[MediaStream] Sync video preview layer and parent layer sizes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-11-30  Eric Carlson  <eric.carlson@apple.com>
2
3         [MediaStream] Sync video preview layer and parent layer sizes
4         https://bugs.webkit.org/show_bug.cgi?id=165139
5
6         Reviewed by Jer Noble.
7
8         CALayer auto-resizing doesn't work on iOS, so manually reize the video capture preview layer
9         whenever the background layer's bounds change.
10
11         * platform/mediastream/mac/AVVideoCaptureSource.mm:
12         (WebCore::AVVideoSourcePreview::AVVideoSourcePreview): Create layer observer.
13         (WebCore::AVVideoSourcePreview::backgroundLayerBoundsChanged): Sync preview layer and background
14           layer sizes.
15         (WebCore::AVVideoSourcePreview::invalidate): Invalidate and clear observer.
16         (-[WebCoreAVVideoCaptureSourceObserver initWithParent:]):
17         (-[WebCoreAVVideoCaptureSourceObserver setParent:]): Add KVO bounds observer.
18         (-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]): Call
19         parent when "bounds" changes.
20         (-[WebCoreAVVideoCaptureSourceObserver actionForKey:]): Return nil to disable all animations.
21
22 2016-11-30  Dave Hyatt  <hyatt@apple.com>
23
24         [CSS Parser] Fix crash in -webkit-shape-outside parsing
25         https://bugs.webkit.org/show_bug.cgi?id=165202
26
27         Reviewed by Dean Jackson.
28
29         * css/CSSBasicShapes.cpp:
30         (WebCore::buildSerializablePositionOffset):
31         The old parser never passed in a singleton value ID for top/right/bottom/left.
32         The new parser does, and it exposed a bug in the serialization code for
33         shapes that didn't properly create the offset primitive value as a percentage
34         in those cases.
35
36 2016-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>
37
38         [GLIB] IndexedDB: Switch to use new encoder for IDBKeyData
39         https://bugs.webkit.org/show_bug.cgi?id=165191
40
41         Reviewed by Sergio Villar Senin.
42
43         Instead of using KeyedEncoder.
44
45         * Modules/indexeddb/server/IDBSerialization.cpp:
46         (WebCore::isLegacySerializedIDBKeyData): Helper function to check whether the given data were encoded with
47         KeyedEncoder or not.
48         (WebCore::serializedTypeForKeyType): Remove #ifdefs for CF and always use the new encoder.
49         (WebCore::encodeKey): Ditto.
50         (WebCore::serializeIDBKeyData): Ditto.
51         (WebCore::decodeKey): Ditto.
52         (WebCore::deserializeIDBKeyData): Ditto.
53
54 2016-11-30  Joseph Pecoraro  <pecoraro@apple.com>
55
56         Web Inspector: Null ResourceResponse Preflight requests cause crash
57         https://bugs.webkit.org/show_bug.cgi?id=165120
58         <rdar://problem/27911350>
59
60         Reviewed by Brian Burg.
61
62         * loader/CrossOriginPreflightChecker.cpp:
63         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
64         Only inform Web Inspector about successful responses. Informing with a
65         null response would break the expected Inspector API contract when
66         notifying about did receive response. Also, when informing Web Inspector
67         include a didFinishLoading event so the frontend knows this pre-flight
68         request is complete.
69
70 2016-11-30  Brady Eidson  <beidson@apple.com>
71
72         REGRESSION (209086): IDB tests crash under GuardMalloc.
73         https://bugs.webkit.org/show_bug.cgi?id=165201
74
75         Reviewed by Chris Dumez.
76
77         No new tests (Covered by literally every IDB test when run under GuardMalloc).
78
79         * Modules/indexeddb/IDBTransaction.cpp:
80         (WebCore::IDBTransaction::commitOnServer): "Commit on Server" operations are special, in that they
81           are the last operation a transaction does, and they remove themselves from the protector map right away.
82           So when we remove them from the protector map we also need to remove their raw-pointer from the 
83           "in-progress" queue.
84
85 2016-11-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
86
87         Some animated image do not animate after reseting their animations
88         https://bugs.webkit.org/show_bug.cgi?id=165131
89
90         Reviewed by Simon Fraser.
91
92         Test: fast/images/reset-image-animation.html
93
94         The bug happens because the ImageFrameCache does not reset its cached
95         frames properly when the BitmapImage rests its animation.
96
97         -- We need to ignore caching the new NativeImage of an ImageFrame if the
98         decoding thread is terminated after asynchronously calling  
99         cacheFrameNativeImageAtIndex() on the main thread through callOnMainThread().
100         Although the decoding thread was terminated this call is still scheduled
101         to be executed later on the main thread.
102
103         -- We need to open the m_frameRequestQueue before starting a new decoding
104         thread. Opening m_frameRequestQueue clears the enqueued requests from the 
105         previous decoding thread and allows enqueueing requests for the new thread.
106
107         -- We need to clear the ImageFrames which were being decoded at the time
108         the decoding queue was closing and their new NativeImages were not cached.
109
110         * platform/graphics/ImageFrameCache.cpp:
111         (WebCore::ImageFrameCache::cacheFrameNativeImageAtIndex): Assert the NativeImage
112         is cached for an ImageFrame which is still being decoded.
113
114         (WebCore::ImageFrameCache::startAsyncDecodingQueue): Open the m_frameRequestQueue
115         before starting the decoding thread. Don't cache the NativeImage of an ImageFrame
116         unless the decoding thread is still alive and it the same as the one that makes
117         the asynchronous call to cacheFrameNativeImageAtIndex().
118         
119         (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Don't request an
120         image frame to be be asynchronously decoded if it is already being decoded.
121         
122         (WebCore::ImageFrameCache::stopAsyncDecodingQueue): Clear the ImageFrames that
123         were being decoded when the decoding thread terminates.
124         
125         * testing/Internals.cpp:
126         (WebCore::Internals::resetImageAnimation):
127         * testing/Internals.h:
128         * testing/Internals.idl:
129         Expose BitmapImage::resetAnimation() through Internals so tests can force it.
130
131 2016-11-30  Darin Adler  <darin@apple.com>
132
133         Streamline and speed up tokenizer and segmented string classes
134         https://bugs.webkit.org/show_bug.cgi?id=165003
135
136         Reviewed by Sam Weinig.
137
138         Profiling Speedometer on my iMac showed the tokenizer as one of the
139         hottest functions. This patch streamlines the segmented string class,
140         removing various unused features, and also improves some other functions
141         seen on the Speedometer profile. On my iMac I measured a speedup of
142         about 3%. Changes include:
143
144         - Removed m_pushedChar1, m_pushedChar2, and m_empty data members from the
145           SegmentedString class and all the code that used to handle them.
146
147         - Simplified the SegmentedString advance functions so they are small
148           enough to get inlined in the HTML tokenizer.
149
150         - Updated callers to call the simpler SegmentedString advance functions
151           that don't handle newlines in as many cases as possible.
152
153         - Cut down on allocations of SegmentedString and made code move the
154           segmented string and the strings that are moved into it rather than
155           copying them whenever possible.
156
157         - Simplified segmented string functions, removing some branches, mostly
158           from the non-fast paths.
159
160         - Removed small unused functions and small functions used in only one
161           or two places, made more functions private and renamed for clarity.
162
163         * bindings/js/JSHTMLDocumentCustom.cpp:
164         (WebCore::documentWrite): Moved a little more of the common code in here
165         from the two functions belwo. Removed obsolete comment saying this was not
166         following the DOM specification because it is. Removed unneeded special
167         cases for 1 argument and no arguments. Take a reference instead of a pointer.
168         (WebCore::JSHTMLDocument::write): Updated for above.
169         (WebCore::JSHTMLDocument::writeln): Ditto.
170
171         * css/parser/CSSTokenizer.cpp: Added now-needed include.
172         * css/parser/CSSTokenizer.h: Removed unneeded include.
173
174         * css/parser/CSSTokenizerInputStream.h: Added definition of kEndOfFileMarker
175         here; this is now separate from the use in the HTMLParser. In the long run,
176         unclear to me whether it is really needed in either.
177
178         * dom/Document.cpp:
179         (WebCore::Document::prepareToWrite): Added. Helper function used by the three
180         different variants of write. Using this may prevent us from having to construct
181         a SegmentedString just to append one string after future refactoring.
182         (WebCore::Document::write): Updated to take an rvalue reference and move the
183         value through.
184         (WebCore::Document::writeln): Use a single write call instead of two.
185
186         * dom/Document.h: Changed write to take an rvalue reference to SegmentedString
187         rather than a const reference.
188
189         * dom/DocumentParser.h: Changed insert to take an rvalue reference to
190         SegmentedString. In the future, should probably overload to take a single
191         string since that is the normal case.
192
193         * dom/RawDataDocumentParser.h: Updated for change to DocumentParser.
194
195         * html/FTPDirectoryDocument.cpp:
196         (WebCore::FTPDirectoryDocumentParser::append): Refactored a bit, just enough
197         so that we don't need an assignment operator for SegmentedString that can
198         copy a String.
199
200         * html/parser/HTMLDocumentParser.cpp:
201         (WebCore::HTMLDocumentParser::insert): Updated to take an rvalue reference,
202         and move the value through.
203         * html/parser/HTMLDocumentParser.h: Updated for the above.
204
205         * html/parser/HTMLEntityParser.cpp:
206         (WebCore::HTMLEntityParser::consumeNamedEntity): Updated for name changes.
207         Changed the twao calls to advance here to call advancePastNonNewline; no
208         change in behavior, but asserts what the code was assuming before, that the
209         character was not a newline.
210
211         * html/parser/HTMLInputStream.h:
212         (WebCore::HTMLInputStream::appendToEnd): Updated to take an rvalue reference,
213         and move the value through.
214         (WebCore::HTMLInputStream::insertAtCurrentInsertionPoint): Ditto.
215         (WebCore::HTMLInputStream::markEndOfFile): Removed the code to construct a
216         SegmentedString, overkill since we can just append an individual string.
217         (WebCore::HTMLInputStream::splitInto): Rewrote the move idiom here to actually
218         use move, which will reduce reference count churn and other unneeded work.
219
220         * html/parser/HTMLMetaCharsetParser.cpp:
221         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Removed unneeded
222         construction of a SegmentedString, just to append a string.
223
224         * html/parser/HTMLSourceTracker.cpp:
225         (WebCore::HTMLSourceTracker::HTMLSourceTracker): Moved to the class definition.
226         (WebCore::HTMLSourceTracker::source): Updated for function name change.
227         * html/parser/HTMLSourceTracker.h: Updated for above.
228
229         * html/parser/HTMLTokenizer.cpp: Added now-needed include.
230         (WebCore::HTMLTokenizer::emitAndResumeInDataState): Use advancePastNonNewline,
231         since this function is never called in response to a newline character.
232         (WebCore::HTMLTokenizer::commitToPartialEndTag): Ditto.
233         (WebCore::HTMLTokenizer::commitToCompleteEndTag): Ditto.
234         (WebCore::HTMLTokenizer::processToken): Use ADVANCE_PAST_NON_NEWLINE_TO macro
235         instead of ADVANCE_TO in cases where the character we are advancing past is
236         known not to be a newline, so we can use the more efficient advance function
237         that doesn't check for the newline character.
238
239         * html/parser/InputStreamPreprocessor.h: Moved kEndOfFileMarker to
240         SegmentedString.h; not sure that's a good place for it either. In the long run,
241         unclear to me whether this is really needed.
242         (WebCore::InputStreamPreprocessor::peek): Added UNLIKELY for the empty check.
243         Added LIKELY for the not-special character check.
244         (WebCore::InputStreamPreprocessor::advance): Updated for the new name of the
245         advanceAndUpdateLineNumber function.
246         (WebCore::InputStreamPreprocessor::advancePastNonNewline): Added. More
247         efficient than advance for cases where the last characer is known not to be
248         a newline character.
249         (WebCore::InputStreamPreprocessor::skipNextNewLine): Deleted. Was unused.
250         (WebCore::InputStreamPreprocessor::reset): Deleted. Was unused except in the
251         constructor; added initial values for the data members to replace.
252         (WebCore::InputStreamPreprocessor::processNextInputCharacter): Removed long
253         FIXME comment that didn't really need to be here. Reorganized a bit.
254         (WebCore::InputStreamPreprocessor::isAtEndOfFile): Renamed and made static.
255
256         * html/track/BufferedLineReader.cpp:
257         (WebCore::BufferedLineReader::nextLine): Updated to not use the poorly named
258         scanCharacter function to advance past a newline. Also renamed from getLine
259         and changed to return Optional<String> instead of using a boolean to indicate
260         failure and an out argument.
261
262         * html/track/BufferedLineReader.h:
263         (WebCore::BufferedLineReader::BufferedLineReader): Use the default, putting
264         initial values on each data member below.
265         (WebCore::BufferedLineReader::append): Updated to take an rvalue reference,
266         and move the value through.
267         (WebCore::BufferedLineReader::scanCharacter): Deleted. Was poorly named,
268         and easy to replace with two lines of code at its two call sites.
269         (WebCore::BufferedLineReader::reset): Rewrote to correctly clear all the
270         data members of the class, not just the segmented string.
271
272         * html/track/InbandGenericTextTrack.cpp:
273         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Updated to take
274         an rvalue reference and move the value through.
275         * html/track/InbandGenericTextTrack.h: Updated for the above.
276
277         * html/track/InbandTextTrack.h: Updated since parseWebVTTFileHeader now
278         takes an rvalue reference.
279
280         * html/track/WebVTTParser.cpp:
281         (WebCore::WebVTTParser::parseFileHeader): Updated to take an rvalue reference
282         and move the value through.
283         (WebCore::WebVTTParser::parseBytes): Updated to pass ownership of the string
284         in to the line reader append function.
285         (WebCore::WebVTTParser::parseCueData): Use auto and WTFMove for WebVTTCueData.
286         (WebCore::WebVTTParser::flush): More of the same.
287         (WebCore::WebVTTParser::parse): Changed to use nextLine instead of getLine.
288         * html/track/WebVTTParser.h: Updated for the above.
289
290         * html/track/WebVTTTokenizer.cpp:
291         (WebCore::advanceAndEmitToken): Use advanceAndUpdateLineNumber by its new
292         name, just advance. No change in behavior.
293         (WebCore::WebVTTTokenizer::WebVTTTokenizer): Pass a String, not a
294         SegmentedString, to add the end of file marker.
295
296         * platform/graphics/InbandTextTrackPrivateClient.h: Updated since
297         parseWebVTTFileHeader takes an rvalue reference.
298
299         * platform/text/SegmentedString.cpp:
300         (WebCore::SegmentedString::Substring::appendTo): Moved here from the header.
301         The only caller is SegmentedString::toString, inside this file.
302         (WebCore::SegmentedString::SegmentedString): Deleted the copy constructor.
303         No longer needed.
304         (WebCore::SegmentedString::operator=): Defined a move assignment operator
305         rather than an ordinary assignment operator, since that's what the call
306         sites really need.
307         (WebCore::SegmentedString::length): Simplified since we no longer need to
308         support pushed characters.
309         (WebCore::SegmentedString::setExcludeLineNumbers): Simplified, since we
310         can just iterate m_otherSubstrings without an extra check. Also changed to
311         write directly to the data member of Substring instead of using a function.
312         (WebCore::SegmentedString::updateAdvanceFunctionPointersForEmptyString):
313         Added. Used when we run out of characters.
314         (WebCore::SegmentedString::clear): Removed code to clear now-deleted members.
315         Updated for changes to other member names.
316         (WebCore::SegmentedString::appendSubstring): Renamed from just append to
317         avoid ambiguity with the public append function. Changed to take an rvalue
318         reference, and move in, and added code to set m_currentCharacter properly,
319         so the caller doesn't have to deal with that.
320         (WebCore::SegmentedString::close): Updated to use m_isClosed by its new name.
321         Also removed unneeded comment about assertion that fires when trying to close
322         an already closed string.
323         (WebCore::SegmentedString::append): Added overloads for rvalue references of
324         both entire SegmentedString objects and of String. Streamlined to just call
325         appendSubstring and append to the deque.
326         (WebCore::SegmentedString::pushBack): Tightened up since we don't allow empty
327         strings and changed to take just a string, not an entire segmented string.
328         (WebCore::SegmentedString::advanceSubstring): Moved logic into the
329         advancePastSingleCharacterSubstringWithoutUpdatingLineNumber function.
330         (WebCore::SegmentedString::toString): Simplified now that we don't need to
331         support pushed characters.
332         (WebCore::SegmentedString::advancePastNonNewlines): Deleted.
333         (WebCore::SegmentedString::advance8): Deleted.
334         (WebCore::SegmentedString::advanceWithoutUpdatingLineNumber16): Renamed from
335         advance16. Simplified now that there are no pushed characters. Also changed to
336         access data members of m_currentSubstring directly instead of calling a function.
337         (WebCore::SegmentedString::advanceAndUpdateLineNumber8): Deleted.
338         (WebCore::SegmentedString::advanceAndUpdateLineNumber16): Ditto.
339         (WebCore::SegmentedString::advancePastSingleCharacterSubstringWithoutUpdatingLineNumber):
340         Renamed from advanceSlowCase. Removed uneeded logic to handle pushed characters.
341         Moved code in here from advanceSubstring.
342         (WebCore::SegmentedString::advancePastSingleCharacterSubstring): Renamed from
343         advanceAndUpdateLineNumberSlowCase. Simplified by calling the function above.
344         (WebCore::SegmentedString::advanceEmpty): Broke assertion up into two.
345         (WebCore::SegmentedString::updateSlowCaseFunctionPointers): Updated for name changes.
346         (WebCore::SegmentedString::advancePastSlowCase): Changed name and meaning of
347         boolean argument. Rewrote to use the String class less; it's now used only when
348         we fail to match after the first character rather than being used for the actual
349         comparison with the literal.
350
351         * platform/text/SegmentedString.h: Moved all non-trivial function bodies out of
352         the class definition to make things easier to read. Moved the SegmentedSubstring
353         class inside the SegmentedString class, making it a private struct named Substring.
354         Removed the m_ prefix from data members of the struct, removed many functions from
355         the struct and made its union be anonymous instead of naming it m_data. Removed
356         unneeded StringBuilder.h include.
357         (WebCore::SegmentedString::isEmpty): Changed to use the length of the substring
358         instead of a separate boolean. We never create an empty substring, nor leave one
359         in place as the current substring unless the entire segmented string is empty.
360         (WebCore::SegmentedString::advancePast): Updated to use the new member function
361         template instead of a non-template member function. The new member function is
362         entirely rewritten and does the matching directly rather than allocating a string
363         just to do prefix matching.
364         (WebCore::SegmentedString::advancePastLettersIgnoringASCIICase): Renamed to make
365         it clear that the literal must be all non-letters or lowercase letters as with
366         the other "letters ignoring ASCII case" functions. The three call sites all fit
367         the bill. Implement by calling the new function template.
368         (WebCore::SegmentedString::currentCharacter): Renamed from currentChar.
369         (WebCore::SegmentedString::Substring::Substring): Use an rvalue reference and
370         move the string in.
371         (WebCore::SegmentedString::Substring::currentCharacter): Simplified since this
372         is never used on an empty substring.
373         (WebCore::SegmentedString::Substring::incrementAndGetCurrentCharacter): Ditto.
374         (WebCore::SegmentedString::SegmentedString): Overload to take an rvalue reference.
375         Simplified since there are now fewer data members.
376         (WebCore::SegmentedString::advanceWithoutUpdatingLineNumber): Renamed from
377         advance, since this is only safe to use if there is some reason it is OK to skip
378         updating the line number.
379         (WebCore::SegmentedString::advance): Renamed from advanceAndUpdateLineNumber,
380         since doing that is the normal desired behavior and not worth mentioning in the
381         public function name.
382         (WebCore::SegmentedString::advancePastNewline): Renamed from
383         advancePastNewlineAndUpdateLineNumber.
384         (WebCore::SegmentedString::numberOfCharactersConsumed): Greatly simplified since
385         pushed characters are no longer supported.
386         (WebCore::SegmentedString::characterMismatch): Added. Used by advancePast.
387
388         * xml/parser/CharacterReferenceParserInlines.h:
389         (WebCore::unconsumeCharacters): Use toString rather than toStringPreserveCapacity
390         because the SegmentedString is going to take ownership of the string.
391         (WebCore::consumeCharacterReference): Updated to use the pushBack that takes just
392         a String, not a SegmentedString. Also use advancePastNonNewline.
393
394         * xml/parser/MarkupTokenizerInlines.h: Added ADVANCE_PAST_NON_NEWLINE_TO.
395
396         * xml/parser/XMLDocumentParser.cpp:
397         (WebCore::XMLDocumentParser::insert): Updated since this takes an rvalue reference.
398         (WebCore::XMLDocumentParser::append): Removed unnecessary code to create a
399         SegmentedString.
400         * xml/parser/XMLDocumentParser.h: Updated for above. Also fixed indentation
401         and initialized most data members.
402         * xml/parser/XMLDocumentParserLibxml2.cpp:
403         (WebCore::XMLDocumentParser::XMLDocumentParser): Moved most data member
404         initialization into the class definition.
405         (WebCore::XMLDocumentParser::resumeParsing): Removed code that copied a
406         segmented string, but converted the whole thing into a string before using it.
407         Now we convert to a string right away.
408
409 2016-11-30  Csaba Osztrogonác  <ossy@webkit.org>
410
411         Unreviewed speculative cmake buildfix after r209070.
412
413         * PlatformMac.cmake: New sources added.
414
415 2016-11-29  Philippe Normand  <pnormand@igalia.com>
416
417         [WebRTC][OpenWebRTC] Temporary device selection support
418         https://bugs.webkit.org/show_bug.cgi?id=165141
419
420         Reviewed by Alejandro G. Castro.
421
422         Make sure the player handles only one audio and video track at
423         most for now. The device choice can be influenced with the
424         WEBKIT_VIDEO_DEVICE and WEBKIT_AUDIO_DEVICE environment variables.
425         Each variable optionally holds the name of the device to use.
426
427         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
428         (WebCore::MediaPlayerPrivateGStreamerOwr::play):
429         (WebCore::MediaPlayerPrivateGStreamerOwr::load):
430
431 2016-11-29  Claudio Saavedra  <csaavedra@igalia.com>
432
433         Build fix with !HAVE(ACCESSIBILITY)
434
435         * accessibility/AXObjectCache.h:
436         (WebCore::AccessibilityReplacedText::AccessibilityReplacedText):
437         (WebCore::AccessibilityReplacedText::postTextStateChangeNotification):
438
439         Add dummy implementations.
440
441 2016-11-29  Commit Queue  <commit-queue@webkit.org>
442
443         Unreviewed, rolling out r209058 and r209074.
444         https://bugs.webkit.org/show_bug.cgi?id=165188
445
446         These changes caused API test StringBuilderTest.Equal to crash
447         and/or fail. (Requested by ryanhaddad on #webkit).
448
449         Reverted changesets:
450
451         "Streamline and speed up tokenizer and segmented string
452         classes"
453         https://bugs.webkit.org/show_bug.cgi?id=165003
454         http://trac.webkit.org/changeset/209058
455
456         "REGRESSION (r209058): API test StringBuilderTest.Equal
457         crashing"
458         https://bugs.webkit.org/show_bug.cgi?id=165142
459         http://trac.webkit.org/changeset/209074
460
461 2016-11-29  Nan Wang  <n_wang@apple.com>
462
463         AX: ARIA tree & treeitem roles & aria-expanded state not spoken to VoiceOver iOS 10
464         https://bugs.webkit.org/show_bug.cgi?id=164936
465         <rdar://problem/29334274>
466
467         Reviewed by Chris Fleizach.
468
469         Added a new container type on iOS for trees. Also, since the treeitem role is ignored
470         on iOS, we should expose the expanded status of a treeitem to its accessible children.
471
472         Test: accessibility/ios-simulator/treeitem-expanded.html
473
474         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
475         (-[WebAccessibilityObjectWrapper _accessibilityTreeAncestor]):
476         (-[WebAccessibilityObjectWrapper treeItemParentForObject:]):
477         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
478         (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
479
480 2016-11-29  Chris Dumez  <cdumez@apple.com>
481
482         Unreviewed, rolling out r209096, r209104, and r209114.
483
484         Caused over 200 layout test failures on the bots
485
486         Reverted changesets:
487
488         "IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite
489         backend."
490         https://bugs.webkit.org/show_bug.cgi?id=164974
491         http://trac.webkit.org/changeset/209096
492
493         "Followup to:"
494         https://bugs.webkit.org/show_bug.cgi?id=164974
495         http://trac.webkit.org/changeset/209104
496
497         "REGRESSION (r209104): storage/indexeddb/modern/gc-closes-
498         database(-private).html timeout."
499         https://bugs.webkit.org/show_bug.cgi?id=165186
500         http://trac.webkit.org/changeset/209114
501
502 2016-11-29  Antoine Quint  <graouts@apple.com>
503
504         [Modern Media Controls] Localization
505         https://bugs.webkit.org/show_bug.cgi?id=165176
506
507         Reviewed by Dean Jackson.
508
509         We add a new localization file for the purpose of modern media controls, since we may
510         require different strings than the legacy one.
511
512         * English.lproj/modern-media-controls-localized-strings.js: Added.
513         * Modules/modern-media-controls/controls/airplay-placard.js:
514         (AirplayPlacard):
515         * Modules/modern-media-controls/controls/pip-placard.js:
516         (PiPPlacard):
517         * Modules/modern-media-controls/main.js:
518         (UIString):
519         * Modules/modern-media-controls/media/status-support.js:
520         (StatusSupport.prototype.syncControl):
521         (StatusSupport):
522         * WebCore.xcodeproj/project.pbxproj:
523         * rendering/RenderThemeMac.mm:
524         (WebCore::RenderThemeMac::mediaControlsScript):
525
526 2016-11-29  Antoine Quint  <graouts@apple.com>
527
528         [Modern Media Controls] Show an invalid placard when we fail to load a media file
529         https://bugs.webkit.org/show_bug.cgi?id=165180
530
531         Reviewed by Dean Jackson.
532
533         We now show a placard with an "invalid" icon when we fail to load the media file.
534
535         Tests: media/modern-media-controls/invalid-placard/invalid-placard.html
536                media/modern-media-controls/placard-support/placard-support-error.html
537
538         * Modules/modern-media-controls/controls/icon-service.js:
539         * Modules/modern-media-controls/controls/invalid-placard.js: Added.
540         (InvalidPlacard):
541         * Modules/modern-media-controls/controls/media-controls.js:
542         (MediaControls.prototype.get showsStartButton):
543         (MediaControls.prototype.set showsStartButton):
544         (MediaControls.prototype.get showsPlacard):
545         (MediaControls.prototype.hidePlacard):
546         (MediaControls.prototype._invalidateChildren):
547         * Modules/modern-media-controls/controls/placard.css:
548         (.placard .icon):
549         * Modules/modern-media-controls/images/iOS/invalid-placard@1x.png: Added.
550         * Modules/modern-media-controls/images/iOS/invalid-placard@2x.png: Added.
551         * Modules/modern-media-controls/images/iOS/invalid-placard@3x.png: Added.
552         * Modules/modern-media-controls/images/macOS/invalid-placard@1x.png: Added.
553         * Modules/modern-media-controls/images/macOS/invalid-placard@2x.png: Added.
554         * Modules/modern-media-controls/js-files:
555         * Modules/modern-media-controls/media/placard-support.js:
556         (PlacardSupport.prototype.get mediaEvents):
557         (PlacardSupport.prototype._updatePlacard):
558         (PlacardSupport):
559         * WebCore.xcodeproj/project.pbxproj:
560
561 2016-11-29  Antoine Quint  <graouts@apple.com>
562
563         [Modern Media Controls] Only show controls when the controls attribute is set
564         https://bugs.webkit.org/show_bug.cgi?id=165175
565
566         We now respect the value of the media's "controls" attribute so that the start button and the controls
567         bar are only shown when that attribute is set to "true".
568
569         Reviewed by Dean Jackson.
570
571         Tests: media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio.html
572                media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off.html
573                media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html
574                media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html
575                media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html
576
577         * Modules/modern-media-controls/controls/controls-bar.js: Added.
578         (ControlsBar):
579         * Modules/modern-media-controls/controls/media-controls.js:
580         (MediaControls.): Deleted.
581         * Modules/modern-media-controls/js-files:
582         * Modules/modern-media-controls/media/controls-visibility-support.js: Added.
583         (ControlsVisibilitySupport):
584         (ControlsVisibilitySupport.prototype.destroy):
585         (ControlsVisibilitySupport.prototype.get mediaEvents):
586         (ControlsVisibilitySupport.prototype.syncControl):
587         * Modules/modern-media-controls/media/media-controller-support.js:
588         (MediaControllerSupport):
589         (MediaControllerSupport.prototype.handleEvent):
590         * Modules/modern-media-controls/media/media-controller.js:
591         (MediaController.prototype._updateControlsIfNeeded):
592         * WebCore.xcodeproj/project.pbxproj:
593
594 2016-11-29  Brady Eidson  <beidson@apple.com>
595
596         Followup to:
597         IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite backend.
598         https://bugs.webkit.org/show_bug.cgi?id=164974
599
600         Unreviewed.
601
602         * Modules/indexeddb/IDBTransaction.h: Until I can explore further why these operations
603           are not protected in the map, change these raw pointers to RefPtrs.
604           This fixes issues seen under GuardMalloc.
605
606 2016-11-29  Antoine Quint  <graouts@apple.com>
607
608         [Modern Media Controls] Inline controls show when entering fullscreen
609         https://bugs.webkit.org/show_bug.cgi?id=165161
610
611         Reviewed by Dean Jackson.
612
613         We would error when entering fullscreen due to the TracksSupport having its destroy() method
614         called when tearing down the inline controls and the `mediaController` reference being incorrect.
615
616         * Modules/modern-media-controls/media/tracks-support.js:
617         (TracksSupport.prototype.destroy):
618
619 2016-11-29  Antoine Quint  <graouts@apple.com>
620
621         [Modern Media Controls] Status text stuck saying "Loading" after media starts playing
622         https://bugs.webkit.org/show_bug.cgi?id=165162
623
624         Reviewed by Dean Jackson.
625
626         We forgot to handle the case where none of the special messages need to be set and the
627         status text should be just an empty string, meaning there is no status text shown in the
628         controls bar and the scrubber appears instead.
629
630         Test: media/modern-media-controls/status-support/status-support-playing.html
631
632         * Modules/modern-media-controls/media/status-support.js:
633         (StatusSupport.prototype.syncControl):
634         (StatusSupport):
635
636 2016-11-29  Brady Eidson  <beidson@apple.com>
637
638         IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite backend.
639         https://bugs.webkit.org/show_bug.cgi?id=164974
640
641         Reviewed by Alex Christensen.
642
643         No new tests (No behavior change other than being faster).
644
645         Instead of building new SQLiteStatements from scratch each time they're needed and then
646         finalizing them after used for a single operation, cache them.
647
648         For tests that do puts and/or gets in tight loops, this shows up as a 5%-20% speedup on profiles.
649
650         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
651         (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
652         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
653         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
654         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
655         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
656         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
657         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
658         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
659         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
660         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
661         (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
662         (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
663         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
664         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
665         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
666         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
667         (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
668         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
669         (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
670         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
671         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
672         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
673         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
674         (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement):
675         (WebCore::IDBServer::SQLiteIDBBackingStore::closeSQLiteDB):
676         (WebCore::IDBServer::queryForGetAllObjectStoreRecords): Deleted.
677         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
678
679 2016-11-22  Jiewen Tan  <jiewen_tan@apple.com>
680
681         Update SubtleCrypto::sign to match the latest spec
682         https://bugs.webkit.org/show_bug.cgi?id=164740
683         <rdar://problem/29257864>
684
685         Reviewed by Brent Fulgham.
686
687         This patch does following few things:
688         1. It updates the SubtleCrypto::sign method to match the latest spec:
689            https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-sign.
690            It also refers to the latest Editor's Draft to a certain degree:
691            https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-sign.
692         2. It implements sign operations of the following algorithms: HMAC, and
693            RSASSA-PKCS1-V1_5.
694         3. It also replaces promise.copyRef() with WTFMove(promise) for all the
695            capture lists of exception callbacks in promise functions.
696
697         Tests: crypto/subtle/hmac-import-key-sign-sha1.html
698                crypto/subtle/hmac-import-key-sign-sha224.html
699                crypto/subtle/hmac-import-key-sign-sha256.html
700                crypto/subtle/hmac-import-key-sign-sha384.html
701                crypto/subtle/hmac-import-key-sign-sha512.html
702                crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha1.html
703                crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha224.html
704                crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha256.html
705                crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha384.html
706                crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha512.html
707                crypto/subtle/sign-malformed-parameters.html
708                crypto/workers/subtle/hmac-import-key-sign.html
709                crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-sign.html
710
711         * bindings/js/JSSubtleCryptoCustom.cpp:
712         (WebCore::normalizeCryptoAlgorithmParameters):
713         (WebCore::jsSubtleCryptoFunctionDecryptPromise):
714         Fix a minor bug.
715         (WebCore::jsSubtleCryptoFunctionEncryptPromise):
716         (WebCore::jsSubtleCryptoFunctionDecryptPromise):
717         (WebCore::jsSubtleCryptoFunctionSignPromise):
718         (WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
719         (WebCore::jsSubtleCryptoFunctionImportKeyPromise):
720         (WebCore::jsSubtleCryptoFunctionExportKeyPromise):
721         (WebCore::JSSubtleCrypto::sign):
722         * crypto/CryptoAlgorithm.cpp:
723         (WebCore::CryptoAlgorithm::sign):
724         * crypto/CryptoAlgorithm.h:
725         * crypto/SubtleCrypto.idl:
726         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
727         (WebCore::CryptoAlgorithmHMAC::sign):
728         * crypto/algorithms/CryptoAlgorithmHMAC.h:
729         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
730         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
731         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
732         * crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
733         (WebCore::CryptoAlgorithmHMAC::platformSign):
734         * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
735         (WebCore::CryptoAlgorithmHMAC::platformSign):
736         * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
737         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
738         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
739         (WebCore::commonCryptoHMACAlgorithm):
740         (WebCore::calculateSignature):
741         Remove a null guardance since the depending bug is resolved.
742         (WebCore::CryptoAlgorithmHMAC::platformSign):
743         (WebCore::CryptoAlgorithmHMAC::platformVerify):
744         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
745         (WebCore::signRSASSA_PKCS1_v1_5):
746         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
747
748 2016-11-29  Chris Dumez  <cdumez@apple.com>
749
750         Can't download move.simple.com direct deposit transition PDF: Non user-triggered activations of anchors that have a download attribute are ignored
751         https://bugs.webkit.org/show_bug.cgi?id=165148
752         <rdar://problem/29421771>
753
754         Reviewed by Daniel Bates.
755
756         We were ignoring non user-triggered activations of anchors that have a
757         download attribute which is stricter than Chrome and Firefox and breaks
758         downloads on move.simple.com. This patch relaxes our policy to allow
759         simulated clicks on such links, similarly to other browsers.
760
761         Web authors can anyway already trigger downloads using script by setting
762         window.location to a specific URL and serving to right HTTP headers to
763         trigger a download.
764
765         Note that our previous behavior matches the current version of the
766         specification so I also filed a bug against the HTML specification to
767         see if we can get it changed to match the behavior of browsers:
768         - https://github.com/whatwg/html/issues/2116
769
770         No new tests, updated existing test.
771
772         * html/HTMLAnchorElement.cpp:
773         (WebCore::HTMLAnchorElement::handleClick):
774
775 2016-11-29  Andy Estes  <aestes@apple.com>
776
777         [Cocoa] Enable two clang warnings recommended by Xcode
778         https://bugs.webkit.org/show_bug.cgi?id=164498
779
780         Reviewed by Mark Lam.
781
782         * Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.
783
784 2016-11-29  Wenson Hsieh  <wenson_hsieh@apple.com>
785
786         Address post-review feedback following r209070 (AppKit momentum scrolling adoption for scroll snapping)
787         https://bugs.webkit.org/show_bug.cgi?id=165147
788
789         Reviewed by Simon Fraser.
790
791         Addresses some additional review feedback after r209070, which adopts _NSScrollingMomentumCalculator for scroll
792         snapping. See individual changes below for more details. No new tests, since there is no behavior change.
793
794         * page/EventHandler.cpp:
795         (WebCore::handleWheelEventInAppropriateEnclosingBox):
796         (WebCore::EventHandler::defaultWheelEventHandler):
797         * page/Page.cpp:
798         (WebCore::Page::ensureTestTrigger):
799         * page/WheelEventDeltaFilter.cpp:
800         (WebCore::WheelEventDeltaFilter::filteredVelocity):
801         * page/WheelEventDeltaFilter.h:
802         * page/mac/WheelEventDeltaFilterMac.mm:
803         (WebCore::WheelEventDeltaFilterMac::updateFromDelta):
804         * page/scrolling/AsyncScrollingCoordinator.cpp:
805         (WebCore::AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView):
806         * page/scrolling/AsyncScrollingCoordinator.h:
807         * page/scrolling/ScrollingCoordinator.h:
808         (WebCore::ScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView):
809
810         Rather than force a complete layout pass when the Page first acquires a WheelEventTestTrigger, we now simply
811         have the scrolling coordinator update its frame node to expect a wheel event test trigger.
812
813         * page/scrolling/ScrollingMomentumCalculator.cpp:
814         (WebCore::ScrollingMomentumCalculator::ScrollingMomentumCalculator):
815         (WebCore::ScrollingMomentumCalculator::create):
816         (WebCore::BasicScrollingMomentumCalculator::BasicScrollingMomentumCalculator):
817         (WebCore::BasicScrollingMomentumCalculator::scrollOffsetAfterElapsedTime):
818         (WebCore::BasicScrollingMomentumCalculator::animationDuration):
819         (WebCore::BasicScrollingMomentumCalculator::initializeSnapProgressCurve):
820         (WebCore::BasicScrollingMomentumCalculator::animationProgressAfterElapsedTime):
821         * page/scrolling/ScrollingMomentumCalculator.h:
822         * page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
823         * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
824         (WebCore::ScrollingMomentumCalculator::create):
825         (WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
826         (WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
827         (WebCore::ScrollingMomentumCalculatorMac::animationDuration):
828         (WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):
829         * platform/PlatformWheelEvent.h:
830         (WebCore::PlatformWheelEvent::copyWithDeltasAndVelocity):
831         (WebCore::PlatformWheelEvent::scrollingVelocity):
832
833         Change scrolling velocity in PlatformWheelEvent to be a FloatSize instead of a FloatPoint. This change
834         propagates to the ScrollController, where state variables and arguments pertaining to scrolling velocity are
835         also now sizes instead of points.
836
837         * platform/cocoa/ScrollController.h:
838         * platform/cocoa/ScrollController.mm:
839         (WebCore::ScrollController::scheduleStatelessScrollSnap):
840         * platform/cocoa/ScrollSnapAnimatorState.h:
841         * platform/cocoa/ScrollSnapAnimatorState.mm:
842         (WebCore::ScrollSnapAnimatorState::transitionToGlideAnimationState):
843         (WebCore::ScrollSnapAnimatorState::setupAnimationForState):
844         (WebCore::ScrollSnapAnimatorState::teardownAnimationForState):
845         (WebCore::ScrollSnapAnimatorState::currentAnimatedScrollOffset):
846
847         Refactor elapsed time to be Seconds instead of double. Additionally, use MonotonicTime::now() instead of
848         monotonicallyIncreasingTime(), and MonotonicTime instead of double for keeping track of the start time.
849
850         * platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:
851
852 2016-11-29  Brady Eidson  <beidson@apple.com>
853
854         IndexedDB 2.0: The client's transaction operation queue should flush as much to the server as possible.
855         https://bugs.webkit.org/show_bug.cgi?id=164932
856
857         Reviewed by Alex Christensen.
858
859         No new tests (No new test necessary, covered extensively by all existing tests).
860
861         Profiles showed that on tests with lots of rapid IDBRequests in a row, both the main thread and database 
862         threads were largely idle.
863
864         The explanation was simple. Currently the client IDBTransaction queues up operations and only vends them out 
865         to the server 1 at a time, waiting for the previous operation to complete.
866
867         While some operations do need to wait for the server to reply, by making the change to send most operations 
868         (all operations with an associated IDBRequest) to the server without waiting we get rid of most of the idleness.
869
870         It is possible we can find a few other types of operations to send without waiting, but we haven't yet seen any
871         test case where they would show up on profiles.
872
873         Sending more than one operation at a time was actually a very small part of this change.
874         As many "edge case" regression tests revealed, we also needed to start having IDBTransaction track all of their
875         "in progress" operations such that they could be aborted on the client side in exceptional circumstances.
876
877         * Modules/indexeddb/IDBTransaction.cpp:
878         (WebCore::IDBTransaction::abortInProgressOperations): Abort's all in-progress operations (ones that have already
879           been sent to the server)
880         (WebCore::IDBTransaction::abortOnServerAndCancelRequests): Abort in-progress operations before pending ones.
881         (WebCore::IDBTransaction::operationTimerFired): If we just started an operation with an associated IDBRequest,
882           schedule the timer to send another one right away.
883         (WebCore::IDBTransaction::operationDidComplete):
884         (WebCore::IDBTransaction::connectionClosedFromServer): Abort in-progress operations before pending ones.
885         * Modules/indexeddb/IDBTransaction.h:
886
887         * Modules/indexeddb/client/TransactionOperation.cpp:
888         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
889         * Modules/indexeddb/client/TransactionOperation.h:
890         (WebCore::IDBClient::TransactionOperation::completed):
891         (WebCore::IDBClient::TransactionOperation::hasIDBRequest):
892
893 2016-11-29  Dave Hyatt  <hyatt@apple.com>
894
895         [CSS Parser] Fix ::cue parsing
896         https://bugs.webkit.org/show_bug.cgi?id=165152
897
898         Reviewed by Zalan Bujtas.
899
900         * css/parser/CSSParserValues.h:
901         (WebCore::CSSParserSelector::setPseudoElementType):
902         * css/parser/CSSSelectorParser.cpp:
903         (WebCore::isOnlyPseudoClassFunction):
904         (WebCore::isOnlyPseudoElementFunction):
905         (WebCore::CSSSelectorParser::consumePseudo):
906         (WebCore::isPseudoClassFunction): Deleted.
907         (WebCore::isPseudoElementFunction): Deleted.
908
909 2016-11-28  Gavin Barraclough  <barraclough@apple.com>
910
911         HTMLMediaElement::updateVolume should updateIsPlayingMedia
912         https://bugs.webkit.org/show_bug.cgi?id=165132
913
914         Reviewed by Darin Adler & Jer Noble.
915
916         HTMLMediaElement::mediaState takes the volume into account when determining whether media
917         is playing (audio is not considered to be playing if volume is 0). As such, any change to
918         the volume may require mediaState to be recomputed.
919
920         * html/HTMLMediaElement.cpp:
921         (WebCore::HTMLMediaElement::updateVolume):
922
923 2016-11-29  Daniel Bates  <dabates@apple.com>
924
925         Avoid ref-count churn in ShadowParseContext::commitColor()
926         https://bugs.webkit.org/show_bug.cgi?id=165125
927
928         Reviewed by Simon Fraser.
929
930         Avoid ref-count churn in ShadowParseContext::commitColor() by moving the passed
931         color into its instance variable.
932
933         Also modified ShadowParseContext::commitColor() to take a Ref<> instead of a
934         RefPtr<> because it is never passed a nullptr.
935
936         * css/parser/CSSParser.cpp:
937         (WebCore::ShadowParseContext::commitColor):
938
939 2016-11-29  Daniel Bates  <dabates@apple.com>
940
941         Avoid ref-count churn in CSSParser::ValueWithCalculation::setCalculation()
942         https://bugs.webkit.org/show_bug.cgi?id=165127
943
944         Reviewed by Simon Fraser.
945
946         Use WTFMove() to move the passed RefPtr into CSSParser::ValueWithCalculation::m_calculation
947         instead of copying it.
948
949         * css/parser/CSSParser.h:
950         (WebCore::CSSParser::ValueWithCalculation::setCalculation):
951
952 2016-11-29  Daniel Bates  <dabates@apple.com>
953
954         CryptoAlgorithm::generateKey() should take lvalue reference to const CryptoAlgorithmParameters
955         https://bugs.webkit.org/show_bug.cgi?id=165111
956
957         Reviewed by Darin Adler.
958
959         CryptoAlgorithm::generateKey() and its overrides always expect to receive a non-null pointer
960         to a CryptoAlgorithmParameter object and never take ownership of it. This kind of relationship
961         is best expressed by modifying CryptoAlgorithm::generateKey() to take a lvalue reference to
962         a const CryptoAlgorithmParameter object.
963
964         * bindings/js/JSSubtleCryptoCustom.cpp:
965         (WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
966         * crypto/CryptoAlgorithm.cpp:
967         (WebCore::CryptoAlgorithm::generateKey):
968         * crypto/CryptoAlgorithm.h:
969         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
970         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
971         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
972         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
973         (WebCore::CryptoAlgorithmAES_KW::generateKey):
974         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
975         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
976         (WebCore::CryptoAlgorithmHMAC::generateKey):
977         * crypto/algorithms/CryptoAlgorithmHMAC.h:
978         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
979         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
980         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
981         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
982         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
983         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
984         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
985         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
986         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
987
988 2016-11-29  Andy Estes  <aestes@apple.com>
989
990         window.name leaks information across domains
991         https://bugs.webkit.org/show_bug.cgi?id=158216
992         <rdar://problem/14548481>
993
994         Reviewed by Brent Fulgham.
995
996         When updating the history after a cross-origin navigation, the HTML Standard says:
997
998         "If the browsing context is a top-level browsing context, but not an auxiliary browsing
999         context, then set the browsing context's name to the empty string."
1000
1001         https://html.spec.whatwg.org/multipage/browsers.html#resetBCName
1002
1003         Tests: http/tests/security/window-name-after-cross-origin-aux-frame-navigation.html
1004                http/tests/security/window-name-after-cross-origin-main-frame-navigation.html
1005                http/tests/security/window-name-after-cross-origin-sub-frame-navigation.html
1006                http/tests/security/window-name-after-same-origin-aux-frame-navigation.html
1007                http/tests/security/window-name-after-same-origin-main-frame-navigation.html
1008                http/tests/security/window-name-after-same-origin-sub-frame-navigation.html
1009
1010         * loader/FrameLoader.cpp:
1011         (WebCore::shouldClearWindowName): Returns true if frame is a main frame with no opener and
1012         newDocument does not have the same origin as the frame's current document.
1013         (WebCore::FrameLoader::clear): Changed to set m_frame's name to nullAtom if
1014         clearWindowProperties and shouldClearWindowName() are true.
1015         * page/SecurityOrigin.cpp:
1016         (WebCore::SecurityOrigin::canAccessStorage): Changed to call isSameOriginAs() and check
1017         m_universalAccess.
1018         (WebCore::SecurityOrigin::isSameOriginAs): Renamed from isThirdParty(); removed the check
1019         for m_universalAccess.
1020         (WebCore::SecurityOrigin::isThirdParty): Renamed to isSameOriginAs().
1021         * page/SecurityOrigin.h: Renamed isThirdParty() to isSameOriginAs() and made it public.
1022
1023 2016-11-29  Dave Hyatt  <hyatt@apple.com>
1024
1025         [CSS Parser] Fix parsing of "all" in transitions
1026         https://bugs.webkit.org/show_bug.cgi?id=165144
1027
1028         Reviewed by Dean Jackson.
1029
1030         * css/parser/CSSPropertyParser.cpp:
1031         (WebCore::consumeTransitionProperty):
1032
1033 2016-11-29  Dave Hyatt  <hyatt@apple.com>
1034
1035         [CSS Parser] Fix @page rule parsing
1036         https://bugs.webkit.org/show_bug.cgi?id=165143
1037
1038         Reviewed by Zalan Bujtas.
1039
1040         * css/parser/CSSParserImpl.cpp:
1041         (WebCore::CSSParserImpl::parsePageSelector):
1042
1043 2016-11-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1044
1045         Unreviewed, fix the build after r209070
1046
1047         -[ScrollingMomentumCalculatorMac calculateToReachDestination] is only available on Sierra.
1048
1049         * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
1050         (WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):
1051         * platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:
1052
1053 2016-11-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1054
1055         Scroll snapping on Mac should use AppKit animations
1056         https://bugs.webkit.org/show_bug.cgi?id=147261
1057         <rdar://problem/29395293>
1058
1059         Reviewed by Brent Fulgham.
1060
1061         Refactors the scroll snapping animation logic to support arbitrary scrolling momentum calculators and
1062         introduces ScrollingMomentumCalculatorMac, which wraps AppKit's _NSScrollingMomentumCalculator. On macOS El
1063         Capitan and later, we use the platform scrolling momentum calculator and for all other cases, we fall back to
1064         the preexissting platform-invariant momentum calculator.
1065
1066         Previously, the scroll snapping animation logic was shared between the ScrollSnapAnimatorState and
1067         ScrollController -- namely, the ScrollController would update various parameters of the ScrollSnapAnimatorState
1068         and then tell it to compute animation-specific constants and coefficients. After this patch, ScrollController
1069         will no longer directly set the ScrollSnapAnimatorState's member variables. Instead, it will tell the animator
1070         state to transition to a new ScrollSnapState with the necessary parameters, and the ScrollSnapAnimatorState is
1071         responsible for modifying itself accordingly. Furthermore, logic pertaining to computing animated scroll offsets
1072         is now split out into a new ScrollingMomentumCalculator, which may have different platform-dependent
1073         implementations. The correct calculator is initialized via ScrollingMomentumCalculator::create, which currently
1074         returns a ScrollingMomentumCalculatorMac on El Capitan and later, and a BasicScrollingMomentumCalculator
1075         otherwise.
1076
1077         The new abstracted ScrollingMomentumCalculator is initialized with various parameters describing the scrolled
1078         content and viewport, as well as the initial and target scrolling offsets. The momentum calculator is then able
1079         to compute the animated scroll offset at any given elapsed time, as well as the total duration of the snapping
1080         animation. The ScrollController's scroll snap timer uses this information (via the ScrollSnapAnimatorState) to
1081         animate its client's scroll offset during a snap or glide.
1082
1083         Also reenables 8 failing and/or flaky scroll snapping tests and adds a new layout test. This patch addresses
1084         two causes for failures and flakiness in these scroll snapping tests:
1085
1086         1.  When starting or stopping the scroll snap animation timer, we call deferTestsForReason and
1087             removeTestDeferralForReason, respectively. These were actually noops for the first simulated scroll gesture
1088             on each of the failing mainframe scrolling tests due to m_expectsWheelEventTestTrigger being false. This
1089             member variable is updated when AsyncScrollingCoordinator::frameViewLayoutUpdated is invoked, wherein we
1090             call ScrollingStateFrameScrollingNode::setExpectsWheelEventTestTrigger(true) when the test has started
1091             monitoring wheel events. However, if this does not happen before scrolling begins in the test (which is the
1092             case here), then the mainframe scrolling node will not expect a wheel event test trigger even though
1093             eventSender.monitorWheelEvents() has been called. To fix this, we simply make the Page trigger a layout of
1094             the main FrameView when first ensuring the wheel event test trigger on the Page.
1095
1096         2.  The second reason for flakiness affects both overflow and mainframe scrolling. Previously, due to the way
1097             we would wait for multiple momentum scroll events before starting to glide, we would end up starting the
1098             scroll snap timer for a snapping animation, stopping it, and then starting it again for the glide animation.
1099             Thus, if the wheel event test trigger's timer fires right after the scroll snap timer stops and before it
1100             starts again due to a glide animation, it will erroneously think that scroll snapping is complete, even
1101             though it's only just about to begin! Now that we know scrolling velocity when we receive the initial
1102             "momentum begin", we now directly transition the scroll snap state from a snapping state to a gliding state
1103             and no longer stop and start the timer during this transition, which means that the test trigger will be
1104             deferred for at least the entire duration of the scroll snapping animation (starting right after the first
1105             "drag end" wheel event).
1106
1107         Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-vertical-then-horizontal.html
1108
1109         * WebCore.xcodeproj/project.pbxproj:
1110         * page/EventHandler.cpp:
1111         (WebCore::handleWheelEventInAppropriateEnclosingBox):
1112         (WebCore::EventHandler::defaultWheelEventHandler):
1113         * page/Page.cpp:
1114         (WebCore::Page::ensureTestTrigger):
1115
1116         Addresses test failures by forcing the mainframe scrolling node to expect wheel event test triggers.
1117
1118         * page/WheelEventDeltaFilter.cpp:
1119         (WebCore::WheelEventDeltaFilter::create):
1120         (WebCore::WheelEventDeltaFilter::filteredVelocity):
1121         * page/WheelEventDeltaFilter.h:
1122         * page/mac/WheelEventDeltaFilterMac.mm:
1123         (WebCore::WheelEventDeltaFilterMac::updateFromDelta):
1124
1125         Add support for plumbing filtered scrolling velocity over to the ScrollController.
1126
1127         * page/scrolling/ScrollingMomentumCalculator.cpp: Copied from Source/WebCore/platform/cocoa/ScrollSnapAnimatorState.mm.
1128         (WebCore::ScrollingMomentumCalculator::ScrollingMomentumCalculator):
1129         (WebCore::ScrollingMomentumCalculator::create):
1130
1131         Creates a platform-independent BasicScrollingMomentumCalculator.
1132
1133         (WebCore::BasicScrollingMomentumCalculator::BasicScrollingMomentumCalculator):
1134         (WebCore::BasicScrollingMomentumCalculator::linearlyInterpolatedOffsetAtProgress):
1135         (WebCore::BasicScrollingMomentumCalculator::cubicallyInterpolatedOffsetAtProgress):
1136         (WebCore::BasicScrollingMomentumCalculator::scrollOffsetAfterElapsedTime):
1137         (WebCore::BasicScrollingMomentumCalculator::animationDuration):
1138         (WebCore::BasicScrollingMomentumCalculator::initializeInterpolationCoefficientsIfNecessary):
1139         (WebCore::BasicScrollingMomentumCalculator::initializeSnapProgressCurve):
1140         (WebCore::BasicScrollingMomentumCalculator::animationProgressAfterElapsedTime):
1141
1142         Interpolation logic ported over from ScrollSnapAnimatorState.
1143
1144         * page/scrolling/ScrollingMomentumCalculator.h: Added.
1145         (WebCore::ScrollingMomentumCalculator::~ScrollingMomentumCalculator):
1146         * page/scrolling/mac/ScrollingMomentumCalculatorMac.h: Copied from Source/WebCore/page/WheelEventDeltaFilter.h.
1147         * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: Added.
1148         (WebCore::ScrollingMomentumCalculator::create):
1149
1150         Creates a ScrollingMomentumCalculatorMac.
1151
1152         (WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
1153         (WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
1154         (WebCore::ScrollingMomentumCalculatorMac::animationDuration):
1155         (WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):
1156         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1157         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1158         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffset):
1159         (WebCore::ScrollingTreeFrameScrollingNodeMac::viewportSize):
1160         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Deleted.
1161         * platform/PlatformWheelEvent.h:
1162         (WebCore::PlatformWheelEvent::copyWithDeltasAndVelocity):
1163         (WebCore::PlatformWheelEvent::scrollingVelocity):
1164         (WebCore::PlatformWheelEvent::copyWithDeltas): Deleted.
1165         * platform/ScrollAnimator.cpp:
1166         (WebCore::ScrollAnimator::scrollOffset):
1167         (WebCore::ScrollAnimator::viewportSize):
1168         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Deleted.
1169         * platform/ScrollAnimator.h:
1170         * platform/cocoa/ScrollController.h:
1171         * platform/cocoa/ScrollController.mm:
1172         (WebCore::otherScrollEventAxis):
1173         (WebCore::ScrollController::ScrollController):
1174         (WebCore::ScrollController::shouldOverrideInertialScrolling):
1175         (WebCore::ScrollController::scheduleStatelessScrollSnap):
1176         (WebCore::ScrollController::statelessSnapTransitionTimerFired):
1177         (WebCore::ScrollController::startDeferringTestsDueToScrollSnapping):
1178         (WebCore::ScrollController::stopDeferringTestsDueToScrollSnapping):
1179         (WebCore::ScrollController::processWheelEventForScrollSnap):
1180         (WebCore::ScrollController::updateScrollSnapState):
1181         (WebCore::ScrollController::updateScrollSnapPoints):
1182
1183         Update the ScrollController's ScrollSnapAnimationState for both vertical and horizontal axes. If both axes lack
1184         any snap points, the pointer to the animation state will be nulled out; otherwise, the animation state will
1185         exist.
1186
1187         (WebCore::ScrollController::startScrollSnapTimer):
1188         (WebCore::ScrollController::stopScrollSnapTimer):
1189         (WebCore::ScrollController::scrollSnapTimerFired):
1190         (WebCore::ScrollController::activeScrollSnapIndexForAxis):
1191         (WebCore::ScrollController::setActiveScrollSnapIndexForAxis):
1192         (WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset):
1193         (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset):
1194         (WebCore::ScrollController::scrollSnapPointState): Deleted.
1195         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Deleted.
1196         (WebCore::ScrollController::shouldOverrideWheelEvent): Deleted.
1197         (WebCore::projectedInertialScrollDistance): Deleted.
1198         (WebCore::ScrollController::beginScrollSnapAnimation): Deleted.
1199         (WebCore::ScrollController::endScrollSnapAnimation): Deleted.
1200         (WebCore::ScrollController::initializeScrollSnapAnimationParameters): Deleted.
1201         (WebCore::ScrollController::isSnappingOnAxis): Deleted.
1202         * platform/cocoa/ScrollSnapAnimatorState.h:
1203         (WebCore::ScrollSnapAnimatorState::snapOffsetsForAxis):
1204         (WebCore::ScrollSnapAnimatorState::setSnapOffsetsForAxis):
1205         (WebCore::ScrollSnapAnimatorState::currentState):
1206         (WebCore::ScrollSnapAnimatorState::activeSnapIndexForAxis):
1207         (WebCore::ScrollSnapAnimatorState::setActiveSnapIndexForAxis):
1208         * platform/cocoa/ScrollSnapAnimatorState.mm:
1209         (WebCore::projectedInertialScrollDistance):
1210         (WebCore::ScrollSnapAnimatorState::transitionToSnapAnimationState):
1211         (WebCore::ScrollSnapAnimatorState::transitionToGlideAnimationState):
1212         (WebCore::ScrollSnapAnimatorState::transitionToUserInteractionState):
1213         (WebCore::ScrollSnapAnimatorState::transitionToDestinationReachedState):
1214
1215         These methods are used to update the ScrollSnapAnimationState. These state transitions should (and do)
1216         encapsulate all changes that need to be made to the animation state; in other words, the ScrollController should
1217         no longer be reaching directly into the ScrollSnapAnimatorState to change member variables.
1218
1219         (WebCore::ScrollSnapAnimatorState::setupAnimationForState):
1220         (WebCore::ScrollSnapAnimatorState::teardownAnimationForState):
1221         (WebCore::ScrollSnapAnimatorState::currentAnimatedScrollOffset):
1222         (WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset):
1223         (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Deleted.
1224         (WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta): Deleted.
1225         (WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta): Deleted.
1226         (WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow): Deleted.
1227         (WebCore::ScrollSnapAnimatorState::isSnapping): Deleted.
1228         (WebCore::ScrollSnapAnimatorState::canReachTargetWithCurrentInitialScrollDelta): Deleted.
1229         (WebCore::ScrollSnapAnimatorState::wheelDeltaTrackingIsInProgress): Deleted.
1230         (WebCore::ScrollSnapAnimatorState::hasFinishedTrackingWheelDeltas): Deleted.
1231         (WebCore::ScrollSnapAnimatorState::interpolatedOffsetAtProgress): Deleted.
1232         (WebCore::ScrollSnapAnimationCurveState::initializeSnapProgressCurve): Deleted.
1233         (WebCore::ScrollSnapAnimationCurveState::initializeInterpolationCoefficientsIfNecessary): Deleted.
1234         (WebCore::ScrollSnapAnimationCurveState::interpolatedPositionAtProgress): Deleted.
1235         (WebCore::ScrollSnapAnimationCurveState::shouldCompleteSnapAnimationImmediatelyAtTime): Deleted.
1236         (WebCore::ScrollSnapAnimationCurveState::animationProgressAtTime): Deleted.
1237
1238         The ScrollSnapAnimatorState now tracks state across both axes. This simplifies coordinating scroll snapping in
1239         both horizontal and vertical axes and fixes the issue of the scroll offset not snapping when performing a scroll
1240         in one direction without momentum, then scrolling with momentum in the other direction in a single gesture.
1241
1242         * platform/spi/mac/NSScrollingMomentumCalculatorSPI.h: Added.
1243
1244 2016-11-29  Brady Eidson  <beidson@apple.com>
1245
1246         IndexedDB 2.0: Queue up completed requests in the client, handle them one by one.
1247         https://bugs.webkit.org/show_bug.cgi?id=165000
1248
1249         Reviewed by Alex Christensen.
1250
1251         No new tests (Covered extensively by every existing test).
1252
1253         Currently when a TransactionOperation completes on the server, it immediately completes
1254         itself on the client side, including scheduling an event dispatch if necessary.
1255         
1256         This patch changes it so that "server completed operations" instead queue up in the 
1257         IDBTransaction and are "client-side completed" asynchronously, 1-by-1.
1258         
1259         Currently this is a "no behavior change" because only one operation is ever sent to
1260         the server at a time.
1261         
1262         But that will change with https://webkit.org/b/164932
1263         And this patch is a pre-requisite for that.
1264         
1265         * Modules/indexeddb/IDBRequest.cpp:
1266         (WebCore::IDBRequest::dispatchEvent):
1267         (WebCore::IDBRequest::didOpenOrIterateCursor):
1268         (WebCore::IDBRequest::completeRequestAndDispatchEvent):
1269         (WebCore::IDBRequest::requestCompleted): Deleted.
1270         * Modules/indexeddb/IDBRequest.h:
1271         
1272         * Modules/indexeddb/IDBTransaction.cpp:
1273         (WebCore::IDBTransaction::IDBTransaction):
1274         (WebCore::IDBTransaction::internalAbort):
1275         (WebCore::IDBTransaction::abortOnServerAndCancelRequests):
1276         (WebCore::IDBTransaction::scheduleOperation):
1277         (WebCore::IDBTransaction::schedulePendingOperationTimer):
1278         (WebCore::IDBTransaction::pendingOperationTimerFired):
1279         (WebCore::IDBTransaction::operationCompletedOnServer):
1280         (WebCore::IDBTransaction::scheduleCompletedOperationTimer):
1281         (WebCore::IDBTransaction::completedOperationTimerFired):
1282         (WebCore::IDBTransaction::completeNoncursorRequest):
1283         (WebCore::IDBTransaction::completeCursorRequest):
1284         (WebCore::IDBTransaction::finishedDispatchEventForRequest):
1285         (WebCore::IDBTransaction::didStart):
1286         (WebCore::IDBTransaction::didOpenCursorOnServer):
1287         (WebCore::IDBTransaction::didIterateCursorOnServer):
1288         (WebCore::IDBTransaction::didGetAllRecordsOnServer):
1289         (WebCore::IDBTransaction::didGetRecordOnServer):
1290         (WebCore::IDBTransaction::didGetCountOnServer):
1291         (WebCore::IDBTransaction::didDeleteRecordOnServer):
1292         (WebCore::IDBTransaction::didClearObjectStoreOnServer):
1293         (WebCore::IDBTransaction::putOrAddOnServer):
1294         (WebCore::IDBTransaction::didPutOrAddOnServer):
1295         (WebCore::IDBTransaction::operationCompletedOnClient):
1296         (WebCore::IDBTransaction::deactivate):
1297         (WebCore::IDBTransaction::connectionClosedFromServer):
1298         (WebCore::IDBTransaction::scheduleOperationTimer): Deleted.
1299         (WebCore::IDBTransaction::operationTimerFired): Deleted.
1300         (WebCore::IDBTransaction::operationDidComplete): Deleted.
1301         * Modules/indexeddb/IDBTransaction.h:
1302         
1303         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
1304         (WebCore::IDBClient::IDBConnectionProxy::completeOperation):
1305         
1306         * Modules/indexeddb/client/TransactionOperation.cpp:
1307         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
1308         * Modules/indexeddb/client/TransactionOperation.h:
1309         (WebCore::IDBClient::TransactionOperation::transitionToCompleteOnThisThread):
1310         (WebCore::IDBClient::TransactionOperation::transitionToComplete):
1311         (WebCore::IDBClient::TransactionOperation::doComplete):
1312         (WebCore::IDBClient::TransactionOperation::idbRequest):
1313         (WebCore::IDBClient::TransactionOperation::performCompleteOnOriginThread): Deleted.
1314         (WebCore::IDBClient::TransactionOperation::completed): Deleted.
1315
1316 2016-11-29  Zalan Bujtas  <zalan@apple.com>
1317
1318         Safari (WebKit) doesn't wrap element within flex when width comes below min-width
1319         https://bugs.webkit.org/show_bug.cgi?id=136041
1320         <rdar://problem/25569370>
1321
1322         Reviewed by Darin Adler.
1323
1324         While figuring out whether a particular flex item fits the current line, we need to take
1325         the min-width into account too. This matches both FF and Chrome behaviour.
1326
1327         Tests: fast/flexbox/flex-wrap-when-min-widht-is-set-1.html
1328                fast/flexbox/flex-wrap-when-min-widht-is-set-2.html
1329
1330         * rendering/RenderFlexibleBox.cpp:
1331         (WebCore::RenderFlexibleBox::computeNextFlexLine):
1332
1333 2016-11-29  Antti Koivisto  <antti@apple.com>
1334
1335         Try to fix win/gtk build.
1336
1337         * style/StyleUpdate.h:
1338         (WebCore::Style::ElementUpdate::ElementUpdate):
1339
1340             Add explicit constructor for compilers that don't support C++14 list initialization correctly.
1341
1342 2016-11-28  Antti Koivisto  <antti@apple.com>
1343
1344         Slotted nodes ignore transition
1345         https://bugs.webkit.org/show_bug.cgi?id=160866
1346         <rdar://problem/29231901>
1347
1348         Reviewed by Sam Weinig.
1349
1350         The problem is that slot (display:contents) always triggers full render tree rebuild when something
1351         changes in the slotted subtree. This causes animation to jump to end (may be another bug).
1352
1353         Test: fast/shadow-dom/shadow-host-transition.html
1354
1355         * style/RenderTreeUpdater.cpp:
1356         (WebCore::RenderTreeUpdater::updateElementRenderer):
1357         (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
1358         * style/StyleChange.h:
1359
1360             Rearrange so the strongest ('Detach') is the highest.
1361
1362         * style/StyleTreeResolver.cpp:
1363         (WebCore::Style::TreeResolver::resolveElement):
1364         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
1365
1366             If style was display:contents and stays that way, use 'Inherit' StyleChange which doesn't force render tree rebuild.
1367             Refactor more of the functionality to createAnimatedElementUpdate.
1368
1369         * style/StyleTreeResolver.h:
1370
1371 2016-11-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1372
1373         [GTK] Crash in WebCore::PlatformDisplayX11::supportsXComposite when running under Wayland
1374         https://bugs.webkit.org/show_bug.cgi?id=164917
1375
1376         Reviewed by Michael Catanzaro.
1377
1378         WebKitGTK+ appplications are expected to call gtk_init(), because WebKitGTK+, like GTK+ itself, requires a
1379         display to work. We currently fallback to create a X11 display when X11 is enabled in cases where GTK+ doesn't
1380         have a default display (gtk_init() wasn't called or failed). That's why we end up creating an X11 display under
1381         Wayland when both Wayland and X11 option are enabled. The code assumes X11 display creation will always work if
1382         X11 is enabled, but that's not true now that we support also Wayland at runtime. So, we should try to get a
1383         native display before creating the PlatformDisplay. Rendering will not work in any case when gtk_init() is not
1384         called, but in most of the cases those applications are not actually going to render anything, so this way at
1385         least we will not crash.
1386
1387         * platform/graphics/PlatformDisplay.cpp:
1388         (WebCore::PlatformDisplay::createPlatformDisplay): Use create() method for X11 and Wayland if we couldn't get a
1389         native display from GTK+. If everything fails create a display with no native.
1390         (WebCore::PlatformDisplay::PlatformDisplay): Add NativeDisplayOwned parameter.
1391         * platform/graphics/PlatformDisplay.h:
1392         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1393         (WebCore::PlatformDisplayWayland::create): Try to create a native Wayland display or return nullptr.
1394         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland): Initialize NativeDisplayOwned parameter.
1395         (WebCore::PlatformDisplayWayland::~PlatformDisplayWayland): Destroy the display if owned.
1396         (WebCore::PlatformDisplayWayland::initialize): Return early if native display is nullptr.
1397         * platform/graphics/wayland/PlatformDisplayWayland.h:
1398         * platform/graphics/x11/PlatformDisplayX11.cpp:
1399         (WebCore::PlatformDisplayX11::create): Try to create a native X11 display or return nullptr.
1400         (WebCore::PlatformDisplayX11::PlatformDisplayX11): Use NativeDisplayOwned now.
1401         (WebCore::PlatformDisplayX11::~PlatformDisplayX11): Ditto.
1402         * platform/graphics/x11/PlatformDisplayX11.h:
1403
1404 2016-11-28  Matt Baker  <mattbaker@apple.com>
1405
1406         Web Inspector: Debugger should have an option for showing asynchronous call stacks
1407         https://bugs.webkit.org/show_bug.cgi?id=163230
1408         <rdar://problem/28698683>
1409
1410         Reviewed by Joseph Pecoraro.
1411
1412         Test: inspector/debugger/async-stack-trace.html
1413
1414         * inspector/InspectorInstrumentation.cpp:
1415         (WebCore::didScheduleAsyncCall):
1416         Helper function used by by instrumentation hooks. Informs the debugger
1417         agent that an asynchronous call was scheduled for the current script
1418         execution state.
1419
1420         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
1421         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
1422         (WebCore::InspectorInstrumentation::willFireTimerImpl):
1423         (WebCore::InspectorInstrumentation::didFireTimerImpl):
1424         Asynchronous stack trace plumbing for timers (setTimeout, setInterval).
1425         (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
1426         (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
1427         (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
1428         (WebCore::InspectorInstrumentation::didFireAnimationFrameImpl):
1429         Asynchronous stack trace plumbing for requestAnimationFrame.
1430
1431 2016-11-28  Jiewen Tan  <jiewen_tan@apple.com>
1432
1433         Unreviewed, followup patch after r209059.
1434
1435         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
1436         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
1437         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
1438         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
1439         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
1440         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
1441         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
1442         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
1443         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
1444
1445 2016-11-28  Jiewen Tan  <jiewen_tan@apple.com>
1446
1447         ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html
1448         https://bugs.webkit.org/show_bug.cgi?id=165124
1449         <rdar://problem/29413805>
1450
1451         Reviewed by Daniel Bates.
1452
1453         We should only dereference callbacks after being back to the Document/Worker threads as
1454         it might destroy promises in the work queue which will then trigger the assertion.
1455
1456         Covered by existing tests.
1457
1458         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
1459         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
1460         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
1461         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
1462         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
1463         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
1464         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
1465         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
1466         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
1467
1468 2016-11-28  Darin Adler  <darin@apple.com>
1469
1470         Streamline and speed up tokenizer and segmented string classes
1471         https://bugs.webkit.org/show_bug.cgi?id=165003
1472
1473         Reviewed by Sam Weinig.
1474
1475         Profiling Speedometer on my iMac showed the tokenizer as one of the
1476         hottest functions. This patch streamlines the segmented string class,
1477         removing various unused features, and also improves some other functions
1478         seen on the Speedometer profile. On my iMac I measured a speedup of
1479         about 3%. Changes include:
1480
1481         - Removed m_pushedChar1, m_pushedChar2, and m_empty data members from the
1482           SegmentedString class and all the code that used to handle them.
1483
1484         - Simplified the SegmentedString advance functions so they are small
1485           enough to get inlined in the HTML tokenizer.
1486
1487         - Updated callers to call the simpler SegmentedString advance functions
1488           that don't handle newlines in as many cases as possible.
1489
1490         - Cut down on allocations of SegmentedString and made code move the
1491           segmented string and the strings that are moved into it rather than
1492           copying them whenever possible.
1493
1494         - Simplified segmented string functions, removing some branches, mostly
1495           from the non-fast paths.
1496
1497         - Removed small unused functions and small functions used in only one
1498           or two places, made more functions private and renamed for clarity.
1499
1500         * bindings/js/JSHTMLDocumentCustom.cpp:
1501         (WebCore::documentWrite): Moved a little more of the common code in here
1502         from the two functions belwo. Removed obsolete comment saying this was not
1503         following the DOM specification because it is. Removed unneeded special
1504         cases for 1 argument and no arguments. Take a reference instead of a pointer.
1505         (WebCore::JSHTMLDocument::write): Updated for above.
1506         (WebCore::JSHTMLDocument::writeln): Ditto.
1507
1508         * css/parser/CSSTokenizer.cpp: Added now-needed include.
1509         * css/parser/CSSTokenizer.h: Removed unneeded include.
1510
1511         * css/parser/CSSTokenizerInputStream.h: Added definition of kEndOfFileMarker
1512         here; this is now separate from the use in the HTMLParser. In the long run,
1513         unclear to me whether it is really needed in either.
1514
1515         * dom/Document.cpp:
1516         (WebCore::Document::prepareToWrite): Added. Helper function used by the three
1517         different variants of write. Using this may prevent us from having to construct
1518         a SegmentedString just to append one string after future refactoring.
1519         (WebCore::Document::write): Updated to take an rvalue reference and move the
1520         value through.
1521         (WebCore::Document::writeln): Use a single write call instead of two.
1522
1523         * dom/Document.h: Changed write to take an rvalue reference to SegmentedString
1524         rather than a const reference.
1525
1526         * dom/DocumentParser.h: Changed insert to take an rvalue reference to
1527         SegmentedString. In the future, should probably overload to take a single
1528         string since that is the normal case.
1529
1530         * dom/RawDataDocumentParser.h: Updated for change to DocumentParser.
1531
1532         * html/FTPDirectoryDocument.cpp:
1533         (WebCore::FTPDirectoryDocumentParser::append): Refactored a bit, just enough
1534         so that we don't need an assignment operator for SegmentedString that can
1535         copy a String.
1536
1537         * html/parser/HTMLDocumentParser.cpp:
1538         (WebCore::HTMLDocumentParser::insert): Updated to take an rvalue reference,
1539         and move the value through.
1540         * html/parser/HTMLDocumentParser.h: Updated for the above.
1541
1542         * html/parser/HTMLEntityParser.cpp:
1543         (WebCore::HTMLEntityParser::consumeNamedEntity): Updated for name changes.
1544         Changed the twao calls to advance here to call advancePastNonNewline; no
1545         change in behavior, but asserts what the code was assuming before, that the
1546         character was not a newline.
1547
1548         * html/parser/HTMLInputStream.h:
1549         (WebCore::HTMLInputStream::appendToEnd): Updated to take an rvalue reference,
1550         and move the value through.
1551         (WebCore::HTMLInputStream::insertAtCurrentInsertionPoint): Ditto.
1552         (WebCore::HTMLInputStream::markEndOfFile): Removed the code to construct a
1553         SegmentedString, overkill since we can just append an individual string.
1554         (WebCore::HTMLInputStream::splitInto): Rewrote the move idiom here to actually
1555         use move, which will reduce reference count churn and other unneeded work.
1556
1557         * html/parser/HTMLMetaCharsetParser.cpp:
1558         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Removed unneeded
1559         construction of a SegmentedString, just to append a string.
1560
1561         * html/parser/HTMLSourceTracker.cpp:
1562         (WebCore::HTMLSourceTracker::HTMLSourceTracker): Moved to the class definition.
1563         (WebCore::HTMLSourceTracker::source): Updated for function name change.
1564         * html/parser/HTMLSourceTracker.h: Updated for above.
1565
1566         * html/parser/HTMLTokenizer.cpp: Added now-needed include.
1567         (WebCore::HTMLTokenizer::emitAndResumeInDataState): Use advancePastNonNewline,
1568         since this function is never called in response to a newline character.
1569         (WebCore::HTMLTokenizer::commitToPartialEndTag): Ditto.
1570         (WebCore::HTMLTokenizer::commitToCompleteEndTag): Ditto.
1571         (WebCore::HTMLTokenizer::processToken): Use ADVANCE_PAST_NON_NEWLINE_TO macro
1572         instead of ADVANCE_TO in cases where the character we are advancing past is
1573         known not to be a newline, so we can use the more efficient advance function
1574         that doesn't check for the newline character.
1575
1576         * html/parser/InputStreamPreprocessor.h: Moved kEndOfFileMarker to
1577         SegmentedString.h; not sure that's a good place for it either. In the long run,
1578         unclear to me whether this is really needed.
1579         (WebCore::InputStreamPreprocessor::peek): Added UNLIKELY for the empty check.
1580         Added LIKELY for the not-special character check.
1581         (WebCore::InputStreamPreprocessor::advance): Updated for the new name of the
1582         advanceAndUpdateLineNumber function.
1583         (WebCore::InputStreamPreprocessor::advancePastNonNewline): Added. More
1584         efficient than advance for cases where the last characer is known not to be
1585         a newline character.
1586         (WebCore::InputStreamPreprocessor::skipNextNewLine): Deleted. Was unused.
1587         (WebCore::InputStreamPreprocessor::reset): Deleted. Was unused except in the
1588         constructor; added initial values for the data members to replace.
1589         (WebCore::InputStreamPreprocessor::processNextInputCharacter): Removed long
1590         FIXME comment that didn't really need to be here. Reorganized a bit.
1591         (WebCore::InputStreamPreprocessor::isAtEndOfFile): Renamed and made static.
1592
1593         * html/track/BufferedLineReader.cpp:
1594         (WebCore::BufferedLineReader::nextLine): Updated to not use the poorly named
1595         scanCharacter function to advance past a newline. Also renamed from getLine
1596         and changed to return Optional<String> instead of using a boolean to indicate
1597         failure and an out argument.
1598
1599         * html/track/BufferedLineReader.h:
1600         (WebCore::BufferedLineReader::BufferedLineReader): Use the default, putting
1601         initial values on each data member below.
1602         (WebCore::BufferedLineReader::append): Updated to take an rvalue reference,
1603         and move the value through.
1604         (WebCore::BufferedLineReader::scanCharacter): Deleted. Was poorly named,
1605         and easy to replace with two lines of code at its two call sites.
1606         (WebCore::BufferedLineReader::reset): Rewrote to correctly clear all the
1607         data members of the class, not just the segmented string.
1608
1609         * html/track/InbandGenericTextTrack.cpp:
1610         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Updated to take
1611         an rvalue reference and move the value through.
1612         * html/track/InbandGenericTextTrack.h: Updated for the above.
1613
1614         * html/track/InbandTextTrack.h: Updated since parseWebVTTFileHeader now
1615         takes an rvalue reference.
1616
1617         * html/track/WebVTTParser.cpp:
1618         (WebCore::WebVTTParser::parseFileHeader): Updated to take an rvalue reference
1619         and move the value through.
1620         (WebCore::WebVTTParser::parseBytes): Updated to pass ownership of the string
1621         in to the line reader append function.
1622         (WebCore::WebVTTParser::parseCueData): Use auto and WTFMove for WebVTTCueData.
1623         (WebCore::WebVTTParser::flush): More of the same.
1624         (WebCore::WebVTTParser::parse): Changed to use nextLine instead of getLine.
1625         * html/track/WebVTTParser.h: Updated for the above.
1626
1627         * html/track/WebVTTTokenizer.cpp:
1628         (WebCore::advanceAndEmitToken): Use advanceAndUpdateLineNumber by its new
1629         name, just advance. No change in behavior.
1630         (WebCore::WebVTTTokenizer::WebVTTTokenizer): Pass a String, not a
1631         SegmentedString, to add the end of file marker.
1632
1633         * platform/graphics/InbandTextTrackPrivateClient.h: Updated since
1634         parseWebVTTFileHeader takes an rvalue reference.
1635
1636         * platform/text/SegmentedString.cpp:
1637         (WebCore::SegmentedString::Substring::appendTo): Moved here from the header.
1638         The only caller is SegmentedString::toString, inside this file.
1639         (WebCore::SegmentedString::SegmentedString): Deleted the copy constructor.
1640         No longer needed.
1641         (WebCore::SegmentedString::operator=): Defined a move assignment operator
1642         rather than an ordinary assignment operator, since that's what the call
1643         sites really need.
1644         (WebCore::SegmentedString::length): Simplified since we no longer need to
1645         support pushed characters.
1646         (WebCore::SegmentedString::setExcludeLineNumbers): Simplified, since we
1647         can just iterate m_otherSubstrings without an extra check. Also changed to
1648         write directly to the data member of Substring instead of using a function.
1649         (WebCore::SegmentedString::updateAdvanceFunctionPointersForEmptyString):
1650         Added. Used when we run out of characters.
1651         (WebCore::SegmentedString::clear): Removed code to clear now-deleted members.
1652         Updated for changes to other member names.
1653         (WebCore::SegmentedString::appendSubstring): Renamed from just append to
1654         avoid ambiguity with the public append function. Changed to take an rvalue
1655         reference, and move in, and added code to set m_currentCharacter properly,
1656         so the caller doesn't have to deal with that.
1657         (WebCore::SegmentedString::close): Updated to use m_isClosed by its new name.
1658         Also removed unneeded comment about assertion that fires when trying to close
1659         an already closed string.
1660         (WebCore::SegmentedString::append): Added overloads for rvalue references of
1661         both entire SegmentedString objects and of String. Streamlined to just call
1662         appendSubstring and append to the deque.
1663         (WebCore::SegmentedString::pushBack): Tightened up since we don't allow empty
1664         strings and changed to take just a string, not an entire segmented string.
1665         (WebCore::SegmentedString::advanceSubstring): Moved logic into the
1666         advancePastSingleCharacterSubstringWithoutUpdatingLineNumber function.
1667         (WebCore::SegmentedString::toString): Simplified now that we don't need to
1668         support pushed characters.
1669         (WebCore::SegmentedString::advancePastNonNewlines): Deleted.
1670         (WebCore::SegmentedString::advance8): Deleted.
1671         (WebCore::SegmentedString::advanceWithoutUpdatingLineNumber16): Renamed from
1672         advance16. Simplified now that there are no pushed characters. Also changed to
1673         access data members of m_currentSubstring directly instead of calling a function.
1674         (WebCore::SegmentedString::advanceAndUpdateLineNumber8): Deleted.
1675         (WebCore::SegmentedString::advanceAndUpdateLineNumber16): Ditto.
1676         (WebCore::SegmentedString::advancePastSingleCharacterSubstringWithoutUpdatingLineNumber):
1677         Renamed from advanceSlowCase. Removed uneeded logic to handle pushed characters.
1678         Moved code in here from advanceSubstring.
1679         (WebCore::SegmentedString::advancePastSingleCharacterSubstring): Renamed from
1680         advanceAndUpdateLineNumberSlowCase. Simplified by calling the function above.
1681         (WebCore::SegmentedString::advanceEmpty): Broke assertion up into two.
1682         (WebCore::SegmentedString::updateSlowCaseFunctionPointers): Updated for name changes.
1683         (WebCore::SegmentedString::advancePastSlowCase): Changed name and meaning of
1684         boolean argument. Rewrote to use the String class less; it's now used only when
1685         we fail to match after the first character rather than being used for the actual
1686         comparison with the literal.
1687
1688         * platform/text/SegmentedString.h: Moved all non-trivial function bodies out of
1689         the class definition to make things easier to read. Moved the SegmentedSubstring
1690         class inside the SegmentedString class, making it a private struct named Substring.
1691         Removed the m_ prefix from data members of the struct, removed many functions from
1692         the struct and made its union be anonymous instead of naming it m_data. Removed
1693         unneeded StringBuilder.h include.
1694         (WebCore::SegmentedString::isEmpty): Changed to use the length of the substring
1695         instead of a separate boolean. We never create an empty substring, nor leave one
1696         in place as the current substring unless the entire segmented string is empty.
1697         (WebCore::SegmentedString::advancePast): Updated to use the new member function
1698         template instead of a non-template member function. The new member function is
1699         entirely rewritten and does the matching directly rather than allocating a string
1700         just to do prefix matching.
1701         (WebCore::SegmentedString::advancePastLettersIgnoringASCIICase): Renamed to make
1702         it clear that the literal must be all non-letters or lowercase letters as with
1703         the other "letters ignoring ASCII case" functions. The three call sites all fit
1704         the bill. Implement by calling the new function template.
1705         (WebCore::SegmentedString::currentCharacter): Renamed from currentChar.
1706         (WebCore::SegmentedString::Substring::Substring): Use an rvalue reference and
1707         move the string in.
1708         (WebCore::SegmentedString::Substring::currentCharacter): Simplified since this
1709         is never used on an empty substring.
1710         (WebCore::SegmentedString::Substring::incrementAndGetCurrentCharacter): Ditto.
1711         (WebCore::SegmentedString::SegmentedString): Overload to take an rvalue reference.
1712         Simplified since there are now fewer data members.
1713         (WebCore::SegmentedString::advanceWithoutUpdatingLineNumber): Renamed from
1714         advance, since this is only safe to use if there is some reason it is OK to skip
1715         updating the line number.
1716         (WebCore::SegmentedString::advance): Renamed from advanceAndUpdateLineNumber,
1717         since doing that is the normal desired behavior and not worth mentioning in the
1718         public function name.
1719         (WebCore::SegmentedString::advancePastNewline): Renamed from
1720         advancePastNewlineAndUpdateLineNumber.
1721         (WebCore::SegmentedString::numberOfCharactersConsumed): Greatly simplified since
1722         pushed characters are no longer supported.
1723         (WebCore::SegmentedString::characterMismatch): Added. Used by advancePast.
1724
1725         * xml/parser/CharacterReferenceParserInlines.h:
1726         (WebCore::unconsumeCharacters): Use toString rather than toStringPreserveCapacity
1727         because the SegmentedString is going to take ownership of the string.
1728         (WebCore::consumeCharacterReference): Updated to use the pushBack that takes just
1729         a String, not a SegmentedString. Also use advancePastNonNewline.
1730
1731         * xml/parser/MarkupTokenizerInlines.h: Added ADVANCE_PAST_NON_NEWLINE_TO.
1732
1733         * xml/parser/XMLDocumentParser.cpp:
1734         (WebCore::XMLDocumentParser::insert): Updated since this takes an rvalue reference.
1735         (WebCore::XMLDocumentParser::append): Removed unnecessary code to create a
1736         SegmentedString.
1737         * xml/parser/XMLDocumentParser.h: Updated for above. Also fixed indentation
1738         and initialized most data members.
1739         * xml/parser/XMLDocumentParserLibxml2.cpp:
1740         (WebCore::XMLDocumentParser::XMLDocumentParser): Moved most data member
1741         initialization into the class definition.
1742         (WebCore::XMLDocumentParser::resumeParsing): Removed code that copied a
1743         segmented string, but converted the whole thing into a string before using it.
1744         Now we convert to a string right away.
1745
1746 2016-11-28  Chris Dumez  <cdumez@apple.com>
1747
1748         [iOS] Use UIKit SPI to force popover presentation style on iPhone for html validation popovers
1749         https://bugs.webkit.org/show_bug.cgi?id=165107
1750
1751         Reviewed by Simon Fraser.
1752
1753         Use UIKit SPI to force popover presentation style on iPhone for html validation
1754         popovers as this results in simpler code and achieves the same behavior.
1755
1756         * platform/ValidationBubble.h:
1757         * platform/ios/ValidationBubbleIOS.mm:
1758         (WebCore::ValidationBubble::setAnchorRect):
1759         (-[WebValidationBubbleDelegate adaptivePresentationStyleForPresentationController:traitCollection:]): Deleted.
1760         * platform/spi/ios/UIKitSPI.h:
1761
1762 2016-11-28  Chris Dumez  <cdumez@apple.com>
1763
1764         [Mac] Clicking on an HTML validation bubble should dismiss it
1765         https://bugs.webkit.org/show_bug.cgi?id=165117
1766         <rdar://problem/29409837>
1767
1768         Reviewed by Simon Fraser.
1769
1770         Clicking on an HTML validation bubble should dismiss it. It previously
1771         did nothing.
1772
1773         No new tests, this is not easily testable as EventSender.keyDown() sends
1774         the event to the view, not to a particular screen location.
1775
1776         * platform/mac/ValidationBubbleMac.mm:
1777         (-[WebValidationPopover mouseDown:]):
1778         (WebCore::ValidationBubble::ValidationBubble):
1779
1780 2016-11-27  Sam Weinig  <sam@webkit.org>
1781
1782         Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and drawImage
1783         https://bugs.webkit.org/show_bug.cgi?id=165086
1784
1785         Reviewed by Darin Adler.
1786
1787         * html/canvas/CanvasRenderingContext2D.cpp:
1788         (WebCore::size):
1789         Add overloads of size for each type of CanvasSource.
1790         (WebCore::CanvasRenderingContext2D::drawImage):
1791         (WebCore::CanvasRenderingContext2D::createPattern):
1792         * html/canvas/CanvasRenderingContext2D.h:
1793         * html/canvas/CanvasRenderingContext2D.idl:
1794         Use variants to reduce code duplication and match spec language in drawImage and createPattern.
1795
1796 2016-11-28  Beth Dakin  <bdakin@apple.com>
1797
1798         Blacklist Netflix for TouchBar support
1799         https://bugs.webkit.org/show_bug.cgi?id=165104
1800         -and corresponding-
1801         rdar://problem/29404778
1802
1803         Reviewed by Tim Horton.
1804
1805         This patch moves the algorithm to 
1806         bestMediaElementForShowingPlaybackControlsManager() so that Now Playing can also 
1807         use it.
1808         * html/HTMLMediaElement.cpp:
1809         (WebCore::needsPlaybackControlsManagerQuirk):
1810         (WebCore::HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager):
1811         (WebCore::HTMLMediaElement::updatePlaybackControlsManager):
1812
1813 2016-11-28  Mark Lam  <mark.lam@apple.com>
1814
1815         Fix exception scope verification failures in more miscellaneous files.
1816         https://bugs.webkit.org/show_bug.cgi?id=165102
1817
1818         Reviewed by Saam Barati.
1819
1820         No new tests because these are fixes to failures detected by existing tests when
1821         exception check verification is enabled.
1822
1823         * bindings/js/IDBBindingUtilities.cpp:
1824         (WebCore::toJS):
1825         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1826         (WebCore::getJSListenerFunctions):
1827         * bindings/js/JSCryptoKeySerializationJWK.cpp:
1828         (WebCore::buildJSONForRSAComponents):
1829         (WebCore::addUsagesToJSON):
1830         * bindings/js/JSDOMBinding.h:
1831         (WebCore::toJS):
1832         * bridge/runtime_array.cpp:
1833         (JSC::RuntimeArray::put):
1834
1835 2016-11-28  Dave Hyatt  <hyatt@apple.com>
1836
1837         [CSS Parser] Fix bugs in the @supports parser
1838         https://bugs.webkit.org/show_bug.cgi?id=165115
1839
1840         Reviewed by Zalan Bujtas.
1841
1842         * css/parser/CSSParserFastPaths.cpp:
1843         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1844         Clean up the display property to match the old parser to ensure
1845         that @supports conditions on display are the same.
1846
1847         * css/parser/CSSSupportsParser.cpp:
1848         (WebCore::CSSSupportsParser::consumeCondition):
1849         (WebCore::CSSSupportsParser::consumeNegation):
1850         (WebCore::CSSSupportsParser::consumeConditionInParenthesis):
1851         * css/parser/CSSSupportsParser.h:
1852         What follows are all bugs in Blink that need to be fixed to pass our
1853         tests.
1854
1855         Fix the supports parser to allow the whitespace after not/or/and to
1856         be optional. Allow the whitespace following parenthetical conditions
1857         to be optional.
1858
1859         With whitespace being optional, this means that "not(" will parse
1860         as a FunctionToken type, as will "or(" and "and(". Handle this situation
1861         by checking for FunctionToken along with IdentToken and parameterizing
1862         consumeConditionInParenthesis to do the right thing when it starts with
1863         a FunctionToken instead of an IdentToken.
1864
1865         Fix the general enclosure FunctionToken for forward compatibility to require that
1866         the function still be enclosed within parentheses.
1867
1868 2016-11-28  Mark Lam  <mark.lam@apple.com>
1869
1870         Fix exception scope verification failures in ObjectConstructor.cpp and ObjectPrototype.cpp.
1871         https://bugs.webkit.org/show_bug.cgi?id=165051
1872
1873         Reviewed by Saam Barati.
1874
1875         No new tests because this is covered by the existing test
1876         http/tests/security/cross-frame-access-object-prototype.html with the help of a
1877         new ASSERT in ObjectPrototype.cpp.
1878
1879         Fixed jsDOMWindowGetOwnPropertySlotRestrictedAccess() to return false when it
1880         throws an exception.
1881
1882         * bindings/js/JSDOMWindowCustom.cpp:
1883         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
1884
1885 2016-11-28  Tim Horton  <timothy_horton@apple.com>
1886
1887         Obvious change in saturation/color when swiping to a previously visited page
1888         https://bugs.webkit.org/show_bug.cgi?id=165112
1889         <rdar://problem/29257229>
1890
1891         Reviewed by Simon Fraser.
1892
1893         * platform/graphics/cocoa/IOSurface.mm:
1894         (WebCore::IOSurface::createFromImage):
1895         IOSurface::createFromImage should take into account the colorspace of the
1896         originating image, instead of just hardcoding sRGB.
1897
1898         Otherwise, on a non-sRGB display, the display-space snapshot that we take
1899         for back-forward swipe is converted to sRGB, then the colorspace information
1900         is lost (without a way to maintain it inside the IOSurface), and displayed
1901         as layer contents interpreted as display space (instead of sRGB).
1902
1903 2016-11-28  Chris Dumez  <cdumez@apple.com>
1904
1905         Unreviewed, fix crashes on Yosemite after r209009
1906
1907         NSTextField's maximumNumberOfLines was introduced in ElCapitan so
1908         disable it at compile-time on previous OSes for now.
1909
1910         * platform/mac/ValidationBubbleMac.mm:
1911         (WebCore::ValidationBubble::ValidationBubble):
1912
1913 2016-11-28  Keith Rollin  <krollin@apple.com>
1914
1915         Unreviewed, rolling out r208607.
1916
1917         The actual changes aren't inline with what was requested.
1918
1919         Reverted changeset:
1920
1921         "Reduce number of platformMemoryUsage calls"
1922         https://bugs.webkit.org/show_bug.cgi?id=164375
1923         http://trac.webkit.org/changeset/208607
1924
1925 2016-11-28  Beth Dakin  <bdakin@apple.com>
1926
1927         Blacklist Netflix for TouchBar support
1928         https://bugs.webkit.org/show_bug.cgi?id=165104
1929         -and corresponding-
1930         rdar://problem/29404778
1931
1932         Reviewed by Darin Adler.
1933
1934         * html/HTMLMediaElement.cpp:
1935         (WebCore::needsPlaybackControlsManagerQuirk):
1936         (WebCore::HTMLMediaElement::updatePlaybackControlsManager):
1937
1938 2016-11-28  Chris Dumez  <cdumez@apple.com>
1939
1940         Limit HTML Form validation popovers to 4 lines
1941         https://bugs.webkit.org/show_bug.cgi?id=165098
1942         <rdar://problem/29403286>
1943
1944         Reviewed by Darin Adler.
1945
1946         Limit HTML Form validation popovers to 4 lines as per recent feedback.
1947
1948         * platform/ios/ValidationBubbleIOS.mm:
1949         (WebCore::ValidationBubble::ValidationBubble):
1950         * platform/mac/ValidationBubbleMac.mm:
1951         (WebCore::ValidationBubble::ValidationBubble):
1952
1953 2016-11-28  Dave Hyatt  <hyatt@apple.com>
1954
1955         [CSS Parser] Filters and Reflections Fixes
1956         https://bugs.webkit.org/show_bug.cgi?id=165103
1957
1958         Reviewed by Zalan Bujtas.
1959
1960         * css/parser/CSSPropertyParser.cpp:
1961         (WebCore::consumeReflect):
1962         Support the "none" keyword for box-reflect.
1963
1964         * css/parser/CSSPropertyParserHelpers.cpp:
1965         (WebCore::CSSPropertyParserHelpers::isValidPrimitiveFilterFunction):
1966         (WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
1967         Don't rely on range checking, since invert isn't grouped with the other
1968         function values. Actually check every keyword.
1969
1970 2016-11-28  Brent Fulgham  <bfulgham@apple.com>
1971
1972         ImageData does not match specification
1973         https://bugs.webkit.org/show_bug.cgi?id=164663
1974
1975         Reviewed by Simon Fraser.
1976
1977         The W3C specification https://www.w3.org/TR/2dcontext/ clearly states that
1978         the width and height attributes of the ImageData type should be unsigned.
1979         Our current implementation has signed integer values.
1980
1981         In practice, we have enforced the unsigned requirement by throwing a TypeError
1982         if you attempt to construct an ImageData with negative width or height.
1983
1984         This change simply updates the IDL and impelemntation to match the spec.
1985
1986         Test coverage is already provided by fast/canvas/canvas-imageData.html
1987
1988         * bindings/js/SerializedScriptValue.cpp:
1989         (WebCore::CloneDeserializer::readTerminal): Serialize as uint32_t values.
1990         * html/ImageData.idl: Revise width and height to be unsigned long.
1991
1992 2016-11-28  Dave Hyatt  <hyatt@apple.com>
1993
1994         [CSS Parser] flex-basis should be pixel units not percentages.
1995         https://bugs.webkit.org/show_bug.cgi?id=165100
1996
1997         Reviewed by Zalan Bujtas.
1998
1999         * css/parser/CSSPropertyParser.cpp:
2000         (WebCore::CSSPropertyParser::consumeFlex):
2001
2002 2016-11-28  Daniel Bates  <dabates@apple.com>
2003
2004         Replace CSSPropertyNames.in with a JSON file
2005         https://bugs.webkit.org/show_bug.cgi?id=164691
2006
2007         Reviewed by Simon Fraser.
2008
2009         Convert CSSPropertyNames.in to a structured JSON file. This is the first step towards
2010         exposing a CSS feature status dashboard and generating more of the boilerplate code
2011         for a CSS property.
2012
2013         A side effect of this change is that makeprop.pl no longer detects duplicate CSS property
2014         definitions. We will look to bring such duplication detection back in a subsequent
2015         commit.
2016
2017         * CMakeLists.txt: Substitute CSSProperties.json for CSSPropertyNames.in and update the
2018         invocation of makeprop.pl as we no longer need to pass the bindings/scripts/preprocessor.pm
2019         Perl module. Makeprop.pl supports conditional CSS properties and values without the need
2020         to preprocess CSSProperties.json using the C preprocessor.
2021         * DerivedSources.make: Ditto. Pass WTF_PLATFORM_IOS to makeprop.pl when building for iOS
2022         as we no longer make use of bindings/scripts/preprocessor.pm.
2023         * css/CSSProperties.json: Added.
2024         * css/CSSPropertyNames.in: Removed.
2025         * css/StyleResolver.cpp: Remove variable lastHighPriorityProperty as we now generate it.
2026         * css/makeprop.pl: Extracted the input file name, now CSSProperties.json, into a global variable
2027         and referenced this variable throughout this script instead of hardcoding the input file name at
2028         each call site. Updated code to handle CSS longhand names being encoded in a JSON array as opposed
2029         to a string of '|'-separated values. I added a FIXME comment to do the same for the codegen property
2030         "custom". Fixed Perl uninitialized variable warnings when die()-ing with error "Unknown CSS property
2031         used in all shorthand ..." or "Unknown CSS property used in longhands ...".
2032         (isPropertyEnabled): Added. Determine whether code should be generated for a property.
2033         (addProperty): Added.
2034         (sortByDescendingPriorityAndName): Added.
2035         (getScopeForFunction): Lowercase option names so that we can use a consistent case throughout
2036         the JSON file.
2037         (getNameForMethods): Ditto.
2038         (generateColorValueSetter):
2039         (generateAnimationPropertyInitialValueSetter): Ditto.
2040         (generateAnimationPropertyInheritValueSetter): Ditto.
2041         (generateFillLayerPropertyInitialValueSetter): Ditto.
2042         (generateFillLayerPropertyInheritValueSetter): Ditto.
2043         (generateSetValueStatement): Ditto.
2044         (generateInitialValueSetter): Ditto.
2045         (generateInheritValueSetter): Ditto.
2046         (generateValueSetter): Ditto.
2047
2048 2016-11-28  Dave Hyatt  <hyatt@apple.com>
2049
2050         [CSS Parser] Support -webkit-animation-trigger
2051         https://bugs.webkit.org/show_bug.cgi?id=165095
2052
2053         Reviewed by Zalan Bujtas.
2054
2055         * css/CSSValueKeywords.in:
2056         * css/parser/CSSPropertyParser.cpp:
2057         (WebCore::consumeWebkitAnimationTrigger):
2058         (WebCore::consumeAnimationValue):
2059         (WebCore::CSSPropertyParser::parseSingleValue):
2060
2061 2016-11-28  Antti Koivisto  <antti@apple.com>
2062
2063         Remove FIRST_LINE_INHERITED fake pseudo style
2064         https://bugs.webkit.org/show_bug.cgi?id=165071
2065
2066         Reviewed by Andreas Kling.
2067
2068         These are create during layout an then cached to the RenderStyle. Cache computed first line style to
2069         RenderObject rare data instead, avoiding style mutation an other confusing messiness.
2070
2071         * rendering/RenderElement.cpp:
2072         (WebCore::RenderElement::RenderElement):
2073         (WebCore::RenderElement::computeFirstLineStyle):
2074         (WebCore::RenderElement::firstLineStyle):
2075
2076             Cache the first line style.
2077
2078         (WebCore::RenderElement::invalidateCachedFirstLineStyle):
2079         (WebCore::RenderElement::styleWillChange):
2080
2081             Invalidate subtree if we have cached first line style.
2082
2083         (WebCore::RenderElement::getUncachedPseudoStyle):
2084         (WebCore::RenderElement::uncachedFirstLineStyle): Deleted.
2085         (WebCore::RenderElement::cachedFirstLineStyle): Deleted.
2086         * rendering/RenderElement.h:
2087         * rendering/RenderObject.cpp:
2088         (WebCore::RenderObject::rareDataMap):
2089         (WebCore::RenderObject::rareData):
2090         (WebCore::RenderObject::ensureRareData):
2091         * rendering/RenderObject.h:
2092
2093             Stop copying rare data objects.
2094
2095         * rendering/style/RenderStyle.cpp:
2096         (WebCore::RenderStyle::changeRequiresLayout):
2097
2098             Use the normal mechanism for invalidating layout for first-line instead of a hack in pseudoStyleCacheIsInvalid.
2099
2100         * rendering/style/RenderStyleConstants.h:
2101         * style/RenderTreeUpdater.cpp:
2102         (WebCore::pseudoStyleCacheIsInvalid):
2103
2104             Simplify.
2105
2106 2016-11-28  Miguel Gomez  <magomez@igalia.com>
2107
2108         [GTK] Dramatic increase on memory usage since 2.14.x
2109         https://bugs.webkit.org/show_bug.cgi?id=164049
2110
2111         Reviewed by Žan Doberšek.
2112
2113         Use OpenGL version 3.2 Core for rendering when available.
2114         Update some operations that have changed when using 3.2 Core:
2115         - Use glGetStringi to get the extensions list.
2116         - Do not use GL_POINT_SPRITE.
2117         - Always use a VAO when rendering.
2118         - Use a GLSL 1.50 compatible shader.
2119
2120         No new tests needed.
2121
2122         * platform/graphics/GLContext.cpp:
2123         (WebCore::GLContext::version):
2124         Add a method to get OpenGL version we are using.
2125         * platform/graphics/GLContext.h:
2126         Ditto.
2127         * platform/graphics/GraphicsContext3D.h:
2128         Add an attribute to store the VAO used for rendering.
2129         * platform/graphics/OpenGLShims.cpp:
2130         (WebCore::initializeOpenGLShims):
2131         Add glGetStringi to the list of functions.
2132         * platform/graphics/OpenGLShims.h:
2133         Ditto.
2134         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2135         (WebCore::GraphicsContext3D::GraphicsContext3D):
2136         Set appropriate output to the shader compiler and initalize the VAO if needed.
2137         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2138         Delete the VAO if needed.
2139         (WebCore::GraphicsContext3D::getExtensions):
2140         Use glGetExtensionsi for OpenGL versions >= 3.2.
2141         * platform/graphics/glx/GLContextGLX.cpp:
2142         (WebCore::hasGLXARBCreateContextExtension):
2143         Check whether the GLX_ARB_create_context extension is available.
2144         (WebCore::GLContextGLX::createWindowContext):
2145         Use glXCreateContextAttribsARB() if possible to request an OpenGL 3.2 context.
2146         (WebCore::GLContextGLX::createPbufferContext):
2147         Ditto.
2148         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2149         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
2150         Enable glGetStringi for GTK.
2151         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2152         Do not use default getExtensions() method for GTK.
2153         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2154         Ditto.
2155
2156 2016-11-24  Sergio Villar Senin  <svillar@igalia.com>
2157
2158         [css-grid] Move attributes from RenderGrid to the new Grid class
2159         https://bugs.webkit.org/show_bug.cgi?id=165065
2160
2161         Reviewed by Darin Adler.
2162
2163         A new class called Grid was added in 208973. This is the first of a couple of patches moving
2164         private attributes from RenderGrid to Grid.
2165
2166         Apart from that this is adding a couple of new helper functions that will decouple the
2167         existence of in-flow items from the actual data structures storing that information.
2168
2169         Last but not least, the Grid::insert() method does not only insert the item in the m_grid
2170         data structure, but also stores the GridArea associated to that item, so there is no need to
2171         do it in two different calls.
2172
2173         No new tests required as this is a refactoring.
2174
2175         * rendering/RenderGrid.cpp:
2176         (WebCore::RenderGrid::Grid::insert): Added a new parameter.
2177         (WebCore::RenderGrid::Grid::setSmallestTracksStart):
2178         (WebCore::RenderGrid::Grid::smallestTrackStart):
2179         (WebCore::RenderGrid::Grid::gridItemArea):
2180         (WebCore::RenderGrid::Grid::setGridItemArea):
2181         (WebCore::RenderGrid::Grid::clear): Clear the newly added attributes.
2182         (WebCore::RenderGrid::repeatTracksSizingIfNeeded):
2183         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2184         (WebCore::RenderGrid::rawGridTrackSize):
2185         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2186         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
2187         (WebCore::RenderGrid::placeItemsOnGrid):
2188         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2189         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2190         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2191         (WebCore::RenderGrid::clearGrid):
2192         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
2193         (WebCore::RenderGrid::cachedGridSpan):
2194         (WebCore::RenderGrid::cachedGridArea): Deleted.
2195         * rendering/RenderGrid.h:
2196
2197 2016-11-27  Sam Weinig  <sam@webkit.org>
2198
2199         Remove unused DOMRequestState
2200         https://bugs.webkit.org/show_bug.cgi?id=165085
2201
2202         Reviewed by Simon Fraser.
2203
2204         Remove DOMRequestState. It was unused.
2205
2206         * Modules/fetch/FetchBody.cpp:
2207         * WebCore.xcodeproj/project.pbxproj:
2208         * bindings/js/DOMRequestState.h: Removed.
2209
2210 2016-11-27  Csaba Osztrogonác  <ossy@webkit.org>
2211
2212         Fix various --minimal build issues
2213         https://bugs.webkit.org/show_bug.cgi?id=165060
2214
2215         Reviewed by Darin Adler.
2216
2217         * css/parser/CSSPropertyParser.cpp:
2218         * dom/Document.cpp:
2219         * loader/EmptyClients.cpp:
2220
2221 2016-11-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2222
2223         [WTF] Import std::optional reference implementation as WTF::Optional
2224         https://bugs.webkit.org/show_bug.cgi?id=164199
2225
2226         Reviewed by Saam Barati and Sam Weinig.
2227
2228         Rename valueOr to value_or. This is specified in C++17 proposal.
2229
2230         Use Optional::emplace. C++17 Optional::operator=(Optional&&) requires
2231         either copy assignment operator or move assignment operator. But
2232         DFG::JSValueOperand etc. only defines move constructors and drop
2233         implicit copy assignment operators.
2234
2235         It was OK in the previous WTF::Optional since it always uses move
2236         constructors. But it is not valid in C++17 Optional. We use Optional::emplace
2237         instead. This function has the same semantics to the previous WTF::Optional's
2238         operator=.
2239
2240         No behavior change.
2241
2242         * Modules/applepay/ApplePaySession.cpp:
2243         (WebCore::parseAmount):
2244         (WebCore::createContactFields):
2245         (WebCore::toLineItemType):
2246         (WebCore::createLineItem):
2247         (WebCore::createLineItems):
2248         (WebCore::createMerchantCapabilities):
2249         (WebCore::createSupportedNetworks):
2250         (WebCore::toShippingType):
2251         (WebCore::createShippingMethod):
2252         (WebCore::createShippingMethods):
2253         (WebCore::createPaymentRequest):
2254         (WebCore::toPaymentAuthorizationStatus):
2255         * Modules/applepay/PaymentContact.h:
2256         * Modules/applepay/PaymentCoordinator.cpp:
2257         (WebCore::PaymentCoordinator::completeShippingMethodSelection):
2258         (WebCore::PaymentCoordinator::completeShippingContactSelection):
2259         (WebCore::PaymentCoordinator::completePaymentMethodSelection):
2260         * Modules/applepay/PaymentCoordinator.h:
2261         * Modules/applepay/PaymentCoordinatorClient.h:
2262         * Modules/applepay/PaymentMerchantSession.h:
2263         * Modules/applepay/PaymentRequest.h:
2264         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2265         (WebCore::PaymentContact::fromJS):
2266         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
2267         (WebCore::PaymentMerchantSession::fromJS):
2268         * Modules/encryptedmedia/MediaKeyStatusMap.cpp:
2269         (WebCore::MediaKeyStatusMap::Iterator::next):
2270         * Modules/encryptedmedia/MediaKeyStatusMap.h:
2271         * Modules/fetch/FetchBody.cpp:
2272         (WebCore::FetchBody::extract):
2273         * Modules/fetch/FetchBody.h:
2274         * Modules/fetch/FetchBodyOwner.cpp:
2275         (WebCore::FetchBodyOwner::FetchBodyOwner):
2276         (WebCore::FetchBodyOwner::loadBlob):
2277         (WebCore::FetchBodyOwner::finishBlobLoading):
2278         * Modules/fetch/FetchBodyOwner.h:
2279         * Modules/fetch/FetchHeaders.cpp:
2280         (WebCore::FetchHeaders::Iterator::next):
2281         * Modules/fetch/FetchHeaders.h:
2282         * Modules/fetch/FetchRequest.cpp:
2283         (WebCore::setReferrerPolicy):
2284         (WebCore::setMode):
2285         (WebCore::setCredentials):
2286         (WebCore::setCache):
2287         (WebCore::setRedirect):
2288         (WebCore::setMethod):
2289         (WebCore::setReferrer):
2290         (WebCore::buildOptions):
2291         (WebCore::FetchRequest::clone):
2292         * Modules/fetch/FetchRequest.h:
2293         (WebCore::FetchRequest::FetchRequest):
2294         * Modules/fetch/FetchResponse.cpp:
2295         (WebCore::FetchResponse::FetchResponse):
2296         (WebCore::FetchResponse::cloneForJS):
2297         (WebCore::FetchResponse::fetch):
2298         (WebCore::FetchResponse::BodyLoader::didSucceed):
2299         (WebCore::FetchResponse::BodyLoader::didFail):
2300         (WebCore::FetchResponse::BodyLoader::didReceiveResponse):
2301         (WebCore::FetchResponse::BodyLoader::stop):
2302         * Modules/fetch/FetchResponse.h:
2303         * Modules/geolocation/Coordinates.cpp:
2304         (WebCore::Coordinates::altitude):
2305         (WebCore::Coordinates::altitudeAccuracy):
2306         (WebCore::Coordinates::heading):
2307         (WebCore::Coordinates::speed):
2308         * Modules/geolocation/Coordinates.h:
2309         * Modules/indexeddb/IDBCursor.cpp:
2310         (WebCore::IDBCursor::stringToDirection):
2311         * Modules/indexeddb/IDBCursor.h:
2312         * Modules/indexeddb/IDBDatabase.h:
2313         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2314         (WebCore::IDBDatabaseIdentifier::hash):
2315         * Modules/indexeddb/IDBFactory.cpp:
2316         (WebCore::IDBFactory::open):
2317         * Modules/indexeddb/IDBFactory.h:
2318         * Modules/indexeddb/IDBIndex.cpp:
2319         (WebCore::IDBIndex::getAll):
2320         (WebCore::IDBIndex::getAllKeys):
2321         * Modules/indexeddb/IDBIndex.h:
2322         * Modules/indexeddb/IDBKeyPath.h:
2323         (WebCore::isolatedCopy):
2324         * Modules/indexeddb/IDBObjectStore.cpp:
2325         (WebCore::IDBObjectStore::keyPath):
2326         (WebCore::IDBObjectStore::getAll):
2327         (WebCore::IDBObjectStore::getAllKeys):
2328         * Modules/indexeddb/IDBObjectStore.h:
2329         * Modules/indexeddb/IDBTransaction.cpp:
2330         (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
2331         (WebCore::IDBTransaction::requestGetAllIndexRecords):
2332         * Modules/indexeddb/IDBTransaction.h:
2333         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
2334         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
2335         * Modules/indexeddb/IDBVersionChangeEvent.h:
2336         * Modules/indexeddb/server/IDBSerialization.cpp:
2337         (WebCore::serializeIDBKeyPath):
2338         (WebCore::deserializeIDBKeyPath):
2339         * Modules/indexeddb/server/IDBSerialization.h:
2340         * Modules/indexeddb/server/MemoryIndex.cpp:
2341         (WebCore::IDBServer::MemoryIndex::getAllRecords):
2342         * Modules/indexeddb/server/MemoryIndex.h:
2343         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2344         (WebCore::IDBServer::MemoryObjectStore::getAllRecords):
2345         * Modules/indexeddb/server/MemoryObjectStore.h:
2346         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
2347         (WebCore::IDBServer::MemoryObjectStoreCursor::objectStoreCleared):
2348         (WebCore::IDBServer::MemoryObjectStoreCursor::keyDeleted):
2349         (WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
2350         (WebCore::IDBServer::MemoryObjectStoreCursor::setForwardIteratorFromRemainingRange):
2351         (WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange):
2352         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
2353         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
2354         * Modules/indexeddb/server/MemoryObjectStoreCursor.h:
2355         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2356         (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
2357         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
2358         (WebCore::IDBDatabaseInfo::createNewObjectStore):
2359         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
2360         * Modules/indexeddb/shared/IDBGetAllRecordsData.h:
2361         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
2362         (WebCore::IDBObjectStoreInfo::IDBObjectStoreInfo):
2363         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
2364         (WebCore::IDBObjectStoreInfo::keyPath):
2365         * Modules/mediacontrols/MediaControlsHost.cpp:
2366         (WebCore::MediaControlsHost::displayNameForTrack):
2367         * Modules/mediacontrols/MediaControlsHost.h:
2368         * Modules/mediasource/MediaSource.cpp:
2369         (WebCore::MediaSource::endOfStream):
2370         (WebCore::MediaSource::streamEndedWithError):
2371         * Modules/mediasource/MediaSource.h:
2372         * Modules/mediastream/MediaStreamTrack.h:
2373         * Modules/mediastream/PeerConnectionBackend.cpp:
2374         (WebCore::PeerConnectionBackend::createOfferSucceeded):
2375         (WebCore::PeerConnectionBackend::createOfferFailed):
2376         (WebCore::PeerConnectionBackend::createAnswerSucceeded):
2377         (WebCore::PeerConnectionBackend::createAnswerFailed):
2378         (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
2379         (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
2380         (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
2381         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
2382         (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
2383         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
2384         (WebCore::PeerConnectionBackend::stop):
2385         * Modules/mediastream/PeerConnectionBackend.h:
2386         * Modules/mediastream/RTCDTMFSender.cpp:
2387         (WebCore::RTCDTMFSender::insertDTMF):
2388         * Modules/mediastream/RTCDTMFSender.h:
2389         * Modules/mediastream/RTCIceCandidate.cpp:
2390         (WebCore::RTCIceCandidate::create):
2391         (WebCore::RTCIceCandidate::RTCIceCandidate):
2392         * Modules/mediastream/RTCIceCandidate.h:
2393         (WebCore::RTCIceCandidate::sdpMLineIndex):
2394         * Modules/mediastream/SDPProcessor.cpp:
2395         (WebCore::iceCandidateFromJSON):
2396         * Modules/proximity/DeviceProximityEvent.h:
2397         * Modules/streams/ReadableStreamSource.h:
2398         (WebCore::ReadableStreamSource::startFinished):
2399         (WebCore::ReadableStreamSource::pullFinished):
2400         (WebCore::ReadableStreamSource::clean):
2401         * Modules/webaudio/AudioBufferSourceNode.cpp:
2402         (WebCore::AudioBufferSourceNode::start):
2403         * Modules/webaudio/AudioBufferSourceNode.h:
2404         * Modules/webdatabase/SQLResultSet.h:
2405         * Modules/websockets/WebSocket.cpp:
2406         (WebCore::WebSocket::close):
2407         * Modules/websockets/WebSocket.h:
2408         * Modules/websockets/WebSocketChannel.cpp:
2409         (WebCore::WebSocketChannel::didReceiveSocketStreamData):
2410         * Modules/websockets/WebSocketChannel.h:
2411         * bindings/generic/IDLTypes.h:
2412         (WebCore::IDLType::nullValue):
2413         * bindings/js/CachedModuleScript.h:
2414         (WebCore::CachedModuleScript::error):
2415         * bindings/js/Dictionary.h:
2416         (WebCore::Dictionary::get):
2417         * bindings/js/IDBBindingUtilities.cpp:
2418         (WebCore::toJS):
2419         * bindings/js/IDBBindingUtilities.h:
2420         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2421         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
2422         * bindings/js/JSCryptoKeySerializationJWK.h:
2423         * bindings/js/JSDOMConvert.h:
2424         (WebCore::Detail::VariadicConverterBase::convert):
2425         (WebCore::Detail::VariadicConverterBase<IDLInterface<T>>::convert):
2426         (WebCore::convertVariadicArguments):
2427         * bindings/js/JSDOMIterator.h:
2428         (WebCore::IteratorTraits>::next):
2429         * bindings/js/JSDOMPromise.h:
2430         (WebCore::DOMPromise::DOMPromise):
2431         (WebCore::DOMPromise::operator=):
2432         * bindings/js/JSDOMWindowCustom.cpp:
2433         (WebCore::JSDOMWindow::getOwnPropertySlot):
2434         * bindings/js/JSDictionary.h:
2435         (WebCore::JSDictionary::convertValue):
2436         * bindings/js/JSFileCustom.cpp:
2437         (WebCore::constructJSFile):
2438         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2439         (WebCore::callHTMLAllCollection):
2440         (WebCore::JSHTMLAllCollection::item):
2441         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2442         (WebCore::JSHTMLCanvasElement::toDataURL):
2443         * bindings/js/JSImageConstructor.cpp:
2444         (WebCore::JSImageConstructor::construct):
2445         * bindings/js/JSMediaDevicesCustom.cpp:
2446         (WebCore::createStringConstraint):
2447         (WebCore::createBooleanConstraint):
2448         (WebCore::createDoubleConstraint):
2449         (WebCore::createIntConstraint):
2450         * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
2451         (WebCore::importKey):
2452         * bindings/js/ScriptController.cpp:
2453         (WebCore::ScriptController::setupModuleScriptHandlers):
2454         (WebCore::ScriptController::executeScriptInWorld):
2455         (WebCore::ScriptController::executeScript):
2456         * bindings/scripts/CodeGeneratorJS.pm:
2457         (GenerateGetOwnPropertySlotBody):
2458         (GenerateEnumerationImplementationContent):
2459         (GenerateEnumerationHeaderContent):
2460         (GenerateDefaultValue):
2461         (GenerateImplementation):
2462         (GenerateParametersCheck):
2463         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2464         (WebCore::JSFloat64Array::getOwnPropertySlot):
2465         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
2466         (WebCore::JSFloat64Array::put):
2467         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2468         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2469         * bindings/scripts/test/JS/JSTestObj.cpp:
2470         (WebCore::parseEnumeration<TestObj::EnumType>):
2471         (WebCore::parseEnumeration<TestObj::Optional>):
2472         (WebCore::parseEnumeration<AlternateEnumName>):
2473         (WebCore::parseEnumeration<TestObj::EnumA>):
2474         (WebCore::parseEnumeration<TestObj::EnumB>):
2475         (WebCore::parseEnumeration<TestObj::EnumC>):
2476         (WebCore::parseEnumeration<TestObj::Kind>):
2477         (WebCore::parseEnumeration<TestObj::Size>):
2478         (WebCore::parseEnumeration<TestObj::Confidence>):
2479         (WebCore::convertDictionary<TestObj::Dictionary>):
2480         (WebCore::JSTestObj::getOwnPropertySlot):
2481         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgCaller):
2482         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgCaller):
2483         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgCaller):
2484         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsCaller):
2485         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongCaller):
2486         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongCaller):
2487         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceCaller):
2488         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanCaller):
2489         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordCaller):
2490         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Caller):
2491         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Caller):
2492         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
2493         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentCaller):
2494         * bindings/scripts/test/JS/JSTestObj.h:
2495         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2496         (WebCore::parseEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>):
2497         * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
2498         * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
2499         (WebCore::parseEnumeration<TestStandaloneEnumeration>):
2500         * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h:
2501         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2502         (WebCore::jsTestTypedefsPrototypeFunctionSetShadowCaller):
2503         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampCaller):
2504         * bridge/runtime_array.cpp:
2505         (JSC::RuntimeArray::getOwnPropertySlot):
2506         (JSC::RuntimeArray::put):
2507         * crypto/CryptoAlgorithmRegistry.cpp:
2508         (WebCore::CryptoAlgorithmRegistry::identifier):
2509         * crypto/CryptoAlgorithmRegistry.h:
2510         * crypto/CryptoKeySerialization.h:
2511         * crypto/JsonWebKey.h:
2512         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2513         (WebCore::CryptoAlgorithmAES_CBC::importKey):
2514         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2515         (WebCore::CryptoAlgorithmAES_KW::importKey):
2516         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2517         (WebCore::CryptoAlgorithmHMAC::generateKey):
2518         (WebCore::CryptoAlgorithmHMAC::importKey):
2519         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
2520         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
2521         * crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
2522         (WebCore::calculateSignature):
2523         * crypto/keys/CryptoKeyAES.h:
2524         * crypto/keys/CryptoKeyHMAC.h:
2525         * crypto/keys/CryptoKeyRSA.cpp:
2526         (WebCore::CryptoKeyRSA::importJwk):
2527         * crypto/keys/CryptoKeyRSA.h:
2528         * crypto/keys/CryptoKeySerializationRaw.cpp:
2529         (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
2530         * crypto/keys/CryptoKeySerializationRaw.h:
2531         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2532         (WebCore::commonCryptoHMACAlgorithm):
2533         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
2534         (WebCore::cryptoDigestAlgorithm):
2535         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
2536         * crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
2537         * css/CSSFontFace.cpp:
2538         (WebCore::CSSFontFace::calculateStyleMask):
2539         (WebCore::CSSFontFace::calculateWeightMask):
2540         * css/CSSFontFace.h:
2541         * css/CSSFontFaceSet.cpp:
2542         (WebCore::computeFontTraitsMask):
2543         * css/CSSPrimitiveValue.cpp:
2544         (WebCore::CSSPrimitiveValue::doubleValue):
2545         (WebCore::CSSPrimitiveValue::doubleValueInternal):
2546         * css/CSSPrimitiveValue.h:
2547         * css/CSSPropertyNames.in:
2548         * css/CSSSegmentedFontFace.cpp:
2549         * css/CSSStyleSheet.cpp:
2550         (WebCore::CSSStyleSheet::create):
2551         (WebCore::CSSStyleSheet::CSSStyleSheet):
2552         (WebCore::CSSStyleSheet::addRule):
2553         * css/CSSStyleSheet.h:
2554         * css/FontFace.cpp:
2555         (WebCore::FontFace::fontStateChanged):
2556         * css/FontFace.h:
2557         * css/FontFaceSet.cpp:
2558         (WebCore::FontFaceSet::completedLoading):
2559         * css/FontFaceSet.h:
2560         * css/MediaQueryEvaluator.cpp:
2561         (WebCore::doubleValue):
2562         * css/StyleBuilderConverter.h:
2563         (WebCore::StyleBuilderConverter::convertGridPosition):
2564         (WebCore::StyleBuilderConverter::convertWordSpacing):
2565         (WebCore::StyleBuilderConverter::convertPerspective):
2566         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
2567         (WebCore::StyleBuilderConverter::convertFilterOperations):
2568         (WebCore::StyleBuilderConverter::convertLineHeight):
2569         * css/StyleBuilderCustom.h:
2570         (WebCore::StyleBuilderCustom::applyValueLineHeight):
2571         * css/StyleRuleImport.cpp:
2572         (WebCore::StyleRuleImport::requestStyleSheet):
2573         * css/parser/CSSParser.cpp:
2574         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
2575         (WebCore::CSSParser::parseSpringTimingFunctionValue):
2576         (WebCore::CSSParser::parseColorFunctionParameters):
2577         (WebCore::CSSParser::parseColorFromValue):
2578         * css/parser/CSSParser.h:
2579         * cssjit/SelectorCompiler.cpp:
2580         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelationIfResolvingStyle):
2581         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):
2582         * dom/CustomElementReactionQueue.cpp:
2583         * dom/Document.cpp:
2584         (WebCore::Document::lastModified):
2585         * dom/Element.cpp:
2586         (WebCore::Element::scrollBy):
2587         (WebCore::Element::getIntegralAttribute):
2588         (WebCore::Element::getUnsignedIntegralAttribute):
2589         (WebCore::Element::resolveCustomStyle):
2590         * dom/Element.h:
2591         * dom/ElementIteratorAssertions.h:
2592         (WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
2593         (WebCore::ElementIteratorAssertions::clear):
2594         * dom/ExceptionOr.h:
2595         * dom/InlineStyleSheetOwner.cpp:
2596         (WebCore::makeInlineStyleSheetCacheKey):
2597         * dom/KeyboardEvent.h:
2598         * dom/LoadableClassicScript.cpp:
2599         (WebCore::LoadableClassicScript::error):
2600         * dom/LoadableClassicScript.h:
2601         * dom/LoadableModuleScript.cpp:
2602         (WebCore::LoadableModuleScript::error):
2603         * dom/LoadableModuleScript.h:
2604         * dom/LoadableScript.h:
2605         * dom/MessageEvent.cpp:
2606         (WebCore::MessageEvent::MessageEvent):
2607         (WebCore::MessageEvent::create):
2608         (WebCore::MessageEvent::initMessageEvent):
2609         * dom/MessageEvent.h:
2610         * dom/MutationObserver.cpp:
2611         (WebCore::MutationObserver::observe):
2612         * dom/MutationObserver.h:
2613         * dom/ProcessingInstruction.cpp:
2614         (WebCore::ProcessingInstruction::checkStyleSheet):
2615         * dom/PseudoElement.cpp:
2616         (WebCore::PseudoElement::resolveCustomStyle):
2617         * dom/PseudoElement.h:
2618         * dom/RangeBoundaryPoint.h:
2619         (WebCore::RangeBoundaryPoint::setToBeforeChild):
2620         (WebCore::RangeBoundaryPoint::setToAfterChild):
2621         (WebCore::RangeBoundaryPoint::setToEndOfNode):
2622         (WebCore::RangeBoundaryPoint::invalidateOffset):
2623         * dom/ScriptElement.cpp:
2624         (WebCore::ScriptElement::determineScriptType):
2625         (WebCore::ScriptElement::prepareScript):
2626         (WebCore::ScriptElement::executeScriptAndDispatchEvent):
2627         * dom/ScriptElement.h:
2628         * dom/TextDecoder.cpp:
2629         (WebCore::TextDecoder::decode):
2630         * dom/TextDecoder.h:
2631         * dom/UserGestureIndicator.cpp:
2632         (WebCore::UserGestureIndicator::UserGestureIndicator):
2633         * dom/UserGestureIndicator.h:
2634         * editing/CompositeEditCommand.cpp:
2635         (WebCore::CompositeEditCommand::moveParagraphs):
2636         * editing/CompositeEditCommand.h:
2637         * fileapi/File.h:
2638         * history/CachedFrame.h:
2639         (WebCore::CachedFrame::hasInsecureContent):
2640         * html/DOMTokenList.cpp:
2641         (WebCore::DOMTokenList::toggle):
2642         * html/DOMTokenList.h:
2643         * html/HTMLAnchorElement.cpp:
2644         (WebCore::HTMLAnchorElement::handleClick):
2645         * html/HTMLCanvasElement.cpp:
2646         (WebCore::HTMLCanvasElement::toDataURL):
2647         * html/HTMLCanvasElement.h:
2648         * html/HTMLElement.cpp:
2649         (WebCore::HTMLElement::parseBorderWidthAttribute):
2650         (WebCore::HTMLElement::parseAttribute):
2651         * html/HTMLImageElement.cpp:
2652         (WebCore::HTMLImageElement::createForJSConstructor):
2653         (WebCore::HTMLImageElement::width):
2654         (WebCore::HTMLImageElement::height):
2655         * html/HTMLImageElement.h:
2656         * html/HTMLInputElement.cpp:
2657         (WebCore::HTMLInputElement::findClosestTickMarkValue):
2658         (WebCore::HTMLInputElement::maxLengthAttributeChanged):
2659         (WebCore::HTMLInputElement::minLengthAttributeChanged):
2660         * html/HTMLInputElement.h:
2661         * html/HTMLLinkElement.cpp:
2662         (WebCore::HTMLLinkElement::process):
2663         (WebCore::HTMLLinkElement::initializeStyleSheet):
2664         (WebCore::HTMLLinkElement::iconType):
2665         * html/HTMLLinkElement.h:
2666         * html/HTMLOListElement.h:
2667         * html/HTMLOptionsCollection.cpp:
2668         (WebCore::HTMLOptionsCollection::add):
2669         * html/HTMLOptionsCollection.h:
2670         * html/HTMLSelectElement.cpp:
2671         (WebCore::HTMLSelectElement::add):
2672         (WebCore::HTMLSelectElement::setLength):
2673         * html/HTMLSelectElement.h:
2674         * html/HTMLTextAreaElement.cpp:
2675         (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
2676         (WebCore::HTMLTextAreaElement::minLengthAttributeChanged):
2677         * html/ImageInputType.cpp:
2678         (WebCore::ImageInputType::height):
2679         (WebCore::ImageInputType::width):
2680         * html/InputType.cpp:
2681         (WebCore::InputType::findClosestTickMarkValue):
2682         * html/InputType.h:
2683         * html/LinkIconCollector.cpp:
2684         * html/LinkRelAttribute.h:
2685         * html/RangeInputType.cpp:
2686         (WebCore::RangeInputType::findClosestTickMarkValue):
2687         * html/RangeInputType.h:
2688         * html/canvas/CanvasRenderingContext2D.cpp:
2689         (WebCore::CanvasRenderingContext2D::restore):
2690         (WebCore::CanvasRenderingContext2D::setStrokeColor):
2691         (WebCore::CanvasRenderingContext2D::setFillColor):
2692         (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
2693         (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
2694         (WebCore::CanvasRenderingContext2D::setShadow):
2695         (WebCore::CanvasRenderingContext2D::fillText):
2696         (WebCore::CanvasRenderingContext2D::strokeText):
2697         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2698         * html/canvas/CanvasRenderingContext2D.h:
2699         * html/canvas/WebGL2RenderingContext.cpp:
2700         (WebCore::arrayBufferViewElementSize):
2701         * html/canvas/WebGLRenderingContextBase.cpp:
2702         (WebCore::WebGLRenderingContextBase::bufferData):
2703         (WebCore::WebGLRenderingContextBase::bufferSubData):
2704         (WebCore::WebGLRenderingContextBase::texSubImage2D):
2705         (WebCore::WebGLRenderingContextBase::validateArrayBufferType):
2706         (WebCore::WebGLRenderingContextBase::validateTexFuncData):
2707         (WebCore::WebGLRenderingContextBase::texImage2D):
2708         * html/canvas/WebGLRenderingContextBase.h:
2709         * html/parser/HTMLConstructionSite.cpp:
2710         (WebCore::HTMLConstructionSite::indexOfFirstUnopenFormattingElement):
2711         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
2712         * html/parser/HTMLConstructionSite.h:
2713         * html/parser/HTMLParserIdioms.cpp:
2714         (WebCore::parseHTMLIntegerInternal):
2715         (WebCore::parseHTMLInteger):
2716         (WebCore::parseHTMLNonNegativeInteger):
2717         (WebCore::parseValidHTMLNonNegativeIntegerInternal):
2718         (WebCore::parseValidHTMLNonNegativeInteger):
2719         (WebCore::parseValidHTMLFloatingPointNumberInternal):
2720         (WebCore::parseValidHTMLFloatingPointNumber):
2721         (WebCore::parseHTTPRefreshInternal):
2722         * html/parser/HTMLParserIdioms.h:
2723         (WebCore::limitToOnlyHTMLNonNegative):
2724         * html/parser/HTMLSrcsetParser.cpp:
2725         (WebCore::parseDescriptors):
2726         * html/shadow/SliderThumbElement.cpp:
2727         (WebCore::SliderThumbElement::setPositionFromPoint):
2728         (WebCore::SliderThumbElement::resolveCustomStyle):
2729         (WebCore::SliderContainerElement::resolveCustomStyle):
2730         * html/shadow/SliderThumbElement.h:
2731         * html/shadow/TextControlInnerElements.cpp:
2732         (WebCore::TextControlInnerElement::resolveCustomStyle):
2733         (WebCore::TextControlInnerTextElement::resolveCustomStyle):
2734         (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
2735         * html/shadow/TextControlInnerElements.h:
2736         * html/track/TrackEvent.h:
2737         * inspector/InspectorIndexedDBAgent.cpp:
2738         * inspector/InspectorInstrumentation.cpp:
2739         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
2740         * inspector/InspectorInstrumentation.h:
2741         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
2742         * inspector/InspectorStyleSheet.cpp:
2743         (WebCore::InspectorStyleSheet::addRule):
2744         * inspector/InspectorTimelineAgent.cpp:
2745         (WebCore::InspectorTimelineAgent::setInstruments):
2746         * loader/DocumentLoader.cpp:
2747         (WebCore::DocumentLoader::startIconLoading):
2748         * loader/DocumentThreadableLoader.cpp:
2749         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
2750         (WebCore::DocumentThreadableLoader::clearResource):
2751         (WebCore::DocumentThreadableLoader::preflightSuccess):
2752         (WebCore::DocumentThreadableLoader::preflightFailure):
2753         * loader/DocumentThreadableLoader.h:
2754         * loader/EmptyClients.cpp:
2755         * loader/EmptyClients.h:
2756         * loader/FrameLoader.cpp:
2757         (WebCore::FrameLoader::urlSelected):
2758         (WebCore::FrameLoader::receivedFirstData):
2759         (WebCore::FrameLoader::commitProvisionalLoad):
2760         (WebCore::FrameLoader::open):
2761         (WebCore::FrameLoader::dispatchDidCommitLoad):
2762         (WebCore::FrameLoader::clearTestingOverrides):
2763         * loader/FrameLoader.h:
2764         * loader/FrameLoaderClient.h:
2765         * loader/LinkLoader.cpp:
2766         (WebCore::LinkLoader::resourceTypeFromAsAttribute):
2767         (WebCore::LinkLoader::loadLink):
2768         * loader/LinkLoader.h:
2769         * loader/SubresourceLoader.cpp:
2770         (WebCore::SubresourceLoader::SubresourceLoader):
2771         (WebCore::SubresourceLoader::didReceiveResponse):
2772         (WebCore::SubresourceLoader::notifyDone):
2773         * loader/SubresourceLoader.h:
2774         * loader/cache/CachedResource.cpp:
2775         (WebCore::CachedResource::setLoadPriority):
2776         * loader/cache/CachedResource.h:
2777         * loader/cache/CachedResourceRequest.cpp:
2778         (WebCore::CachedResourceRequest::CachedResourceRequest):
2779         * loader/cache/CachedResourceRequest.h:
2780         (WebCore::CachedResourceRequest::priority):
2781         * mathml/MathMLElement.h:
2782         (WebCore::MathMLElement::specifiedDisplayStyle):
2783         (WebCore::MathMLElement::specifiedMathVariant):
2784         * mathml/MathMLFractionElement.cpp:
2785         (WebCore::MathMLFractionElement::cachedFractionAlignment):
2786         (WebCore::MathMLFractionElement::parseAttribute):
2787         * mathml/MathMLFractionElement.h:
2788         * mathml/MathMLMathElement.cpp:
2789         (WebCore::MathMLMathElement::specifiedDisplayStyle):
2790         (WebCore::MathMLMathElement::parseAttribute):
2791         * mathml/MathMLMathElement.h:
2792         * mathml/MathMLMencloseElement.cpp:
2793         (WebCore::MathMLMencloseElement::parseAttribute):
2794         * mathml/MathMLMencloseElement.h:
2795         * mathml/MathMLOperatorDictionary.cpp:
2796         (WebCore::MathMLOperatorDictionary::search):
2797         * mathml/MathMLOperatorDictionary.h:
2798         * mathml/MathMLOperatorElement.cpp:
2799         (WebCore::MathMLOperatorElement::computeOperatorFlag):
2800         (WebCore::MathMLOperatorElement::childrenChanged):
2801         (WebCore::attributeNameToPropertyFlag):
2802         (WebCore::MathMLOperatorElement::parseAttribute):
2803         * mathml/MathMLOperatorElement.h:
2804         * mathml/MathMLPaddedElement.cpp:
2805         (WebCore::MathMLPaddedElement::parseAttribute):
2806         * mathml/MathMLPaddedElement.h:
2807         * mathml/MathMLPresentationElement.cpp:
2808         (WebCore::MathMLPresentationElement::cachedBooleanAttribute):
2809         (WebCore::MathMLPresentationElement::cachedMathMLLength):
2810         (WebCore::MathMLPresentationElement::specifiedDisplayStyle):
2811         (WebCore::MathMLPresentationElement::specifiedMathVariant):
2812         (WebCore::MathMLPresentationElement::parseAttribute):
2813         * mathml/MathMLPresentationElement.h:
2814         (WebCore::MathMLPresentationElement::toOptionalBool):
2815         * mathml/MathMLScriptsElement.cpp:
2816         (WebCore::MathMLScriptsElement::parseAttribute):
2817         * mathml/MathMLScriptsElement.h:
2818         * mathml/MathMLSpaceElement.cpp:
2819         (WebCore::MathMLSpaceElement::parseAttribute):
2820         * mathml/MathMLSpaceElement.h:
2821         * mathml/MathMLTokenElement.cpp:
2822         (WebCore::MathMLTokenElement::convertToSingleCodePoint):
2823         * mathml/MathMLTokenElement.h:
2824         * mathml/MathMLUnderOverElement.cpp:
2825         (WebCore::MathMLUnderOverElement::parseAttribute):
2826         * mathml/MathMLUnderOverElement.h:
2827         * page/ChromeClient.h:
2828         * page/DOMTimer.cpp:
2829         (WebCore::DOMTimer::alignedFireTime):
2830         * page/DOMTimer.h:
2831         * page/DOMWindow.cpp:
2832         (WebCore::DOMWindow::scrollBy):
2833         * page/DOMWindow.h:
2834         * page/EventSource.cpp:
2835         (WebCore::EventSource::parseEventStream):
2836         (WebCore::EventSource::parseEventStreamLine):
2837         * page/EventSource.h:
2838         * page/FrameView.cpp:
2839         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
2840         (WebCore::FrameView::setLayoutViewportOverrideRect):
2841         (WebCore::FrameView::setViewExposedRect):
2842         * page/FrameView.h:
2843         * page/Page.cpp:
2844         (WebCore::Page::takeAnyMediaCanStartListener):
2845         * page/Page.h:
2846         (WebCore::Page::eventThrottlingBehaviorOverride):
2847         (WebCore::Page::setEventThrottlingBehaviorOverride):
2848         * page/ScrollToOptions.h:
2849         * page/SecurityOrigin.cpp:
2850         (WebCore::SecurityOrigin::SecurityOrigin):
2851         (WebCore::SecurityOrigin::create):
2852         * page/SecurityOrigin.h:
2853         (WebCore::SecurityOrigin::port):
2854         * page/SecurityOriginData.cpp:
2855         (WebCore::SecurityOriginData::debugString):
2856         (WebCore::SecurityOriginData::databaseIdentifier):
2857         (WebCore::SecurityOriginData::fromDatabaseIdentifier):
2858         * page/SecurityOriginData.h:
2859         (WebCore::SecurityOriginData::SecurityOriginData):
2860         (WebCore::SecurityOriginData::isEmpty):
2861         (WebCore::SecurityOriginDataHash::hash):
2862         * page/SecurityOriginHash.h:
2863         (WebCore::SecurityOriginHash::hash):
2864         * page/WindowFeatures.cpp:
2865         (WebCore::parseDialogFeatures):
2866         (WebCore::boolFeature):
2867         (WebCore::floatFeature):
2868         * page/WindowFeatures.h:
2869         * page/csp/ContentSecurityPolicySource.cpp:
2870         (WebCore::ContentSecurityPolicySource::ContentSecurityPolicySource):
2871         (WebCore::ContentSecurityPolicySource::portMatches):
2872         * page/csp/ContentSecurityPolicySource.h:
2873         * page/csp/ContentSecurityPolicySourceList.cpp:
2874         (WebCore::ContentSecurityPolicySourceList::parse):
2875         (WebCore::ContentSecurityPolicySourceList::parseSource):
2876         (WebCore::ContentSecurityPolicySourceList::parsePort):
2877         * page/csp/ContentSecurityPolicySourceList.h:
2878         * page/scrolling/AsyncScrollingCoordinator.cpp:
2879         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
2880         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
2881         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2882         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2883         * page/scrolling/AsyncScrollingCoordinator.h:
2884         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
2885         * page/scrolling/ScrollingCoordinator.h:
2886         * page/scrolling/ScrollingTree.cpp:
2887         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
2888         * page/scrolling/ScrollingTree.h:
2889         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2890         (WebCore::ScrollingTreeScrollingNode::setScrollPositionWithoutContentEdgeConstraints):
2891         * page/scrolling/ThreadedScrollingTree.cpp:
2892         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
2893         * page/scrolling/ThreadedScrollingTree.h:
2894         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2895         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
2896         * page/scrolling/ios/ScrollingTreeIOS.cpp:
2897         (WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
2898         * page/scrolling/ios/ScrollingTreeIOS.h:
2899         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2900         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
2901         * platform/DragImage.cpp:
2902         * platform/LinkIcon.h:
2903         * platform/MemoryPressureHandler.h:
2904         * platform/ScrollView.cpp:
2905         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange):
2906         * platform/ScrollView.h:
2907         * platform/Theme.h:
2908         (WebCore::Theme::controlFont):
2909         * platform/Timer.h:
2910         (WebCore::TimerBase::alignedFireTime):
2911         * platform/URL.cpp:
2912         (WebCore::URL::port):
2913         (WebCore::defaultPortForProtocol):
2914         (WebCore::portAllowed):
2915         * platform/URL.h:
2916         * platform/URLParser.cpp:
2917         (WebCore::URLParser::defaultPortForProtocol):
2918         (WebCore::findLongestZeroSequence):
2919         (WebCore::URLParser::parseIPv4Piece):
2920         (WebCore::URLParser::parseIPv4Host):
2921         (WebCore::URLParser::parseIPv4PieceInsideIPv6):
2922         (WebCore::URLParser::parseIPv4AddressInsideIPv6):
2923         (WebCore::URLParser::parseIPv6Host):
2924         (WebCore::URLParser::domainToASCII):
2925         (WebCore::URLParser::formURLDecode):
2926         * platform/URLParser.h:
2927         * platform/graphics/BitmapImage.h:
2928         * platform/graphics/Color.h:
2929         (WebCore::colorWithOverrideAlpha):
2930         * platform/graphics/DisplayRefreshMonitorClient.h:
2931         * platform/graphics/Font.h:
2932         * platform/graphics/FontCascade.cpp:
2933         (WebCore::FontCascade::drawText):
2934         (WebCore::FontCascade::drawEmphasisMarks):
2935         (WebCore::FontCascade::adjustSelectionRectForText):
2936         (WebCore::FontCascade::getEmphasisMarkGlyphData):
2937         (WebCore::FontCascade::emphasisMarkAscent):
2938         (WebCore::FontCascade::emphasisMarkDescent):
2939         (WebCore::FontCascade::emphasisMarkHeight):
2940         * platform/graphics/FontCascade.h:
2941         * platform/graphics/GraphicsContext.cpp:
2942         (WebCore::GraphicsContext::drawText):
2943         (WebCore::GraphicsContext::drawEmphasisMarks):
2944         (WebCore::GraphicsContext::drawBidiText):
2945         * platform/graphics/GraphicsContext.h:
2946         (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
2947         * platform/graphics/GraphicsLayer.h:
2948         (WebCore::GraphicsLayer::setPosition):
2949         (WebCore::GraphicsLayer::setApproximatePosition):
2950         * platform/graphics/Image.h:
2951         (WebCore::Image::hotSpot):
2952         * platform/graphics/ImageBuffer.h:
2953         * platform/graphics/ImageFrameCache.cpp:
2954         (WebCore::ImageFrameCache::clearMetadata):
2955         (WebCore::ImageFrameCache::metadata):
2956         (WebCore::ImageFrameCache::frameMetadataAtIndex):
2957         (WebCore::ImageFrameCache::hotSpot):
2958         * platform/graphics/ImageFrameCache.h:
2959         * platform/graphics/ImageSource.h:
2960         (WebCore::ImageSource::hotSpot):
2961         * platform/graphics/PathUtilities.cpp:
2962         (WebCore::rectFromPolygon):
2963         (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2964         * platform/graphics/ShadowBlur.cpp:
2965         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2966         * platform/graphics/TiledBacking.h:
2967         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2968         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2969         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2970         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2971         (WebCore::SourceBufferPrivateAVFObjC::flush):
2972         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
2973         * platform/graphics/ca/GraphicsLayerCA.cpp:
2974         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
2975         * platform/graphics/ca/TileController.cpp:
2976         (WebCore::TileController::setLayoutViewportRect):
2977         * platform/graphics/ca/TileController.h:
2978         * platform/graphics/cairo/ImageBufferCairo.cpp:
2979         (WebCore::ImageBuffer::toDataURL):
2980         * platform/graphics/cg/ImageBufferCG.cpp:
2981         (WebCore::encodeImage):
2982         (WebCore::dataURL):
2983         (WebCore::ImageBuffer::toDataURL):
2984         * platform/graphics/cg/ImageDecoderCG.cpp:
2985         (WebCore::ImageDecoder::hotSpot):
2986         * platform/graphics/cg/ImageDecoderCG.h:
2987         * platform/graphics/cocoa/FontCocoa.mm:
2988         (WebCore::openTypeFeature):
2989         (WebCore::advanceForColorBitmapFont):
2990         * platform/graphics/displaylists/DisplayListItems.cpp:
2991         (WebCore::DisplayList::DrawGlyphs::localBounds):
2992         (WebCore::DisplayList::DrawLine::localBounds):
2993         (WebCore::DisplayList::DrawLinesForText::localBounds):
2994         (WebCore::DisplayList::DrawLineForDocumentMarker::localBounds):
2995         (WebCore::DisplayList::DrawFocusRingPath::localBounds):
2996         (WebCore::DisplayList::DrawFocusRingRects::localBounds):
2997         (WebCore::DisplayList::StrokeRect::localBounds):
2998         (WebCore::DisplayList::StrokePath::localBounds):
2999         (WebCore::DisplayList::StrokeEllipse::localBounds):
3000         * platform/graphics/displaylists/DisplayListItems.h:
3001         (WebCore::DisplayList::DrawingItem::localBounds):
3002         * platform/graphics/displaylists/DisplayListRecorder.cpp:
3003         (WebCore::DisplayList::Recorder::updateItemExtent):
3004         (WebCore::DisplayList::Recorder::ContextState::rotate):
3005         (WebCore::DisplayList::Recorder::ContextState::concatCTM):
3006         * platform/graphics/efl/ImageBufferEfl.cpp:
3007         (WebCore::encodeImageJPEG):
3008         (WebCore::ImageBuffer::toDataURL):
3009         * platform/graphics/filters/Filter.h:
3010         (WebCore::Filter::mapAbsolutePointToLocalPoint):
3011         * platform/graphics/gtk/ImageBufferGtk.cpp:
3012         (WebCore::encodeImage):
3013         (WebCore::ImageBuffer::toDataURL):
3014         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3015         (WebCore::HarfBuzzShaper::selectionRect):
3016         * platform/graphics/mac/ComplexTextController.cpp:
3017         (WebCore::capitalized):
3018         (WebCore::shouldSynthesize):
3019         * platform/graphics/texmap/TextureMapperLayer.cpp:
3020         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
3021         (WebCore::TextureMapperLayer::replicaTransform):
3022         (WebCore::TextureMapperLayer::mapScrollOffset):
3023         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3024         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
3025         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
3026         * platform/graphics/transforms/AffineTransform.cpp:
3027         (WebCore::AffineTransform::inverse):
3028         * platform/graphics/transforms/AffineTransform.h:
3029         * platform/graphics/transforms/TransformState.cpp:
3030         (WebCore::TransformState::mappedPoint):
3031         (WebCore::TransformState::mappedSecondaryQuad):
3032         (WebCore::TransformState::mapQuad):
3033         (WebCore::TransformState::flattenWithTransform):
3034         * platform/graphics/transforms/TransformState.h:
3035         * platform/graphics/transforms/TransformationMatrix.cpp:
3036         (WebCore::TransformationMatrix::inverse):
3037         * platform/graphics/transforms/TransformationMatrix.h:
3038         * platform/graphics/win/ImageBufferDirect2D.cpp:
3039         (WebCore::ImageBuffer::toDataURL):
3040         * platform/graphics/win/ImageDecoderDirect2D.cpp:
3041         (WebCore::ImageDecoder::hotSpot):
3042         * platform/graphics/win/ImageDecoderDirect2D.h:
3043         * platform/graphics/x11/PlatformDisplayX11.cpp:
3044         (WebCore::PlatformDisplayX11::supportsXDamage):
3045         * platform/graphics/x11/PlatformDisplayX11.h:
3046         * platform/image-decoders/ImageDecoder.h:
3047         (WebCore::ImageDecoder::hotSpot):
3048         * platform/image-decoders/ico/ICOImageDecoder.cpp:
3049         (WebCore::ICOImageDecoder::hotSpot):
3050         (WebCore::ICOImageDecoder::hotSpotAtIndex):
3051         * platform/image-decoders/ico/ICOImageDecoder.h:
3052         * platform/image-encoders/JPEGImageEncoder.cpp:
3053         (WebCore::compressRGBABigEndianToJPEG):
3054         * platform/image-encoders/JPEGImageEncoder.h:
3055         * platform/ios/LegacyTileCache.h:
3056         * platform/ios/LegacyTileCache.mm:
3057         (WebCore::LegacyTileCache::setOverrideVisibleRect):
3058         * platform/ios/LegacyTileLayer.mm:
3059         (-[LegacyTileHostLayer renderInContext:]):
3060         * platform/linux/MemoryPressureHandlerLinux.cpp:
3061         * platform/mac/ThemeMac.h:
3062         * platform/mac/ThemeMac.mm:
3063         (WebCore::ThemeMac::controlFont):
3064         * platform/mediastream/MediaConstraints.cpp:
3065         (WebCore::MediaTrackConstraintSetMap::set):
3066         * platform/mediastream/MediaConstraints.h:
3067         (WebCore::MediaTrackConstraintSetMap::width):
3068         (WebCore::MediaTrackConstraintSetMap::height):
3069         (WebCore::MediaTrackConstraintSetMap::sampleRate):
3070         (WebCore::MediaTrackConstraintSetMap::sampleSize):
3071         (WebCore::MediaTrackConstraintSetMap::aspectRatio):
3072         (WebCore::MediaTrackConstraintSetMap::frameRate):
3073         (WebCore::MediaTrackConstraintSetMap::volume):
3074         (WebCore::MediaTrackConstraintSetMap::echoCancellation):
3075         (WebCore::MediaTrackConstraintSetMap::facingMode):
3076         (WebCore::MediaTrackConstraintSetMap::deviceId):
3077         (WebCore::MediaTrackConstraintSetMap::groupId):
3078         * platform/mediastream/RealtimeMediaSource.cpp:
3079         (WebCore::RealtimeMediaSource::supportsSizeAndFrameRate):
3080         (WebCore::RealtimeMediaSource::applySizeAndFrameRate):
3081         (WebCore::RealtimeMediaSource::applyConstraints):
3082         * platform/mediastream/RealtimeMediaSource.h:
3083         * platform/mediastream/mac/AVVideoCaptureSource.h:
3084         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3085         (WebCore::AVVideoCaptureSource::applySizeAndFrameRate):
3086         (WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions):
3087         (WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate):
3088         * platform/mediastream/openwebrtc/MediaEndpointOwr.h:
3089         * platform/network/CacheValidation.cpp:
3090         (WebCore::computeCurrentAge):
3091         (WebCore::computeFreshnessLifetimeForHTTPFamily):
3092         * platform/network/CacheValidation.h:
3093         * platform/network/DataURLDecoder.h:
3094         * platform/network/HTTPHeaderMap.h:
3095         (WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::updateKeyValue):
3096         * platform/network/HTTPParsers.cpp:
3097         (WebCore::parseHTTPDate):
3098         * platform/network/HTTPParsers.h:
3099         * platform/network/ResourceHandle.cpp:
3100         (WebCore::ResourceHandle::didReceiveResponse):
3101         * platform/network/ResourceResponseBase.cpp:
3102         (WebCore::ResourceResponseBase::cacheControlMaxAge):
3103         (WebCore::parseDateValueInHeader):
3104         (WebCore::ResourceResponseBase::date):
3105         (WebCore::ResourceResponseBase::age):
3106         (WebCore::ResourceResponseBase::expires):
3107         (WebCore::ResourceResponseBase::lastModified):
3108         * platform/network/ResourceResponseBase.h:
3109         (WebCore::ResourceResponseBase::certificateInfo):
3110         * platform/network/SocketStreamHandle.h:
3111         * platform/network/SocketStreamHandleClient.h:
3112         * platform/network/cf/SocketStreamHandleImpl.h:
3113         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
3114         (WebCore::SocketStreamHandleImpl::readStreamCallback):
3115         (WebCore::SocketStreamHandleImpl::platformSend):
3116         * platform/network/curl/SocketStreamHandleImpl.h:
3117         * platform/network/curl/SocketStreamHandleImplCurl.cpp:
3118         (WebCore::SocketStreamHandleImpl::platformSend):
3119         * platform/network/mac/CookieJarMac.mm:
3120         (WebCore::cookiesInPartitionForURL):
3121         * platform/network/soup/SocketStreamHandleImpl.h:
3122         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
3123         (WebCore::SocketStreamHandleImpl::readBytes):
3124         (WebCore::SocketStreamHandleImpl::platformSend):
3125         * rendering/BreakLines.h:
3126         (WebCore::nextBreakablePositionNonLoosely):
3127         (WebCore::nextBreakablePositionLoosely):
3128         (WebCore::isBreakable):
3129         * rendering/HitTestingTransformState.cpp:
3130         (WebCore::HitTestingTransformState::flattenWithTransform):
3131         * rendering/ImageQualityController.cpp:
3132         (WebCore::ImageQualityController::interpolationQualityFromStyle):
3133         (WebCore::ImageQualityController::chooseInterpolationQuality):
3134         * rendering/ImageQualityController.h:
3135         * rendering/InlineIterator.h:
3136         (WebCore::InlineIterator::moveTo):
3137         (WebCore::InlineIterator::nextBreakablePosition):
3138         (WebCore::InlineIterator::setNextBreakablePosition):
3139         * rendering/InlineTextBox.cpp:
3140         (WebCore::InlineTextBox::paintSelection):
3141         (WebCore::InlineTextBox::substringToRender):
3142         (WebCore::InlineTextBox::hyphenatedStringForTextRun):
3143         (WebCore::InlineTextBox::constructTextRun):
3144         * rendering/InlineTextBox.h:
3145         (WebCore::InlineTextBox::substringToRender):
3146         (WebCore::InlineTextBox::hyphenatedStringForTextRun):
3147         (WebCore::InlineTextBox::constructTextRun):
3148         * rendering/OrderIterator.cpp:
3149         (WebCore::OrderIterator::reset):
3150         * rendering/OrderIterator.h:
3151         * rendering/PaintInfo.h:
3152         (WebCore::PaintInfo::applyTransform):
3153         * rendering/RenderBlock.cpp:
3154         (WebCore::RenderBlockRareData::RenderBlockRareData):
3155         (WebCore::RenderBlock::baselinePosition):
3156         (WebCore::RenderBlock::firstLineBaseline):
3157         (WebCore::RenderBlock::inlineBlockBaseline):
3158         (WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
3159         * rendering/RenderBlock.h:
3160         * rendering/RenderBlockFlow.cpp:
3161         (WebCore::RenderBlockFlow::firstLineBaseline):
3162         (WebCore::RenderBlockFlow::inlineBlockBaseline):
3163         * rendering/RenderBlockFlow.h:
3164         * rendering/RenderBox.cpp:
3165         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
3166         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
3167         (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth):
3168         (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight):
3169         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
3170         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
3171         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
3172         (WebCore::RenderBox::computeLogicalHeight):
3173         (WebCore::RenderBox::computeLogicalHeightUsing):
3174         (WebCore::RenderBox::computeContentLogicalHeight):
3175         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
3176         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
3177         (WebCore::RenderBox::computePercentageLogicalHeight):
3178         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3179         (WebCore::RenderBox::availableLogicalHeight):
3180         (WebCore::RenderBox::availableLogicalHeightUsing):
3181         * rendering/RenderBox.h:
3182         (WebCore::RenderBox::firstLineBaseline):
3183         (WebCore::RenderBox::inlineBlockBaseline):
3184         * rendering/RenderCombineText.cpp:
3185         (WebCore::RenderCombineText::computeTextOrigin):
3186         * rendering/RenderCombineText.h:
3187         * rendering/RenderDeprecatedFlexibleBox.cpp:
3188         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3189         * rendering/RenderFlexibleBox.cpp:
3190         (WebCore::RenderFlexibleBox::baselinePosition):
3191         (WebCore::RenderFlexibleBox::firstLineBaseline):
3192         (WebCore::RenderFlexibleBox::inlineBlockBaseline):
3193         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
3194         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
3195         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
3196         (WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing):
3197         (WebCore::RenderFlexibleBox::adjustChildSizeForAspectRatioCrossAxisMinAndMax):
3198         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
3199         * rendering/RenderFlexibleBox.h:
3200         * rendering/RenderFlowThread.cpp:
3201         (WebCore::RenderFlowThread::addForcedRegionBreak):
3202         * rendering/RenderGrid.cpp:
3203         (WebCore::GridTrack::setGrowthLimit):
3204         (WebCore::GridTrack::setGrowthLimitCap):
3205         (WebCore::GridTrack::growthLimitCap):
3206         (WebCore::RenderGrid::GridSizingData::freeSpace):
3207         (WebCore::RenderGrid::GridSizingData::availableSpace):
3208         (WebCore::RenderGrid::GridSizingData::setAvailableSpace):
3209         (WebCore::RenderGrid::GridSizingData::setFreeSpace):
3210         (WebCore::RenderGrid::layoutBlock):
3211         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
3212         (WebCore::RenderGrid::computeIntrinsicLogicalHeight):
3213         (WebCore::RenderGrid::computeIntrinsicLogicalContentHeightUsing):
3214         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3215         (WebCore::overrideContainingBlockContentSizeForChild):
3216         (WebCore::setOverrideContainingBlockContentSizeForChild):
3217         (WebCore::RenderGrid::logicalHeightForChild):
3218         (WebCore::RenderGrid::minSizeForChild):
3219         (WebCore::RenderGrid::minContentForChild):
3220         (WebCore::RenderGrid::maxContentForChild):
3221         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
3222         (WebCore::sortByGridTrackGrowthPotential):
3223         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
3224         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
3225         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
3226         (WebCore::RenderGrid::layoutGridItems):
3227         * rendering/RenderGrid.h:
3228         * rendering/RenderLayer.cpp:
3229         (WebCore::RenderLayer::paintLayerByApplyingTransform):
3230         (WebCore::RenderLayer::hitTestLayer):
3231         * rendering/RenderLayerBacking.cpp:
3232         * rendering/RenderListBox.cpp:
3233         (WebCore::RenderListBox::paintItem):
3234         (WebCore::RenderListBox::listIndexIsVisible):
3235         (WebCore::RenderListBox::computeFirstIndexesVisibleInPaddingTopBottomAreas):
3236         * rendering/RenderListBox.h:
3237         * rendering/RenderMenuList.h:
3238         * rendering/RenderMultiColumnSet.cpp:
3239         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
3240         * rendering/RenderTable.cpp:
3241         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3242         (WebCore::RenderTable::baselinePosition):
3243         (WebCore::RenderTable::inlineBlockBaseline):
3244         (WebCore::RenderTable::firstLineBaseline):
3245         * rendering/RenderTable.h:
3246         * rendering/RenderTableCell.cpp:
3247         (WebCore::RenderTableCell::cellBaselinePosition):
3248         * rendering/RenderTableSection.cpp:
3249         (WebCore::RenderTableSection::firstLineBaseline):
3250         * rendering/RenderTableSection.h:
3251         * rendering/RenderText.cpp:
3252         (WebCore::RenderText::computePreferredLogicalWidths):
3253         (WebCore::RenderText::stringView):
3254         * rendering/RenderText.h:
3255         * rendering/RenderTextControl.h:
3256         * rendering/RenderView.cpp:
3257         (WebCore::RenderView::setSelection):
3258         (WebCore::RenderView::splitSelectionBetweenSubtrees):
3259         (WebCore::RenderView::getSelection):
3260         (WebCore::RenderView::clearSelection):
3261         * rendering/RenderView.h:
3262         * rendering/SelectionSubtreeRoot.h:
3263         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
3264         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
3265         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
3266         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
3267         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
3268         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
3269         * rendering/SimpleLineLayout.cpp:
3270         (WebCore::SimpleLineLayout::LineState::lastFragment):
3271         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
3272         (WebCore::SimpleLineLayout::createTextRuns):
3273         * rendering/SimpleLineLayoutFunctions.cpp:
3274         (WebCore::SimpleLineLayout::paintFlow):
3275         * rendering/line/BreakingContext.h:
3276         (WebCore::WordTrailingSpace::width):
3277         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
3278         (WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition):
3279         (WebCore::BreakingContext::InlineIteratorHistory::moveTo):
3280         (WebCore::tryHyphenating):
3281         (WebCore::BreakingContext::computeAdditionalBetweenWordsWidth):
3282         (WebCore::BreakingContext::handleText):
3283         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
3284         * rendering/mathml/MathMLStyle.cpp:
3285         (WebCore::MathMLStyle::resolveMathMLStyle):
3286         * rendering/mathml/RenderMathMLBlock.cpp:
3287         (WebCore::RenderMathMLBlock::baselinePosition):
3288         (WebCore::RenderMathMLTable::firstLineBaseline):
3289         * rendering/mathml/RenderMathMLBlock.h:
3290         (WebCore::RenderMathMLBlock::ascentForChild):
3291         * rendering/mathml/RenderMathMLFraction.cpp:
3292         (WebCore::RenderMathMLFraction::firstLineBaseline):
3293         * rendering/mathml/RenderMathMLFraction.h:
3294         * rendering/mathml/RenderMathMLOperator.cpp:
3295         (WebCore::RenderMathMLOperator::firstLineBaseline):
3296         * rendering/mathml/RenderMathMLOperator.h:
3297         * rendering/mathml/RenderMathMLPadded.cpp:
3298         (WebCore::RenderMathMLPadded::firstLineBaseline):
3299         * rendering/mathml/RenderMathMLPadded.h:
3300         * rendering/mathml/RenderMathMLRow.cpp:
3301         (WebCore::RenderMathMLRow::firstLineBaseline):
3302         * rendering/mathml/RenderMathMLRow.h:
3303         * rendering/mathml/RenderMathMLScripts.cpp:
3304         (WebCore::RenderMathMLScripts::validateAndGetReferenceChildren):
3305         (WebCore::RenderMathMLScripts::firstLineBaseline):
3306         * rendering/mathml/RenderMathMLScripts.h:
3307         * rendering/mathml/RenderMathMLSpace.cpp:
3308         (WebCore::RenderMathMLSpace::firstLineBaseline):
3309         * rendering/mathml/RenderMathMLSpace.h:
3310         * rendering/mathml/RenderMathMLToken.cpp:
3311         (WebCore::RenderMathMLToken::updateMathVariantGlyph):
3312         (WebCore::RenderMathMLToken::firstLineBaseline):
3313         * rendering/mathml/RenderMathMLToken.h:
3314         * rendering/svg/RenderSVGContainer.cpp:
3315         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
3316         * rendering/svg/RenderSVGForeignObject.cpp:
3317         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
3318         * rendering/svg/RenderSVGImage.cpp:
3319         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3320         * rendering/svg/RenderSVGResourceClipper.cpp:
3321         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
3322         * rendering/svg/RenderSVGResourceFilter.cpp:
3323         (WebCore::RenderSVGResourceFilter::postApplyResource):
3324         * rendering/svg/RenderSVGRoot.cpp:
3325         (WebCore::RenderSVGRoot::nodeAtPoint):
3326         * rendering/svg/RenderSVGShape.cpp:
3327         (WebCore::RenderSVGShape::setupNonScalingStrokeContext):
3328         (WebCore::RenderSVGShape::nodeAtFloatPoint):
3329         (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
3330         * rendering/svg/Render