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