run-builtins-generator-tests should be able to test WebCore builtins wrapper with...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-07-22  Youenn Fablet  <youenn@apple.com>
2
3         run-builtins-generator-tests should be able to test WebCore builtins wrapper with more than one file
4         https://bugs.webkit.org/show_bug.cgi?id=159921
5
6         Reviewed by Brian Burg.
7
8         Covered by existing and added built-ins tests.
9
10         Updating built system according ---wrappers-only new meaning.
11         builtin generator is now called for each individual built-in file plus once for WebCore wrapper files.
12         WebCore wrapper files allow handling things like conditionally guarded features.
13         They also remove the need to use built-ins macros outside generated code.
14
15         * CMakeLists.txt:
16         * DerivedSources.make:
17
18 2016-07-21  Frederic Wang  <fwang@igalia.com>
19
20         Move parsing of accentunder and accent attributes from renderer to element classes
21         https://bugs.webkit.org/show_bug.cgi?id=159625
22
23         Reviewed by Brent Fulgham.
24
25         We introduce a new MathMLUnderOverElement that is used for elements munder, mover and
26         munderover in order to create RenderMathMLUnderOver and parse and expose the values of the
27         accent and accentunder attributes. This is one more step toward moving MathML attribute
28         parsing to the DOM (bug 156536). We also do minor clean-up for this and previous renderer
29         classes that no longer do attribute parsing: the MathMLNames namespace is no longer necessary
30         and constructors can take a more accurate element type.
31
32         No new tests, already covered by existing test.
33
34         * CMakeLists.txt: Add MathMLUnderOverElement files.
35         * WebCore.xcodeproj/project.pbxproj: Ditto.
36         * mathml/MathMLAllInOne.cpp: Ditto.
37         * mathml/MathMLElement.cpp:
38         (WebCore::MathMLElement::cachedBooleanAttribute): Add parsing of boolean attributes.
39         * mathml/MathMLElement.h: New type and helper functions for boolean attributes.
40         * mathml/MathMLInlineContainerElement.cpp:
41         (WebCore::MathMLInlineContainerElement::createElementRenderer): Remove handling of
42         under/over/underover elements.
43         * mathml/MathMLScriptsElement.cpp:
44         (WebCore::MathMLScriptsElement::MathMLScriptsElement): Remove inline keyword to avoid link
45         errors now that MathMLUnderOverElement overrides that class.
46         * mathml/MathMLScriptsElement.h: Allow MathMLUnderOverElement to override this class.
47         * mathml/MathMLUnderOverElement.cpp:
48         (WebCore::MathMLUnderOverElement::MathMLUnderOverElement):
49         (WebCore::MathMLUnderOverElement::create):
50         (WebCore::MathMLUnderOverElement::accent): Helper function to access the accent value.
51         (WebCore::MathMLUnderOverElement::accentUnder): Helper function to access the accentunder value.
52         (WebCore::MathMLUnderOverElement::parseAttribute): Make accent and accentunder dirty.
53         (WebCore::MathMLUnderOverElement::createElementRenderer): Create RenderMathMLUnderOver
54         * mathml/MathMLUnderOverElement.h:
55         * mathml/mathtags.in: Map under/over/underover to MathMLUnderOverElement.
56         * rendering/mathml/RenderMathMLFraction.cpp: Remove MathMLNames and make the constructor
57         take a MathMLFractionElement.
58         (WebCore::RenderMathMLFraction::RenderMathMLFraction):
59         * rendering/mathml/RenderMathMLFraction.h:
60         * rendering/mathml/RenderMathMLPadded.cpp: Remove MathMLNames and make the constructor
61         take a MathMLPaddedElement.
62         (WebCore::RenderMathMLPadded::RenderMathMLPadded):
63         * rendering/mathml/RenderMathMLPadded.h:
64         * rendering/mathml/RenderMathMLScripts.cpp: Remove MathMLNames and make the constructor
65         take a MathMLScriptsElement. Also rename scriptsElement() to element().
66         (WebCore::RenderMathMLScripts::RenderMathMLScripts):
67         (WebCore::RenderMathMLScripts::element):
68         (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
69         (WebCore::RenderMathMLScripts::scriptsElement): Deleted.
70         * rendering/mathml/RenderMathMLScripts.h:
71         * rendering/mathml/RenderMathMLUnderOver.cpp: Remove MathMLNames and make the constructor
72         take a RenderMathMLUnderOver.
73         (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver):
74         (WebCore::RenderMathMLUnderOver::element):
75         (WebCore::RenderMathMLUnderOver::hasAccent): Use the helper functions for accent and accentunder.
76         * rendering/mathml/RenderMathMLUnderOver.h:
77
78 2016-07-21  Chris Dumez  <cdumez@apple.com>
79
80         Parameter to Node.isSameNode() / isEqualNode() should be mandatory
81         https://bugs.webkit.org/show_bug.cgi?id=160070
82
83         Reviewed by Ryosuke Niwa.
84
85         Parameter to Node.isSameNode() / isEqualNode() should be mandatory as
86         per the specification:
87         - https://dom.spec.whatwg.org/#interface-node
88
89         Chrome and Firefox agree with the specification (although Firefox does
90         not support isSameNode()).
91
92         No new tests, rebaselined existing tests.
93
94         * dom/Node.idl:
95
96 2016-07-21  Chris Dumez  <cdumez@apple.com>
97
98         Parameter to Document.createEvent() should be mandatory
99         https://bugs.webkit.org/show_bug.cgi?id=160065
100
101         Reviewed by Darin Adler.
102
103         Parameter to Document.createEvent() should be mandatory as per the
104         specification:
105         - https://dom.spec.whatwg.org/#document
106
107         We already throw anyway when the parameter is omitted because we use
108         "undefined" as event type, which is invalid. However, we throw the
109         wrong exception.
110
111         Firefox and Chrome agree with the specification here.
112
113         No new tests, rebaselined existing tests.
114
115         * dom/Document.idl:
116
117 2016-07-21  Brian Burg  <bburg@apple.com>
118
119         REGRESSION(r62549): Objective-C DOM bindings sometimes fail to regenerate when CodeGenerator.pm is modified
120         https://bugs.webkit.org/show_bug.cgi?id=160031
121
122         Reviewed by Darin Adler.
123
124         This bug was caused by a refactoring 6 years ago. Not all uses of a variable
125         were renamed, so the ObjC bindings target pattern was not specifying any
126         build scripts as target dependencies.
127
128         * DerivedSources.make: Standardize on {COMMON,JS,DOM}_BINDINGS_SCRIPTS.
129
130 2016-07-21  Darin Adler  <darin@apple.com>
131
132         Remove unneeded content attribute name "playsinline"
133         https://bugs.webkit.org/show_bug.cgi?id=160069
134
135         Reviewed by Chris Dumez.
136
137         * html/HTMLVideoElement.idl: Removed explicit content attribute name on Reflect
138         attribute since it is the same as the name that the code generator will generate.
139
140 2016-07-21  Chris Dumez  <cdumez@apple.com>
141
142         Make parameters to Element.getElementsBy*() operations mandatory
143         https://bugs.webkit.org/show_bug.cgi?id=160060
144
145         Reviewed by Darin Adler.
146
147         Make parameters to Element.getElementsBy*() operations mandatory to
148         match the specification:
149         - https://dom.spec.whatwg.org/#interface-element
150
151         Firefox and Chrome agree with the specification so the compatibility
152         risk should be low.
153
154         It makes very little sense to call these operations without parameter,
155         especially considering WebKit uses the string "undefined" if the
156         parameter is omitted.
157
158         No new tests, rebaselined existing tests.
159
160         * dom/Element.idl:
161
162 2016-07-21  Chris Dumez  <cdumez@apple.com>
163
164         Make parameters mandatory for attribute-related API on Element
165         https://bugs.webkit.org/show_bug.cgi?id=160059
166
167         Reviewed by Ryosuke Niwa.
168
169         Make parameters mandatory for attribute-related API on Element to match
170         the specification:
171         - https://dom.spec.whatwg.org/#element
172
173         Firefox and Chrome agree with the specification. Calling this API
174         without the parameters does not make much sense, especially considering
175         WebKit uses the string "undefined" when the parameter is omitted.
176
177         No new tests, rebaselined existing tests.
178
179         * dom/Element.idl:
180
181 2016-07-21  Myles C. Maxfield  <mmaxfield@apple.com>
182
183         Remove support for deprecated SPI inlineMediaPlaybackRequiresPlaysInlineAttribute
184         https://bugs.webkit.org/show_bug.cgi?id=160066
185
186         Reviewed by Dean Jackson.
187
188         r203520 deprecated inlineMediaPlaybackRequiresPlaysInlineAttribute in favor of
189         allowsInlineMediaPlaybackWithPlaysInlineAttribute and
190         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute. The old
191         inlineMediaPlaybackRequiresPlaysInlineAttribute is SPI and was never released
192         to the public. Therefore, it can be removed safely.
193
194         No new tests because there is no behavior change.
195
196         * page/Settings.cpp:
197         * page/Settings.in:
198         * testing/InternalSettings.cpp:
199         (WebCore::InternalSettings::Backup::Backup): Deleted.
200         (WebCore::InternalSettings::Backup::restoreTo): Deleted.
201         (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Deleted.
202         * testing/InternalSettings.h:
203         * testing/InternalSettings.idl:
204
205 2016-07-21  Dean Jackson  <dino@apple.com>
206
207         REGRESSION (r202927): The internal size of the ImageBuffer is scaled twice by the context scaleFactor
208         https://bugs.webkit.org/show_bug.cgi?id=159981
209         <rdar://problem/27429465>
210
211         Reviewed by Myles Maxfield.
212
213         The change to propagate color spaces through ImageBuffers created an
214         alternate version of createCompatibleBuffer. This version accidentally
215         attempted to take the display resolution (i.e. hidpi) into account
216         when creating the buffer, which meant it was being applied twice.
217
218         The fix is simply to remove that logic. The caller of the method
219         will take the resolution into account, the same way they did
220         with the old createCompatibleBuffer method.
221
222         Test: fast/hidpi/pdf-image-scaled.html
223
224         * platform/graphics/cg/ImageBufferCG.cpp:
225         (WebCore::ImageBuffer::createCompatibleBuffer): Don't calculate
226         a resolution - just use the value of 1.0.
227
228 2016-07-21  John Wilander  <wilander@apple.com>
229
230         Block mixed content synchronous XHR
231         https://bugs.webkit.org/show_bug.cgi?id=105462
232         <rdar://problem/13666424>
233
234         Reviewed by Brent Fulgham.
235
236         Test: http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame.html
237
238         * loader/DocumentThreadableLoader.cpp:
239         (WebCore::DocumentThreadableLoader::loadRequest):
240
241 2016-07-21  Chris Dumez  <cdumez@apple.com>
242
243         Make parameters to Document.getElementsBy*() operations mandatory
244         https://bugs.webkit.org/show_bug.cgi?id=160050
245
246         Reviewed by Daniel Bates.
247
248         Make parameters to Document.getElementsBy*() operations mandatory to
249         match the specification:
250         - https://dom.spec.whatwg.org/#interface-document
251
252         Firefox and Chrome agree with the specification so the compatibility
253         risk should be low.
254
255         It makes very little sense to call these operations without parameter,
256         especially considering WebKit uses the string "undefined" if the
257         parameter is omitted.
258
259         No new tests, rebaselined existing tests.
260
261         * dom/Document.idl:
262
263 2016-07-21  Nan Wang  <n_wang@apple.com>
264
265         AX: aria-label not being used correctly in accessible name calculation of heading
266         https://bugs.webkit.org/show_bug.cgi?id=160009
267
268         Reviewed by Chris Fleizach.
269
270         Actually we are exposing the correct information for heading objects. On macOS, 
271         VoiceOver should handle the logic that picks the right information to speak.
272         On iOS, VoiceOver is speaking the static text child instead of the heading object.
273         So we should set the accessibilityLabel of the static text based on the parent's 
274         alternate label.
275
276         Test: accessibility/ios-simulator/heading-with-aria-label.html
277
278         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
279         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
280
281 2016-07-21  Saam Barati  <sbarati@apple.com>
282
283         op_add/ValueAdd should be an IC in all JIT tiers
284         https://bugs.webkit.org/show_bug.cgi?id=159649
285
286         Reviewed by Benjamin Poulain.
287
288         * ForwardingHeaders/jit/JITMathICForwards.h: Added.
289
290 2016-07-21  Chris Dumez  <cdumez@apple.com>
291
292         Make parameters mandatory for Document.create*() operations
293         https://bugs.webkit.org/show_bug.cgi?id=160047
294
295         Reviewed by Ryosuke Niwa.
296
297         Make parameters mandatory for Document.create*() operations:
298         createTextNode(), createComment(), createCDataSection(),
299         createAttribute() and createProcessingInstruction().
300
301         This matches the specification:
302         - https://dom.spec.whatwg.org/#interface-document
303
304         Firefox and Chrome both agree with the specification so the
305         compatibility risk should be low. Also WebKit uses the string
306         "undefined" when the parameter is omitted, which is not very
307         helpful.
308
309         No new tests, rebaselined existing tests.
310
311         * dom/Document.idl:
312
313 2016-07-21  Chris Dumez  <cdumez@apple.com>
314
315         Fix null handling of SVGAngle/SVGLength.valueAsString attribute
316         https://bugs.webkit.org/show_bug.cgi?id=160025
317
318         Reviewed by Ryosuke Niwa.
319
320         Fix null handling of SVGAngle/SVGLength.valueAsString attribute
321         to match the specification:
322         - https://www.w3.org/TR/SVG2/types.html#InterfaceSVGAngle
323         - https://www.w3.org/TR/SVG2/types.html#InterfaceSVGLength
324
325         In particular, this patch drops [TreatNullAs=EmptyString] IDL
326         extended attribute from this attribute. This is not supposed
327         to change behavior given that both "" and "null" are invalid
328         numbers and the specification says to throw a SYNTAX_ERR in
329         this case.
330
331         However, WebKit currently ignores assignments to "" instead
332         of throwing. As a result, assigning to null will now throw
333         instead of being ignored. The compatibility risk should be
334         low because both Firefox and Chrome throw when assigning
335         null.
336
337         I did not change the behavior when assigning to "" because
338         it is a bit out of scope for this patch and browsers to not
339         seem to agree:
340         - Firefox throws
341         - Chrome set value to "0"
342         - WebKit ignores the assignment
343
344         The specification seems to agree with Firefox as far as I
345         can tell given that "" is not a valid number as per:
346         - https://www.w3.org/TR/css3-values/#numbers
347
348         Test: svg/dom/valueAsString-null.html
349
350         * svg/SVGAngle.idl:
351         * svg/SVGLength.idl:
352
353 2016-07-21  Chris Dumez  <cdumez@apple.com>
354
355         Fix null handling of HTMLFontElement.color
356         https://bugs.webkit.org/show_bug.cgi?id=160036
357
358         Reviewed by Ryosuke Niwa.
359
360         Fix null handling of HTMLFontElement.color to match the specification:
361         - https://html.spec.whatwg.org/#htmlfontelement
362
363         We are supposed to treat null as the empty string. Both Firefox and
364         Chrome agree with the specification.
365
366         No new tests, rebaselined existing tests.
367
368         * html/HTMLFontElement.idl:
369
370 2016-07-21  Chris Dumez  <cdumez@apple.com>
371
372         Fix null handling for several HTMLTableElement attributes
373         https://bugs.webkit.org/show_bug.cgi?id=160041
374
375         Reviewed by Ryosuke Niwa.
376
377         Fix null handling for several HTMLTableElement attributes to match the
378         specification:
379         - https://html.spec.whatwg.org/#HTMLTableElement-partial
380
381         The attributes in question are 'bicolor', 'cellSpacing' and
382         'cellPadding'. We are supposed to treat null as the empty string for
383         these attributes.
384
385         Firefox and Chrome both agree with the specification.
386
387         No new tests, rebaselined existing tests.
388
389         * html/HTMLTableElement.idl:
390
391 2016-07-21  Chris Dumez  <cdumez@apple.com>
392
393         Fix null handling for HTMLObjectElement.border
394         https://bugs.webkit.org/show_bug.cgi?id=160040
395
396         Reviewed by Ryosuke Niwa.
397
398         Fix null handling for HTMLObjectElement.border to match the specification:
399         - https://html.spec.whatwg.org/#HTMLObjectElement-partial
400
401         We are supposed to treat null as the empty string.
402
403         Both Firefox and Chrome agree with the specification.
404
405         No new tests, rebaselined existing tests.
406
407         * html/HTMLObjectElement.idl:
408
409 2016-07-21  Chris Dumez  <cdumez@apple.com>
410
411         Fix null handling for td.bgColor / tr.bgColor
412         https://bugs.webkit.org/show_bug.cgi?id=160043
413
414         Reviewed by Ryosuke Niwa.
415
416         Fix null handling for td.bgColor / tr.bgColor to match the
417         specification:
418         - https://html.spec.whatwg.org/#HTMLTableCellElement-partial
419         - https://html.spec.whatwg.org/#HTMLTableRowElement-partial
420
421         We are supposed to treat null as the empty string.
422
423         Firefox and Chrome both agree with the specification.
424
425         No new tests, rebaselined existing tests.
426
427         * html/HTMLTableCellElement.idl:
428         * html/HTMLTableRowElement.idl:
429
430 2016-07-21  Chris Dumez  <cdumez@apple.com>
431
432         Fix null handling for several HTMLBodyElement attributes
433         https://bugs.webkit.org/show_bug.cgi?id=160044
434
435         Reviewed by Ryosuke Niwa.
436
437         Fix null handling for several HTMLBodyElement attributes to match the
438         specification:
439         - https://html.spec.whatwg.org/#HTMLBodyElement-partial
440
441         The attributes in question are: 'text', 'link', 'vlink', 'alink' and
442         'bgcolor'.
443
444         We are supposed to treat null as the empty string for these attributes.
445
446         Firefox and Chrome both agree with the specification.
447
448         No new tests, rebaselined existing tests.
449
450         * html/HTMLBodyElement.idl:
451
452 2016-07-21  Chris Dumez  <cdumez@apple.com>
453
454         Fix null handling for HTMLIFrameElement.marginWidth / marginHeight
455         https://bugs.webkit.org/show_bug.cgi?id=160037
456
457         Reviewed by Ryosuke Niwa.
458
459         Fix null handling for HTMLIFrameElement.marginWidth / marginHeight to
460         match the specification:
461         - https://html.spec.whatwg.org/#HTMLIFrameElement-partial
462
463         We are supposed to treat null as the empty string. Both Firefox and
464         Chrome agree with the specification.
465
466         No new tests, rebaselined existing tests.
467
468         * html/HTMLIFrameElement.idl:
469
470 2016-07-21  Chris Dumez  <cdumez@apple.com>
471
472         Fix null handling for HTMLImageElement.border
473         https://bugs.webkit.org/show_bug.cgi?id=160039
474
475         Reviewed by Ryosuke Niwa.
476
477         Fix null handling for HTMLImageElement.border to match the specification:
478         - https://html.spec.whatwg.org/#HTMLImageElement-partial
479
480         We are supposed to treat null as the empty string.
481
482         Both Firefox and Chrome agree with the specification.
483
484         No new tests, rebaselined existing tests.
485
486         * html/HTMLImageElement.idl:
487
488 2016-07-21  Daniel Bates  <dabates@apple.com>
489
490         REGRESSION: Plugin replaced YouTube Flash videos always have the same width
491         https://bugs.webkit.org/show_bug.cgi?id=159998
492         <rdar://problem/27462285>
493
494         Reviewed by Simon Fraser.
495
496         Fixes an issue where the width of a plugin replaced YouTube video loaded via an HTML embed
497         element would always have the same width regardless of value of the width attribute.
498
499         For YouTube Flash videos the YouTube plugin replacement substitutes a shadow DOM subtree
500         for the default renderer of an HTML embed element. The root of this shadow DOM subtree
501         is an HTML div element. Currently we set inline styles on this <div> when it is instantiated.
502         In particular, we set inline display and position to "inline-block" and "relative", respectively,
503         and set an invalid height and width (we specify a font weight value instead of a CSS length value
504         - this causes an ASSERT_NOT_REACHED() assertion failure in StyleBuilderConverter::convertLengthSizing()
505         in a debug build). These styles never worked as intended and we ultimately created an inline
506         renderer (ignoring display "inline-block") that had auto width and height. Instead it is sufficient
507         to remove all these inline styles and create a RenderBlockFlow renderer for this <div> so that it
508         renders as a block, non-replaced element to achieve the intended illusion that the <embed> is a
509         single element.
510
511         * html/shadow/YouTubeEmbedShadowElement.cpp: Remove unused header HTMLEmbedElement.h and include
512         header RenderBlockFlow.h. Also update copyright in license block.
513         (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement): Remove inline styles as these
514         never worked as intended.
515         (WebCore::YouTubeEmbedShadowElement::createElementRenderer): Override; create a block-flow
516         renderer for us so that we layout as a block, non-replaced element.
517         * html/shadow/YouTubeEmbedShadowElement.h:
518
519 2016-07-21  Myles C. Maxfield  <mmaxfield@apple.com>
520
521         [iPhone] Playing a video on tudou.com plays only sound, no video
522         https://bugs.webkit.org/show_bug.cgi?id=159967
523         <rdar://problem/26964090>
524
525         Reviewed by Jon Lee, Jeremy Jones, and Anders Carlsson.
526
527         WebKit recently starting honoring the playsinline and webkit-playsinline
528         attribute on iPhones. However, because these attributes previously did
529         nothing, some sites (such as Todou) were setting them on their content
530         and expecting that they are not honored. In this specific case, the
531         video is absolutely positioned to be 1 pixel x 1 pixel.
532
533         Previously, with iOS 9, apps could set the allowsInlineMediaPlayback
534         property on their WKWebView, which would honor the webkit-playsinline
535         attribute. Safari on iPhones didn't do this.
536
537         In order to not break these existing apps, it's important that the
538         allowsInlineMediaPlayback preference still allows webkit-playsinline
539         videos to play inline in apps using WKWebView. However, in Safari, these
540         videos should play fullscreen. (Todou videos have webkit-playsinline
541         but not playsinline.)
542
543         Therefore, in Safari, videos with playsinline should be inline, but
544         videos with webkit-playsinline should be fullscreen. In apps using
545         WKWebViews, if the app sets allowsInlineMediaPlayback, then videos with
546         playsinline should be inline, and videos with webkit-playsinline should
547         also be inline. Videos on iPad and Mac should all be inline by default.
548
549         We can create some truth tables for the cases which need to be covered:
550
551         All apps on Mac / iPad:
552         Presence of playsinline | Presence of webkit-playsinline | Result
553         ========================|================================|===========
554         Not present             | Not present                    | Inline
555         Present                 | Not present                    | Inline
556         Not Present             | Present                        | Inline
557         Present                 | Present                        | Inline
558
559         Safari on iPhone:
560         Presence of playsinline | Presence of webkit-playsinline | Result
561         ========================|================================|===========
562         Not present             | Not present                    | Fullscreen
563         Present                 | Not present                    | Inline
564         Not Present             | Present                        | Fullscreen
565         Present                 | Present                        | Inline
566
567         App on iPhone which sets allowsInlineMediaPlayback:
568         Presence of playsinline | Presence of webkit-playsinline | Result
569         ========================|================================|===========
570         Not present             | Not present                    | Fullscreen
571         Present                 | Not present                    | Inline
572         Not Present             | Present                        | Inline
573         Present                 | Present                        | Inline
574
575         The way to distinguish Safari from another app is to create an SPI
576         boolean preference which Safari can set. This is already how the
577         iPhone and iPad are differentiated using the requiresPlayInlineAttribute
578         which Safari sets but other apps don't. However, this preference is
579         no longer sufficient because Safari should now be discriminating
580         between the playsinline and webkit-playsinline attributes. Therefore,
581         this preference should be extended to two boolean preferences, which
582         this patch adds:
583
584         allowsInlineMediaPlaybackWithPlaysInlineAttribute
585         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute
586
587         Safari on iPhone will set
588         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute to true,
589         and allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute to
590         false. Other apps on iPhone will get their defaults values (because they
591         are SPI) which means they will both be true. On iPad and Mac, apps will
592         use the defaults values where both are false.
593
594         This patch adds support for these two preferences, but does not remove
595         the existing inlineMediaPlaybackRequiresPlaysInlineAttribute preference.
596         I will remove the exising preference as soon as I update Safari to migrate
597         off of it.
598
599         Test: media/video-playsinline.html
600
601         * html/MediaElementSession.cpp:
602         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
603         * page/Settings.cpp:
604         * page/Settings.in:
605         * testing/InternalSettings.cpp:
606         (WebCore::InternalSettings::Backup::Backup):
607         (WebCore::InternalSettings::Backup::restoreTo):
608         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithPlaysInlineAttribute):
609         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute):
610         * testing/InternalSettings.h:
611         * testing/InternalSettings.idl:
612
613 2016-07-21  Ryosuke Niwa  <rniwa@webkit.org>
614
615         Crash accessing null renderer inside WebCore::DeleteSelectionCommand::doApply
616         https://bugs.webkit.org/show_bug.cgi?id=160011
617
618         Reviewed by Chris Dumez.
619
620         Add a null pointer check for renderer() call.
621
622         Unfortunately no new tests since we don't have a reproduction.
623
624         * editing/DeleteSelectionCommand.cpp:
625         (WebCore::DeleteSelectionCommand::doApply):
626
627 2016-07-21  Chris Dumez  <cdumez@apple.com>
628
629         The 2 first parameters to DOMImplementation.createDocument() should be mandatory
630         https://bugs.webkit.org/show_bug.cgi?id=160030
631
632         Reviewed by Sam Weinig.
633
634         The 2 first parameters to DOMImplementation.createDocument() should be mandatory
635         as per the specification:
636         - https://dom.spec.whatwg.org/#domimplementation
637
638         Firefox and Chrome both agree with the specification. However, those
639         parameters were marked as optional in WebKit. Calling this function
640         without parameters would create a document element whose tag is the
641         string "undefined", which does not seem helpful. This patch thus
642         aligns our behavior with the specification and other browsers.
643
644         No new tests, rebaselined existing tests.
645
646         * dom/DOMImplementation.idl:
647
648 2016-07-21  Chris Dumez  <cdumez@apple.com>
649
650         Kill legacy valueToStringWithNullCheck() utility function
651         https://bugs.webkit.org/show_bug.cgi?id=159991
652
653         Reviewed by Sam Weinig.
654
655         Kill legacy valueToStringWithNullCheck() utility function. Treating null as
656         a null string is legacy behavior so drop this function so that people are
657         not tempted to use it. We should be using either:
658         1. JSValue::toWTFString() for non-nullable DOMStrings
659         2. valueToStringWithUndefinedOrNullCheck() for nullable DOMStrings
660         3. valueToStringTreatingNullAsEmptyString() for strings with [TreatNullAs=EmptyString]
661
662         No new tests, no web-exposed behavior change.
663
664         * bindings/js/JSDOMBinding.cpp:
665         (WebCore::valueToStringWithNullCheck): Deleted.
666         * bindings/js/JSDOMBinding.h:
667         * bindings/js/JSHTMLFrameElementCustom.cpp:
668         (WebCore::JSHTMLFrameElement::setLocation):
669         * html/HTMLFrameElement.idl:
670
671 2016-07-21  Zalan Bujtas  <zalan@apple.com>
672
673         Do not keep invalid IOSurface in ImageBufferData.
674         https://bugs.webkit.org/show_bug.cgi?id=160005
675         <rdar://problem/27208636>
676
677         Reviewed by Simon Fraser.
678
679         When we fail to initialize the IOSurface for the accelerated context, we switch over to
680         the non-accelerated code path. Since ImageBufferData::surface is used to indicate whether
681         the graphics context is in accelerated mode, we need to reset it when the initialization fails.
682
683         Unable to create a test case.
684
685         * platform/graphics/cg/ImageBufferCG.cpp:
686         (WebCore::ImageBuffer::ImageBuffer):
687
688 2016-07-21  Chris Dumez  <cdumez@apple.com>
689
690         playsInline IDL attribute has the wrong casing
691         https://bugs.webkit.org/show_bug.cgi?id=160029
692         <rdar://problem/27474031>
693
694         Reviewed by Jon Lee.
695
696         Fix case from video.playsinline to video.playsInline in order to match
697         the specification:
698         - https://html.spec.whatwg.org/multipage/embedded-content.html#the-video-element:dom-video-playsinline
699
700         It still reflects the "playsinline" content attribute though, as per
701         the specification:
702         - https://html.spec.whatwg.org/multipage/embedded-content.html#dom-video-playsinline
703
704         No new tests, updated existing test.
705
706         * html/HTMLVideoElement.idl:
707
708 2016-07-21  Chris Dumez  <cdumez@apple.com>
709
710         Drop [TreatNullAs=EmptyString] from CanvasRenderingContext2D.globalCompositeOperation
711         https://bugs.webkit.org/show_bug.cgi?id=160026
712
713         Reviewed by Sam Weinig.
714
715         Drop [TreatNullAs=EmptyString] from CanvasRenderingContext2D.globalCompositeOperation
716         attribute as it does not match the specification:
717         - https://html.spec.whatwg.org/multipage/scripting.html#canvascompositing
718
719         It does not change web-exposed behavior because assigning to "" or "null"
720         gets ignored as those are not valid operations.
721
722         Test: fast/canvas/context-globalCompositeOperation-null.html
723
724         * html/canvas/CanvasRenderingContext2D.idl:
725
726 2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
727
728         [GTK][Threaded Compositor] Overlay scrollbars shouldn't be a requirement of the threaded compositor
729         https://bugs.webkit.org/show_bug.cgi?id=160020
730
731         Reviewed by Michael Catanzaro.
732
733         It has been a requirement only because we didn't really know why frame scrollbars were not rendered when using
734         the threaded compositor. The reason is that RenderView doesn't use layers for FrameView scrollbars by default,
735         unless using overlay scrollbars. When using the threaded compositor we really need layers for the FrameView
736         scrollbars even when not using overlay scrollbars.
737
738         * platform/gtk/ScrollbarThemeGtk.cpp:
739         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Stop enforcing overlay scrollbars when threaded compositor is enabled.
740         * rendering/RenderLayerCompositor.cpp:
741         (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls): Always use layers for scrollbars when
742         threaded compositor is enabled.
743
744 2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
745
746         [Cairo] Fix a crash in fast/canvas/canvas-getImageData-invalid-result-buffer-crash.html
747         https://bugs.webkit.org/show_bug.cgi?id=160014
748
749         Reviewed by Michael Catanzaro.
750
751         In r202887 some null checks were added for JSArray::createUninitialized (and related) but not for the
752         ImageBuffer cairo implementation.
753
754         * platform/graphics/cairo/ImageBufferCairo.cpp:
755         (WebCore::getImageData): Return early if Uint8ClampedArray::createUninitialized() returns nullptr.
756
757 2016-07-21  Miguel Gomez  <magomez@igalia.com>
758
759         [GTK] The GSTREAMER_GL path in MediaPlayerPrivateGStreamerBase::paintToTextureMapper() is missing a mutex lock
760         https://bugs.webkit.org/show_bug.cgi?id=160018
761
762         Reviewed by Philippe Normand.
763
764         Lock the video sample mutex while accessing it.
765
766         Covered by existent tests.
767
768         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
769         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
770
771 2016-07-21  Miguel Gomez  <magomez@igalia.com>
772
773         [Threaded Compositor] Flickering when zooming in/out in maps.google.com
774         https://bugs.webkit.org/show_bug.cgi?id=154069
775
776         Reviewed by Carlos Garcia Campos.
777
778         Add a new extra buffer to GraphicsContext3D when using the Threaded Compositor,
779         so it doesn't have to reuse the buffers that are still waiting for composition.
780
781         Covered by existing tests.
782
783         * platform/graphics/GraphicsContext3D.h:
784         Add a new texture to use for the rendering. Remove the compositor fbo we were using.
785         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
786         (WebCore::GraphicsContext3D::GraphicsContext3D):
787         Initialize the new texture and remove the previous fbo related code.
788         (WebCore::GraphicsContext3D::~GraphicsContext3D):
789         Properly destroy the new texture and remove the previous fbo related code.
790         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
791         (WebCore::GraphicsContext3D::reshapeFBOs):
792         Allocate the new texture and remove the previous fbo allocation.
793         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
794         (WebCore::GraphicsContext3D::prepareTexture):
795         Use a single fbo with three textures instead of two fbos with a texture each.
796         Rotate the three textures usage so:
797         - m_texture becomes m_compositorTexture to be pushed to the compositor.
798         - m_intermediateTexture becomes m_texture to receive the next rendering.
799         - m_compositorTexture becomes m_intermediateTexture.
800         And add a glFlush() to ensure that the gl commands are sent to the pipeline.
801         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
802         (WebCore::GraphicsContext3D::reshapeFBOs):
803         Allocate the new texture.
804
805 2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
806
807         [GTK][Threaded Compositor] Web view background colors don't work
808         https://bugs.webkit.org/show_bug.cgi?id=159465
809
810         Reviewed by Michael Catanzaro.
811
812         * rendering/RenderLayerBacking.cpp:
813         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Initialize frame view layer opacity for platforms not
814         using the tiled cache layer.
815
816 2016-07-20  Youenn Fablet  <youenn@apple.com>
817
818         [XHR] Cache response JS object in case of arraybuffer and blob response types
819         https://bugs.webkit.org/show_bug.cgi?id=128903
820
821         Reviewed by Alex Christensen.
822
823         Covered by existing and modified tests.
824
825         Making response getter a JS builtin that caches response in @response private slot.
826         Handling invalidation of cached response with @responseCacheIsValid new private method.
827         Handling creation of cached response with @retrieveResponse new private method which reuses most of
828         JSXMLHttpRequest::response previous code.
829
830         Caching of responses is activated whenever load ended without any error for blob and arraybuffer response types.
831
832         Caching of response for document is also activated in case the response getter is used but not if responseXML getter is used.
833
834         * CMakeLists.txt: Adding XMLHttpRequest.js.
835         * DerivedSources.make: Ditto.
836         * bindings/js/JSXMLHttpRequestCustom.cpp:
837         (WebCore::JSXMLHttpRequest::retrieveResponse): Implements creation of to-be-cached response.
838         (WebCore::JSXMLHttpRequest::response): Deleted.
839         * bindings/js/WebCoreBuiltinNames.h: Adding new private names.
840         * xml/XMLHttpRequest.cpp:
841         (WebCore::XMLHttpRequest::didCacheResponse): Renamed from didCacheResponseJSON as all response types are now cached.
842         (WebCore::XMLHttpRequest::didCacheResponseJSON): Deleted.
843         * xml/XMLHttpRequest.h:
844         * xml/XMLHttpRequest.idl:
845
846 2016-07-20  Youenn Fablet  <youenn@apple.com>
847
848         Remove crossOriginRequestPolicy from ThreadableLoaderOptions
849         https://bugs.webkit.org/show_bug.cgi?id=159417
850
851         Reviewed by Alex Christensen.
852
853         No observable change.
854
855         * Modules/fetch/FetchLoader.cpp:
856         (WebCore::FetchLoader::start): DenyCrossOriginRequests -> FetchOptions::Mode::SameOrigin.
857         * fileapi/FileReaderLoader.cpp:
858         (WebCore::FileReaderLoader::start): DenyCrossOriginRequests -> FetchOptions::Mode::SameOrigin.
859         * inspector/InspectorNetworkAgent.cpp:
860         (WebCore::InspectorNetworkAgent::loadResource): AllowCrossOriginRequests -> FetchOptions::Mode::NoCors.
861         * loader/DocumentThreadableLoader.cpp:
862         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
863         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): UseAccessControl -> FetchOptions::Mode::Cors.
864         (WebCore::DocumentThreadableLoader::redirectReceived): Ditto.
865         (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
866         (WebCore::DocumentThreadableLoader::loadRequest): Use NoCors as option passed to ResourceLoader. This allows
867         desactivating ResourceLoader CORS checks as they are done in DocumentThreadableLoader right now. In the future,
868         these checks should be moved to ResourceLoader and DocumentThreadableLoader should directly pass the fetch mode
869         option.
870         (WebCore::DocumentThreadableLoader::isAllowedRedirect): AllowCrossOriginRequests -> FetchOptions::Mode::NoCors.
871         * loader/ThreadableLoader.cpp:
872         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Removing CrossOriginRequestPolicy.
873         * loader/ThreadableLoader.h: Ditto.
874         * loader/WorkerThreadableLoader.cpp:
875         (WebCore::LoaderTaskOptions::LoaderTaskOptions): Ditto.
876         * page/EventSource.cpp:
877         (WebCore::EventSource::connect): UseAccessControl -> FetchOptions::Mode::Cors.
878         * workers/Worker.cpp:
879         (WebCore::Worker::create): DenyCrossOriginRequests -> FetchOptions::Mode::SameOrigin.
880         * workers/WorkerGlobalScope.cpp:
881         (WebCore::WorkerGlobalScope::importScripts): AllowCrossOriginRequests -> FetchOptions::Mode::NoCors.
882         * workers/WorkerScriptLoader.cpp:
883         (WebCore::WorkerScriptLoader::loadSynchronously):
884         (WebCore::WorkerScriptLoader::loadAsynchronously):
885         * workers/WorkerScriptLoader.h:
886         * xml/XMLHttpRequest.cpp:
887         (WebCore::XMLHttpRequest::createRequest):
888
889 2016-07-20  Chris Dumez  <cdumez@apple.com>
890
891         Fix null handling of several Document attributes
892         https://bugs.webkit.org/show_bug.cgi?id=159997
893
894         Reviewed by Ryosuke Niwa.
895
896         Fix null handling of the following Document attributes: title, cookie
897         and domain.
898
899         In WebKit, they were all marked as [TreatNullAs=EmptyString], which
900         does not match the specification:
901         - https://html.spec.whatwg.org/multipage/dom.html#document
902
903         Details for each attribute:
904         - title: null is now treated as the string "null", thus setting the
905           document title to "null". This matches Firefox and Chrome.
906         - cookie: adds a "null" cookie instead of being a no-op. This matches
907                   both Firefox and Chrome.
908         - domain: Calls setDomain(String("null")) instead of
909                   setDomain(String()). This throws an exception because "null"
910                   is not a suffix of the effective domain name. The behavior
911                   is the same in Firefox and Chrome. Previously, we were
912                   already throwing an exception since setting the domain to
913                   the empty string throws, as per the specification.
914
915         Test: http/tests//dom/document-attributes-null-handling.html
916
917         * dom/Document.idl:
918
919 2016-07-20  Commit Queue  <commit-queue@webkit.org>
920
921         Unreviewed, rolling out r203471.
922         https://bugs.webkit.org/show_bug.cgi?id=160003
923
924         many iOS-simulator tests are failing (Requested by litherum on
925         #webkit).
926
927         Reverted changeset:
928
929         "[iPhone] Playing a video on tudou.com plays only sound, no
930         video"
931         https://bugs.webkit.org/show_bug.cgi?id=159967
932         http://trac.webkit.org/changeset/203471
933
934 2016-07-19  Ryosuke Niwa  <rniwa@webkit.org>
935
936         iOS: Cannot paste images in RTF content
937         https://bugs.webkit.org/show_bug.cgi?id=159964
938         <rdar://problem/27442806>
939
940         Reviewed by Enrica Casucci.
941
942         The bug was caused by setDefersLoading(true) not deferring image loading for the parsed fragment.
943         Worked around this bug by disabling image loading while parsing the document fragment.
944
945         * editing/ios/EditorIOS.mm:
946         (WebCore::Editor::createFragmentAndAddResources):
947
948 2016-07-20  Brady Eidson  <beidson@apple.com>
949
950         Address a small FIXME in IDB code.
951         https://bugs.webkit.org/show_bug.cgi?id=159999
952
953         Reviewed by Andy Estes.
954
955         No new tests (No behavior change).
956
957         * Modules/indexeddb/IDBRequest.cpp:
958         (WebCore::IDBRequest::IDBRequest):
959         
960         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
961         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier): Deleted.
962         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
963
964 2016-07-20  Brady Eidson  <beidson@apple.com>
965
966         Remove some "modernFoo"s from IndexedDB code.
967         https://bugs.webkit.org/show_bug.cgi?id=159985
968
969         Reviewed by Andy Estes.
970
971         No new tests (No known behavior change).
972
973         * Modules/indexeddb/IDBCursor.cpp:
974         (WebCore::IDBCursor::IDBCursor):
975         (WebCore::IDBCursor::~IDBCursor):
976         (WebCore::IDBCursor::sourcesDeleted):
977         (WebCore::IDBCursor::effectiveObjectStore):
978         (WebCore::IDBCursor::transaction):
979         (WebCore::IDBCursor::direction):
980         (WebCore::IDBCursor::update):
981         (WebCore::IDBCursor::advance):
982         (WebCore::IDBCursor::continueFunction):
983         (WebCore::IDBCursor::uncheckedIterateCursor):
984         (WebCore::IDBCursor::deleteFunction):
985         (WebCore::IDBCursor::setGetResult):
986         
987         * Modules/indexeddb/IDBIndex.cpp:
988         (WebCore::IDBIndex::IDBIndex):
989         (WebCore::IDBIndex::~IDBIndex):
990         (WebCore::IDBIndex::hasPendingActivity):
991         (WebCore::IDBIndex::name):
992         (WebCore::IDBIndex::objectStore):
993         (WebCore::IDBIndex::keyPath):
994         (WebCore::IDBIndex::unique):
995         (WebCore::IDBIndex::multiEntry):
996         (WebCore::IDBIndex::openCursor):
997         (WebCore::IDBIndex::doCount):
998         (WebCore::IDBIndex::openKeyCursor):
999         (WebCore::IDBIndex::doGet):
1000         (WebCore::IDBIndex::doGetKey):
1001         (WebCore::IDBIndex::markAsDeleted):
1002         * Modules/indexeddb/IDBIndex.h:
1003         
1004         * Modules/indexeddb/IDBObjectStore.cpp:
1005         (WebCore::IDBObjectStore::transaction):
1006         (WebCore::IDBObjectStore::deleteFunction): Deleted.
1007         (WebCore::IDBObjectStore::modernDelete): Deleted.
1008         * Modules/indexeddb/IDBObjectStore.h:
1009         
1010         * bindings/js/JSIDBIndexCustom.cpp:
1011         (WebCore::JSIDBIndex::visitAdditionalChildren):
1012
1013 2016-07-20  Chris Dumez  <cdumez@apple.com>
1014
1015         Stop using valueToStringWithNullCheck() in JSCSSStyleDeclaration::putDelegate()
1016         https://bugs.webkit.org/show_bug.cgi?id=159982
1017
1018         Reviewed by Ryosuke Niwa.
1019
1020         valueToStringWithNullCheck() treats null as the null String() which is
1021         legacy / non standard behavior. The specification says we should treat
1022         null as the empty string:
1023         - https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-camel-cased-attribute
1024
1025         Therefore, we should be using valueToStringTreatingNullAsEmptyString() instead.
1026
1027         In practice, there is no web-exposed behavior change because
1028         MutableStyleProperties::setProperty() removes the property wether the
1029         value is the null String or the empty String.
1030
1031         This behavior is correct since the specification says that we should
1032         remove the property if the value is the empty string:
1033         - https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty (step 4)
1034
1035         I added test coverage to make sure we behave according to specification.
1036         This test is passing in Firefox, Chrome and in WebKit (before and after
1037         my change).
1038
1039         Test: fast/css/CSSStyleDeclaration-property-setter.html
1040
1041         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1042         (WebCore::JSCSSStyleDeclaration::putDelegate):
1043
1044 2016-07-20  Chris Dumez  <cdumez@apple.com>
1045
1046         Fix null handling of HTMLFrameElement.marginWidth / marginHeight
1047         https://bugs.webkit.org/show_bug.cgi?id=159987
1048
1049         Reviewed by Ryosuke Niwa.
1050
1051         Fix null handling of HTMLFrameElement.marginWidth / marginHeight:
1052         - https://html.spec.whatwg.org/multipage/obsolete.html#htmlframeelement
1053
1054         We are supposed to treat null as the empty string but we treat it as
1055         the string "null".
1056
1057         Firefox and Chrome both match the specification.
1058
1059         No new tests, updated existing tests.
1060
1061         * html/HTMLFrameElement.idl:
1062
1063 2016-07-20  Wenson Hsieh  <wenson_hsieh@apple.com>
1064
1065         Pausing autoplayed media should not remove all restrictions for that media element
1066         https://bugs.webkit.org/show_bug.cgi?id=159988
1067
1068         Reviewed by Jon Lee.
1069
1070         Localizes the removal of behavior restrictions introduced in r203464 upon pausing an
1071         autoplaying video to just affect the hiding or showing of the media controller. This
1072         prevents pages from using Javascript to start playing autoplaying videos that have
1073         been paused by the user.
1074
1075         * html/HTMLMediaElement.cpp:
1076         (WebCore::HTMLMediaElement::pause):
1077
1078 2016-07-20  Myles C. Maxfield  <mmaxfield@apple.com>
1079
1080         [iPhone] Playing a video on tudou.com plays only sound, no video
1081         https://bugs.webkit.org/show_bug.cgi?id=159967
1082         <rdar://problem/26964090>
1083
1084         Reviewed by Jon Lee.
1085
1086         WebKit recently starting honoring the playsinline and webkit-playsinline
1087         attribute on iPhones. However, because these attributes previously did
1088         nothing, some sites (such as Todou) were setting them on their content
1089         and expecting that they are not honored. In this specific case, the
1090         video is absolutely positioned to be 1 pixel x 1 pixel.
1091
1092         Previously, with iOS 9, apps could set the allowsInlineMediaPlayback
1093         property on their WKWebView, which would honor the webkit-playsinline
1094         attribute. Safari on iPhones didn't do this.
1095
1096         In order to not break these existing apps, it's important that the
1097         allowsInlineMediaPlayback preference still allows webkit-playsinline
1098         videos to play inline in apps using WKWebView. However, in Safari, these
1099         videos should play fullscreen. (Todou videos have webkit-playsinline
1100         but not playsinline.)
1101
1102         Therefore, in Safari, videos with playsinline should be inline, but
1103         videos with webkit-playsinline should be fullscreen. In apps using
1104         WKWebViews, if the app sets allowsInlineMediaPlayback, then videos with
1105         playsinline should be inline, and videos with webkit-playsinline should
1106         also be inline. Videos on iPad and Mac should all be inline by default.
1107
1108         We can create some truth tables for the cases which need to be covered:
1109
1110         All apps on Mac / iPad:
1111         Presence of playsinline | Presence of webkit-playsinline | Result
1112         ========================|================================|===========
1113         Not present             | Not present                    | Inline
1114         Present                 | Not present                    | Inline
1115         Not Present             | Present                        | Inline
1116         Present                 | Present                        | Inline
1117
1118         Safari on iPhone:
1119         Presence of playsinline | Presence of webkit-playsinline | Result
1120         ========================|================================|===========
1121         Not present             | Not present                    | Fullscreen
1122         Present                 | Not present                    | Inline
1123         Not Present             | Present                        | Fullscreen
1124         Present                 | Present                        | Inline
1125
1126         App on iPhone which sets allowsInlineMediaPlayback:
1127         Presence of playsinline | Presence of webkit-playsinline | Result
1128         ========================|================================|===========
1129         Not present             | Not present                    | Fullscreen
1130         Present                 | Not present                    | Inline
1131         Not Present             | Present                        | Inline
1132         Present                 | Present                        | Inline
1133
1134         The way to distinguish Safari from another app is to create an SPI
1135         boolean preference which Safari can set. This is already how the
1136         iPhone and iPad are differentiated using the requiresPlayInlineAttribute
1137         which Safari sets but other apps don't. However, this preference is
1138         no longer sufficient because Safari should now be discriminating
1139         between the playsinline and webkit-playsinline attributes. Therefore,
1140         this preference should be extended to two boolean preferences, which
1141         this patch adds:
1142
1143         allowsInlineMediaPlaybackWithPlaysInlineAttribute
1144         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute
1145
1146         Safari on iPhone will set
1147         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute to true,
1148         and allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute to
1149         false. Other apps on iPhone will get their defaults values (because they
1150         are SPI) which means they will both be true. On iPad and Mac, apps will
1151         use the defaults values where both are false.
1152
1153         This patch adds support for these two preferences, but does not remove
1154         the existing inlineMediaPlaybackRequiresPlaysInlineAttribute preference.
1155         I will remove the exising preference as soon as I update Safari to migrate
1156         off of it.
1157
1158         Test: media/video-playsinline.html
1159
1160         * html/MediaElementSession.cpp:
1161         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
1162         * page/Settings.cpp:
1163         * page/Settings.in:
1164         * testing/InternalSettings.cpp:
1165         (WebCore::InternalSettings::Backup::Backup):
1166         (WebCore::InternalSettings::Backup::restoreTo):
1167         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithPlaysInlineAttribute):
1168         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute):
1169         * testing/InternalSettings.h:
1170         * testing/InternalSettings.idl:
1171
1172 2016-07-20  Chris Dumez  <cdumez@apple.com>
1173
1174         Get rid of custom bindings code for XMLHttpRequest.open()
1175         https://bugs.webkit.org/show_bug.cgi?id=159984
1176
1177         Reviewed by Ryosuke Niwa.
1178
1179         Get rid of custom bindings code for XMLHttpRequest.open() as the
1180         bindings generator is able to generate it.
1181
1182         Relevant specification:
1183         - https://xhr.spec.whatwg.org/#xmlhttprequest
1184
1185         The issue is that legacy content prevents treating the 'async' argument
1186         being undefined identical from it being omitted. However, this can be
1187         achieved by using overloading in IDL, like in the specification.
1188
1189         No new tests, already covered by the following tests:
1190         - http/tests/xmlhttprequest/basic-auth.html
1191         - http/tests/xmlhttprequest/open-async-overload.html
1192
1193         * bindings/js/JSXMLHttpRequestCustom.cpp:
1194         (WebCore::SendFunctor::SendFunctor): Deleted.
1195         (WebCore::SendFunctor::line): Deleted.
1196         (WebCore::SendFunctor::column): Deleted.
1197         (WebCore::SendFunctor::url): Deleted.
1198         (WebCore::SendFunctor::operator()): Deleted.
1199         * xml/XMLHttpRequest.cpp:
1200         (WebCore::XMLHttpRequest::open):
1201         * xml/XMLHttpRequest.h:
1202         * xml/XMLHttpRequest.idl:
1203
1204 2016-07-20  Rawinder Singh  <rawinder.singh-webkit@cisra.canon.com.au>
1205
1206         Mark overriden methods in WebCore/svg final classes as final
1207         https://bugs.webkit.org/show_bug.cgi?id=159966
1208
1209         Reviewed by Michael Catanzaro.
1210
1211         Update WebCore/svg classes so that overriden methods in final classes are marked final.
1212
1213         * svg/SVGAElement.h:
1214         * svg/SVGAltGlyphDefElement.h:
1215         * svg/SVGAltGlyphItemElement.h:
1216         * svg/SVGAnimateTransformElement.h:
1217         * svg/SVGAnimatedColor.h:
1218         * svg/SVGCircleElement.h:
1219         * svg/SVGClipPathElement.h:
1220         * svg/SVGCursorElement.h:
1221         * svg/SVGDefsElement.h:
1222         * svg/SVGDescElement.h:
1223         * svg/SVGEllipseElement.h:
1224         * svg/SVGFEMergeNodeElement.h:
1225         * svg/SVGFilterElement.h:
1226         * svg/SVGFontElement.h:
1227         * svg/SVGFontFaceElement.h:
1228         * svg/SVGFontFaceFormatElement.h:
1229         * svg/SVGFontFaceNameElement.h:
1230         * svg/SVGFontFaceSrcElement.h:
1231         * svg/SVGFontFaceUriElement.h:
1232         * svg/SVGForeignObjectElement.h:
1233         * svg/SVGGElement.h:
1234         * svg/SVGGlyphElement.h:
1235         * svg/SVGGlyphRefElement.h:
1236         * svg/SVGHKernElement.h:
1237         * svg/SVGImageElement.h:
1238         * svg/SVGLineElement.h:
1239         * svg/SVGMPathElement.h:
1240         * svg/SVGMaskElement.h:
1241         * svg/SVGMetadataElement.h:
1242         * svg/SVGMissingGlyphElement.h:
1243         * svg/SVGPathBuilder.h:
1244         * svg/SVGPathByteStreamBuilder.h:
1245         * svg/SVGPathByteStreamSource.h:
1246         * svg/SVGPathElement.h:
1247         * svg/SVGPathSegArcAbs.h:
1248         * svg/SVGPathSegArcRel.h:
1249         * svg/SVGPathSegClosePath.h:
1250         * svg/SVGPathSegCurvetoCubicAbs.h:
1251         * svg/SVGPathSegCurvetoCubicRel.h:
1252         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
1253         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
1254         * svg/SVGPathSegCurvetoQuadraticAbs.h:
1255         * svg/SVGPathSegCurvetoQuadraticRel.h:
1256         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
1257         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
1258         * svg/SVGPathSegLinetoAbs.h:
1259         * svg/SVGPathSegLinetoHorizontalAbs.h:
1260         * svg/SVGPathSegLinetoHorizontalRel.h:
1261         * svg/SVGPathSegLinetoRel.h:
1262         * svg/SVGPathSegLinetoVerticalAbs.h:
1263         * svg/SVGPathSegLinetoVerticalRel.h:
1264         * svg/SVGPathSegListBuilder.h:
1265         * svg/SVGPathSegListSource.h:
1266         * svg/SVGPathSegMovetoAbs.h:
1267         * svg/SVGPathSegMovetoRel.h:
1268         * svg/SVGPathStringSource.h:
1269         * svg/SVGPathTraversalStateBuilder.h:
1270         * svg/SVGPatternElement.h:
1271         * svg/SVGRectElement.h:
1272         * svg/SVGScriptElement.h:
1273         * svg/SVGStopElement.h:
1274         * svg/SVGStyleElement.h:
1275         * svg/SVGSwitchElement.h:
1276         * svg/SVGTRefElement.cpp:
1277         * svg/SVGTitleElement.h:
1278         * svg/SVGToOTFFontConversion.cpp:
1279         * svg/SVGUnknownElement.h:
1280         * svg/SVGVKernElement.h:
1281         * svg/SVGViewElement.h:
1282         * svg/SVGZoomEvent.h:
1283         * svg/animation/SVGSMILElement.cpp:
1284         * svg/graphics/SVGImage.h:
1285         * svg/graphics/SVGImageClients.h:
1286         * svg/graphics/SVGImageForContainer.h:
1287         * svg/graphics/filters/SVGFEImage.h:
1288         * svg/graphics/filters/SVGFilter.h:
1289         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1290         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1291         * svg/properties/SVGAnimatedPropertyTearOff.h:
1292         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
1293         * svg/properties/SVGMatrixTearOff.h:
1294         * svg/properties/SVGPathSegListPropertyTearOff.h:
1295
1296 2016-07-20  Brady Eidson  <beidson@apple.com>
1297
1298         Transition most IDB interfaces from ScriptExecutionContext to ExecState.
1299         https://bugs.webkit.org/show_bug.cgi?id=159975
1300
1301         Reviewed by Alex Christensen.
1302
1303         No new tests (No known behavior change).
1304
1305         * Modules/indexeddb/IDBCursor.cpp:
1306         (WebCore::IDBCursor::continueFunction):
1307         (WebCore::IDBCursor::deleteFunction):
1308         * Modules/indexeddb/IDBCursor.h:
1309         * Modules/indexeddb/IDBCursor.idl:
1310
1311         * Modules/indexeddb/IDBDatabase.idl:
1312
1313         * Modules/indexeddb/IDBFactory.cpp:
1314         (WebCore::IDBFactory::cmp):
1315         * Modules/indexeddb/IDBFactory.h:
1316         * Modules/indexeddb/IDBFactory.idl:
1317
1318         * Modules/indexeddb/IDBIndex.cpp:
1319         (WebCore::IDBIndex::openCursor):
1320         (WebCore::IDBIndex::count):
1321         (WebCore::IDBIndex::doCount):
1322         (WebCore::IDBIndex::openKeyCursor):
1323         (WebCore::IDBIndex::get):
1324         (WebCore::IDBIndex::doGet):
1325         (WebCore::IDBIndex::getKey):
1326         (WebCore::IDBIndex::doGetKey):
1327         * Modules/indexeddb/IDBIndex.h:
1328         * Modules/indexeddb/IDBIndex.idl:
1329
1330         * Modules/indexeddb/IDBKeyRange.cpp:
1331         (WebCore::IDBKeyRange::only): Deleted.
1332         * Modules/indexeddb/IDBKeyRange.h:
1333
1334         * Modules/indexeddb/IDBObjectStore.cpp:
1335         (WebCore::IDBObjectStore::openCursor):
1336         (WebCore::IDBObjectStore::get):
1337         (WebCore::IDBObjectStore::putOrAdd):
1338         (WebCore::IDBObjectStore::deleteFunction):
1339         (WebCore::IDBObjectStore::doDelete):
1340         (WebCore::IDBObjectStore::modernDelete):
1341         (WebCore::IDBObjectStore::clear):
1342         (WebCore::IDBObjectStore::createIndex):
1343         (WebCore::IDBObjectStore::count):
1344         (WebCore::IDBObjectStore::doCount):
1345         * Modules/indexeddb/IDBObjectStore.h:
1346         * Modules/indexeddb/IDBObjectStore.idl:
1347
1348         * Modules/indexeddb/IDBTransaction.cpp:
1349         (WebCore::IDBTransaction::requestOpenCursor):
1350         (WebCore::IDBTransaction::doRequestOpenCursor):
1351         (WebCore::IDBTransaction::requestGetRecord):
1352         (WebCore::IDBTransaction::requestGetValue):
1353         (WebCore::IDBTransaction::requestGetKey):
1354         (WebCore::IDBTransaction::requestIndexRecord):
1355         (WebCore::IDBTransaction::requestCount):
1356         (WebCore::IDBTransaction::requestDeleteRecord):
1357         (WebCore::IDBTransaction::requestClearObjectStore):
1358         (WebCore::IDBTransaction::requestPutOrAdd):
1359         * Modules/indexeddb/IDBTransaction.h:
1360
1361         * inspector/InspectorIndexedDBAgent.cpp:
1362
1363 2016-07-20  Wenson Hsieh  <wenson_hsieh@apple.com>
1364
1365         Media controls don't appear when pausing a small autoplaying video
1366         https://bugs.webkit.org/show_bug.cgi?id=159972
1367         <rdar://problem/27180657>
1368
1369         Reviewed by Beth Dakin.
1370
1371         When pausing an autoplaying video, remove behavior restrictions for the
1372         initial user gesture and show media controls.
1373
1374         New WebKit API test. See VideoControlsManagerSingleSmallAutoplayingVideo.
1375
1376         * html/HTMLMediaElement.cpp:
1377         (WebCore::HTMLMediaElement::pause):
1378
1379 2016-07-20  Chris Dumez  <cdumez@apple.com>
1380
1381         Fix null handling of HTMLMediaElement.mediaGroup
1382         https://bugs.webkit.org/show_bug.cgi?id=159974
1383
1384         Reviewed by Eric Carlson.
1385
1386         Fix null handling of HTMLMediaElement.mediaGroup to match the specification:
1387         - https://www.w3.org/TR/html5/embedded-content-0.html#media-elements
1388
1389         null is supposed to be treated as the String "null". This patch aligns
1390         our behavior with the specification. I tested Firefox and Chrome but both
1391         do not have this attribute on HTMLMediaElement.
1392
1393         Also remove support for [TreatNullAs=LegacyNullString] from our bindings
1394         generator as HTMLMediaElement.mediaGroup was the last user.
1395
1396         No new tests, rebaselined existing test.
1397
1398         * bindings/scripts/CodeGeneratorJS.pm:
1399         (JSValueToNative):
1400         * bindings/scripts/IDLAttributes.txt:
1401         * html/HTMLMediaElement.idl:
1402
1403 2016-07-20  Chris Dumez  <cdumez@apple.com>
1404
1405         CSSStyleDeclaration.setProperty() should be able to unset "important" on a property
1406         https://bugs.webkit.org/show_bug.cgi?id=159959
1407
1408         Reviewed by Alexey Proskuryakov.
1409
1410         CSSStyleDeclaration.setProperty() should be able to unsert "important"
1411         on a property as per the latest specification:
1412         - https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
1413         - https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-camel-cased-attribute
1414
1415         Firefox and Chrome match the specification here but WebKit was ignoring calls
1416         to setProperty() if there is already an "important" property wit this name
1417         and if the new property does not have the "important" flag set.
1418
1419         This behavior was added a long time ago via Bug 60007. However, it does not
1420         match the latest specification or other browsers.
1421
1422         Test: fast/css/CSSStyleDeclaration-setProperty-unset-important.html
1423
1424         * css/StyleProperties.cpp:
1425         (WebCore::MutableStyleProperties::addParsedProperty):
1426         Drop code that was added via Bug 60007 as this behavior no longer matches the
1427         specification or other browsers. The layout test added in Bug 60007 fails in
1428         other browsers and was updated in this patch to match the specification.
1429
1430 2016-07-20  Commit Queue  <commit-queue@webkit.org>
1431
1432         Unreviewed, rolling out r203423.
1433         https://bugs.webkit.org/show_bug.cgi?id=159977
1434
1435         The test for this change is failing on Mac Release WK2
1436         (Requested by ryanhaddad on #webkit).
1437
1438         Reverted changeset:
1439
1440         "HTMLVideoElement frames do not update on iOS when src is a
1441         MediaStream blob"
1442         https://bugs.webkit.org/show_bug.cgi?id=159833
1443         http://trac.webkit.org/changeset/203423
1444
1445 2016-07-20  Chris Dumez  <cdumez@apple.com>
1446
1447         Fix null handling of HTMLSelectElement.value attribute
1448         https://bugs.webkit.org/show_bug.cgi?id=159925
1449
1450         Reviewed by Benjamin Poulain.
1451
1452         Fix null handling of HTMLSelectElement.value attribute:
1453         - https://html.spec.whatwg.org/multipage/forms.html#htmlselectelement
1454
1455         We were treating null as the null String which would end up setting
1456         selectedIndex to -1. However, we should treat null as the String "null"
1457         which would set the selectedIndex to the index of the <option> element
1458         whose value is "null".
1459
1460         Firefox and Chrome match the specification.
1461
1462         Test: fast/dom/HTMLSelectElement/value-null-handling.html
1463
1464         * html/HTMLSelectElement.cpp:
1465         (WebCore::HTMLSelectElement::setValue):
1466         * html/HTMLSelectElement.idl:
1467
1468 2016-07-20  Chris Dumez  <cdumez@apple.com>
1469
1470         PostResolutionCallbackDisabler can resume pending requests while a ResourceLoadSuspender is alive
1471         https://bugs.webkit.org/show_bug.cgi?id=159962
1472         <rdar://problem/21439264>
1473
1474         Reviewed by David Kilzer.
1475
1476         PostResolutionCallbackDisabler can resume pending requests while a ResourceLoadSuspender
1477         is alive. We have both PostResolutionCallbackDisabler and ResourceLoadSuspender that
1478         call LoaderStrategy::suspendPendingRequests() / LoaderStrategy::resumePendingRequests().
1479         However, PostResolutionCallbackDisabler and ResourceLoadSuspender are not aware of each
1480         other. It is therefore possible for a PostResolutionCallbackDisabler object to get
1481         destroyed, causing LoaderStrategy::resumePendingRequests() to be called while a
1482         ResourceLoadSuspender object is alive.
1483
1484         This leads to hard to investigate crashes where we end up re-entering WebKit and killing
1485         the style resolver.
1486
1487         This patch drops ResourceLoadSuspender and uses PostResolutionCallbackDisabler instead.
1488         There was only one user of ResourceLoadSuspender and PostResolutionCallbackDisabler
1489         is better because it manages a resolutionNestingDepth counter internally to make sure
1490         it only calls LoaderStrategy::resumePendingRequests() once all
1491         PostResolutionCallbackDisabler instances are destroyed.
1492
1493         No new tests, there is no easy way to reproduce the crashes.
1494
1495         * dom/Document.cpp:
1496         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
1497         * loader/LoaderStrategy.cpp:
1498         (WebCore::ResourceLoadSuspender::ResourceLoadSuspender): Deleted.
1499         (WebCore::ResourceLoadSuspender::~ResourceLoadSuspender): Deleted.
1500         * loader/LoaderStrategy.h:
1501
1502 2016-07-19  Youenn Fablet  <youenn@apple.com>
1503
1504         [Fetch API] Add a JS builtin to implement https://fetch.spec.whatwg.org/#concept-headers-fill
1505         https://bugs.webkit.org/show_bug.cgi?id=159932
1506
1507         Reviewed by Alex Christensen.
1508
1509         Covered by existing tests.
1510
1511         Refactoring Headers initializeWith to use the new built-in internal that implements
1512         https://fetch.spec.whatwg.org/#concept-headers-fill.
1513
1514         Refactoring Response constructor to put more checks in the JS builtin fucntion called within constructor.
1515         Making use of the new built-in internal that implements https://fetch.spec.whatwg.org/#concept-headers-fill.
1516
1517         * CMakeLists.txt: Adding FetchHeadersInternals.js
1518         * DerivedSources.make: Ditto.
1519         * Modules/fetch/FetchHeaders.js:
1520         (initializeFetchHeaders): Using fillFetchHeaders new built-in internal.
1521         * Modules/fetch/FetchInternals.js: Added.
1522         (fillFetchHeaders):
1523         * Modules/fetch/FetchResponse.cpp: Refactoring to do more in the JS built-in. Splitting of initializeWith so
1524         that the checks are done in the order defined by the spec.
1525         (WebCore::FetchResponse::setStatus):
1526         (WebCore::FetchResponse::initializeWith):
1527         (WebCore::isNullBodyStatus): Deleted.
1528         * Modules/fetch/FetchResponse.h:
1529         * Modules/fetch/FetchResponse.idl:
1530         * Modules/fetch/FetchResponse.js:
1531         (initializeFetchResponse): New built-in internal.
1532         * WebCore.xcodeproj/project.pbxproj:
1533         * bindings/js/WebCoreBuiltinNames.h:
1534
1535 2016-07-19  Chris Dumez  <cdumez@apple.com>
1536
1537         Fix null handling of SVGScriptElement.type attribute
1538         https://bugs.webkit.org/show_bug.cgi?id=159927
1539
1540         Reviewed by Benjamin Poulain.
1541
1542         Fix null handling of SVGScriptElement.type attribute:
1543         - https://www.w3.org/TR/SVG2/interact.html#InterfaceSVGScriptElement
1544
1545         We were treating null as the null String which would end up removing
1546         the 'type' content attribute. However, we should treat null as the
1547         String "null".
1548
1549         Firefox and Chrome match the specification.
1550
1551         No new tests, updated existing test.
1552
1553         * svg/SVGScriptElement.idl:
1554
1555 2016-07-19  Chris Dumez  <cdumez@apple.com>
1556
1557         Fix null handling of several HTMLDocument attributes
1558         https://bugs.webkit.org/show_bug.cgi?id=159923
1559
1560         Reviewed by Benjamin Poulain.
1561
1562         Fix null handling of several HTMLDocument attributes:
1563         - https://html.spec.whatwg.org/multipage/dom.html#document
1564         - https://html.spec.whatwg.org/multipage/obsolete.html#document-partial
1565
1566         In particular, null handling was incorrect in WebKit for 'dir',
1567         'bgColor', 'fgColor', 'alinkColor', 'linkColor' and 'vlinkColor'.
1568
1569         Firefox and Chrome match the specification.
1570
1571         Test: fast/dom/HTMLDocument/null-handling.html
1572
1573         * html/HTMLDocument.idl:
1574
1575 2016-07-19  Chris Dumez  <cdumez@apple.com>
1576
1577         Document.createElementNS() / createAttributeNS() parameters should be mandatory
1578         https://bugs.webkit.org/show_bug.cgi?id=159938
1579
1580         Reviewed by Benjamin Poulain.
1581
1582         Document.createElementNS() / createAttributeNS() parameters should be mandatory:
1583         - https://dom.spec.whatwg.org/#document
1584
1585         They were optional in WebKit. However, Firefox and Chrome both match the
1586         specification.
1587
1588         No new tests, rebaselined existing tests.
1589
1590         * dom/Document.idl:
1591
1592 2016-07-19  Benjamin Poulain  <bpoulain@apple.com>
1593
1594         Use getElementById for attribute matching if the attribute name is html's id
1595         https://bugs.webkit.org/show_bug.cgi?id=159960
1596
1597         Reviewed by Chris Dumez.
1598
1599         Elliott Sprehn discovered YUI makes heavy uses of querySelector with [id=value]
1600         (https://bugs.chromium.org/p/chromium/issues/detail?id=627242).
1601
1602         If we are not in quirks mode, IdForStyleResolution has the same value
1603         as the Id attribute. We can use the same optimization for both cases.
1604
1605         Tests: fast/selectors/id-attribute-querySelector-used-as-id-selector-quirks.html
1606                fast/selectors/id-attribute-querySelector-used-as-id-selector.html
1607
1608         * dom/SelectorQuery.cpp:
1609         (WebCore::canBeUsedForIdFastPath):
1610         (WebCore::findIdMatchingType):
1611         (WebCore::SelectorDataList::SelectorDataList):
1612         (WebCore::selectorForIdLookup):
1613         (WebCore::filterRootById):
1614
1615 2016-07-19  Chris Dumez  <cdumez@apple.com>
1616
1617         Drop SVGElement.xmlbase attribute
1618         https://bugs.webkit.org/show_bug.cgi?id=159926
1619
1620         Reviewed by Benjamin Poulain.
1621
1622         Drop SVGElement.xmlbase attribute as it is no longer part of the
1623         specification:
1624         - https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement
1625
1626         Both Firefox and Chrome have already dropped support for
1627         SVGElement.xmlbase.
1628
1629         Chrome's intent to remove:
1630         https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/TfwMq4d25hk/C-v_iC_wKfAJ
1631
1632         Test: svg/dom/SVGElement-xmlbase.html
1633
1634         * svg/SVGElement.cpp:
1635         (WebCore::SVGElement::removedFrom): Deleted.
1636         * svg/SVGElement.h:
1637         * svg/SVGElement.idl:
1638
1639 2016-07-19  Chris Dumez  <cdumez@apple.com>
1640
1641         Align CSSStyleDeclaration.setProperty() with the specification
1642         https://bugs.webkit.org/show_bug.cgi?id=159955
1643
1644         Reviewed by Benjamin Poulain.
1645
1646         Align CSSStyleDeclaration.setProperty() with the specification:
1647         - https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface
1648
1649         In particular, the following changes were needed:
1650         1. The 'value' parameter should not be optional
1651         2. The 'priority' parameter should treat null as the empty string
1652            rather than the string "null".
1653         3. The 'priority' parameter's default value should be the empty string,
1654            not the string "undefined".
1655         4. CSSStyleDeclaration.setProperty() should return early if 'priority'
1656            is not the empty string and is not an ASCII case-insensitive match
1657            for the string "important".
1658
1659         Chrome matches the specification entirely.
1660         Firefox matches the specification with the exception that it does a
1661         case-sensitive match for "important".
1662
1663         Test: fast/css/CSSStyleDeclaration-setProperty.html
1664
1665         * css/CSSStyleDeclaration.idl:
1666         * css/PropertySetCSSStyleDeclaration.cpp:
1667         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
1668
1669 2016-07-19  Daniel Bates  <dabates@apple.com>
1670
1671         CSP: Improve support for multiple policies to more closely conform to the CSP Level 2 spec.
1672         https://bugs.webkit.org/show_bug.cgi?id=159841
1673         <rdar://problem/27381684>
1674
1675         Reviewed by Brent Fulgham.
1676
1677         Implement a first pass at sending multiple violation reports so as to more closely
1678         conform to section Enforcing multiple policies of the Content Security Policy Level 2 spec.,
1679         <https://w3c.github.io/webappsec-csp/2/> (Editor's Draft, 25 April 2016).
1680
1681         Tests: http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports.php
1682                http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy.php
1683                http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2.php
1684                http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy.php
1685                http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2.php
1686                http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy.php
1687                http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy2.php
1688                http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy.php
1689                http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy2.php
1690                http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy.php
1691                http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2.php
1692                http/tests/security/contentSecurityPolicy/1.1/scripthash-in-enforced-policy-and-not-in-report-only.html
1693                http/tests/security/contentSecurityPolicy/1.1/scripthash-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy.html
1694                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-enforced-policy-and-blocked-by-report-policy.php
1695                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-enforced-policy-and-blocked-by-report-policy2.php
1696                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy.php
1697                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2.php
1698                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy.php
1699                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy2.php
1700                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy.php
1701                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy2.php
1702                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy.php
1703                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2.php
1704                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-in-enforced-policy-and-not-in-report-only.html
1705                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy.html
1706                http/tests/security/contentSecurityPolicy/1.1/scriptnonce-multiple-policies.html
1707
1708         * page/csp/ContentSecurityPolicy.cpp:
1709         (WebCore::ContentSecurityPolicy::allPoliciesWithDispositionAllow): Added. Returns whether the resource
1710         is allowed by all of the policies with the specified disposition.
1711         (WebCore::ContentSecurityPolicy::allPoliciesAllow): Added. Returns whether the resource is allowed by
1712         all of the enforced policies.
1713         (WebCore::ContentSecurityPolicy::findHashOfContentInPolicies): Formerly named foundHashOfContentInAllPolicies.
1714         Modified to return a ("has found hash in all enforced policies, "has found hash in all report-only policies)-pair
1715         so that we can differentiate whether the hash violated an enforced policy or a report-only policy.
1716         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Write in terms of ContentSecurityPolicy::allPoliciesAllow().
1717         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
1718         (WebCore::ContentSecurityPolicy::allowScriptWithNonce): For now only accept a nonce if it is allowed by
1719         all enforced policies. As a side effect of this change is that we only send a CSP violation report when a
1720         nonce violates a report-only policy only if the nonce also violates one or more enforced policies. We will
1721         address this limitation in <https://bugs.webkit.org/show_bug.cgi?id=159830>.
1722         (WebCore::ContentSecurityPolicy::allowStyleWithNonce): Ditto.
1723         (WebCore::ContentSecurityPolicy::allowInlineScript): Differentiate between a hash/'unsafe-inline' that
1724         matches/is contained in all enforce policies and a hash/'unsafe-inline' that matches/is contained in all
1725         report-only policies so that we only allow the resource for the former. As a side effect of this change
1726         we may report that a resource violated a policy even if it contained the hash. See <https://bugs.webkit.org/show_bug.cgi?id=159832>
1727         for more details.
1728         (WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
1729         (WebCore::ContentSecurityPolicy::allowEval): Write in terms of ContentSecurityPolicy::allPoliciesAllow().
1730         (WebCore::ContentSecurityPolicy::allowFrameAncestors): Ditto.
1731         (WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
1732         (WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
1733         (WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
1734         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
1735         (WebCore::ContentSecurityPolicy::allowChildContextFromSource): Ditto.
1736         (WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
1737         (WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
1738         (WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
1739         (WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
1740         (WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
1741         (WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
1742         (WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
1743         (WebCore::ContentSecurityPolicy::foundHashOfContentInAllPolicies): Deleted.
1744         * page/csp/ContentSecurityPolicy.h:
1745         (WebCore::ContentSecurityPolicy::violatedDirectiveInAnyPolicy): Deleted.
1746
1747 2016-07-19  Chris Dumez  <cdumez@apple.com>
1748
1749         Fix null handling of HTMLScriptElement.text attribute
1750         https://bugs.webkit.org/show_bug.cgi?id=159943
1751
1752         Reviewed by Benjamin Poulain.
1753
1754         Fix null handling of HTMLScriptElement.text attribute:
1755         - https://html.spec.whatwg.org/multipage/scripting.html#the-script-element
1756
1757         We should treat null as the "null" String but we were treating it as
1758         the empty string.
1759
1760         Firefox and Chrome match the specification.
1761
1762         No new tests, rebaselined existing test.
1763
1764         * html/HTMLScriptElement.idl:
1765
1766 2016-07-19  Chris Dumez  <cdumez@apple.com>
1767
1768         autocapitalize attribute should not use [TreatNullAs=LegacyNullString]
1769         https://bugs.webkit.org/show_bug.cgi?id=159934
1770
1771         Reviewed by Benjamin Poulain.
1772
1773         autocapitalize attribute should not use [TreatNullAs=LegacyNullString]. This is
1774         non-standard and we want to drop support for it from the bindings generator.
1775
1776         Instead, use [TreatNullAs=EmptyString] in order to maintain existing behavior
1777         given that both a missing/empty attribute result in using the default
1778         autocapitalization mode and that autocapitalize returns the empty string by
1779         default.
1780
1781         Test: platform/ios-simulator/ios/fast/forms/autocapitalize-null.html
1782
1783         * html/HTMLFormElement.idl:
1784         * html/HTMLInputElement.idl:
1785         * html/HTMLTextAreaElement.idl:
1786
1787 2016-07-19  Zalan Bujtas  <zalan@apple.com>
1788
1789         REGRESSION(r203415): ASSERTION FAILED: !m_layoutRoot->container() || !m_layoutRoot->container()->needsLayout()
1790         https://bugs.webkit.org/show_bug.cgi?id=159952
1791
1792         Reviewed by Simon Fraser.
1793
1794         Update ASSERTs to reflect new functionality, that is, now we can end up in a state
1795         where the container (RenderView) of one of the dirty subtrees is dirty.
1796         See r203415.
1797  
1798         Covered by editing/pasteboard/drag-drop-input-in-svg.svg
1799
1800         * page/FrameView.cpp:
1801         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1802
1803 2016-07-19  Dean Jackson  <dino@apple.com>
1804
1805         REGRESSION(202927): The first slide is the only displayed slide when Quicklooking a Keynote file
1806         https://bugs.webkit.org/show_bug.cgi?id=159948
1807         <rdar://problem/27391012>
1808
1809         Reviewed by Simon Fraser.
1810
1811         There is an iOS bug (<rdar://problem/27416744>) that is causing us
1812         to not always get a color space on CGContextRefs. Investigation of this
1813         exposed some optimizations we can take when we are creating ImageBuffers.
1814         In particular, if we have a bitmap context or an IOSurfaceContext we
1815         can simply copy their color space using API. Otherwise we stick with
1816         the existing CGContextCopyDeviceColorSpace.
1817
1818         Lastly, if for some reason we are unable to copy the device color space,
1819         we should fall back to sRGB.
1820
1821         * platform/graphics/cg/ImageBufferCG.cpp:
1822         (WebCore::ImageBuffer::createCompatibleBuffer):
1823         * platform/spi/cg/CoreGraphicsSPI.h: Add some SPI and enums.
1824
1825
1826 2016-07-19  George Ruan  <gruan@apple.com>
1827
1828         HTMLVideoElement frames do not update on iOS when src is a MediaStream blob
1829         https://bugs.webkit.org/show_bug.cgi?id=159833
1830         <rdar://problem/27379487>
1831
1832         Reviewed by Eric Carlson.
1833
1834         Test: fast/mediastream/MediaStream-video-element-displays-buffer.html
1835
1836         * WebCore.xcodeproj/project.pbxproj:
1837         * platform/graphics/avfoundation/MediaSampleAVFObjC.h: Change create to return a Ref<T> instead
1838         of RefPtr<T>
1839         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Make observer of
1840         MediaStreamTrackPrivate and make MediaPlayer use an AVSampleBufferDisplayLayer instead of CALayer.
1841         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: Ditto.
1842         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Clean up
1843         observers and AVSampleBufferDisplayLayer
1844         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Ensures AVSampleBufferDisplayLayer
1845         is available.
1846         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSampleBufferFromTrack): Placeholder.
1847         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Responsible
1848         for enqueuing sample buffers to the active video track.
1849         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Ensures that an AVSampleBufferDisplayLayer
1850         exists.
1851         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): Destroys the AVSampleBufferDisplayLayer.
1852         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Replace CALayer with AVSampleBufferDisplayLayer.
1853         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Ditto.
1854         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): Called from MediaStreamTrackPrivate when a
1855         new SampleBuffer is available.
1856         (WebCore::updateTracksOfType): Manage adding and removing self as observer from tracks.
1857         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): Replace CALayer with AVSampleBufferDisplayLayer
1858         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::acceleratedRenderingStateChanged): Copied from
1859         MediaPlayerPrivateMediaSourceAVFObjC.mm
1860         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Deleted CALayer.
1861         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Deleted process of updating CALayer.
1862         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize): Deleted CALayer.
1863         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Deleted.
1864         * platform/mediastream/MediaStreamPrivate.cpp:
1865         (WebCore::MediaStreamPrivate::updateActiveVideoTrack): Remove redundant check.
1866         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1867         (WebCore::MediaStreamTrackPrivate::sourceHasMoreMediaData): Called from RealtimeMediaSource when a new SampleBuffer
1868         is available.
1869         * platform/mediastream/MediaStreamTrackPrivate.h:
1870         (WebCore::MediaStreamTrackPrivate::Observer::sampleBufferUpdated): Relays to MediaPlayerPrivateMediaStream that
1871         a new SampleBuffer is available to enqueue to the AVSampleBufferDisplayLayer.
1872         * platform/mediastream/RealtimeMediaSource.cpp:
1873         (WebCore::RealtimeMediaSource::mediaDataUpdated): Relays to all observers that a new SampleBuffer is available.
1874         * platform/mediastream/RealtimeMediaSource.h:
1875         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1876         (WebCore::AVVideoCaptureSource::processNewFrame): Calls mediaDataUpdated when a new SampleBuffer is captured.
1877
1878 2016-07-19  Anders Carlsson  <andersca@apple.com>
1879
1880         Get rid of a #define private public hack in WebCore
1881         https://bugs.webkit.org/show_bug.cgi?id=159953
1882
1883         Reviewed by Dan Bernstein.
1884
1885         Use @package instead.
1886
1887         * bindings/objc/DOMInternal.h:
1888         * bindings/objc/DOMObject.h:
1889
1890 2016-07-19  Andreas Kling  <akling@apple.com>
1891
1892         Fix SharedBuffer leak in MockContentFilter::replacementData().
1893         <https://webkit.org/b/159945>
1894
1895         Reviewed by Andy Estes.
1896
1897         Spotted on leaks bot. This code was pretty explicit about how it's going to leak.
1898         Since this is in the mock filter, it only affected layout tests.
1899
1900         * testing/MockContentFilter.cpp:
1901         (WebCore::MockContentFilter::replacementData):
1902
1903 2016-07-19  Zalan Bujtas  <zalan@apple.com>
1904
1905         theguardian.co.uk crossword puzzles are sometimes not displaying text
1906         https://bugs.webkit.org/show_bug.cgi?id=159924
1907         <rdar://problem/27409483>
1908
1909         Reviewed by Simon Fraser.
1910
1911         This patch fixes the case when
1912         - 2 disjoint subtrees are dirty
1913         - RenderView is also dirty.
1914         and we end up not laying out one of the 2 subtrees.
1915
1916         In FrameView::scheduleRelayoutOfSubtree, we assume that when the RenderView is dirty
1917         we already have a pending full layout which means that any previous subtree layouts have already been
1918         converted to full layouts.
1919         However this assumption is incorrect. RenderView can get dirty without checking if there's
1920         already a pending subtree layout.
1921         One option to solve this problem would be to override RenderObject::setNeedsLayout in RenderView
1922         so that when the RenderView gets dirty, we could also convert any pending subtree layout to full layout.
1923         However RenderObject::setNeedsLayout is a hot function and making it virtual would impact performance.
1924         The other option is to always normalize subtree layouts in FrameView::scheduleRelayoutOfSubtree().
1925         This patch implements the second option.
1926
1927         Test: fast/misc/subtree-layouts.html
1928
1929         * page/FrameView.cpp:
1930         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1931
1932 2016-07-19  Anders Carlsson  <andersca@apple.com>
1933
1934         Some payment authorization status values should keep the sheet active
1935         https://bugs.webkit.org/show_bug.cgi?id=159936
1936         rdar://problem/26756701
1937
1938         Reviewed by Tim Horton.
1939
1940         * Modules/applepay/ApplePaySession.cpp:
1941         (WebCore::ApplePaySession::completePayment):
1942         Keep the sheet active if the status isn't a final state status.
1943
1944         * Modules/applepay/PaymentAuthorizationStatus.h:
1945         (WebCore::isFinalStateStatus):
1946         Add a new helper function that returns whether a given payment authorization status is "final",
1947         meaning that once that status has been passed to completePayment, the session is finished.
1948
1949 2016-07-19  Nan Wang  <n_wang@apple.com>
1950
1951         AX: Incorrect behavior for word related text marker functions when there's collapsed whitespace
1952         https://bugs.webkit.org/show_bug.cgi?id=159910
1953
1954         Reviewed by Chris Fleizach.
1955
1956         We are getting a bad CharacterOffset when there's collapsed whitespace. Added a TraverseOptionValidateOffset
1957         option to make sure we are getting the correct CharacterOffset based on the corresponding Range offset. And
1958         fixed a word navigation issue based on that.
1959
1960         Test: accessibility/mac/text-marker-word-nav-collapsed-whitespace.html
1961
1962         * accessibility/AXObjectCache.cpp:
1963         (WebCore::AXObjectCache::traverseToOffsetInRange):
1964         (WebCore::AXObjectCache::rangeForNodeContents):
1965         (WebCore::AXObjectCache::startOrEndCharacterOffsetForRange):
1966         (WebCore::AXObjectCache::characterOffsetFromVisiblePosition):
1967         (WebCore::AXObjectCache::rightWordRange):
1968         (WebCore::AXObjectCache::previousBoundary):
1969         * accessibility/AXObjectCache.h:
1970         (WebCore::AXObjectCache::isNodeInUse):
1971
1972 2016-07-19  Youenn Fablet  <youenn@apple.com>
1973
1974         [Streams API] ReadableStreamController methods should throw if its stream is not readable
1975         https://bugs.webkit.org/show_bug.cgi?id=159871
1976
1977         Reviewed by Xabier Rodriguez-Calvar.
1978
1979         Spec now mandates close and enqueue to throw if ReadableStream is not readable.
1980         Covered by rebased and/or modified tests.
1981
1982         * Modules/streams/ReadableStreamController.js:
1983         (enqueue): Throwing a TypeError if controlled stream is not readable.
1984         (close): Ditto.
1985
1986 2016-07-19  Simon Fraser  <simon.fraser@apple.com>
1987
1988         Bubbles appear split for a brief moment in Messages
1989         https://bugs.webkit.org/show_bug.cgi?id=159915
1990         rdar://problem/27182267
1991
1992         Reviewed by David Hyatt.
1993
1994         RenderView::repaintRootContents() had a long-standing bug in WebView when the
1995         view is scrolled. repaint() uses visualOverflowRect() but, for the 
1996         RenderView, the visualOverflowRect() is the initial containing block
1997         which is anchored at 0,0. When the view is scrolled it's clipped out and
1998         calls to repaintRootContents() have no effect.
1999         
2000         Change repaintRootContents() to use layoutOverflowRect(). ScrollView::repaintContentRectangle()
2001         will clip it to the view if necessary.
2002
2003         Test: fast/repaint/scrolled-view-full-repaint.html
2004
2005         * rendering/RenderView.cpp:
2006         (WebCore::RenderView::repaintRootContents):
2007
2008 2016-07-19  Dan Bernstein  <mitz@apple.com>
2009
2010         <rdar://problem/27420308> WebCore-7602.1.42 fails to build: error: unused parameter 'vm'
2011
2012         * bindings/js/JSDOMGlobalObject.cpp:
2013         (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Fixed the !ENABLE(STREAMS_API) build.
2014
2015 2016-07-19  Youenn Fablet  <youenn@apple.com>
2016
2017         [Streams API] Make ReadableStream properties not enumerable
2018         https://bugs.webkit.org/show_bug.cgi?id=159868
2019
2020         Reviewed by Darin Adler.
2021
2022         Covered by rebased tests.
2023
2024         Uopdating IDL definitions to mark all functions/attributes as not enumerable.
2025         Updating IDL constructor definitions to correctly compute constructor length.
2026         Updating built-in implementation to correctly compute pipeTo length to 1 (second parameter being optional).
2027
2028         * Modules/streams/ReadableStream.idl:
2029         * Modules/streams/ReadableStream.js:
2030         * Modules/streams/ReadableStreamController.idl:
2031         * Modules/streams/ReadableStreamReader.idl:
2032
2033 2016-07-19  Chris Dumez  <cdumez@apple.com>
2034
2035         form.enctype / encoding / method should treat null as "null" string
2036         https://bugs.webkit.org/show_bug.cgi?id=159916
2037
2038         Reviewed by Ryosuke Niwa.
2039
2040         form.enctype / encoding / method should treat null as "null" string:
2041         - https://html.spec.whatwg.org/multipage/forms.html#htmlformelement
2042
2043         Previously, WebKit would treat null as the null String, which would
2044         end up removing the existing attribute.
2045
2046         Firefox and Chrome match the specification.
2047
2048         Test: fast/dom/HTMLFormElement/null-handling.html
2049
2050         * html/HTMLFormElement.h:
2051         * html/HTMLFormElement.idl:
2052
2053 2016-07-18  Csaba Osztrogon√°c  <ossy@webkit.org>
2054
2055         All-in-one buildfix after r202439
2056         https://bugs.webkit.org/show_bug.cgi?id=159877
2057
2058         Reviewed by Chris Dumez.
2059
2060         * Modules/webaudio/AudioDestinationNode.h:
2061         (WebCore::AudioDestinationNode::resume):
2062         (WebCore::AudioDestinationNode::suspend):
2063         (WebCore::AudioDestinationNode::close):
2064
2065 2016-07-18  Frederic Wang  <fwang@igalia.com>
2066
2067         Move parsing of subscriptshift and superscriptshift from rendering to element classes
2068         https://bugs.webkit.org/show_bug.cgi?id=159622
2069
2070         Reviewed by Darin Adler.
2071
2072         We introduce a new MathMLScriptsElement that is used for elements msub, msup, msubsup and
2073         mmultiscripts in order to create RenderMathMLScripts and parse and expose the values of the
2074         subscriptshift and superscriptshift attributes. This is one more step toward moving MathML
2075         attribute parsing to the DOM (bug 156536).
2076
2077         No new tests, rendering is unchanged.
2078
2079         * CMakeLists.txt: Add MathMLScriptsElement files.
2080         * WebCore.xcodeproj/project.pbxproj: Ditto.
2081         * mathml/MathMLAllInOne.cpp: Ditto.
2082         * mathml/MathMLInlineContainerElement.cpp: Remove handling of scripts.
2083         (WebCore::MathMLInlineContainerElement::createElementRenderer): Deleted.
2084         * mathml/MathMLScriptsElement.cpp: Added. New class to handle scripted elements supporting
2085         parsing for the subscriptshift and superscriptshift MathML lengths.
2086         (WebCore::MathMLScriptsElement::MathMLScriptsElement):
2087         (WebCore::MathMLScriptsElement::create):
2088         (WebCore::MathMLScriptsElement::subscriptShift): Expose the cached length for the shift,
2089         parsing the attribute again if necessary.
2090         (WebCore::MathMLScriptsElement::superscriptShift): Ditto.
2091         (WebCore::MathMLScriptsElement::parseAttribute): Mark attributes dirty.
2092         (WebCore::MathMLScriptsElement::createElementRenderer): Create RenderMathMLScripts.
2093         * mathml/MathMLScriptsElement.h: Ditto.
2094         * mathml/mathtags.in: Map msub, msup, msubsup and mmultiscripts to MathMLScriptsElement.
2095         * rendering/mathml/RenderMathMLScripts.cpp:
2096         (WebCore::RenderMathMLScripts::scriptsElement): Helper function to cast the node to a
2097         MathMLScriptsElement.
2098         (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded): Resolve the attributes
2099         using the functions from the MathMLScriptsElement class.
2100         * rendering/mathml/RenderMathMLScripts.h: Declare scriptsElement.
2101
2102 2016-07-18  Frederic Wang  <fwang@igalia.com>
2103
2104         Do not store gap and shift parameters on RenderMathMLFraction
2105         https://bugs.webkit.org/show_bug.cgi?id=159876
2106
2107         Reviewed by Darin Adler.
2108
2109         After r203285, the stack and fraction layout parameters are only used in layoutBlock so we
2110         do not need to store them on the class. We remove them and split updateLayoutParameters into
2111         three functions: one to update the linethickness and two others to retrieve the fraction and
2112         stack respectively.
2113
2114         No new tests, rendering is unchanged.
2115
2116         * rendering/mathml/RenderMathMLFraction.cpp:
2117         (WebCore::RenderMathMLFraction::updateLineThickness): Move code to update thickness members here.
2118         (WebCore::RenderMathMLFraction::getFractionParameters): Move code to retrieve fraction parameters here.
2119         (WebCore::RenderMathMLFraction::getStackParameters): Move code to retrieve stack parameters here.
2120         (WebCore::RenderMathMLFraction::layoutBlock): Use the new helper functions and local variables
2121         for fraction and stack parameters.
2122         (WebCore::RenderMathMLFraction::updateLayoutParameters): Deleted.
2123         * rendering/mathml/RenderMathMLFraction.h: Declare new helper functions and remove members
2124         for stack and fraction parameters.
2125
2126 2016-07-18  Chris Dumez  <cdumez@apple.com>
2127
2128         input.formEnctype / formMethod and button.formEnctype / formMethod / type should treat null as "null"
2129         https://bugs.webkit.org/show_bug.cgi?id=159908
2130
2131         Reviewed by Alex Christensen.
2132
2133         input.formEnctype / formMethod and button.formEnctype / formMethod / type
2134         should treat null as "null" String:
2135         - https://html.spec.whatwg.org/multipage/forms.html#htmlinputelement
2136         - https://html.spec.whatwg.org/multipage/forms.html#htmlbuttonelement
2137
2138         In WebKit, we would treat null as a null String which would end up
2139         removing the corresponding attribute. This does not match the
2140         specification. Firefox and Chrome match the specification here.
2141
2142         Tests:
2143         - fast/dom/HTMLButtonElement/null-handling.html
2144         - fast/dom/HTMLInputElement/null-handling.html
2145
2146         * html/HTMLButtonElement.idl:
2147         * html/HTMLInputElement.idl:
2148
2149 2016-07-18  Alex Christensen  <achristensen@webkit.org>
2150
2151         webbookmarksd needs to use the same AppCache directory as MobileSafari
2152         https://bugs.webkit.org/show_bug.cgi?id=159912
2153
2154         Reviewed by Alexey Proskuryakov.
2155
2156         No new tests.  This only changes behavior for webbookmarksd.
2157
2158         * platform/RuntimeApplicationChecks.h:
2159         * platform/RuntimeApplicationChecks.mm:
2160         (WebCore::IOSApplication::isWebBookmarksD): Added.
2161
2162 2016-07-18  Chris Dumez  <cdumez@apple.com>
2163
2164         EventTarget.dispatchEvent() parameter should not be nullable
2165         https://bugs.webkit.org/show_bug.cgi?id=159897
2166
2167         Reviewed by Benjamin Poulain.
2168
2169         EventTarget.dispatchEvent() parameter should not be nullable:
2170         - https://dom.spec.whatwg.org/#interface-eventtarget
2171
2172         Even though the parameter was marked as nullable in our IDL, our
2173         implementation does a null check and we already throw a TypeError
2174         when calling dispatchEvent(null).
2175
2176         Update our IDL so that it matches the specification and so that
2177         the null check is generated in the bindings instead.
2178
2179         No new tests, rebaseline existing tests.
2180
2181         * dom/EventTarget.cpp:
2182         (WebCore::EventTarget::dispatchEventForBindings):
2183         * dom/EventTarget.h:
2184         * dom/EventTarget.idl:
2185
2186 2016-07-18  Chris Dumez  <cdumez@apple.com>
2187
2188         DocType's publicId / systemId should not be nullable
2189         https://bugs.webkit.org/show_bug.cgi?id=159901
2190
2191         Reviewed by Benjamin Poulain.
2192
2193         DocType's publicId / systemId should not be nullable. While they were
2194         not marked as nullable in our IDL, they could be stored as null Strings
2195         in our implementation depending on how the Node was constructed. This
2196         led to subtle bugs where String() != emptyString().
2197
2198         In particular, Node.isEqualNode() would return false when DocumentType
2199         nodes would mismatch because of their publicId / systemId being null
2200         instead of the emptyString.
2201
2202         Serialization would DocumentType nodes would also be wrong when
2203         publicId / systemId were empty Strings instead of null strings. The
2204         new behavior now matches:
2205         - https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-doctype (steps 7-9)
2206
2207         To address these issues, we now always store publicId / systemId as
2208         non-null Strings inside the DocumentType class.
2209
2210         Test: fast/dom/DocumentType/isEqualNode.html
2211
2212         * dom/DocumentType.cpp:
2213         (WebCore::DocumentType::DocumentType):
2214         * editing/MarkupAccumulator.cpp:
2215         (WebCore::MarkupAccumulator::appendDocumentType):
2216
2217 2016-07-18  Jeremy Jones  <jeremyj@apple.com>
2218
2219         If previous media session interruptions were prevented, still allow subsequent interruptions to try.
2220         https://bugs.webkit.org/show_bug.cgi?id=157553
2221         rdar://problem/25740804
2222
2223         Reviewed by Eric Carlson.
2224
2225         Test: platform/ios-simulator/media/video-interruption-suspendunderlock.html
2226
2227         When suspending under lock on iOS, there is first a resign active event, then a
2228         suspend under lock. PiP prevents resign active from interrupting playback. But it should allow the
2229         suspend under lock to interrupt playback.
2230
2231         Currently if there are nested interruptions only the first one is acted upon.
2232
2233         This change allows subsequent, nested interruptions to have a chance to interrupt playback if the
2234         previous interruptions were ignored.
2235
2236         This test is for iPad only, so it must be run manually.
2237
2238         * html/HTMLMediaElement.cpp:
2239         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction):
2240         * platform/audio/PlatformMediaSession.cpp:
2241         (WebCore::PlatformMediaSession::beginInterruption):
2242         * testing/Internals.cpp:
2243         (WebCore::Internals::beginMediaSessionInterruption):
2244
2245 2016-07-18  Brent Fulgham  <bfulgham@apple.com>
2246
2247         Don't associate form-associated elements with forms in other trees.
2248         https://bugs.webkit.org/show_bug.cgi?id=119451
2249         <rdar://problem/27382946>
2250
2251         Change is based on the Blink change (patch by <adamk@chromium.org>):
2252         <https://chromium.googlesource.com/chromium/blink/+/0b33128be67e7845d495d5219614c02ccfe7a414>
2253
2254         Reviewed by Chris Dumez.
2255
2256         Prevent elements from being associated with forms that are not part of the same home subtree.
2257         This brings us in line with the WhatWG HTML specification as of September, 2013.
2258
2259         Tests: fast/forms/image-disconnected-during-parse.html
2260                fast/forms/input-disconnected-during-parse.html
2261
2262         * dom/Element.h:
2263         (WebCore::Node::rootElement): Added.
2264         * html/FormAssociatedElement.cpp:
2265         (WebCore::FormAssociatedElement::insertedInto): If the element is associated with a form that
2266         is not part of the same tree, remove the association.
2267         * html/HTMLImageElement.cpp:
2268         (WebCore::HTMLImageElement::insertedInto): Ditto.
2269
2270 2016-07-18  Anders Carlsson  <andersca@apple.com>
2271
2272         WebKit nightly fails to build on macOS Sierra
2273         https://bugs.webkit.org/show_bug.cgi?id=159902
2274         rdar://problem/27365672
2275
2276         Reviewed by Tim Horton.
2277
2278         * Modules/applepay/cocoa/PaymentCocoa.mm:
2279         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2280         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
2281         * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
2282         Use new PassKitSPI header.
2283
2284         * WebCore.xcodeproj/project.pbxproj:
2285         Add new PassKitSPI header.
2286
2287         * icu/unicode/ucurr.h: Added.
2288         Add ucurr.h from ICU.
2289
2290         * platform/spi/cocoa/PassKitSPI.h: Added.
2291         Add new PassKitSPI header.
2292
2293 2016-07-18  Dean Jackson  <dino@apple.com>
2294
2295         REGRESSION (r202950): Image zoom animations are broken at medium.com (159861)
2296         https://bugs.webkit.org/show_bug.cgi?id=159906
2297         <rdar://problem/27391725>
2298
2299         Reviewed by Simon Fraser.
2300
2301         The fix for webkit.org/b/157569 in r200769 broke AMP pages.
2302         The followup fix for webkit.org/b/159450 in r202950 broke Medium pages.
2303
2304         Revert them both until we have better testing.
2305
2306         * css/CSSParser.cpp:
2307         (WebCore::CSSParser::addPropertyWithPrefixingVariant):
2308         (WebCore::CSSParser::parseValue):
2309         (WebCore::CSSParser::parseAnimationShorthand):
2310         (WebCore::CSSParser::parseTransitionShorthand): Deleted.
2311         * css/CSSPropertyNames.in:
2312         * css/PropertySetCSSStyleDeclaration.cpp:
2313         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
2314         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
2315         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
2316         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
2317         * css/StyleProperties.cpp:
2318         (WebCore::MutableStyleProperties::removeShorthandProperty):
2319         (WebCore::MutableStyleProperties::removeProperty):
2320         (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty):
2321         (WebCore::MutableStyleProperties::setProperty):
2322         (WebCore::getIndexInShorthandVectorForPrefixingVariant):
2323         (WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
2324         (WebCore::MutableStyleProperties::setPrefixingVariantProperty):
2325         (WebCore::StyleProperties::asText): Deleted.
2326         * css/StyleProperties.h:
2327
2328 2016-07-18  Andreas Kling  <akling@apple.com>
2329
2330         There should be a way to simulate memory pressure in layout tests
2331         <https://webkit.org/b/159743>
2332
2333         Reviewed by Simon Fraser.
2334
2335         Add three window.internal APIs:
2336
2337             - boolean isUnderMemoryPressure (readonly attribute)
2338             - void beginSimulatedMemoryPressure()
2339             - void endSimulatedMemoryPressure()
2340
2341         These make it possible to write tests that exercise behaviors that only
2342         occur during memory pressure situations.
2343
2344         I also implemented the "org.WebKit.lowMemory" notification handler using the new API.
2345
2346         Test: memory/memory-pressure-simulation.html
2347
2348         * platform/MemoryPressureHandler.cpp:
2349         (WebCore::MemoryPressureHandler::beginSimulatedMemoryPressure):
2350         (WebCore::MemoryPressureHandler::endSimulatedMemoryPressure):
2351         * platform/MemoryPressureHandler.h:
2352         (WebCore::MemoryPressureHandler::isUnderMemoryPressure):
2353         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2354         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2355         (WebCore::MemoryPressureHandler::install):
2356         * testing/Internals.cpp:
2357         (WebCore::Internals::isUnderMemoryPressure):
2358         (WebCore::Internals::beginSimulatedMemoryPressure):
2359         (WebCore::Internals::endSimulatedMemoryPressure):
2360         * testing/Internals.h:
2361         * testing/Internals.idl:
2362
2363 2016-07-18  Said Abou-Hallawa  <sabouhallawa@apple,com>
2364
2365         [iOS] PDFDocumentImage should cache only a sub image of the PDF when caching the whole image is expensive
2366         https://bugs.webkit.org/show_bug.cgi?id=158715
2367
2368         Reviewed by Dean Jackson.
2369
2370         Test: fast/images/displaced-non-cached-pdf.html
2371
2372         For iOS, we need to ensure the size of the cached PDF images will not
2373         exceed some limit. Also we should be caching only a sub image of the PDF
2374         if caching the whole image will exceed the memory limit.
2375
2376         * page/Settings.cpp:
2377         (WebCore::Settings::Settings):
2378         (WebCore::Settings::setCachedPDFImageEnabled):
2379         * page/Settings.h:
2380         (WebCore::Settings::isCachedPDFImageEnabled):
2381             Add an option to disable caching the PDF images.
2382
2383         * platform/graphics/cg/PDFDocumentImage.cpp:
2384         (WebCore::PDFDocumentImage::setCachedPDFImageEnabled):
2385             Allow the caller of draw() to disable caching the PDF images.
2386         
2387         (WebCore::PDFDocumentImage::cacheParametersMatch):
2388             Match the context dirty rectangle with the cached image rectangle.
2389         
2390         (WebCore::transformContextForPainting):
2391             When preparing the context for drawing the PDF, take the location 
2392             of the destination rectangle into account. We do not need to scale
2393             the location of the source rectangle because we scale the size of
2394             the rectangle but we don't scale the whole coordinate system.
2395
2396         (WebCore::cachedImageRect):
2397             Calculate the rectangle of the cached image such that it does not
2398             exceed the limit. Start from the center of the dirty rectangle and
2399             then expand around it.
2400             
2401         (WebCore::PDFDocumentImage::decodedSizeChanged):
2402             In addition to notifying the ImageObserver, it keeps track of the size
2403             of all the cached PDF images.
2404
2405         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
2406             Ensure the size of all the cached images does not exceed the limit
2407             
2408         (WebCore::PDFDocumentImage::destroyDecodedData):
2409         * platform/graphics/cg/PDFDocumentImage.h:
2410
2411         * rendering/RenderImage.cpp:
2412         (WebCore::RenderImage::paintIntoRect):
2413             Pass the option to disable caching the PDF images to PDFDocumentImage.
2414
2415         * testing/InternalSettings.cpp:
2416         (WebCore::InternalSettings::Backup::Backup):
2417         (WebCore::InternalSettings::Backup::restoreTo):
2418         (WebCore::InternalSettings::setCachedPDFImageEnabled):
2419         * testing/InternalSettings.h:
2420         * testing/InternalSettings.idl:
2421             Add an internal option to disable caching the PDF images.
2422
2423 2016-07-18  Chris Dumez  <cdumez@apple.com>
2424
2425         The 2 first parameters to addEventListener() / removeEventListener() should be mandatory
2426         https://bugs.webkit.org/show_bug.cgi?id=158008
2427
2428         Reviewed by Darin Adler.
2429
2430         The 2 first parameters to addEventListener() / removeEventListener() should be
2431         mandatory:
2432         - https://dom.spec.whatwg.org/#interface-eventtarget
2433
2434         Firefox 46 and Chrome 50 both match the specification and throw an exception when those
2435         parameters are omitted. However, those parameters were marked as optional in WebKit and
2436         the calls were no-ops if those parameters were omitted. This patch aligns our behavior
2437         with the specification and other browsers.
2438
2439         Test: fast/dom/eventtarget-api-parameters.html
2440
2441         * bindings/scripts/CodeGeneratorJS.pm:
2442         (GetFunctionLength): Deleted.
2443         * dom/EventTarget.idl:
2444
2445 2016-07-18  Brent Fulgham  <bfulgham@apple.com>
2446
2447         Unreviewed, rolling out r203373.
2448
2449         Unaddressed
2450
2451         Reverted changeset:
2452
2453         "Don't associate form-associated elements with forms in other
2454         trees."
2455         https://bugs.webkit.org/show_bug.cgi?id=119451
2456         http://trac.webkit.org/changeset/203373
2457
2458 2016-07-18  Brent Fulgham  <bfulgham@apple.com>
2459
2460         Don't associate form-associated elements with forms in other trees.
2461         https://bugs.webkit.org/show_bug.cgi?id=119451
2462         <rdar://problem/27382946>
2463
2464         Change is based on the Blink change (patch by <adamk@chromium.org>):
2465         <https://chromium.googlesource.com/chromium/blink/+/0b33128be67e7845d495d5219614c02ccfe7a414>
2466
2467         Reviewed by Zalan Bujtas.
2468
2469         Prevent elements from being associated with forms that are not part of the same home subtree.
2470         This brings us in line with the WhatWG HTML specification as of September, 2013.
2471
2472         Tests: fast/forms/image-disconnected-during-parse.html
2473                fast/forms/input-disconnected-during-parse.html
2474
2475         * dom/NodeTraversal.h:
2476         (WebCore::NodeTraversal::highestAncestorOrSelf): Added.
2477         * html/FormAssociatedElement.cpp:
2478         (WebCore::FormAssociatedElement::insertedInto): If the element is associated with a form that
2479         is not part of the same tree, remove the association.
2480         * html/HTMLImageElement.cpp:
2481         (WebCore::HTMLImageElement::insertedInto): Ditto.
2482
2483 2016-07-18  George Ruan  <gruan@apple.com>
2484
2485         Move MediaSampleAVFObjC into its own file
2486         https://bugs.webkit.org/show_bug.cgi?id=159796
2487         <rdar://problem/27362488>
2488
2489         In preparation for a feature that uses MediaSampleAVFObjC, but does
2490         not need SourceBufferPrivateAVFObjC, it is beneficial to move
2491         MediaSampleAVFObjC to its own file.
2492
2493         Reviewed by Eric Carlson.
2494
2495         * WebCore.xcodeproj/project.pbxproj:
2496         * platform/MediaSample.h: Allow setting trackID to associate
2497         MediaSample id with MediaStreamTrackPrivate id.
2498         * platform/graphics/avfoundation/MediaSampleAVFObjC.h: Added.
2499         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: Moved
2500         from MediaSampleAVFObjC
2501         (WebCore::MediaSampleAVFObjC::presentationTime):
2502         (WebCore::MediaSampleAVFObjC::decodeTime):
2503         (WebCore::MediaSampleAVFObjC::duration):
2504         (WebCore::MediaSampleAVFObjC::sizeInBytes):
2505         (WebCore::MediaSampleAVFObjC::platformSample):
2506         (WebCore::CMSampleBufferIsRandomAccess):
2507         (WebCore::MediaSampleAVFObjC::flags):
2508         (WebCore::MediaSampleAVFObjC::presentationSize):
2509         (WebCore::MediaSampleAVFObjC::dump):
2510         (WebCore::MediaSampleAVFObjC::offsetTimestampsBy):
2511         (WebCore::MediaSampleAVFObjC::setTimestamps):
2512         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2513         Moved MediaSampleAVFObjC to its own file.
2514         (WebCore::MediaSampleAVFObjC::platformSample): Deleted.
2515         (WebCore::CMSampleBufferIsRandomAccess): Deleted.
2516         (WebCore::MediaSampleAVFObjC::flags): Deleted.
2517         (WebCore::MediaSampleAVFObjC::presentationSize): Deleted.
2518         (WebCore::MediaSampleAVFObjC::dump): Deleted.
2519         (WebCore::MediaSampleAVFObjC::offsetTimestampsBy): Deleted.
2520         (WebCore::MediaSampleAVFObjC::setTimestamps): Deleted.
2521         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2522
2523 2016-07-18  Eric Carlson  <eric.carlson@apple.com>
2524
2525         [MSE][Mac] Pass AVSampleBufferDisplayLayer HDCP status to a newly created key session
2526         https://bugs.webkit.org/show_bug.cgi?id=159812
2527         <rdar://problem/27371624>
2528
2529         Reviewed by Jon Lee.
2530
2531         No new tests, it isn't possible to test this with our current testing infrastructure.
2532
2533         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2534         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2535         (WebCore::SourceBufferPrivateAVFObjC::setCDMSession): Call layerDidReceiveError if there has
2536         been an HDCP error.
2537         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Remember an HDCP error.
2538
2539 2016-07-18  Yoav Weiss  <yoav@yoav.ws>
2540
2541         Add preload to features.json
2542         https://bugs.webkit.org/show_bug.cgi?id=159872
2543
2544         Reviewed by Darin Adler.
2545
2546         No new tests but no functional change.
2547
2548         * features.json:
2549
2550 2016-07-18  Youenn Fablet  <youenn@apple.com>
2551
2552         [Streams API] ReadableStream should throw a RangeError in case of NaN highWaterMark
2553         https://bugs.webkit.org/show_bug.cgi?id=159870
2554
2555         Reviewed by Xabier Rodriguez-Calvar.
2556
2557         Covered by rebased test.
2558
2559         * Modules/streams/StreamInternals.js:
2560         (validateAndNormalizeQueuingStrategy): Throwing a RangeError in lieu of a TypeError in case of NaN highWaterMark.
2561
2562 2016-07-18  Csaba Osztrogon√°c  <ossy@webkit.org>
2563
2564         Windows buildfix after r203338
2565         https://bugs.webkit.org/show_bug.cgi?id=159875
2566
2567         Unreviewed buildfix.
2568
2569         * dom/UserGestureIndicator.h:
2570         (WebCore::UserGestureToken::addDestructionObserver):
2571
2572 2016-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2573
2574         MemoryPressureHandler doesn't work if cgroups aren't present in Linux
2575         https://bugs.webkit.org/show_bug.cgi?id=155255
2576
2577         Reviewed by Sergio Villar Senin.
2578
2579         Allow to pass an eventFD file descriptor to the MemoryPressureHandler to be monitorized in case cgroups are not
2580         available.
2581
2582         * platform/MemoryPressureHandler.h:
2583         * platform/linux/MemoryPressureHandlerLinux.cpp:
2584
2585 2016-07-17  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2586
2587         Clean up PassRefPtr uses in Modules/encryptedmedia, Modules/speech, and Modules/quota
2588         https://bugs.webkit.org/show_bug.cgi?id=159701
2589
2590         Reviewed by Alex Christensen.
2591
2592         No new tests, no behavior changes.
2593
2594         * Modules/encryptedmedia/CDM.h:
2595         * Modules/encryptedmedia/MediaKeySession.h:
2596         * Modules/encryptedmedia/MediaKeys.h:
2597         * Modules/quota/DOMWindowQuota.cpp:
2598         * Modules/quota/StorageErrorCallback.cpp:
2599         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
2600         * Modules/quota/StorageErrorCallback.h:
2601         * Modules/quota/StorageInfo.h:
2602         * Modules/quota/StorageQuota.h:
2603         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
2604         * Modules/speech/SpeechSynthesis.cpp:
2605         (WebCore::SpeechSynthesis::getVoices):
2606         (WebCore::SpeechSynthesis::startSpeakingImmediately):
2607         (WebCore::SpeechSynthesis::speak):
2608         (WebCore::SpeechSynthesis::cancel):
2609         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
2610         (WebCore::SpeechSynthesis::boundaryEventOccurred):
2611         (WebCore::SpeechSynthesis::didStartSpeaking):
2612         (WebCore::SpeechSynthesis::didPauseSpeaking):
2613         (WebCore::SpeechSynthesis::didResumeSpeaking):
2614         (WebCore::SpeechSynthesis::didFinishSpeaking):
2615         (WebCore::SpeechSynthesis::speakingErrorOccurred):
2616         * Modules/speech/SpeechSynthesis.h:
2617         * Modules/speech/SpeechSynthesisEvent.h:
2618         * Modules/speech/SpeechSynthesisUtterance.h:
2619         * Modules/speech/SpeechSynthesisVoice.cpp:
2620         (WebCore::SpeechSynthesisVoice::create):
2621         (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
2622         * Modules/speech/SpeechSynthesisVoice.h:
2623         * platform/PlatformSpeechSynthesizer.h:
2624         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
2625         (WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
2626         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
2627         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
2628         (WebCore::PlatformSpeechSynthesizerMock::speak):
2629         (WebCore::PlatformSpeechSynthesizerMock::cancel):
2630         (WebCore::PlatformSpeechSynthesizerMock::pause):
2631         (WebCore::PlatformSpeechSynthesizerMock::resume):
2632
2633 2016-07-16  Sam Weinig  <sam@webkit.org>
2634
2635         [WebKit API] Add SPI to track multiple navigations caused by a single user gesture
2636         <rdar://problem/26554137>
2637         https://bugs.webkit.org/show_bug.cgi?id=159856
2638
2639         Reviewed by Dan Bernstein.
2640
2641         - Adds a new RefCounted object to represent a unique user gesture, called UserGestureToken.
2642         - Makes UserGestureIndicator track UserGestureToken.
2643         - Refines UserGestureIndicator's interface to use Optional and a smaller enum set
2644           to represent the different initial states.
2645         - Stores UserGestureTokens on objects that want to forward user gesture state (DOMTimer, 
2646           postMessage, and ScheduledNavigation) rather than just a boolean.
2647
2648         * accessibility/AccessibilityNodeObject.cpp:
2649         (WebCore::AccessibilityNodeObject::increment):
2650         (WebCore::AccessibilityNodeObject::decrement):
2651         * accessibility/AccessibilityObject.cpp:
2652         (WebCore::AccessibilityObject::press):
2653         * bindings/js/ScriptController.cpp:
2654         (WebCore::ScriptController::executeScriptInWorld):
2655         (WebCore::ScriptController::executeScript):
2656         Update for new UserGestureIndicator interface.
2657
2658         * dom/UserGestureIndicator.cpp:
2659         (WebCore::currentToken):
2660         (WebCore::UserGestureToken::~UserGestureToken):
2661         (WebCore::UserGestureIndicator::UserGestureIndicator):
2662         (WebCore::UserGestureIndicator::~UserGestureIndicator):
2663         (WebCore::UserGestureIndicator::currentUserGesture):
2664         (WebCore::UserGestureIndicator::processingUserGesture):
2665         (WebCore::UserGestureIndicator::processingUserGestureForMedia):
2666         (WebCore::isDefinite): Deleted.
2667         * dom/UserGestureIndicator.h:
2668         (WebCore::UserGestureToken::create):
2669         (WebCore::UserGestureToken::state):
2670         (WebCore::UserGestureToken::processingUserGesture):
2671         (WebCore::UserGestureToken::processingUserGestureForMedia):
2672         (WebCore::UserGestureToken::addDestructionObserver):
2673         (WebCore::UserGestureToken::UserGestureToken):
2674         Add UserGestureToken and track the current one explicitly.
2675
2676         * html/HTMLMediaElement.cpp:
2677         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):
2678         * inspector/InspectorFrontendClientLocal.cpp:
2679         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2680         * inspector/InspectorFrontendHost.cpp:
2681         * inspector/InspectorPageAgent.cpp:
2682         (WebCore::InspectorPageAgent::navigate):
2683         Update for new UserGestureIndicator interface.
2684
2685         * loader/NavigationAction.cpp:
2686         (WebCore::NavigationAction::NavigationAction):
2687         * loader/NavigationAction.h:
2688         (WebCore::NavigationAction::userGestureToken):
2689         (WebCore::NavigationAction::processingUserGesture):
2690         * loader/NavigationScheduler.cpp:
2691         (WebCore::ScheduledNavigation::ScheduledNavigation):
2692         (WebCore::ScheduledNavigation::~ScheduledNavigation):
2693         (WebCore::ScheduledNavigation::lockBackForwardList):
2694         (WebCore::ScheduledNavigation::wasDuringLoad):
2695         (WebCore::ScheduledNavigation::isLocationChange):
2696         (WebCore::ScheduledNavigation::userGestureToForward):
2697         (WebCore::ScheduledNavigation::clearUserGesture):
2698         (WebCore::NavigationScheduler::mustLockBackForwardList):
2699         (WebCore::NavigationScheduler::scheduleFormSubmission):
2700         (WebCore::ScheduledNavigation::wasUserGesture): Deleted.
2701         * page/DOMTimer.cpp:
2702         (WebCore::shouldForwardUserGesture):
2703         (WebCore::userGestureTokenToForward):
2704         (WebCore::DOMTimer::DOMTimer):
2705         (WebCore::DOMTimer::fired):
2706         * page/DOMTimer.h:
2707         * page/DOMWindow.cpp:
2708         (WebCore::PostMessageTimer::PostMessageTimer):
2709         Store the active UserGestureToken rather than just a bit.
2710
2711         * page/EventHandler.cpp:
2712         (WebCore::EventHandler::handleMousePressEvent):
2713         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2714         (WebCore::EventHandler::handleMouseReleaseEvent):
2715         (WebCore::EventHandler::keyEvent):
2716         (WebCore::EventHandler::handleTouchEvent):
2717         * rendering/HitTestResult.cpp:
2718         (WebCore::HitTestResult::toggleMediaFullscreenState):
2719         (WebCore::HitTestResult::enterFullscreenForVideo):
2720         (WebCore::HitTestResult::toggleEnhancedFullscreenForVideo):
2721         Update for new UserGestureIndicator interface.
2722
2723 2016-07-17  Ryosuke Niwa  <rniwa@webkit.org>
2724
2725         Rename fastHasAttribute to hasAttributeWithoutSynchronization
2726         https://bugs.webkit.org/show_bug.cgi?id=159864
2727
2728         Reviewed by Chris Dumez.
2729
2730         Renamed Rename fastHasAttribute to hasAttributeWithoutSynchronization for clarity.
2731
2732         * accessibility/AccessibilityListBoxOption.cpp:
2733         (WebCore::AccessibilityListBoxOption::isEnabled):
2734         * accessibility/AccessibilityObject.cpp:
2735         (WebCore::AccessibilityObject::hasAttribute):
2736         (WebCore::AccessibilityObject::getAttribute):
2737         * accessibility/AccessibilityRenderObject.cpp:
2738         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2739         * bindings/scripts/CodeGenerator.pm:
2740         (GetterExpression):
2741         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2742         * bindings/scripts/test/JS/JSTestObj.cpp:
2743         (WebCore::jsTestObjReflectedBooleanAttr):
2744         (WebCore::jsTestObjReflectedCustomBooleanAttr):
2745         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2746         (-[DOMTestObj reflectedBooleanAttr]):
2747         (-[DOMTestObj setReflectedBooleanAttr:]):
2748         (-[DOMTestObj reflectedCustomBooleanAttr]):
2749         (-[DOMTestObj setReflectedCustomBooleanAttr:]):
2750         * dom/Document.cpp:
2751         (WebCore::Document::hasManifest):
2752         (WebCore::Document::doctype):
2753         * dom/Element.h:
2754         (WebCore::Node::parentElement):
2755         (WebCore::Element::hasAttributeWithoutSynchronization):
2756         (WebCore::Element::fastHasAttribute): Deleted.
2757         * editing/ApplyStyleCommand.cpp:
2758         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2759         * editing/DeleteSelectionCommand.cpp:
2760         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
2761         * editing/markup.cpp:
2762         (WebCore::createMarkupInternal):
2763         * html/ColorInputType.cpp:
2764         (WebCore::ColorInputType::shouldShowSuggestions):
2765         * html/FileInputType.cpp:
2766         (WebCore::FileInputType::handleDOMActivateEvent):
2767         (WebCore::FileInputType::receiveDroppedFiles):
2768         * html/FormAssociatedElement.cpp:
2769         (WebCore::FormAssociatedElement::didMoveToNewDocument):
2770         (WebCore::FormAssociatedElement::insertedInto):
2771         (WebCore::FormAssociatedElement::removedFrom):
2772         (WebCore::FormAssociatedElement::formAttributeChanged):
2773         * html/FormController.cpp:
2774         (WebCore::ownerFormForState):
2775         * html/GenericCachedHTMLCollection.cpp:
2776         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
2777         * html/HTMLAnchorElement.cpp:
2778         (WebCore::HTMLAnchorElement::draggable):
2779         (WebCore::HTMLAnchorElement::href):
2780         (WebCore::HTMLAnchorElement::sendPings):
2781         * html/HTMLAppletElement.cpp:
2782         (WebCore::HTMLAppletElement::rendererIsNeeded):
2783         * html/HTMLElement.cpp:
2784         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
2785         (WebCore::elementAffectsDirectionality):
2786         (WebCore::setHasDirAutoFlagRecursively):
2787         * html/HTMLEmbedElement.cpp:
2788         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2789         * html/HTMLFieldSetElement.cpp:
2790         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
2791         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
2792         (WebCore::HTMLFieldSetElement::disabledStateChanged):
2793         (WebCore::HTMLFieldSetElement::childrenChanged):
2794         * html/HTMLFormControlElement.cpp:
2795         (WebCore::HTMLFormControlElement::formNoValidate):
2796         (WebCore::HTMLFormControlElement::formAction):
2797         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
2798         (WebCore::shouldAutofocus):
2799         * html/HTMLFormElement.cpp:
2800         (WebCore::HTMLFormElement::formElementIndex):
2801         (WebCore::HTMLFormElement::noValidate):
2802         * html/HTMLFrameElement.cpp:
2803         (WebCore::HTMLFrameElement::noResize):
2804         (WebCore::HTMLFrameElement::didAttachRenderers):
2805         * html/HTMLFrameElementBase.cpp:
2806         (WebCore::HTMLFrameElementBase::parseAttribute):
2807         (WebCore::HTMLFrameElementBase::location):
2808         * html/HTMLHRElement.cpp:
2809         (WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
2810         * html/HTMLImageElement.cpp:
2811         (WebCore::HTMLImageElement::isServerMap):
2812         * html/HTMLInputElement.cpp:
2813         (WebCore::HTMLInputElement::finishParsingChildren):
2814         (WebCore::HTMLInputElement::matchesDefaultPseudoClass):
2815         (WebCore::HTMLInputElement::isActivatedSubmit):
2816         (WebCore::HTMLInputElement::reset):
2817         (WebCore::HTMLInputElement::multiple):
2818         (WebCore::HTMLInputElement::setSize):
2819         (WebCore::HTMLInputElement::shouldUseMediaCapture):
2820         * html/HTMLMarqueeElement.cpp:
2821         (WebCore::HTMLMarqueeElement::minimumDelay):
2822         * html/HTMLMediaElement.cpp:
2823         (WebCore::HTMLMediaElement::insertedInto):
2824         (WebCore::HTMLMediaElement::selectMediaResource):
2825         (WebCore::HTMLMediaElement::loadResource):
2826         (WebCore::HTMLMediaElement::autoplay):
2827         (WebCore::HTMLMediaElement::preload):
2828         (WebCore::HTMLMediaElement::loop):
2829         (WebCore::HTMLMediaElement::setLoop):
2830         (WebCore::HTMLMediaElement::controls):
2831         (WebCore::HTMLMediaElement::setControls):
2832         (WebCore::HTMLMediaElement::muted):
2833         (WebCore::HTMLMediaElement::setMuted):
2834         (WebCore::HTMLMediaElement::selectNextSourceChild):
2835         (WebCore::HTMLMediaElement::sourceWasAdded):
2836         (WebCore::HTMLMediaElement::mediaSessionTitle):
2837         * html/HTMLObjectElement.cpp:
2838         (WebCore::HTMLObjectElement::parseAttribute):
2839         * html/HTMLOptGroupElement.cpp:
2840         (WebCore::HTMLOptGroupElement::isDisabledFormControl):
2841         (WebCore::HTMLOptGroupElement::isFocusable):
2842         * html/HTMLOptionElement.cpp:
2843         (WebCore::HTMLOptionElement::matchesDefaultPseudoClass):
2844         (WebCore::HTMLOptionElement::text):
2845         * html/HTMLProgressElement.cpp:
2846         (WebCore::HTMLProgressElement::isDeterminate):
2847         (WebCore::HTMLProgressElement::didElementStateChange):
2848         * html/HTMLScriptElement.cpp:
2849         (WebCore::HTMLScriptElement::async):
2850         (WebCore::HTMLScriptElement::setCrossOrigin):
2851         (WebCore::HTMLScriptElement::asyncAttributeValue):
2852         (WebCore::HTMLScriptElement::deferAttributeValue):
2853         (WebCore::HTMLScriptElement::hasSourceAttribute):
2854         (WebCore::HTMLScriptElement::dispatchLoadEvent):
2855         * html/HTMLSelectElement.cpp:
2856         (WebCore::HTMLSelectElement::reset):
2857         * html/HTMLTrackElement.cpp:
2858         (WebCore::HTMLTrackElement::isDefault):
2859         (WebCore::HTMLTrackElement::ensureTrack):
2860         (WebCore::HTMLTrackElement::loadTimerFired):
2861         * html/MediaElementSession.cpp:
2862         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
2863         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
2864         (WebCore::MediaElementSession::allowsAutomaticMediaDataLoading):
2865         * html/SearchInputType.cpp:
2866         (WebCore::SearchInputType::searchEventsShouldBeDispatched):
2867         (WebCore::SearchInputType::didSetValueByUserEdit):
2868         * inspector/InspectorDOMAgent.cpp:
2869         (WebCore::InspectorDOMAgent::buildObjectForNode):
2870         * loader/FrameLoader.cpp:
2871         (WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument):
2872         (WebCore::FrameLoader::findFrameForNavigation):
2873         * loader/ImageLoader.cpp:
2874         (WebCore::ImageLoader::notifyFinished):
2875         * mathml/MathMLSelectElement.cpp:
2876         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
2877         * rendering/RenderTableCell.cpp:
2878         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2879         * rendering/RenderThemeIOS.mm:
2880         (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
2881         * rendering/SimpleLineLayout.cpp:
2882         (WebCore::SimpleLineLayout::canUseForWithReason):
2883         * rendering/svg/RenderSVGResourceClipper.cpp:
2884         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2885         * svg/SVGAnimateMotionElement.cpp:
2886         (WebCore::SVGAnimateMotionElement::updateAnimationPath):
2887         * svg/SVGAnimationElement.cpp:
2888         (WebCore::SVGAnimationElement::startedActiveInterval):
2889         (WebCore::SVGAnimationElement::updateAnimation):
2890         * svg/animation/SVGSMILElement.cpp:
2891         (WebCore::SVGSMILElement::insertedInto):
2892
2893 2016-07-17  Brady Eidson  <beidson@apple.com>
2894
2895         Exceptions logged to the JS console should use toString().
2896         https://bugs.webkit.org/show_bug.cgi?id=159855
2897
2898         Reviewed by Darin Adler.
2899
2900         No new tests (No change in behavior).
2901
2902         * bindings/js/JSDOMBinding.cpp:
2903         (WebCore::reportException):
2904
2905         * dom/DOMCoreException.h:
2906         (WebCore::DOMCoreException::DOMCoreException):
2907
2908         * dom/ExceptionBase.cpp:
2909         (WebCore::ExceptionBase::ExceptionBase):
2910         (WebCore::ExceptionBase::toString):
2911         (WebCore::ExceptionBase::consoleErrorMessage): Deleted.
2912         * dom/ExceptionBase.h:
2913         (WebCore::ExceptionBase::description): Deleted.
2914
2915         * svg/SVGException.h:
2916
2917         * xml/XPathException.h:
2918         (WebCore::XPathException::XPathException):
2919
2920 2016-07-17  Brady Eidson  <beidson@apple.com>
2921
2922         Update DOMCoreException to use the description in toString().
2923         https://bugs.webkit.org/show_bug.cgi?id=159857
2924
2925         Reviewed by Darin Adler.
2926
2927         No new tests (Covered by changes to existing tests).
2928
2929         * bindings/js/JSDOMBinding.cpp:
2930         (WebCore::createDOMException):
2931
2932         * dom/DOMCoreException.h:
2933         (WebCore::DOMCoreException::DOMCoreException):
2934         (WebCore::DOMCoreException::createWithDescriptionAsMessage): Deleted.
2935
2936 2016-07-17  Myles C. Maxfield  <mmaxfield@apple.com>
2937
2938         Support new emoji group candidates
2939         https://bugs.webkit.org/show_bug.cgi?id=159755
2940         <rdar://problem/27325521>
2941
2942         Reviewed by Dean Jackson.
2943
2944         There are a few code points which should be able to be joined (with ZWJ) to
2945         either U+2640 or U+2642 to change the gender of the emoji. These patterns
2946         should also work with an additional 0xFE0F variation selector. This patch
2947         adds these new patterns to our existing emoji group candidate infrastructure.
2948
2949         Tests: fast/text/emoji-gender-2-3.html
2950                fast/text/emoji-gender-2-4.html
2951                fast/text/emoji-gender-2-5.html
2952                fast/text/emoji-gender-2-6.html
2953                fast/text/emoji-gender-2-7.html
2954                fast/text/emoji-gender-2-8.html
2955                fast/text/emoji-gender-2-9.html
2956                fast/text/emoji-gender-2.html
2957                fast/text/emoji-gender-3.html
2958                fast/text/emoji-gender-4.html
2959                fast/text/emoji-gender-5.html
2960                fast/text/emoji-gender-6.html
2961                fast/text/emoji-gender-7.html
2962                fast/text/emoji-gender-8.html
2963                fast/text/emoji-gender-9.html
2964                fast/text/emoji-gender-fe0f-3.html
2965                fast/text/emoji-gender-fe0f-4.html
2966                fast/text/emoji-gender-fe0f-5.html
2967                fast/text/emoji-gender-fe0f-6.html
2968                fast/text/emoji-gender-fe0f-7.html
2969                fast/text/emoji-gender-fe0f-8.html
2970                fast/text/emoji-gender-fe0f-9.html
2971                fast/text/emoji-gender.html
2972                fast/text/emoji-num-glyphs.html
2973                fast/text/emoji-single-parent-family-2.html
2974                fast/text/emoji-single-parent-family.html
2975
2976         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2977         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Removed incorrect ASSERT()s.
2978         * platform/graphics/FontCascade.cpp:
2979         (WebCore::FontCascade::characterRangeCodePath):
2980         * platform/text/CharacterProperties.h:
2981         (WebCore::isEmojiGroupCandidate):
2982
2983 2016-07-16  Brady Eidson  <beidson@apple.com>
2984
2985         Update SVGException to use the description in toString().
2986         https://bugs.webkit.org/show_bug.cgi?id=159847
2987
2988         Reviewed by Darin Adler.
2989
2990         No new tests (Covered by changes to existing tests).
2991
2992         * bindings/js/JSDOMBinding.cpp:
2993         (WebCore::reportException): use consoleErrorMessage for now.
2994
2995         * dom/ExceptionBase.cpp:
2996         (WebCore::ExceptionBase::consoleErrorMessage):
2997         * dom/ExceptionBase.h:
2998
2999         * svg/SVGException.h:
3000
3001 2016-07-16  Chris Dumez  <cdumez@apple.com>
3002
3003         Use fastHasAttribute() when possible
3004         https://bugs.webkit.org/show_bug.cgi?id=159838
3005
3006         Reviewed by Ryosuke Niwa.
3007
3008         Use fastHasAttribute() when possible, for performance.
3009
3010         * editing/DeleteSelectionCommand.cpp:
3011         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
3012         * editing/markup.cpp:
3013         (WebCore::createMarkupInternal):
3014         * html/HTMLAnchorElement.cpp:
3015         (WebCore::HTMLAnchorElement::draggable):
3016         * html/HTMLFrameElementBase.cpp:
3017         (WebCore::HTMLFrameElementBase::parseAttribute):
3018         * mathml/MathMLSelectElement.cpp:
3019         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
3020         * rendering/RenderThemeIOS.mm:
3021         (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
3022
3023 2016-07-16  Ryosuke Niwa  <rniwa@webkit.org>
3024
3025         Rename fastGetAttribute to attributeWithoutSynchronization
3026         https://bugs.webkit.org/show_bug.cgi?id=159852
3027
3028         Reviewed by Darin Adler.
3029
3030         Renamed fastGetAttribute to attributeWithoutSynchronization for clarity.
3031
3032         * accessibility/AXObjectCache.cpp:
3033         (WebCore::AXObjectCache::findAriaModalNodes):
3034         (WebCore::nodeHasRole):
3035         (WebCore::AXObjectCache::handleLiveRegionCreated):
3036         (WebCore::AXObjectCache::handleMenuItemSelected):
3037         (WebCore::AXObjectCache::handleAriaModalChange):
3038         (WebCore::isNodeAriaVisible):
3039         * accessibility/AccessibilityNodeObject.cpp:
3040         (WebCore::siblingWithAriaRole):
3041         (WebCore::AccessibilityNodeObject::titleElementText):
3042         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
3043         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
3044         (WebCore::AccessibilityNodeObject::stringValue):
3045         (WebCore::accessibleNameForNode):
3046         * accessibility/AccessibilityObject.cpp:
3047         (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
3048         (WebCore::AccessibilityObject::getAttribute):
3049         * accessibility/AccessibilityRenderObject.cpp:
3050         (WebCore::AccessibilityRenderObject::stringValue):
3051         (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
3052         * accessibility/AccessibilitySVGElement.cpp:
3053         (WebCore::AccessibilitySVGElement::childElementWithMatchingLanguage):
3054         (WebCore::AccessibilitySVGElement::accessibilityDescription):
3055         * bindings/objc/DOM.mm:
3056         (-[DOMHTMLLinkElement _mediaQueryMatches]):
3057         * bindings/scripts/CodeGenerator.pm:
3058         (GetterExpression):
3059         * bindings/scripts/CodeGeneratorObjC.pm:
3060         (GenerateImplementation):
3061         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3062         * bindings/scripts/test/JS/JSTestObj.cpp:
3063         (WebCore::jsTestObjReflectedStringAttr):
3064         * dom/AuthorStyleSheets.cpp:
3065         (WebCore::AuthorStyleSheets::collectActiveStyleSheets):
3066         * dom/Document.cpp:
3067         (WebCore::Document::buildAccessKeyMap):
3068         (WebCore::Document::processBaseElement):
3069         * dom/DocumentOrderedMap.cpp:
3070         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
3071         * dom/Element.cpp:
3072         (WebCore::Element::imageSourceURL):
3073         (WebCore::Element::rendererIsNeeded):
3074         (WebCore::Element::insertedInto):
3075         (WebCore::Element::removedFrom):
3076         (WebCore::Element::pseudo):
3077         (WebCore::Element::setPseudo):
3078         (WebCore::Element::spellcheckAttributeState):
3079         (WebCore::Element::canContainRangeEndPoint):
3080         (WebCore::Element::completeURLsInAttributeValue):
3081         * dom/Element.h:
3082         (WebCore::Element::fastHasAttribute):
3083         (WebCore::Element::attributeWithoutSynchronization):
3084         (WebCore::Element::fastGetAttribute): Deleted.
3085         * dom/InlineStyleSheetOwner.cpp:
3086         (WebCore::InlineStyleSheetOwner::createSheet):
3087         * dom/ScriptElement.cpp:
3088         (WebCore::ScriptElement::requestScript):
3089         (WebCore::ScriptElement::executeScript):
3090         * dom/SlotAssignment.cpp:
3091         (WebCore::slotNameFromSlotAttribute):
3092         (WebCore::SlotAssignment::SlotAssignment):
3093         (WebCore::recursivelyFireSlotChangeEvent):
3094         (WebCore::SlotAssignment::didChangeSlot):
3095         (WebCore::SlotAssignment::hostChildElementDidChange):
3096         (WebCore::SlotAssignment::assignedNodesForSlot):
3097         (WebCore::SlotAssignment::resolveAllSlotElements):
3098         * dom/TreeScope.cpp:
3099         (WebCore::TreeScope::labelElementForId):
3100         * dom/VisitedLinkState.cpp:
3101         (WebCore::linkAttribute):
3102         * editing/ApplyStyleCommand.cpp:
3103         (WebCore::isLegacyAppleStyleSpan):
3104         (WebCore::hasNoAttributeOrOnlyStyleAttribute):
3105         * editing/EditingStyle.cpp:
3106         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
3107         * editing/ReplaceSelectionCommand.cpp:
3108         (WebCore::isInterchangeNewlineNode):
3109         (WebCore::isInterchangeConvertedSpaceSpan):
3110         (WebCore::positionAvoidingPrecedingNodes):
3111         (WebCore::isMailPasteAsQuotationNode):
3112         (WebCore::isHeaderElement):
3113         (WebCore::isInlineNodeWithStyle):
3114         * editing/TextIterator.cpp:
3115         (WebCore::isRendererReplacedElement):
3116         * editing/cocoa/DataDetection.mm:
3117         (WebCore::DataDetection::isDataDetectorLink):
3118         (WebCore::DataDetection::requiresExtendedContext):
3119         (WebCore::DataDetection::dataDetectorIdentifier):
3120         (WebCore::DataDetection::shouldCancelDefaultAction):
3121         (WebCore::removeResultLinksFromAnchor):
3122         (WebCore::searchForLinkRemovingExistingDDLinks):
3123         * editing/gtk/EditorGtk.cpp:
3124         (WebCore::elementURL):
3125         * editing/htmlediting.cpp:
3126         (WebCore::isTabSpanNode):
3127         (WebCore::isTabSpanTextNode):
3128         (WebCore::isMailBlockquote):
3129         (WebCore::caretMinOffset):
3130         * editing/markup.cpp:
3131         (WebCore::createFragmentFromMarkup):
3132         * html/Autofill.cpp:
3133         (WebCore::AutofillData::createFromHTMLFormControlElement):
3134         * html/BaseTextInputType.cpp:
3135         (WebCore::BaseTextInputType::patternMismatch):
3136         * html/DateInputType.cpp:
3137         (WebCore::DateInputType::createStepRange):
3138         * html/DateTimeInputType.cpp:
3139         (WebCore::DateTimeInputType::createStepRange):
3140         * html/DateTimeLocalInputType.cpp:
3141         (WebCore::DateTimeLocalInputType::createStepRange):
3142         * html/FormAssociatedElement.cpp:
3143         (WebCore::FormAssociatedElement::findAssociatedForm):
3144         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
3145         (WebCore::FormAssociatedElement::formAttributeTargetChanged):
3146         * html/HTMLAnchorElement.cpp:
3147         (WebCore::HTMLAnchorElement::draggable):
3148         (WebCore::HTMLAnchorElement::href):
3149         (WebCore::HTMLAnchorElement::setHref):
3150         (WebCore::HTMLAnchorElement::target):
3151         (WebCore::HTMLAnchorElement::origin):
3152         (WebCore::HTMLAnchorElement::sendPings):
3153         (WebCore::HTMLAnchorElement::handleClick):
3154         * html/HTMLAnchorElement.h:
3155         (WebCore::HTMLAnchorElement::visitedLinkHash):
3156         * html/HTMLAppletElement.cpp:
3157         (WebCore::HTMLAppletElement::updateWidget):
3158         * html/HTMLAreaElement.cpp:
3159         (WebCore::HTMLAreaElement::target):
3160         * html/HTMLAttachmentElement.cpp:
3161         (WebCore::HTMLAttachmentElement::attachmentTitle):
3162         (WebCore::HTMLAttachmentElement::attachmentType):
3163         * html/HTMLBaseElement.cpp:
3164         (WebCore::HTMLBaseElement::target):
3165         (WebCore::HTMLBaseElement::href):
3166         * html/HTMLBodyElement.cpp:
3167         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
3168         * html/HTMLButtonElement.cpp:
3169         (WebCore::HTMLButtonElement::value):
3170         (WebCore::HTMLButtonElement::computeWillValidate):
3171         * html/HTMLCanvasElement.cpp:
3172         (WebCore::HTMLCanvasElement::reset):
3173         * html/HTMLDocument.cpp:
3174         (WebCore::HTMLDocument::bgColor):
3175         (WebCore::HTMLDocument::setBgColor):
3176         (WebCore::HTMLDocument::fgColor):
3177         (WebCore::HTMLDocument::setFgColor):
3178         (WebCore::HTMLDocument::alinkColor):
3179         (WebCore::HTMLDocument::setAlinkColor):
3180         (WebCore::HTMLDocument::linkColor):
3181         (WebCore::HTMLDocument::setLinkColor):
3182         (WebCore::HTMLDocument::vlinkColor):
3183         (WebCore::HTMLDocument::setVlinkColor):
3184         * html/HTMLElement.cpp:
3185         (WebCore::contentEditableType):
3186         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
3187         (WebCore::HTMLElement::dir):
3188         (WebCore::HTMLElement::setDir):
3189         (WebCore::HTMLElement::draggable):
3190         (WebCore::HTMLElement::setDraggable):
3191         (WebCore::HTMLElement::title):
3192         (WebCore::HTMLElement::tabIndex):
3193         (WebCore::HTMLElement::translateAttributeMode):
3194         (WebCore::HTMLElement::hasDirectionAuto):
3195         (WebCore::HTMLElement::directionality):
3196         * html/HTMLEmbedElement.cpp:
3197         (WebCore::HTMLEmbedElement::imageSourceURL):
3198         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs):
3199         * html/HTMLFormControlElement.cpp:
3200         (WebCore::HTMLFormControlElement::formEnctype):
3201         (WebCore::HTMLFormControlElement::formMethod):
3202         (WebCore::HTMLFormControlElement::formAction):
3203         (WebCore::HTMLFormControlElement::autocorrect):
3204         (WebCore::HTMLFormControlElement::autocapitalizeType):
3205         * html/HTMLFormElement.cpp:
3206         (WebCore::HTMLFormElement::autocorrect):
3207         (WebCore::HTMLFormElement::autocapitalizeType):
3208         (WebCore::HTMLFormElement::autocapitalize):
3209         (WebCore::HTMLFormElement::action):
3210         (WebCore::HTMLFormElement::setAction):
3211         (WebCore::HTMLFormElement::target):
3212         (WebCore::HTMLFormElement::wasUserSubmitted):
3213         (WebCore::HTMLFormElement::shouldAutocomplete):
3214         (WebCore::HTMLFormElement::finishParsingChildren):
3215         (WebCore::HTMLFormElement::autocomplete):
3216         * html/HTMLFrameElementBase.cpp:
3217         (WebCore::HTMLFrameElementBase::location):
3218         (WebCore::HTMLFrameElementBase::setLocation):
3219         * html/HTMLHtmlElement.cpp:
3220         (WebCore::HTMLHtmlElement::insertedByParser):
3221         * html/HTMLImageElement.cpp:
3222         (WebCore::HTMLImageElement::imageSourceURL):
3223         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
3224         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
3225         (WebCore::HTMLImageElement::selectImageSource):
3226         (WebCore::HTMLImageElement::altText):
3227         (WebCore::HTMLImageElement::createElementRenderer):
3228         (WebCore::HTMLImageElement::width):
3229         (WebCore::HTMLImageElement::height):
3230         (WebCore::HTMLImageElement::alt):
3231         (WebCore::HTMLImageElement::draggable):
3232         (WebCore::HTMLImageElement::setHeight):
3233         (WebCore::HTMLImageElement::src):
3234         (WebCore::HTMLImageElement::setSrc):
3235         (WebCore::HTMLImageElement::addSubresourceAttributeURLs):
3236         (WebCore::HTMLImageElement::didMoveToNewDocument):
3237         (WebCore::HTMLImageElement::isServerMap):
3238         (WebCore::HTMLImageElement::crossOrigin):
3239         * html/HTMLInputElement.cpp:
3240         (WebCore::HTMLInputElement::updateType):
3241         (WebCore::HTMLInputElement::initializeInputType):
3242         (WebCore::HTMLInputElement::altText):
3243         (WebCore::HTMLInputElement::value):
3244         (WebCore::HTMLInputElement::defaultValue):
3245         (WebCore::HTMLInputElement::setDefaultValue):
3246         (WebCore::HTMLInputElement::acceptMIMETypes):
3247         (WebCore::HTMLInputElement::acceptFileExtensions):
3248         (WebCore::HTMLInputElement::accept):
3249         (WebCore::HTMLInputElement::alt):
3250         (WebCore::HTMLInputElement::effectiveMaxLength):
3251         (WebCore::HTMLInputElement::src):
3252         (WebCore::HTMLInputElement::setAutoFilled):
3253         (WebCore::HTMLInputElement::dataList):
3254         (WebCore::HTMLInputElement::resetListAttributeTargetObserver):
3255         * html/HTMLKeygenElement.cpp:
3256         (WebCore::HTMLKeygenElement::isKeytypeRSA):
3257         (WebCore::HTMLKeygenElement::appendFormData):
3258         * html/HTMLLIElement.cpp:
3259         (WebCore::HTMLLIElement::didAttachRenderers):
3260         (WebCore::HTMLLIElement::parseValue):
3261         * html/HTMLLabelElement.cpp:
3262         (WebCore::HTMLLabelElement::control):
3263         * html/HTMLLinkElement.cpp:
3264         (WebCore::HTMLLinkElement::crossOrigin):
3265         (WebCore::HTMLLinkElement::process):
3266         (WebCore::HTMLLinkElement::href):
3267         (WebCore::HTMLLinkElement::rel):
3268         (WebCore::HTMLLinkElement::target):
3269         (WebCore::HTMLLinkElement::type):
3270         (WebCore::HTMLLinkElement::iconType):
3271         * html/HTMLMarqueeElement.cpp:
3272         (WebCore::HTMLMarqueeElement::scrollAmount):
3273         (WebCore::HTMLMarqueeElement::setScrollAmount):
3274         (WebCore::HTMLMarqueeElement::scrollDelay):
3275         (WebCore::HTMLMarqueeElement::setScrollDelay):
3276         (WebCore::HTMLMarqueeElement::loop):
3277         * html/HTMLMediaElement.cpp:
3278         (WebCore::HTMLMediaElement::insertedInto):
3279         (WebCore::HTMLMediaElement::crossOrigin):
3280         (WebCore::HTMLMediaElement::networkState):
3281         (WebCore::HTMLMediaElement::mediaSessionTitle):
3282         (WebCore::HTMLMediaElement::doesHaveAttribute):
3283         * html/HTMLMetaElement.cpp:
3284         (WebCore::HTMLMetaElement::process):
3285         (WebCore::HTMLMetaElement::content):
3286         (WebCore::HTMLMetaElement::httpEquiv):
3287         (WebCore::HTMLMetaElement::name):
3288         * html/HTMLMeterElement.cpp:
3289         (WebCore::HTMLMeterElement::min):
3290         (WebCore::HTMLMeterElement::setMin):
3291         (WebCore::HTMLMeterElement::max):
3292         (WebCore::HTMLMeterElement::setMax):
3293         (WebCore::HTMLMeterElement::value):
3294         (WebCore::HTMLMeterElement::low):
3295         (WebCore::HTMLMeterElement::high):
3296         (WebCore::HTMLMeterElement::optimum):
3297         * html/HTMLObjectElement.cpp:
3298         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
3299         (WebCore::HTMLObjectElement::hasValidClassId):
3300         (WebCore::HTMLObjectElement::imageSourceURL):
3301         (WebCore::HTMLObjectElement::renderFallbackContent):
3302         (WebCore::HTMLObjectElement::containsJavaApplet):
3303         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
3304         * html/HTMLOptGroupElement.cpp:
3305         (WebCore::HTMLOptGroupElement::groupLabelText):
3306         * html/HTMLOptionElement.cpp:
3307         (WebCore::HTMLOptionElement::value):
3308         (WebCore::HTMLOptionElement::label):
3309         * html/HTMLParamElement.cpp:
3310         (WebCore::HTMLParamElement::value):
3311         (WebCore::HTMLParamElement::isURLParameter):
3312         * html/HTMLProgressElement.cpp:
3313         (WebCore::HTMLProgressElement::value):
3314         (WebCore::HTMLProgressElement::max):
3315         * html/HTMLScriptElement.cpp:
3316         (WebCore::HTMLScriptElement::crossOrigin):
3317         (WebCore::HTMLScriptElement::src):
3318         (WebCore::HTMLScriptElement::sourceAttributeValue):
3319         (WebCore::HTMLScriptElement::charsetAttributeValue):
3320         (WebCore::HTMLScriptElement::typeAttributeValue):
3321         (WebCore::HTMLScriptElement::languageAttributeValue):
3322         (WebCore::HTMLScriptElement::forAttributeValue):
3323         (WebCore::HTMLScriptElement::eventAttributeValue):
3324         (WebCore::HTMLScriptElement::asyncAttributeValue):
3325         * html/HTMLSlotElement.cpp:
3326         (WebCore::HTMLSlotElement::insertedInto):
3327         (WebCore::HTMLSlotElement::removedFrom):
3328         * html/HTMLSourceElement.cpp:
3329         (WebCore::HTMLSourceElement::media):
3330         (WebCore::HTMLSourceElement::setMedia):
3331         (WebCore::HTMLSourceElement::type):
3332         (WebCore::HTMLSourceElement::setType):
3333         * html/HTMLTableCellElement.cpp:
3334         (WebCore::HTMLTableCellElement::colSpanForBindings):
3335         (WebCore::HTMLTableCellElement::rowSpan):
3336         (WebCore::HTMLTableCellElement::rowSpanForBindings):
3337         (WebCore::HTMLTableCellElement::cellIndex):
3338         (WebCore::HTMLTableCellElement::abbr):
3339         (WebCore::HTMLTableCellElement::axis):
3340         (WebCore::HTMLTableCellElement::setColSpanForBindings):
3341         (WebCore::HTMLTableCellElement::headers):
3342         (WebCore::HTMLTableCellElement::setRowSpanForBindings):
3343         (WebCore::HTMLTableCellElement::scope):
3344         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs):
3345         (WebCore::HTMLTableCellElement::cellAbove):
3346         * html/HTMLTableColElement.cpp:
3347         (WebCore::HTMLTableColElement::width):
3348         * html/HTMLTableElement.cpp:
3349         (WebCore::HTMLTableElement::rules):
3350         (WebCore::HTMLTableElement::summary):
3351         (WebCore::HTMLTableElement::addSubresourceAttributeURLs):
3352         * html/HTMLTableSectionElement.cpp:
3353         (WebCore::HTMLTableSectionElement::align):
3354         (WebCore::HTMLTableSectionElement::setAlign):
3355         (WebCore::HTMLTableSectionElement::ch):
3356         (WebCore::HTMLTableSectionElement::setCh):
3357         (WebCore::HTMLTableSectionElement::chOff):
3358         (WebCore::HTMLTableSectionElement::setChOff):
3359         (WebCore::HTMLTableSectionElement::vAlign):
3360         (WebCore::HTMLTableSectionElement::setVAlign):
3361         * html/HTMLTextAreaElement.cpp:
3362         (WebCore::HTMLTextAreaElement::appendFormData):
3363         * html/HTMLTextFormControlElement.cpp:
3364         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
3365         (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty):
3366         (WebCore::HTMLTextFormControlElement::directionForFormData):
3367         * html/HTMLTrackElement.cpp:
3368         (WebCore::HTMLTrackElement::srclang):
3369         (WebCore::HTMLTrackElement::label):
3370         (WebCore::HTMLTrackElement::isDefault):
3371         (WebCore::HTMLTrackElement::ensureTrack):
3372         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute):
3373         * html/HTMLVideoElement.cpp:
3374         (WebCore::HTMLVideoElement::parseAttribute):
3375         (WebCore::HTMLVideoElement::imageSourceURL):
3376         * html/ImageInputType.cpp:
3377         (WebCore::ImageInputType::height):
3378         (WebCore::ImageInputType::width):
3379         * html/InputType.cpp:
3380         (WebCore::InputType::applyStep):
3381         * html/MediaElementSession.cpp:
3382         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
3383         * html/MonthInputType.cpp:
3384         (WebCore::MonthInputType::createStepRange):
3385         * html/NumberInputType.cpp:
3386         (WebCore::NumberInputType::createStepRange):
3387         (WebCore::NumberInputType::sizeShouldIncludeDecoration):
3388         * html/RangeInputType.cpp:
3389         (WebCore::RangeInputType::createStepRange):
3390         (WebCore::RangeInputType::handleKeydownEvent):
3391         * html/TextFieldInputType.cpp:
3392         (WebCore::TextFieldInputType::appendFormData):
3393         (WebCore::TextFieldInputType::updateAutoFillButton):
3394         * html/TimeInputType.cpp:
3395         (WebCore::TimeInputType::createStepRange):
3396         * html/ValidationMessage.cpp:
3397         (WebCore::ValidationMessage::updateValidationMessage):
3398         * html/WeekInputType.cpp:
3399         (WebCore::WeekInputType::createStepRange):
3400         * html/track/WebVTTElement.cpp:
3401         (WebCore::WebVTTElement::createEquivalentHTMLElement):
3402         * inspector/InspectorPageAgent.cpp:
3403         (WebCore::InspectorPageAgent::buildObjectForFrame):
3404         * loader/FormSubmission.cpp:
3405         (WebCore::FormSubmission::create):
3406         * loader/FrameLoader.cpp:
3407         (WebCore::FrameLoader::defaultSubstituteDataForURL):
3408         * loader/ImageLoader.cpp:
3409         (WebCore::ImageLoader::updateFromElement):
3410         * loader/SubframeLoader.cpp:
3411         (WebCore::SubframeLoader::isPluginContentAllowedByContentSecurityPolicy):
3412         * mathml/MathMLElement.cpp:
3413         (WebCore::MathMLElement::colSpan):
3414         (WebCore::MathMLElement::rowSpan):
3415         (WebCore::MathMLElement::childShouldCreateRenderer):
3416         (WebCore::MathMLElement::defaultEventHandler):
3417         (WebCore::MathMLElement::cachedMathMLLength):
3418         * mathml/MathMLFractionElement.cpp:
3419         (WebCore::MathMLFractionElement::lineThickness):
3420         (WebCore::MathMLFractionElement::cachedFractionAlignment):
3421         * mathml/MathMLSelectElement.cpp:
3422         (WebCore::MathMLSelectElement::getSelectedActionChildAndIndex):
3423         (WebCore::MathMLSelectElement::getSelectedActionChild):
3424         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
3425         (WebCore::MathMLSelectElement::defaultEventHandler):
3426         (WebCore::MathMLSelectElement::willRespondToMouseClickEvents):
3427         (WebCore::MathMLSelectElement::toggle):
3428         * page/EventHandler.cpp:
3429         (WebCore::findDropZone):
3430         * page/Frame.cpp:
3431         (WebCore::Frame::matchLabelsAgainstElement):
3432         * page/PageSerializer.cpp:
3433         (WebCore::PageSerializer::serializeFrame):
3434         * platform/win/PasteboardWin.cpp:
3435         (WebCore::Pasteboard::writeImageToDataObject):
3436         * rendering/HitTestResult.cpp:
3437         (WebCore::HitTestResult::altDisplayString):
3438         * rendering/RenderDetailsMarker.cpp:
3439         (WebCore::RenderDetailsMarker::isOpen):
3440         * rendering/RenderImage.cpp:
3441         (WebCore::RenderImage::imageMap):
3442         (WebCore::RenderImage::nodeAtPoint):
3443         * rendering/RenderMenuList.cpp:
3444         (RenderMenuList::itemAccessibilityText):
3445         (RenderMenuList::itemToolTip):
3446         * rendering/RenderSearchField.cpp:
3447         (WebCore::RenderSearchField::autosaveName):
3448         * rendering/RenderThemeIOS.mm:
3449         (WebCore::getAttachmentProgress):
3450         (WebCore::AttachmentInfo::AttachmentInfo):
3451         * rendering/RenderThemeMac.mm:
3452         (WebCore::AttachmentLayout::layOutSubtitle):
3453         (WebCore::RenderThemeMac::paintAttachment):
3454         * rendering/mathml/MathMLStyle.cpp:
3455         (WebCore::MathMLStyle::resolveMathMLStyle):
3456         * rendering/mathml/RenderMathMLFenced.cpp:
3457         (WebCore::RenderMathMLFenced::updateFromElement):
3458         * rendering/mathml/RenderMathMLOperator.cpp:
3459         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
3460         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
3461         (WebCore::RenderMathMLOperator::setOperatorProperties):
3462         * rendering/mathml/RenderMathMLScripts.cpp:
3463         (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
3464         * rendering/mathml/RenderMathMLUnderOver.cpp:
3465         (WebCore::RenderMathMLUnderOver::hasAccent):
3466         * style/StyleSharingResolver.cpp:
3467         (WebCore::Style::SharingResolver::canShareStyleWithElement):
3468         (WebCore::Style::SharingResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3469         * svg/SVGAElement.cpp:
3470         (WebCore::SVGAElement::title):
3471         (WebCore::SVGAElement::defaultEventHandler):
3472         * svg/SVGAltGlyphElement.cpp:
3473         (WebCore::SVGAltGlyphElement::glyphRef):
3474         (WebCore::SVGAltGlyphElement::setFormat):
3475         (WebCore::SVGAltGlyphElement::format):
3476         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
3477         * svg/SVGAnimationElement.cpp:
3478         (WebCore::SVGAnimationElement::toValue):
3479         (WebCore::SVGAnimationElement::byValue):
3480         (WebCore::SVGAnimationElement::fromValue):
3481         (WebCore::SVGAnimationElement::isAdditive):
3482         (WebCore::SVGAnimationElement::isAccumulated):
3483         * svg/SVGElement.cpp:
3484         (WebCore::SVGElement::xmlbase):
3485         (WebCore::SVGElement::setXmlbase):
3486         * svg/SVGFontFaceElement.cpp:
3487         (WebCore::SVGFontFaceElement::unitsPerEm):
3488         (WebCore::SVGFontFaceElement::xHeight):
3489         (WebCore::SVGFontFaceElement::capHeight):
3490         (WebCore::SVGFontFaceElement::horizontalOriginX):
3491         (WebCore::SVGFontFaceElement::horizontalOriginY):
3492         (WebCore::SVGFontFaceElement::horizontalAdvanceX):
3493         (WebCore::SVGFontFaceElement::verticalOriginX):
3494         (WebCore::SVGFontFaceElement::verticalOriginY):
3495         (WebCore::SVGFontFaceElement::verticalAdvanceY):
3496         (WebCore::SVGFontFaceElement::ascent):
3497         (WebCore::SVGFontFaceElement::descent):
3498         * svg/SVGFontFaceNameElement.cpp:
3499         (WebCore::SVGFontFaceNameElement::srcValue):
3500         * svg/SVGFontFaceUriElement.cpp:
3501         (WebCore::SVGFontFaceUriElement::srcValue):
3502         * svg/SVGGlyphRefElement.cpp:
3503         (WebCore::SVGGlyphRefElement::glyphRef):
3504         (WebCore::SVGGlyphRefElement::setGlyphRef):
3505         * svg/SVGHKernElement.cpp:
3506         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
3507         * svg/SVGSVGElement.cpp:
3508         (WebCore::SVGSVGElement::contentScriptType):
3509         (WebCore::SVGSVGElement::contentStyleType):
3510         * svg/SVGStyleElement.cpp:
3511         (WebCore::SVGStyleElement::media):
3512         (WebCore::SVGStyleElement::title):
3513         (WebCore::SVGStyleElement::setTitle):
3514         * svg/SVGToOTFFontConversion.cpp:
3515         (WebCore::SVGToOTFFontConverter::appendOS2Table):
3516         (WebCore::SVGToOTFFontConverter::appendCFFTable):
3517         (WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable):
3518         (WebCore::SVGToOTFFontConverter::appendVORGTable):
3519         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
3520         (WebCore::SVGToOTFFontConverter::processGlyphElement):
3521         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
3522         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
3523         * svg/SVGVKernElement.cpp:
3524         (WebCore::SVGVKernElement::buildVerticalKerningPair):
3525         * svg/animation/SVGSMILElement.cpp:
3526         (WebCore::SVGSMILElement::insertedInto):
3527         (WebCore::SVGSMILElement::parseAttribute):
3528         (WebCore::SVGSMILElement::svgAttributeChanged):
3529         (WebCore::SVGSMILElement::restart):
3530         (WebCore::SVGSMILElement::fill):
3531         (WebCore::SVGSMILElement::dur):
3532         (WebCore::SVGSMILElement::repeatDur):
3533         (WebCore::SVGSMILElement::repeatCount):
3534         (WebCore::SVGSMILElement::maxValue):
3535         (WebCore::SVGSMILElement::minValue):
3536
3537 2016-07-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3538
3539         ASSERTION FAILED: isMainThread() in ~UniqueIDBDatabase() since r201997
3540         https://bugs.webkit.org/show_bug.cgi?id=159809
3541
3542         Reviewed by Brady Eidson.
3543
3544         In r201997 the UniqueIDBDatabase was protected in executeNextDatabaseTask() because the last reference could be
3545         removed while the task is performed. However UniqueIDBDatabase is expected to be deleted in the main thread, and
3546         the destructor asserts when not called in the main thread, but executeNextDatabaseTask() is always called on a
3547         secondary thread. So, if the protector contains the last reference, the object is deleted in the secondary thread.
3548
3549         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3550         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask): Use callOnMainThread to ensure the object is
3551         deleted in the main thread in case the protector contains the last reference.
3552
3553 2016-07-15  Chris Dumez  <cdumez@apple.com>
3554
3555         Use emptyString() / nullAtom when possible
3556         https://bugs.webkit.org/show_bug.cgi?id=159850
3557
3558         Reviewed by Ryosuke Niwa.
3559
3560         Use emptyString() / nullAtom when possible, for performance.
3561
3562         * Modules/webaudio/AudioNode.cpp:
3563         (WebCore::AudioNode::channelCountMode):
3564         (WebCore::AudioNode::channelInterpretation):
3565         * Modules/webdatabase/DatabaseTracker.cpp:
3566         (WebCore::DatabaseTracker::tracker):
3567         * Modules/websockets/WebSocket.cpp:
3568         (WebCore::WebSocket::WebSocket):
3569         (WebCore::WebSocket::didConnect):
3570         * Modules/websockets/WebSocketChannel.cpp:
3571         (WebCore::WebSocketChannel::subprotocol):
3572         (WebCore::WebSocketChannel::extensions):
3573         * accessibility/AccessibilityObject.cpp:
3574         (WebCore::AccessibilityObject::supportsPressAction):
3575         * accessibility/mac/AXObjectCacheMac.mm:
3576         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3577         * css/CSSPropertySourceData.cpp:
3578         (WebCore::CSSPropertySourceData::CSSPropertySourceData):
3579         * css/PageRuleCollector.cpp:
3580         (WebCore::PageRuleCollector::pageName):
3581         * css/PropertySetCSSStyleDeclaration.cpp:
3582         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
3583         * dom/DocumentMarkerController.cpp:
3584         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
3585         * dom/Element.cpp:
3586         (WebCore::Element::setPrefix):
3587         * editing/AlternativeTextController.cpp:
3588         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
3589         (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
3590         * editing/CompositeEditCommand.cpp:
3591         (WebCore::CompositeEditCommand::removeNodeAttribute):
3592         (WebCore::CompositeEditCommand::moveParagraphs):
3593         * editing/InsertTextCommand.cpp:
3594         (WebCore::InsertTextCommand::positionInsideTextNode):
3595         * editing/TextCheckingHelper.cpp:
3596         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
3597         * editing/TypingCommand.cpp:
3598         (WebCore::TypingCommand::deleteSelection):
3599         (WebCore::TypingCommand::deleteKeyPressed):
3600         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3601         (WebCore::TypingCommand::insertLineBreak):
3602         (WebCore::TypingCommand::insertParagraphSeparator):
3603         * editing/cocoa/EditorCocoa.mm:
3604         (WebCore::Editor::styleForSelectionStart):
3605         * editing/mac/EditorMac.mm:
3606         (WebCore::Editor::stringSelectionForPasteboard):
3607         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
3608         * fileapi/FileReaderLoader.cpp:
3609         (WebCore::FileReaderLoader::FileReaderLoader):
3610         * html/FileInputType.cpp:
3611         (WebCore::FileInputType::appendFormData):
3612         * html/HTMLMediaElement.cpp:
3613         (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
3614         * html/HTMLOutputElement.cpp:
3615         (WebCore::HTMLOutputElement::HTMLOutputElement):
3616         * html/SearchInputType.cpp:
3617         (WebCore::SearchInputType::handleKeydownEvent):
3618         * html/TextFieldInputType.cpp:
3619         (WebCore::autoFillButtonTypeToAccessibilityLabel):
3620         * html/canvas/WebGLDebugShaders.cpp:
3621         (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
3622         * html/canvas/WebGLRenderingContextBase.cpp:
3623         (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
3624         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
3625         * html/canvas/WebGLShader.cpp:
3626         (WebCore::WebGLShader::WebGLShader):
3627         * html/shadow/MediaControlElements.cpp:
3628         (WebCore::MediaControlStatusDisplayElement::update):
3629         * html/track/TextTrack.cpp:
3630         (WebCore::TextTrack::captionMenuOffItem):
3631         (WebCore::TextTrack::captionMenuAutomaticItem):
3632         * html/track/VTTRegion.cpp:
3633         (WebCore::VTTRegion::scroll):
3634         * html/track/VTTRegion.h:
3635         * inspector/InspectorDOMAgent.cpp:
3636         (WebCore::InspectorDOMAgent::toErrorString):
3637         (WebCore::InspectorDOMAgent::resolveNode):
3638         (WebCore::InspectorDOMAgent::documentURLString):
3639         (WebCore::documentBaseURLString):
3640         * inspector/InspectorDOMDebuggerAgent.cpp:
3641         (WebCore::domTypeName):
3642         * inspector/InspectorFrontendHost.cpp:
3643         (WebCore::InspectorFrontendHost::localizedStringsURL):
3644         * inspector/InspectorHistory.cpp:
3645         (WebCore::InspectorHistory::Action::mergeId):
3646         * inspector/InspectorPageAgent.cpp:
3647         (WebCore::InspectorPageAgent::reload):
3648         (WebCore::InspectorPageAgent::frameId):
3649         (WebCore::InspectorPageAgent::loaderId):
3650         * inspector/InspectorStyleSheet.cpp:
3651         (WebCore::InspectorStyleSheet::ruleSelector):
3652         * loader/EmptyClients.h:
3653         * loader/FrameLoader.cpp:
3654         (WebCore::FrameLoader::referrer):
3655         * loader/ImageLoader.cpp:
3656         (WebCore::ImageLoader::clearFailedLoadURL):
3657         * loader/ResourceLoader.cpp:
3658         (WebCore::ResourceLoader::didReceiveResponse):
3659         * page/ContextMenuController.cpp:
3660         (WebCore::ContextMenuController::contextMenuItemSelected):
3661         * page/FrameTree.cpp:
3662         (WebCore::FrameTree::setName):
3663         (WebCore::FrameTree::clearName):
3664         * page/Location.cpp:
3665         (WebCore::Location::port):
3666         * platform/network/ProtectionSpaceBase.cpp:
3667         (WebCore::ProtectionSpaceBase::ProtectionSpaceBase):
3668         * xml/parser/XMLDocumentParserLibxml2.cpp:
3669         (WebCore::handleElementAttributes):
3670
3671 2016-07-15  Simon Fraser  <simon.fraser@apple.com>
3672
3673         Repaints rects drawn incorrectly when inspecting a WebView on a Retina display
3674         https://bugs.webkit.org/show_bug.cgi?id=159824
3675         rdar://problem/27376305
3676
3677         Reviewed by Brian Burg.
3678
3679         InspectorOverlayPage.js set up the canvases with a deviceScaleFactor passed into
3680         reset(), which comes from the overlay's m_page.deviceScaleFactor(). However, updatePaintRects()
3681         used window.devicePixelRatio which was always 1.
3682
3683         Fix by setting the deviceScaleFactor on the m_overlayPage.
3684
3685         * inspector/InspectorOverlay.cpp:
3686         (WebCore::InspectorOverlay::overlayPage):
3687
3688 2016-07-15  Myles C. Maxfield  <mmaxfield@apple.com>
3689
3690         [macOS] Work around crash in [NSAttributedString nextWordFromIndex:forward:]
3691         https://bugs.webkit.org/show_bug.cgi?id=159842
3692
3693         Reviewed by Jon Lee.
3694
3695         <rdar://problem/27380532> describes a crash inside [NSAttributedString nextWordFromIndex:forward:].
3696         This must be worked around for https://bugs.webkit.org/show_bug.cgi?id=159755 and
3697         <rdar://problem/27325521>.
3698
3699         * platform/text/mac/TextBoundaries.mm:
3700         (WebCore::findNextWordFromIndex):
3701
3702 2016-07-15  Brady Eidson  <beidson@apple.com>
3703
3704         Update XPathException to use the description in toString().
3705         https://bugs.webkit.org/show_bug.cgi?id=159848
3706
3707         Reviewed by Alex Christensen.
3708
3709         No new tests (Covered by changes to existing tests).
3710
3711         * bindings/js/JSDOMBinding.cpp:
3712         (WebCore::createDOMException):
3713         * xml/XPathException.h:
3714         (WebCore::XPathException::XPathException):
3715
3716 2016-07-15  Brady Eidson  <beidson@apple.com>
3717
3718         Change toString() behavior for exceptions constructed with "createWithDescriptionAsMessage".
3719         https://bugs.webkit.org/show_bug.cgi?id=159839
3720
3721         Reviewed by Alex Christensen.
3722
3723         No new tests (Covered by changes to existing tests).
3724
3725         This is the first step towards extended exception messages for all exception types.
3726
3727         * dom/ExceptionBase.cpp:
3728         (WebCore::ExceptionBase::ExceptionBase):
3729         (WebCore::ExceptionBase::toString):
3730         * dom/ExceptionBase.h:
3731
3732 2016-07-15  Geoffrey Garen  <ggaren@apple.com>
3733
3734         Added a makeRef<T> helper
3735         https://bugs.webkit.org/show_bug.cgi?id=159835
3736
3737         Reviewed by Andreas Kling.
3738
3739         Anders told me to!
3740
3741         * Modules/indexeddb/IDBTransaction.cpp:
3742         (WebCore::IDBTransaction::putOrAddOnServer):
3743         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3744         (WebCore::InProcessIDBServer::deleteDatabase):
3745         (WebCore::InProcessIDBServer::didDeleteDatabase):
3746         (WebCore::InProcessIDBServer::openDatabase):
3747         (WebCore::InProcessIDBServer::didOpenDatabase):
3748         (WebCore::InProcessIDBServer::didAbortTransaction):
3749         (WebCore::InProcessIDBServer::didCommitTransaction):
3750         (WebCore::InProcessIDBServer::didCreateObjectStore):
3751         (WebCore::InProcessIDBServer::didDeleteObjectStore):
3752         (WebCore::InProcessIDBServer::didClearObjectStore):
3753         (WebCore::InProcessIDBServer::didCreateIndex):
3754         (WebCore::InProcessIDBServer::didDeleteIndex):
3755         (WebCore::InProcessIDBServer::didPutOrAdd):
3756         (WebCore::InProcessIDBServer::didGetRecord):
3757         (WebCore::InProcessIDBServer::didGetCount):
3758         (WebCore::InProcessIDBServer::didDeleteRecord):
3759         (WebCore::InProcessIDBServer::didOpenCursor):
3760         (WebCore::InProcessIDBServer::didIterateCursor):
3761         (WebCore::InProcessIDBServer::abortTransaction):
3762         (WebCore::InProcessIDBServer::commitTransaction):
3763         (WebCore::InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
3764         (WebCore::InProcessIDBServer::createObjectStore):
3765         (WebCore::InProcessIDBServer::deleteObjectStore):
3766         (WebCore::InProcessIDBServer::clearObjectStore):
3767         (WebCore::InProcessIDBServer::createIndex):
3768         (WebCore::InProcessIDBServer::deleteIndex):
3769         (WebCore::InProcessIDBServer::putOrAdd):
3770         (WebCore::InProcessIDBServer::getRecord):
3771         (WebCore::InProcessIDBServer::getCount):
3772         (WebCore::InProcessIDBServer::deleteRecord):
3773         (WebCore::InProcessIDBServer::openCursor):
3774         (WebCore::InProcessIDBServer::iterateCursor):
3775         (WebCore::InProcessIDBServer::establishTransaction):
3776         (WebCore::InProcessIDBServer::fireVersionChangeEvent):
3777         (WebCore::InProcessIDBServer::didStartTransaction):
3778         (WebCore::InProcessIDBServer::didCloseFromServer):
3779         (WebCore::InProcessIDBServer::notifyOpenDBRequestBlocked):
3780         (WebCore::InProcessIDBServer::databaseConnectionClosed):
3781         (WebCore::InProcessIDBServer::abortOpenAndUpgradeNeeded):
3782         (WebCore::InProcessIDBServer::didFireVersionChangeEvent):
3783         (WebCore::InProcessIDBServer::openDBRequestCancelled):
3784         (WebCore::InProcessIDBServer::confirmDidCloseFromServer):
3785         (WebCore::InProcessIDBServer::getAllDatabaseNames):
3786         (WebCore::InProcessIDBServer::didGetAllDatabaseNames):
3787         * Modules/mediastream/MediaDevicesRequest.cpp:
3788         (WebCore::MediaDevicesRequest::didCompleteTrackSourceInfoRequest):
3789         * Modules/mediastream/UserMediaRequest.cpp:
3790         (WebCore::UserMediaRequest::constraintsValidated):
3791         (WebCore::UserMediaRequest::userMediaAccessGranted):
3792         * Modules/webaudio/AudioContext.cpp:
3793         (WebCore::AudioContext::scheduleNodeDeletion):
3794         (WebCore::AudioContext::isPlayingAudioDidChange):
3795         (WebCore::AudioContext::suspend):
3796         (WebCore::AudioContext::resume):
3797         (WebCore::AudioContext::close):
3798         (WebCore::AudioContext::suspendPlayback):
3799         (WebCore::AudioContext::mayResumePlayback):
3800         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3801         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
3802         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
3803         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3804         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
3805         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3806         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3807         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
3808         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
3809         * Modules/websockets/WebSocket.cpp:
3810         (WebCore::WebSocket::connect):
3811         * bindings/js/JSEventListener.h:
3812         (WebCore::JSEventListener::jsFunction):
3813         * dom/Node.cpp:
3814         (WebCore::Node::setTextContent):
3815         * html/HTMLMediaElement.cpp:
3816         (WebCore::HTMLMediaElement::layoutSizeChanged):
3817         * inspector/CommandLineAPIHost.cpp:
3818         (WebCore::CommandLineAPIHost::wrapper):
3819         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3820         (WebCore::AudioSourceProviderAVFObjC::prepare):
3821         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
3822         (WebCore::WebCoreAVCFResourceLoader::invalidate):
3823         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
3824         (WebCore::WebCoreAVFResourceLoader::invalidate):
3825         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3826         (WebVideoFullscreenControllerContext::setExternalPlayback):
3827         * platform/network/BlobResourceHandle.cpp:
3828         (WebCore::BlobResourceHandle::start):
3829         (WebCore::BlobResourceHandle::notifyFinish):
3830         * platform/network/SocketStreamHandleBase.cpp:
3831         (WebCore::SocketStreamHandleBase::disconnect):
3832         * platform/network/curl/CurlDownload.cpp:
3833         (WebCore::CurlDownload::didReceiveHeader):
3834
3835 2016-07-15  Chris Dumez  <cdumez@apple.com>
3836
3837         Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
3838         https://bugs.webkit.org/show_bug.cgi?id=159793
3839
3840         Reviewed by Ryosuke Niwa.
3841
3842         Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible, for performance.
3843
3844         * Modules/plugins/YouTubePluginReplacement.cpp:
3845         (WebCore::YouTubePluginReplacement::installReplacement):
3846         * dom/Element.h:
3847         (WebCore::Element::setIdAttribute):
3848         * editing/ApplyStyleCommand.cpp:
3849         (WebCore::hasNoAttributeOrOnlyStyleAttribute):
3850         (WebCore::createFontElement):
3851         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
3852         * editing/EditingStyle.cpp:
3853         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
3854         * editing/Editor.cpp:
3855         (WebCore::Editor::setBaseWritingDirection):
3856         * editing/ReplaceSelectionCommand.cpp:
3857         (WebCore::isMailPasteAsQuotationNode):
3858         (WebCore::isInlineNodeWithStyle):
3859         * editing/cocoa/DataDetection.mm:
3860         (WebCore::DataDetection::detectContentInRange):
3861         * editing/htmlediting.cpp:
3862         (WebCore::createTabSpanElement):
3863         * editing/ios/EditorIOS.mm:
3864         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3865         (WebCore::Editor::WebContentReader::readURL):
3866         * editing/mac/EditorMac.mm:
3867         (WebCore::Editor::WebContentReader::readURL):
3868         * editing/markup.cpp:
3869         (WebCore::createFragmentFromText):
3870         * html/BaseButtonInputType.cpp:
3871         (WebCore::BaseButtonInputType::setValue):
3872         * html/BaseCheckableInputType.cpp:
3873         (WebCore::BaseCheckableInputType::setValue):
3874         * html/FTPDirectoryDocument.cpp:
3875         (WebCore::FTPDirectoryDocumentParser::appendEntry):
3876         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
3877         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
3878         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
3879         * html/HTMLAnchorElement.cpp:
3880         (WebCore::HTMLAnchorElement::href):
3881         (WebCore::HTMLAnchorElement::setHref):
3882         (WebCore::HTMLAnchorElement::target):
3883         * html/HTMLAreaElement.cpp:
3884         (WebCore::HTMLAreaElement::target):
3885         * html/HTMLBaseElement.cpp:
3886         (WebCore::HTMLBaseElement::setHref):
3887         * html/HTMLButtonElement.cpp:
3888         (WebCore::HTMLButtonElement::setType):
3889         * html/HTMLDetailsElement.cpp:
3890         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
3891         (WebCore::HTMLDetailsElement::toggleOpen):
3892         * html/HTMLDocument.cpp:
3893         (WebCore::HTMLDocument::setBgColor):
3894         (WebCore::HTMLDocument::setFgColor):
3895         (WebCore::HTMLDocument::setAlinkColor):
3896         (WebCore::HTMLDocument::setLinkColor):
3897         (WebCore::HTMLDocument::setVlinkColor):
3898         * html/HTMLElement.cpp:
3899         (WebCore::HTMLElement::setDir):
3900         (WebCore::HTMLElement::setContentEditable):
3901         (WebCore::HTMLElement::setDraggable):
3902         (WebCore::HTMLElement::setSpellcheck):
3903         (WebCore::HTMLElement::setTranslate):
3904         * html/HTMLFormControlElement.cpp:
3905         (WebCore::HTMLFormControlElement::setFormEnctype):
3906         (WebCore::HTMLFormControlElement::setFormMethod):
3907         (WebCore::HTMLFormControlElement::setAutocorrect):
3908         (WebCore::HTMLFormControlElement::setAutocapitalize):
3909         (WebCore::HTMLFormControlElement::setAutocomplete):
3910         * html/HTMLFormElement.cpp:
3911         (WebCore::HTMLFormElement::setAutocorrect):
3912         (WebCore::HTMLFormElement::setAutocapitalize):
3913         (WebCore::HTMLFormElement::setAction):
3914         (WebCore::HTMLFormElement::setEnctype):
3915         (WebCore::HTMLFormElement::setMethod):
3916         (WebCore::HTMLFormElement::target):
3917         * html/HTMLImageElement.cpp:
3918         (WebCore::HTMLImageElement::width):
3919         (WebCore::HTMLImageElement::height):
3920         (WebCore::HTMLImageElement::setSrc):
3921         * html/HTMLInputElement.cpp:
3922         (WebCore::HTMLInputElement::setType):
3923         (WebCore::HTMLInputElement::updateType):
3924         (WebCore::HTMLInputElement::altText):
3925         (WebCore::HTMLInputElement::setDefaultValue):
3926         * html/HTMLLinkElement.cpp:
3927         (WebCore::HTMLLinkElement::href):
3928         (WebCore::HTMLLinkElement::target):
3929         (WebCore::HTMLLinkElement::type):
3930         * html/HTMLMediaElement.cpp:
3931         (WebCore::HTMLMediaElement::setSrc):
3932         (WebCore::HTMLMediaElement::setPreload):
3933         * html/HTMLMeterElement.cpp:
3934         (WebCore::HTMLMeterElement::min):
3935         (WebCore::HTMLMeterElement::setMin):
3936         (WebCore::HTMLMeterElement::max):
3937         (WebCore::HTMLMeterElement::setMax):
3938         (WebCore::HTMLMeterElement::value):
3939         (WebCore::HTMLMeterElement::setValue):
3940         (WebCore::HTMLMeterElement::low):
3941         (WebCore::HTMLMeterElement::setLow):
3942         (WebCore::HTMLMeterElement::high):
3943         (WebCore::HTMLMeterElement::setHigh):
3944         (WebCore::HTMLMeterElement::optimum):
3945         (WebCore::HTMLMeterElement::setOptimum):
3946         * html/HTMLObjectElement.cpp:
3947         (WebCore::HTMLObjectElement::containsJavaApplet):
3948         * html/HTMLOptionElement.cpp:
3949         (WebCore::HTMLOptionElement::createForJSConstructor):
3950         (WebCore::HTMLOptionElement::setValue):
3951         (WebCore::HTMLOptionElement::setLabel):
3952         * html/HTMLProgressElement.cpp:
3953         (WebCore::HTMLProgressElement::setValue):
3954         (WebCore::HTMLProgressElement::setMax):
3955         * html/HTMLScriptElement.cpp:
3956         (WebCore::HTMLScriptElement::typeAttributeValue):
3957         * html/HTMLSelectElement.cpp:
3958         (WebCore::HTMLSelectElement::setMultiple):
3959         * html/HTMLSourceElement.cpp:
3960         (WebCore::HTMLSourceElement::setSrc):
3961         (WebCore::HTMLSourceElement::media):
3962         (WebCore::HTMLSourceElement::setMedia):
3963         (WebCore::HTMLSourceElement::type):
3964         (WebCore::HTMLSourceElement::setType):
3965         * html/HTMLTableSectionElement.cpp:
3966         (WebCore::HTMLTableSectionElement::setAlign):
3967         (WebCore::HTMLTableSectionElement::setCh):
3968         (WebCore::HTMLTableSectionElement::chOff):
3969         (WebCore::HTMLTableSectionElement::setChOff):
3970         (WebCore::HTMLTableSectionElement::setVAlign):
3971         * html/HTMLTextFormControlElement.cpp:
3972         (WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):
3973         * html/HTMLVideoElement.cpp:
3974         (WebCore::HTMLVideoElement::imageSourceURL):
3975         * html/HiddenInputType.cpp:
3976         (WebCore::HiddenInputType::restoreFormControlState):
3977         (WebCore::HiddenInputType::setValue):
3978         * html/MediaDocument.cpp:
3979         (WebCore::MediaDocumentParser::createDocumentStructure):
3980         (WebCore::MediaDocument::replaceMediaElementTimerFired):
3981         * html/PluginDocument.cpp:
3982         (WebCore::PluginDocumentParser::createDocumentStructure):
3983         * html/TextFieldInputType.cpp:
3984         (WebCore::TextFieldInputType::createAutoFillButton):
3985         (WebCore::TextFieldInputType::updateAutoFillButton):
3986         * html/parser/HTMLTreeBuilder.cpp:
3987         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):