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