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