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