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