Fix problems with cross-origin redirects
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-01-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2
3         Fix problems with cross-origin redirects
4         https://bugs.webkit.org/show_bug.cgi?id=116075
5
6         Reviewed by Daniel Bates.
7
8         Merging https://chromium.googlesource.com/chromium/blink/+/7ea774e478f84f355748108d2aaabca15355d512 by Ken Russell
9         Same origin redirect responses leading to cross-origin requests were checked as cross-origin redirect responses.
10         Introduced ClientRequestedCredentials to manage whether credentials are needed or not in the cross-origin request.
11
12         In addition to Blink patch, it was needed to update some loaders with the newly introduced ClientRequestedCredentials parameter.
13         Added the clearing of "Accept-Encoding" header from cross-origin requests as Mac HTTP network layer is adding it for same-origin requests.
14
15         Test: http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin.html
16
17         * loader/DocumentLoader.cpp:
18         (WebCore::DocumentLoader::startLoadingMainResource): Added new security parameter (from Blink patch).
19         * loader/DocumentThreadableLoader.cpp:
20         (WebCore::DocumentThreadableLoader::redirectReceived): Updated checks so that same origin redirections are not treated as cross origin redirections (from Blink patch).
21         * loader/MediaResourceLoader.cpp:
22         (WebCore::MediaResourceLoader::start):
23         * loader/NetscapePlugInStreamLoader.cpp:
24         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added new security parameter.
25         * loader/ResourceLoaderOptions.h:
26         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added new security parameter (from Blink patch).
27         (WebCore::ResourceLoaderOptions::credentialRequest):
28         (WebCore::ResourceLoaderOptions::setCredentialRequest):
29         * loader/cache/CachedResourceLoader.cpp:
30         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Ditto.
31         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.
32         * loader/icon/IconLoader.cpp:
33         (WebCore::IconLoader::startLoading): Added new security parameter.
34         * page/EventSource.cpp:
35         (WebCore::EventSource::connect): Added new security parameter (from Blink patch).
36         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
37         (WebCore::WebCoreAVCFResourceLoader::startLoading): Added new security parameter.
38         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
39         (WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
40         * platform/network/ResourceHandleTypes.h: Added new security parameter constants (from Blink patch).
41         * platform/network/ResourceRequestBase.cpp:
42         (WebCore::ResourceRequestBase::clearHTTPAcceptEncoding): Function to remove "Accept-Encoding" header.
43         * platform/network/ResourceRequestBase.h: Ditto.
44         * xml/XMLHttpRequest.cpp:
45         (WebCore::XMLHttpRequest::createRequest): Added new security parameter.
46
47 2016-01-13  Myles C. Maxfield  <mmaxfield@apple.com>
48
49         Addressing more post-review comments after r194566
50
51         Unreviewed.
52
53         No new tests because there is no behavior change.
54
55         * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
56         (WebCore::topLanguagePreference):
57
58 2016-01-13  Alex Christensen  <achristensen@webkit.org>
59
60         Implement custom protocols when using NetworkSession
61         https://bugs.webkit.org/show_bug.cgi?id=153078
62
63         Reviewed by Andy Estes.
64
65         No new tests, but this makes the WebKit2CustomProtocolsTest api tests pass when using NetworkSession.
66
67         * WebCore.xcodeproj/project.pbxproj:
68         Make NSURLConnectionSPI.h private so we can include it from within WebKit2.
69
70 2016-01-13  Brent Fulgham  <bfulgham@apple.com>
71
72         Cross-protocol, cross-site scripting (XPSS) using HTML forms
73         https://bugs.webkit.org/show_bug.cgi?id=153017
74         <rdar://problem/5873254>
75
76         Reviewed by David Kilzer.
77
78         * loader/DocumentLoader.cpp:
79         (WebCore::DocumentLoader::responseReceived): If response HTTP version is 0.9,
80         sandbox against script execution and plugins.
81         * loader/ResourceLoader.cpp:
82         (WebCore::ResourceLoader::didReceiveResponse): Ditto.
83         * loader/SubresourceLoader.cpp:
84         (WebCore::SubresourceLoader::didReceiveResponse): Ditto.
85         * platform/network/ResourceResponseBase.cpp:
86         (WebCore::ResourceResponseBase::adopt): Update for HTTP version.
87         (WebCore::ResourceResponseBase::copyData): Ditto.
88         (WebCore::ResourceResponseBase::httpVersion): Added.
89         (WebCore::ResourceResponseBase::setHTTPVersion): Ditto.
90         * platform/network/ResourceResponseBase.h:
91         (WebCore::ResourceResponseBase::encode): Update for HTTP version.
92         (WebCore::ResourceResponseBase::decode): Ditto.
93         * platform/network/cf/ResourceResponseCFNet.cpp:
94         (WebCore::ResourceResponse::platformLazyInit): Capture HTTP version.
95         * platform/network/cocoa/ResourceResponseCocoa.mm:
96         (WebCore::ResourceResponse::platformLazyInit): Ditto.
97
98 2016-01-13  Beth Dakin  <bdakin@apple.com>
99
100         WK2: Request completion candidates when needed
101         https://bugs.webkit.org/show_bug.cgi?id=153040
102         -and corresponding-
103         rdar://problem/24155631
104
105         Reviewed by Enrica Casucci.
106
107         Helper functions for stringForCandidateRequest() and 
108         handleAcceptedCandidate()
109         * editing/Editor.cpp:
110         (WebCore::candidateRangeForSelection):
111         (WebCore::candidateWouldReplaceText):
112
113         Request candidates for the word that is currently being typed so long as the 
114         candidate would replace that word. Otherwise, use String().
115         (WebCore::Editor::stringForCandidateRequest):
116
117         When a candidate has been accepted, insert the text.
118         (WebCore::Editor::handleAcceptedCandidate):
119         * editing/Editor.h:
120
121 2016-01-13  Myles C. Maxfield  <mmaxfield@apple.com>
122
123         Addressing post-review comments after r194566
124
125         Unreviewed.
126
127         No new tests because there is no behavior difference.
128
129         * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
130         (WebCore::textBreakLocalePreference):
131         (WebCore::topLanguagePreference):
132         (WebCore::getSearchLocale):
133         (WebCore::getTextBreakLocale):
134         (WebCore::canonicalLanguageIdentifier): Deleted.
135
136 2016-01-12  Ryosuke Niwa  <rniwa@webkit.org>
137
138         formaction must return document's address when formaction is missing
139         https://bugs.webkit.org/show_bug.cgi?id=148874
140
141         Reviewed by Chris Dumez.
142
143         Fixed the bug by falling back to document.url() when the attribute is not set or is empty in formAction getter.
144
145         Test: fast/forms/formaction-attribute-with-empty-value.html
146
147         * html/HTMLButtonElement.idl:
148         * html/HTMLFormControlElement.cpp:
149         (WebCore::HTMLFormControlElement::formAction): Added.
150         (WebCore::HTMLFormControlElement::setFormAction): Added.
151         * html/HTMLFormControlElement.h:
152         * html/HTMLInputElement.idl:
153
154 2016-01-13  Chris Dumez  <cdumez@apple.com>
155
156         Unreviewed, rolling out r194900.
157
158         Roll back in as this did not actually regress PLT
159
160         Reverted changeset:
161
162         "Unreviewed, rolling out r194826."
163         https://bugs.webkit.org/show_bug.cgi?id=153020
164         http://trac.webkit.org/changeset/194900
165
166 2016-01-13  Konstantin Tokarev  <annulen@yandex.ru>
167
168         Removed empty #if block from Font.h
169         https://bugs.webkit.org/show_bug.cgi?id=153067
170
171         Reviewed by Alex Christensen.
172
173         No new tests needed.
174
175         * platform/graphics/Font.h:
176         (WebCore::Font::scriptCache): Deleted.
177
178 2016-01-13  Michael Catanzaro  <mcatanzaro@igalia.com>
179
180         [GTK] Consistently use virtual and override specifiers in ScrollbarThemeGtk
181         https://bugs.webkit.org/show_bug.cgi?id=153076
182
183         Reviewed by Alex Christensen.
184
185         No behavior change.
186
187         * platform/gtk/ScrollbarThemeGtk.h:
188
189 2016-01-13  Daniel Bates  <dabates@apple.com>
190
191         Cleanup: XSS Auditor should avoid re-evaluating the parsed script tag
192         https://bugs.webkit.org/show_bug.cgi?id=152870
193
194         Reviewed by Brent Fulgham.
195
196         Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
197         <https://src.chromium.org/viewvc/blink?revision=154354&view=revision>
198
199         Although the XSS Auditor caches the decoded start tag of a script as an optimization to
200         avoid decoding it again when filtering the character data of the script, it is sufficient
201         to cache whether the HTTP response contains the decoded start tag of a script. This
202         avoids both decoding the start tag of a script and determining whether the HTTP response
203         contains it again when filtering the character data of the script. Moreover, this removes
204         the need to cache a string object.
205
206         * html/parser/XSSAuditor.cpp:
207         (WebCore::XSSAuditor::filterCharacterToken):
208         (WebCore::XSSAuditor::filterScriptToken):
209         * html/parser/XSSAuditor.h:
210
211 2016-01-13  Commit Queue  <commit-queue@webkit.org>
212
213         Unreviewed, rolling out r194963.
214         https://bugs.webkit.org/show_bug.cgi?id=153079
215
216         This change causes ASan tests to crash and exit early
217         (Requested by ryanhaddad on #webkit).
218
219         Reverted changeset:
220
221         "Fragmentation-free allocator for timeless and/or coupled
222         allocations."
223         https://bugs.webkit.org/show_bug.cgi?id=152696
224         http://trac.webkit.org/changeset/194963
225
226 2016-01-13  Daniel Bates  <dabates@apple.com>
227
228         [XSS Auditor] Do not include trailing comment characters in JavaScript snippets
229         https://bugs.webkit.org/show_bug.cgi?id=152873
230
231         Reviewed by Brent Fulgham.
232
233         Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
234         <https://src.chromium.org/viewvc/blink?view=rev&revision=169967>
235
236         Test: http/tests/security/xssAuditor/script-tag-with-injected-comment.html
237
238         * html/parser/XSSAuditor.cpp:
239         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
240
241 2016-01-13  Adam Bergkvist  <adam.bergkvist@ericsson.com>
242
243         WebRTC: Add support for RTCRtpSender.replaceTrack()
244         https://bugs.webkit.org/show_bug.cgi?id=153063
245
246         Reviewed by Eric Carlson.
247
248         Add the API and infrastructure to support RTCRtpSender.replaceTrack(). The platform is
249         reached through the RTCPeerConnection object that created the RTCRtpSender via a client
250         interface.
251
252         Test: fast/mediastream/RTCRtpSender-replaceTrack.html
253
254         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
255         (WebCore::MediaEndpointPeerConnection::replaceTrack):
256         * Modules/mediastream/MediaEndpointPeerConnection.h:
257         * Modules/mediastream/PeerConnectionBackend.h:
258         * Modules/mediastream/RTCPeerConnection.cpp:
259         (WebCore::RTCPeerConnection::addTrack):
260         (WebCore::RTCPeerConnection::removeTrack):
261         (WebCore::RTCPeerConnection::replaceTrack):
262         * Modules/mediastream/RTCPeerConnection.h:
263         * Modules/mediastream/RTCRtpSender.cpp:
264         (WebCore::RTCRtpSender::RTCRtpSender):
265         (WebCore::RTCRtpSender::replaceTrack):
266         * Modules/mediastream/RTCRtpSender.h:
267         (WebCore::RTCRtpSenderClient::~RTCRtpSenderClient):
268         (WebCore::RTCRtpSender::create):
269         (WebCore::RTCRtpSender::trackId):
270         (WebCore::RTCRtpSender::stop):
271         * Modules/mediastream/RTCRtpSender.idl:
272
273 2016-01-13  Brady Eidson  <beidson@apple.com>
274
275         Modern IDB: A few cursor tests are flaky because JS wrappers are GC'ed.
276         https://bugs.webkit.org/show_bug.cgi?id=153038
277
278         Reviewed by Alex Christensen.
279
280         No new tests (Couldn't write a test that was any more reliable than "flaky", so fixing the existing flaky tests will do).
281
282         And IDBCursor has an associated IDBRequest that is re-used each time the IDBCursor iterates.
283         
284         The normal ActiveDOMObject approach to prevent the IDBRequest's wrapper from being garbage collected was not good enough
285         because, while the IDBRequest may not currently be waiting on any activity, as long as its associated IDBCursor is still
286         reachable then the request might be reused in the future.
287         
288         Fortunately there's an IDL allowance for "one object keeping another alive during GC" and that's JSCustomMarkFunction
289         combined with GenerateIsReachable.
290         
291         Applying those to IDBCursor and IDBRequest fix this handily.
292         
293         * CMakeLists.txt:
294         * WebCore.xcodeproj/project.pbxproj:
295
296         * Modules/indexeddb/IDBCursor.h:
297         (WebCore::IDBCursor::isModernCursor):
298         * Modules/indexeddb/IDBCursor.idl:
299         
300         * Modules/indexeddb/IDBRequest.idl:
301         
302         * Modules/indexeddb/client/IDBCursorImpl.cpp:
303         (WebCore::IDBClient::IDBCursor::advance):
304         (WebCore::IDBClient::IDBCursor::continueFunction):
305         (WebCore::IDBClient::IDBCursor::uncheckedIterateCursor):
306         (WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor): Deleted. Fixed the typo of this name.
307         * Modules/indexeddb/client/IDBCursorImpl.h:
308         
309         * bindings/js/JSIDBCursorCustom.cpp: Added.
310         (WebCore::JSIDBCursor::visitAdditionalChildren):
311
312 2016-01-13  Zalan Bujtas  <zalan@apple.com>
313
314         Get text drawing working with display lists.
315         https://bugs.webkit.org/show_bug.cgi?id=152957
316
317         Reviewed by Simon Fraser.
318
319         This patch enables text drawing for display lists.
320
321         * platform/graphics/FontCascade.cpp:
322         (WebCore::FontCascade::drawGlyphBuffer):
323         * platform/graphics/FontCascade.h:
324         * platform/graphics/GraphicsContext.cpp:
325         (WebCore::GraphicsContext::drawGlyphs):
326         (WebCore::GraphicsContext::drawText): Deleted.
327         * platform/graphics/cocoa/FontCascadeCocoa.mm:
328         (WebCore::FontCascade::drawGlyphs):
329         * platform/graphics/displaylists/DisplayListItems.cpp:
330         (WebCore::DisplayList::DrawGlyphs::apply):
331
332 2016-01-13  Zalan Bujtas  <zalan@apple.com>
333
334         Simple line layout: Add support for word-break property.
335         https://bugs.webkit.org/show_bug.cgi?id=153054
336
337         Reviewed by Antti Koivisto.
338
339         This patch enables word-break property for simple line layout.
340         (https://drafts.csswg.org/css-text-3/#propdef-word-break)
341
342         word-break: normal and keep-all -> existing, non-(force)breaking behaviour.
343                     break-all -> breaks words when needed.
344
345         Covered by existing tests like fast/text/word-break.html
346
347         * rendering/SimpleLineLayout.cpp:
348         (WebCore::SimpleLineLayout::createLineRuns):
349         (WebCore::SimpleLineLayout::canUseForStyle): Deleted.
350         (WebCore::SimpleLineLayout::printReason): Deleted.
351         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
352         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
353         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
354         * rendering/SimpleLineLayoutTextFragmentIterator.h:
355         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
356         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
357         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isBreakable): Deleted.
358         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
359
360 2016-01-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
361
362         Reference cycle between SVGPathElement and SVGPathSegWithContext leaks Document
363         https://bugs.webkit.org/show_bug.cgi?id=151810
364
365         Reviewed by Darin Adler.
366
367         Break the reference cycle between SVGPathElement and SVGPathSegWithContext
368         by changing the back-pointer to be a WeakPtr pointer instead of having it
369         RefPtr. Make sure the SVGPathSegWithContext derived classes handle correctly
370         the case when the SVGPathElement back-pointer is deleted.
371
372         Also change the SVGPathElement argument to the SVGPathSeg creation functions
373         and constructors to be a const reference instead of having it as a pointer
374         since SVGPathElement is the class factory for all these classes.
375
376         * svg/SVGPathElement.cpp:
377         (WebCore::SVGPathElement::SVGPathElement):
378         (WebCore::SVGPathElement::createSVGPathSegClosePath):
379         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
380         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
381         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
382         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
383         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
384         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
385         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
386         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
387         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
388         (WebCore::SVGPathElement::createSVGPathSegArcRel):
389         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
390         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
391         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
392         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
393         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
394         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
395         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
396         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
397         (WebCore::SVGPathElement::isSupportedAttribute):
398         * svg/SVGPathElement.h:
399         * svg/SVGPathSegArc.h:
400         (WebCore::SVGPathSegArc::SVGPathSegArc):
401         * svg/SVGPathSegArcAbs.h:
402         (WebCore::SVGPathSegArcAbs::create):
403         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
404         * svg/SVGPathSegArcRel.h:
405         (WebCore::SVGPathSegArcRel::create):
406         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
407         * svg/SVGPathSegClosePath.h:
408         (WebCore::SVGPathSegClosePath::create):
409         (WebCore::SVGPathSegClosePath::SVGPathSegClosePath):
410         * svg/SVGPathSegCurvetoCubic.h:
411         (WebCore::SVGPathSegCurvetoCubic::SVGPathSegCurvetoCubic):
412         * svg/SVGPathSegCurvetoCubicAbs.h:
413         (WebCore::SVGPathSegCurvetoCubicAbs::create):
414         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
415         * svg/SVGPathSegCurvetoCubicRel.h:
416         (WebCore::SVGPathSegCurvetoCubicRel::create):
417         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
418         * svg/SVGPathSegCurvetoCubicSmooth.h:
419         (WebCore::SVGPathSegCurvetoCubicSmooth::SVGPathSegCurvetoCubicSmooth):
420         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
421         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
422         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
423         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
424         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
425         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
426         * svg/SVGPathSegCurvetoQuadratic.h:
427         (WebCore::SVGPathSegCurvetoQuadratic::SVGPathSegCurvetoQuadratic):
428         * svg/SVGPathSegCurvetoQuadraticAbs.h:
429         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
430         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
431         * svg/SVGPathSegCurvetoQuadraticRel.h:
432         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
433         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
434         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
435         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
436         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
437         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
438         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
439         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
440         * svg/SVGPathSegLinetoAbs.h:
441         (WebCore::SVGPathSegLinetoAbs::create):
442         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
443         * svg/SVGPathSegLinetoHorizontal.h:
444         (WebCore::SVGPathSegLinetoHorizontal::SVGPathSegLinetoHorizontal):
445         * svg/SVGPathSegLinetoHorizontalAbs.h:
446         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
447         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
448         * svg/SVGPathSegLinetoHorizontalRel.h:
449         (WebCore::SVGPathSegLinetoHorizontalRel::create):
450         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
451         * svg/SVGPathSegLinetoRel.h:
452         (WebCore::SVGPathSegLinetoRel::create):
453         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
454         * svg/SVGPathSegLinetoVertical.h:
455         (WebCore::SVGPathSegLinetoVertical::SVGPathSegLinetoVertical):
456         * svg/SVGPathSegLinetoVerticalAbs.h:
457         (WebCore::SVGPathSegLinetoVerticalAbs::create):
458         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
459         * svg/SVGPathSegLinetoVerticalRel.h:
460         (WebCore::SVGPathSegLinetoVerticalRel::create):
461         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
462         * svg/SVGPathSegMovetoAbs.h:
463         (WebCore::SVGPathSegMovetoAbs::create):
464         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
465         * svg/SVGPathSegMovetoRel.h:
466         (WebCore::SVGPathSegMovetoRel::create):
467         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
468         * svg/SVGPathSegWithContext.h:
469         (WebCore::SVGPathSegWithContext::SVGPathSegWithContext):
470         (WebCore::SVGPathSegWithContext::animatedProperty):
471         (WebCore::SVGPathSegWithContext::contextElement):
472         (WebCore::SVGPathSegWithContext::setContextAndRole):
473         (WebCore::SVGPathSegWithContext::commitChange):
474         (WebCore::SVGPathSegSingleCoordinate::setY):
475         (WebCore::SVGPathSegSingleCoordinate::SVGPathSegSingleCoordinate):
476         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
477         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
478         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
479         (WebCore::SVGPathSegListPropertyTearOff::removeItem):
480
481 2016-01-13  Andreas Kling  <akling@apple.com>
482
483         Use BumpArena for style sheet object tree.
484         <https://webkit.org/b/152696>
485
486         Reviewed by Antti Koivisto.
487
488         Give each StyleSheetContents its own BumpArena, and plumb it down through CSSParser
489         to allocate StyleRule, StyleProperties and CSSSelectorList's selector arrays there.
490
491         This basically means that most objects that make up a given style sheet will end up
492         in one (or a few) contiguous region(s) of memory, instead of being scattered all
493         over the malloc heap.
494
495         In the common case (no CSSOM manipulation), the lifetimes of these objects are very
496         predictable: everything tends to die when the StyleSheetContents dies.
497         This dramatically improves space-efficiency in those cases, and allows us to return
498         contiguous chunks of memory to the system once a style sheet is no longer needed.
499
500         One-off CSS parses that don't work within a StyleSheetContents context will have
501         their StyleRules & co allocated out of the global BumpArena.
502
503         Bonus: give SelectorQueryCache a dedicated BumpArena as well, since it has very
504         predictable lifetime.
505
506         * css/CSSGrammar.y.in:
507         * css/CSSKeyframesRule.h:
508         (WebCore::StyleRuleKeyframes::create):
509         * css/CSSParser.cpp:
510         (WebCore::CSSParser::createStyleProperties):
511         (WebCore::CSSParser::createMediaRule):
512         (WebCore::CSSParser::createSupportsRule):
513         (WebCore::CSSParser::createKeyframesRule):
514         (WebCore::CSSParser::setArena):
515         (WebCore::CSSParser::arena):
516         (WebCore::CSSParser::createStyleRule):
517         (WebCore::CSSParser::createFontFaceRule):
518         (WebCore::CSSParser::createPageRule):
519         (WebCore::CSSParser::createRegionRule):
520         (WebCore::CSSParser::createViewportRule):
521         * css/CSSParser.h:
522         * css/CSSParserValues.cpp:
523         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
524         (WebCore::CSSParserSelector::adoptSelectorVector):
525         * css/CSSParserValues.h:
526         * css/CSSSelectorList.cpp:
527         (WebCore::CSSSelectorList::CSSSelectorList):
528         (WebCore::CSSSelectorList::adoptSelectorVector):
529         (WebCore::CSSSelectorList::deleteSelectors):
530         * css/CSSSelectorList.h:
531         * css/StyleProperties.cpp:
532         (WebCore::ImmutableStyleProperties::create):
533         (WebCore::StyleProperties::immutableCopyIfNeeded):
534         * css/StyleProperties.h:
535         * css/StyleRule.cpp:
536         (WebCore::StyleRule::create):
537         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
538         (WebCore::StyleRuleRegion::StyleRuleRegion):
539         * css/StyleRule.h:
540         (WebCore::StyleRule::create):
541         (WebCore::StyleRule::parserAdoptSelectorVector):
542         (WebCore::StyleRuleFontFace::create):
543         (WebCore::StyleRulePage::create):
544         (WebCore::StyleRulePage::parserAdoptSelectorVector):
545         (WebCore::StyleRuleMedia::create):
546         (WebCore::StyleRuleSupports::create):
547         (WebCore::StyleRuleRegion::create):
548         (WebCore::StyleRuleViewport::create):
549         * css/StyleSheetContents.cpp:
550         (WebCore::StyleSheetContents::StyleSheetContents):
551         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
552         (WebCore::StyleSheetContents::parseStringAtPosition):
553         * css/StyleSheetContents.h:
554         * dom/SelectorQuery.cpp:
555         (WebCore::SelectorQueryCache::SelectorQueryCache):
556         (WebCore::SelectorQueryCache::add):
557         * dom/SelectorQuery.h:
558         * svg/SVGFontFaceElement.cpp:
559         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
560
561 2016-01-13  YongGeol Jung  <yg48.jung@samsung.com>
562
563         [TexMap] BitmapTextureGL is not released while scene is updated continuously.
564         https://bugs.webkit.org/show_bug.cgi?id=152524
565
566         Reviewed by Žan Doberšek.
567
568         This patch fixes two issues.
569         First, m_releaseUnusedTexturesTimer is not fired if scene is updated within 0.5s continuously.
570         In this case, BitmapTexturePool will not remove texture even if texture is not used for long time.
571         Second, m_releaseUnusedTexturesTimer is triggered by acquireTexture function only.
572         So, if next scene does not need to use BitmapTexture, remained textures in pool will not removed.
573
574         No new tests needed.
575
576         * platform/graphics/texmap/BitmapTexturePool.cpp:
577         (WebCore::BitmapTexturePool::scheduleReleaseUnusedTextures):
578         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
579
580 2016-01-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
581
582         [Streams API] Refactor builtin internals to prepare support for streams API in worker
583         https://bugs.webkit.org/show_bug.cgi?id=152535
584
585         Reviewed by Darin Adler.
586
587         Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
588         This file should be generated by the builtin generator once refactoring is done.
589         This code is located in JSBuiltinInternalFunctions::initialize.
590
591         Adding private controller and reader constructors to the JS DOM constructor map so that they do not get garbage collected.
592
593         No change in behavior, except that private builtins are usable in workers (but not actually used).
594
595         * CMakeLists.txt:
596         * WebCore.vcxproj/WebCore.vcxproj:
597         * WebCore.xcodeproj/project.pbxproj:
598         * bindings/js/JSDOMGlobalObject.cpp:
599         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
600         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
601         (WebCore::JSDOMGlobalObject::finishCreation):
602         (WebCore::JSDOMGlobalObject::visitChildren):
603         * bindings/js/JSDOMGlobalObject.h:
604         * bindings/js/JSDOMWindowBase.cpp:
605         (WebCore::JSDOMWindowBase::finishCreation):
606         (WebCore::JSDOMWindowBase::visitChildren):
607         * bindings/js/JSDOMWindowBase.h:
608         * bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
609         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
610         (WebCore::JSBuiltinInternalFunctions::visit):
611         (WebCore::JSBuiltinInternalFunctions::initialize):
612         * bindings/js/WebCoreJSBuiltinInternals.h:
613
614 2016-01-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
615
616         [EFL] Fix wrong return value of paintThemePart in RenderThemeEfl
617         https://bugs.webkit.org/show_bug.cgi?id=153058
618
619         Reviewed by Carlos Garcia Campos.
620
621         To return false in paint functions in RenderThemeEfl means that it is supported though,
622         paintThemePart has returned false even when failing to get image cache of theme.
623
624         * rendering/RenderThemeEfl.cpp:
625         (WebCore::RenderThemeEfl::paintThemePart):
626
627 2016-01-12  Andy Estes  <aestes@apple.com>
628
629         [Content Filtering] forEachContentFilterUntilBlocked should accept a lambda by rvalue reference
630         https://bugs.webkit.org/show_bug.cgi?id=153057
631
632         Reviewed by Dan Bernstein.
633
634         No new tests. No change in behavior.
635
636         Instead of having ContentFilter::forEachContentFilterUntilBlocked() take a std::function, just have it take an
637         rvalue reference to the lambda its passed.
638
639         * loader/ContentFilter.cpp:
640         (WebCore::ContentFilter::forEachContentFilterUntilBlocked):
641         * loader/ContentFilter.h:
642
643 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
644
645         [GTK] Fix return value of some paint methods in RenderThemeGtk
646         https://bugs.webkit.org/show_bug.cgi?id=153015
647
648         Reviewed by Michael Catanzaro.
649
650         The bool value returned by paint methods in RenderTheme means
651         whether the appearance is supported or not, so we should return
652         true when not supported (so we didn't paint anything) and false
653         when supported (so we actually painted the theme part).
654
655         * rendering/RenderThemeGtk.cpp:
656         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
657         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
658         (WebCore::RenderThemeGtk::paintMediaButton):
659         (WebCore::RenderThemeGtk::paintMediaMuteButton):
660         (WebCore::RenderThemeGtk::paintMediaPlayButton):
661         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
662         (WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer): Deleted.
663         * rendering/RenderThemeGtk.h:
664
665 2016-01-12  Andy Estes  <aestes@apple.com>
666
667         [Content Filtering] De-virtualize PlatformContentFilter::{needsMoreData, didBlockData}()
668         https://bugs.webkit.org/show_bug.cgi?id=153052
669
670         Reviewed by Andreas Kling.
671
672         No new tests. No change in behavior.
673
674         Instead of having virtual functions that each platform content filter implement in terms of their own state,
675         store the state in the base class so that these functions can be non-virtual. Teach each subclass to update the
676         base class state appropriately.
677
678         * loader/ContentFilter.h:
679         * platform/PlatformContentFilter.h:
680         (WebCore::PlatformContentFilter::needsMoreData):
681         (WebCore::PlatformContentFilter::didBlockData):
682         * platform/cocoa/NetworkExtensionContentFilter.h:
683         * platform/cocoa/NetworkExtensionContentFilter.mm:
684         (WebCore::NetworkExtensionContentFilter::willSendRequest):
685         (WebCore::NetworkExtensionContentFilter::responseReceived):
686         (WebCore::NetworkExtensionContentFilter::handleDecision):
687         (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Deleted.
688         (WebCore::NetworkExtensionContentFilter::needsMoreData): Deleted.
689         (WebCore::NetworkExtensionContentFilter::didBlockData): Deleted.
690         * platform/cocoa/ParentalControlsContentFilter.h:
691         * platform/cocoa/ParentalControlsContentFilter.mm:
692         (WebCore::ParentalControlsContentFilter::responseReceived):
693         (WebCore::ParentalControlsContentFilter::updateFilterState):
694         (WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Deleted.
695         (WebCore::ParentalControlsContentFilter::needsMoreData): Deleted.
696         (WebCore::ParentalControlsContentFilter::didBlockData): Deleted.
697         * platform/spi/cocoa/NEFilterSourceSPI.h:
698         * testing/MockContentFilter.cpp:
699         (WebCore::MockContentFilter::willSendRequest):
700         (WebCore::MockContentFilter::maybeDetermineStatus):
701         (WebCore::MockContentFilter::needsMoreData): Deleted.
702         (WebCore::MockContentFilter::didBlockData): Deleted.
703         * testing/MockContentFilter.h:
704
705 2016-01-12  Andy Estes  <aestes@apple.com>
706
707         Address missed review feedback after r194950.
708
709         * platform/cocoa/NetworkExtensionContentFilter.mm:
710         (WebCore::NetworkExtensionContentFilter::initialize): Renamed the NetworkExtension dispatch queue.
711
712 2016-01-08  Andy Estes  <aestes@apple.com>
713
714         [Content Filtering] Lazily load platform frameworks
715         https://bugs.webkit.org/show_bug.cgi?id=152881
716         rdar://problem/23270886
717
718         Reviewed by Brady Eidson.
719
720         On Cocoa platforms, ContentFilter soft-links two frameworks that perform the underlying filtering operations.
721         There is a one-time cost associated with the soft-linking, and the current design requires all clients to pay
722         this cost whether or not they ever load a resource that is subject to filtering.
723
724         Addressed this by deferring the loading of frameworks until it is known that a resource will require filtering.
725         It is rather simple to defer the soft-linking at the PlatformContentFilter level, but doing this alone would
726         mean that every CachedRawResourceClient callback would be routed through ContentFilter, even in the very common
727         case where both platform content filters are disabled. This is because checking if a platform content filter is
728         enabled involves loading its framework, so creating a ContentFilter (which DocumentLoader will add as the
729         CachedRawResource client in place of itself) cannot be avoided by checking that all its platform content filters
730         are disabled.
731
732         Resolved this by inverting the relationship between ContentFilter and DocumentLoader. Instead of ContentFilter
733         being the CachedRawResource's client and forwarding callbacks to DocumentLoader when one or more platform
734         filters are enabled, DocumentLoader is now always the client and it forwards callbacks to ContentFilter.
735         ContentFilter then returns a boolean value indicating whether or not DocumentLoader should proceed with each
736         callback.
737
738         New API test: ContentFiltering.LazilyLoadPlatformFrameworks
739
740         * loader/ContentFilter.cpp:
741         (WebCore::ContentFilter::create): Renamed from createIfEnabled(). Since the enabled check causes frameworks to
742         be loaded, the check is skipped here and all types are always created.
743         (WebCore::ContentFilter::continueAfterWillSendRequest): Renamed from willSendRequest(). Renamed requestCopy to
744         originalRequest, and only created it for logging purposes. Since the copy was only used for logging purposes,
745         request is now modified directly. Returned false if request is null.
746         (WebCore::ContentFilter::continueAfterResponseReceived): Renamed from responseReceived(). Stopped asserting that
747         resource is non-null, since it will be null in the case of substitute data loads. Stopped asserting that m_state
748         is not Initialized, since that state was removed and the function can now be called in all states. Only logged
749         if m_state is Filtering. Returned false if m_state is Blocked.
750         (WebCore::ContentFilter::continueAfterDataReceived): Renamed from dataReceived(). Stopped asserting that
751         resource is non-null and that m_state is Initialized, and moved the logging, for the same reasons as above.
752         Returned false if m_state is Filtering or Blocked.
753         (WebCore::ContentFilter::continueAfterNotifyFinished): Renamed from notifyFinished(). Stopped asserting that
754         resource is non-null and that m_state is not Initialized, and moved the logging, for the same reasons as above.
755         If m_state is not Blocked at this point, set m_state to Allowed in order for deliverResourceData() to not get
756         caught in continueAfterDataReceived(). Returned false if m_state is Blocked or Stopped after delivering data.
757         (WebCore::ContentFilter::createIfEnabled): Renamed to create().
758         (WebCore::ContentFilter::~ContentFilter): Stopped removing ourself as m_mainResource's client.
759         (WebCore::ContentFilter::willSendRequest): Renamed to continueAfterWillSendRequest().
760         (WebCore::ContentFilter::startFilteringMainResource): Stopped adding ourself as m_mainResource's client. Stopped
761         asserting that m_state is not Initialized and instead returned early if m_state is not Stopped.
762         (WebCore::ContentFilter::stopFilteringMainResource): Stopped removing ourself as m_mainResource's client.
763         (WebCore::ContentFilter::responseReceived): Renamed to continueAfterResponseReceived().
764         (WebCore::ContentFilter::dataReceived): Renamed to continueAfterDataReceived().
765         (WebCore::ContentFilter::redirectReceived): Removed. DocumentLoader now calls continueAfterWillSendRequest()
766         directly on redirects.
767         (WebCore::ContentFilter::notifyFinished): Renamed to continueAfterNotifyFinished().
768         (WebCore::ContentFilter::didDecide): Instead of calling DocumentLoader::contentFilterDidDecide(), called
769         DocumentLoader::contentFilterDidBlock() when m_state is Blocked.
770         (WebCore::ContentFilter::deliverResourceData): Asserted that m_state is Allowed.
771         * loader/ContentFilter.h: Stopped inheriting from CachedRawResourceClient. Redeclared the
772         CachedRawResourceClient virtual functions as the continue* functions mentioned above. Made State enum private
773         and removed Initialized. Initialized m_state to Stopped and removed its getter.
774         (WebCore::ContentFilter::type): Returned a ContentFilter::Type that does not include an enabled function.
775         * loader/DocumentLoader.cpp:
776         (WebCore::DocumentLoader::notifyFinished): Returned early if ContentFilter::continueAfterNotifyFinished()
777         returned false.
778         (WebCore::DocumentLoader::willSendRequest): Called ContentFilter::continueAfterWillSendRequest() even for
779         redirects, since ContentFilter is no longer a CachedRawResourceClient and so will no longer receive
780         redirectReceived(). Returned early if continueAfterWillSendRequest() returns false.
781         (WebCore::DocumentLoader::responseReceived): Returned early if ContentFilter::continueAfterResponseReceived()
782         returned false.
783         (WebCore::DocumentLoader::dataReceived): Ditto for ContentFilter::continueAfterDataReceived().
784         (WebCore::DocumentLoader::startLoadingMainResource): Called ContentFilter::create(), not createIfEnabled().
785         (WebCore::DocumentLoader::becomeMainResourceClient): Called ContentFilter::startFilteringMainResource() even if
786         m_state is not Initialized. Added ourself as a client of m_mainResource unconditionally.
787         (WebCore::DocumentLoader::contentFilterDidBlock): Renamed from contentFilterDidDecide. Removed assertions and
788         the early return when m_state is Allowed, since the state is guaranteed to be Blocked.
789         (WebCore::DocumentLoader::contentFilterDidDecide): Renamed to contentFilterDidBlock.
790         * platform/cocoa/NetworkExtensionContentFilter.h: Moved definition of HAVE_NETWORK_EXTENSION to Platform.h so
791         that this file doesn't need to become a Private header. Made enabled() private, and declared initialize().
792         * platform/cocoa/NetworkExtensionContentFilter.mm:
793         (WebCore::NetworkExtensionContentFilter::initialize): Added a function to lazily initialize the object.
794         (WebCore::NetworkExtensionContentFilter::willSendRequest): For the modern NEFilterSource, checked if it is
795         enabled only after checking if the request is HTTP(S). If both checks pass, then called initialize().
796         (WebCore::NetworkExtensionContentFilter::responseReceived): Ditto for the legacy NEFilterSource.
797         * platform/cocoa/ParentalControlsContentFilter.h: Made enabled() private.
798         * platform/cocoa/ParentalControlsContentFilter.mm:
799         (WebCore::ParentalControlsContentFilter::responseReceived): Checked if WebFilterEvaluator is enabled only after
800         checking if the response is from a protocol that can be handled.
801         * testing/MockContentFilter.cpp:
802         (WebCore::MockContentFilter::willSendRequest): Immediately set m_status to Status::Allowed if !enabled().
803         * testing/MockContentFilter.h: Made enabled() private.
804
805 2016-01-12  Commit Queue  <commit-queue@webkit.org>
806
807         Unreviewed, rolling out r194926 and r194928.
808         https://bugs.webkit.org/show_bug.cgi?id=153048
809
810         This change is causing LayoutTest crashes (Requested by
811         ryanhaddad on #webkit).
812
813         Reverted changesets:
814
815         "Avoid downloading the wrong image for <picture> elements."
816         https://bugs.webkit.org/show_bug.cgi?id=153027
817         http://trac.webkit.org/changeset/194926
818
819         "Avoid downloading the wrong image for <picture> elements."
820         https://bugs.webkit.org/show_bug.cgi?id=153027
821         http://trac.webkit.org/changeset/194928
822
823 2016-01-11  Dean Jackson  <dino@apple.com>
824
825         [iOS] Antialiasing doesn't work in WebGL
826         https://bugs.webkit.org/show_bug.cgi?id=153000
827         <rdar://problem/9165531>
828
829         Reviewed by Alex Christensen.
830
831         WebGL has supported platform antialiasing since
832         the beginning, but we never hooked it up for iOS
833         because it used a slightly different extension.
834
835         Test: fast/canvas/webgl/antialiasing-enabled.html
836
837         * platform/graphics/mac/GraphicsContext3DMac.mm:
838         (WebCore::GraphicsContext3D::endPaint): Resolve the multisampling
839         buffer once we're done painting.
840         (WebCore::GraphicsContext3D::~GraphicsContext3D): We never created
841         the m_compositorTexture RenderBuffer on iOS, so no point deleting
842         it.
843
844         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
845         (WebCore::Extensions3DOpenGL::supportsExtension): The iOS extension
846         has a slightly different name.
847         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
848         (WebCore::GraphicsContext3D::reshapeFBOs): Make sure to create the
849         multisample buffer with the correct format.
850         (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): We
851         need to remember what our bound frame buffer is when we
852         enter this call, and restore it afterwards. In the middle we can
853         discard our multisample read buffer once we have resolved it
854         into the normal framebuffer.
855
856 2016-01-12  Daniel Bates  <dabates@apple.com>
857
858         XSS Auditor should navigate to empty substitute data on full page block
859         https://bugs.webkit.org/show_bug.cgi?id=152868
860         <rdar://problem/18658448>
861
862         Reviewed by David Kilzer and Andy Estes.
863
864         Derived from Blink patch (by Tom Sepez <tsepez@chromium.org>):
865         <https://src.chromium.org/viewvc/blink?view=rev&revision=179240>
866
867         Test: http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url.html
868
869         * html/parser/XSSAuditorDelegate.cpp:
870         (WebCore::XSSAuditorDelegate::didBlockScript): Modified to call NavigationScheduler::schedulePageBlock().
871         * loader/NavigationScheduler.cpp:
872         (WebCore::ScheduledPageBlock::ScheduledPageBlock): Added.
873         (WebCore::NavigationScheduler::schedulePageBlock): Navigate to empty substitute data with
874         the same URL as the originating document.
875         * loader/NavigationScheduler.h:
876
877 2016-01-12  Dave Hyatt  <hyatt@apple.com>
878
879         Avoid downloading the wrong image for <picture> elements.
880         https://bugs.webkit.org/show_bug.cgi?id=153027
881
882         Reviewed by Dean Jackson.
883
884         I was unable to write a reliable test for this feature (I welcome suggestions regarding
885         how this could be tested).
886
887         * html/HTMLImageElement.cpp:
888         (WebCore::HTMLImageElement::HTMLImageElement):
889         (WebCore::HTMLImageElement::~HTMLImageElement):
890         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
891         (WebCore::HTMLImageElement::insertedInto):
892         (WebCore::HTMLImageElement::removedFrom):
893         (WebCore::HTMLImageElement::pictureNode):
894         (WebCore::HTMLImageElement::setPictureNode):
895         * html/HTMLImageElement.h:
896         * html/parser/HTMLConstructionSite.cpp:
897         (WebCore::HTMLConstructionSite::createHTMLElement):
898
899         Images that are built underneath a <picture> element are now connected
900         to that picture element via a setPictureNode call from the parser. This
901         ensures that the correct <source> elements are examined before checking the image.
902
903         This connection between images and their picture owners is handled using a static
904         HashMap in HTMLImageElement. This connection is made both from the parser and from
905         DOM insertions, and the map is queried now instead of looking directly at the
906         image's parentNode().
907
908         Also note the change to pass the document element's computed style in for media
909         query evaluation. Just as with the preload scanner, the image's style can't be
910         used as it has not been determined yet.
911
912 2016-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
913
914         Cleanup in font loading code
915         https://bugs.webkit.org/show_bug.cgi?id=153023
916
917         Reviewed by Zalan Bujtas.
918
919         See detailed notes below.
920
921         No new tests because there is no behavior change.
922
923         * css/CSSFontFace.cpp:
924         (WebCore::CSSFontFace::isLoaded): Deleted. Never called.
925         * css/CSSFontFace.h: Ditto.
926         * css/CSSFontFaceSource.cpp:
927         (WebCore::CSSFontFaceSource::font): No need to use a helper
928         isLoaded() function.
929         (WebCore::CSSFontFaceSource::isLoaded): Deleted. Unnecessary.
930         * css/CSSFontFaceSource.h:
931         * css/CSSFontFaceSrcValue.cpp:
932         (WebCore::CSSFontFaceSrcValue::cachedFont): Un-indent code.
933         * css/CSSFontSelector.cpp:
934         (WebCore::registerLocalFontFacesForFamily): constructFamilyFontFaces()
935         always returns an empty Vector. Therefore, the function of this function
936         is to perform the ancillary processing related to the case where the Faces
937         don't already exist. Renames the function and removes the empty vector
938         return.
939         (WebCore::CSSFontSelector::addFontFaceRule): Update for
940         registerLocalFontFacesForFamily().
941         (WebCore::FontFaceComparator::FontFaceComparator): Instead of using a static,
942         construct a wrapper class around the comparator.
943         (WebCore::FontFaceComparator::operator()): Ditto.
944         (WebCore::CSSFontSelector::getFontFace): Un-indent code and update to use
945         FontFaceComparator.
946         (WebCore::CSSFontSelector::fallbackFontAt): Migrate off PassRefPtr.
947         (WebCore::constructFamilyFontFaces): Deleted.
948         (WebCore::compareFontFaces): Deleted.
949         (WebCore::CSSFontSelector::resolvesFamilyFor): Deleted. Never called.
950         * css/CSSFontSelector.h:
951         * css/CSSSegmentedFontFace.cpp:
952         (WebCore::CSSSegmentedFontFace::isValid): Deleted.
953         (WebCore::CSSSegmentedFontFace::fontRanges): Cache negative validity results.
954         * css/CSSSegmentedFontFace.h:
955         * platform/graphics/FontCascade.h:
956         (WebCore::FontCascade::fontSelector): Use nullptr.
957         * platform/graphics/FontSelector.h:
958
959 2016-01-12  Ryosuke Niwa  <rniwa@webkit.org>
960
961         Add a build flag for custom element
962         https://bugs.webkit.org/show_bug.cgi?id=153005
963
964         Reviewed by Alex Christensen.
965
966         Added a build flag for enabling custom elements.
967
968         * Configurations/FeatureDefines.xcconfig:
969
970 2016-01-12  Adam Bergkvist  <adam.bergkvist@ericsson.com>
971
972         WebRTC: Update RTCPeerConnection.add/removeTrack() and add test
973         https://bugs.webkit.org/show_bug.cgi?id=153010
974
975         Reviewed by Eric Carlson.
976
977         RTCPeerConnection.add/removeTrack() are not fully spec compliant yet, since that would
978         require support for RTCRtpTransceiver which is a new work-in-progress feature. Use
979         Vector, instead of map, for senders and receivers since nothing is removed from these
980         sets anymore.
981
982         Test: fast/mediastream/RTCPeerConnection-add-removeTrack.html
983
984         * Modules/mediastream/RTCPeerConnection.cpp:
985         (WebCore::RTCPeerConnection::addTrack):
986         (WebCore::RTCPeerConnection::removeTrack):
987         (WebCore::RTCPeerConnection::queuedCreateOffer): Deleted.
988         * Modules/mediastream/RTCPeerConnection.h:
989         * Modules/mediastream/RTCRtpSender.cpp:
990         (WebCore::RTCRtpSender::RTCRtpSender):
991         * Modules/mediastream/RTCRtpSender.h:
992         (WebCore::RTCRtpSender::create):
993         (WebCore::RTCRtpSender::mediaStreamIds):
994
995 2016-01-12  Brady Eidson  <beidson@apple.com>
996
997         Modern IDB: Check in empty SQLite backing store implementation.
998         https://bugs.webkit.org/show_bug.cgi?id=153022
999
1000         Reviewed by Alex Christensen.
1001
1002         No new tests (No change in behavior).
1003
1004         Just to get the implementation files in the tree, this backing store currently does nothing
1005         other than return errors for every operation.
1006
1007         * CMakeLists.txt:
1008         * WebCore.xcodeproj/project.pbxproj:
1009
1010         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Added.
1011         (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
1012         (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
1013         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
1014         (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
1015         (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
1016         (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
1017         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
1018         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
1019         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
1020         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1021         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
1022         (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
1023         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
1024         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
1025         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
1026         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
1027         (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
1028         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
1029         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
1030         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
1031         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
1032         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
1033         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
1034         * Modules/indexeddb/server/SQLiteIDBBackingStore.h: Added.
1035
1036 2016-01-12  Brady Eidson  <beidson@apple.com>
1037
1038         Modern IDB: storage/indexeddb/dont-wedge.html is flaky.
1039         https://bugs.webkit.org/show_bug.cgi?id=152892
1040
1041         Reviewed by Alex Christensen.
1042
1043         No new tests (Reenabled existing test).
1044
1045         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1046         (WebCore::IDBClient::IDBConnectionToServer::abortOpenAndUpgradeNeeded):
1047         * Modules/indexeddb/client/IDBConnectionToServer.h:
1048         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1049
1050         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1051         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted): If the database was opened
1052           or an upgrade transaction was started, but the script execution context is already
1053           stopped, immediately message back to the server so it doesn't wedge.
1054
1055         * Modules/indexeddb/server/IDBServer.cpp:
1056         (WebCore::IDBServer::IDBServer::abortOpenAndUpgradeNeeded):
1057         * Modules/indexeddb/server/IDBServer.h:
1058
1059         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1060         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):
1061         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1062
1063         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1064         (WebCore::InProcessIDBServer::abortOpenAndUpgradeNeeded):
1065         * Modules/indexeddb/shared/InProcessIDBServer.h:
1066
1067 2016-01-12  Commit Queue  <commit-queue@webkit.org>
1068
1069         Unreviewed, rolling out r194826.
1070         https://bugs.webkit.org/show_bug.cgi?id=153020
1071
1072         Appears to have regressed PLT (Requested by kling on #webkit).
1073
1074         Reverted changeset:
1075
1076         "Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
1077         cont'd"
1078         https://bugs.webkit.org/show_bug.cgi?id=152902
1079         http://trac.webkit.org/changeset/194826
1080
1081 2016-01-12  Antti Koivisto  <antti@apple.com>
1082
1083         Don't reuse memory cache entries with different charset
1084         https://bugs.webkit.org/show_bug.cgi?id=110031
1085         rdar://problem/13666418
1086
1087         Reviewed by Andreas Kling.
1088
1089         Test: fast/loader/cache-encoding.html
1090
1091         * loader/cache/CachedResourceLoader.cpp:
1092         (WebCore::CachedResourceLoader::requestResource):
1093         (WebCore::logResourceRevalidationDecision):
1094         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1095
1096             Pass full CachedResourceRequest to the function.
1097             If charset differs don't reuse the cache entry.
1098
1099         * loader/cache/CachedResourceLoader.h:
1100
1101 2016-01-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1102
1103         Use a pointer instead of PassRefPtr in AbstractView argument of UIEvent class
1104         https://bugs.webkit.org/show_bug.cgi?id=152829
1105
1106         Reviewed by Darin Adler.
1107
1108         As a step to reduce uses of PassRefPtr, UIEvent class doesn't need to use PassRefPtr for AbstractView argument.
1109         Nobody hands us ownership when making one of these objects.
1110
1111         * dom/FocusEvent.cpp:
1112         (WebCore::FocusEvent::FocusEvent):
1113         * dom/FocusEvent.h:
1114         * dom/KeyboardEvent.cpp:
1115         (WebCore::KeyboardEvent::KeyboardEvent):
1116         * dom/MouseEvent.cpp:
1117         (WebCore::MouseEvent::create):
1118         (WebCore::MouseEvent::MouseEvent):
1119         (WebCore::MouseEvent::initMouseEvent):
1120         (WebCore::SimulatedMouseEvent::create):
1121         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
1122         * dom/MouseEvent.h:
1123         * dom/MouseRelatedEvent.cpp:
1124         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1125         * dom/MouseRelatedEvent.h:
1126         * dom/TextEvent.cpp:
1127         (WebCore::TextEvent::create):
1128         (WebCore::TextEvent::createForPlainTextPaste):
1129         (WebCore::TextEvent::createForFragmentPaste):
1130         (WebCore::TextEvent::createForDrop):
1131         (WebCore::TextEvent::createForDictation):
1132         (WebCore::TextEvent::TextEvent):
1133         (WebCore::TextEvent::initTextEvent):
1134         * dom/TextEvent.h:
1135         * dom/TouchEvent.cpp:
1136         (WebCore::TouchEvent::TouchEvent):
1137         (WebCore::TouchEvent::initTouchEvent):
1138         * dom/TouchEvent.h:
1139         * dom/UIEvent.cpp:
1140         (WebCore::UIEvent::UIEvent):
1141         (WebCore::UIEvent::initUIEvent):
1142         * dom/UIEvent.h:
1143         (WebCore::UIEvent::create):
1144         (WebCore::UIEvent::view):
1145         * dom/UIEventWithKeyState.h:
1146         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
1147
1148 2016-01-12  Csaba Osztrogonác  <ossy@webkit.org>
1149
1150         Fix unused-private-field warnings in DisplayListItems.h
1151         https://bugs.webkit.org/show_bug.cgi?id=153012
1152
1153         Reviewed by Michael Catanzaro.
1154
1155         * platform/graphics/displaylists/DisplayListItems.cpp:
1156         (WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
1157         * platform/graphics/displaylists/DisplayListItems.h:
1158
1159 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1160
1161         Unreviewed. Fix isRecording condition logic in GraphicsContext::roundToDevicePixels after r194816.
1162
1163         This looks like a typo introduced in r194816, we want to return early logging
1164         a message when isRecording() returns true.
1165
1166         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1167         (WebCore::GraphicsContext::roundToDevicePixels):
1168         * platform/graphics/cg/GraphicsContextCG.cpp:
1169         (WebCore::GraphicsContext::roundToDevicePixels):
1170
1171 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1172
1173         Inconsistencies in main resource load delegates when loading from history
1174         https://bugs.webkit.org/show_bug.cgi?id=150927
1175
1176         Reviewed by Michael Catanzaro.
1177
1178         When restoring a page from the page cache, even though there
1179         isn't an actual load of resources, we are still emitting the load
1180         delegates to let the API layer know there are contents being
1181         loaded in the web view. This makes the page cache restoring
1182         transparent for the API layer. However, when restoring a page from
1183         the cache, all the delegates are emitted after the load is
1184         committed. This is not consistent with real loads, where we first
1185         load the main resource and once we get a response we commit the
1186         load. This inconsistency is problematic if the API layer expects
1187         to always have a main resource with a response when the load is
1188         committed. This is the case of the GTK+ port, for example. So,
1189         this patch ensures that when a page is restored from the page
1190         cache, the main resource load delegates that are emitted until a
1191         response is received in normal loads, are emitted before the load
1192         is committed.
1193
1194         Test: http/tests/loading/main-resource-delegates-on-back-navigation.html
1195
1196         * loader/FrameLoader.cpp:
1197         (WebCore::FrameLoader::commitProvisionalLoad): When loading from
1198         the page cache, send delegate messages up to didReceiveResponse
1199         for the main resource before the load is committed, and the
1200         remaining messages afterwards.
1201
1202 2016-01-09  Andy Estes  <aestes@apple.com>
1203
1204         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
1205         https://bugs.webkit.org/show_bug.cgi?id=152950
1206         rdar://problem/24066652
1207
1208         Reviewed by Tim Horton.
1209
1210         Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
1211         return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
1212
1213         New API test: WebKit2.AlwaysRevalidatedURLSchemes
1214
1215         * loader/cache/CachedResource.cpp:
1216         (WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
1217         (WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
1218         that scheme should always be revalidated according to SchemeRegistry.
1219         * platform/SchemeRegistry.cpp:
1220         (WebCore::alwaysRevalidatedSchemes):
1221         (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
1222         (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
1223         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
1224         There was no reason for this to be in SchemeRegistry.
1225         * platform/SchemeRegistry.h:
1226
1227 2016-01-11  Brady Eidson  <beidson@apple.com>
1228
1229         Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
1230         https://bugs.webkit.org/show_bug.cgi?id=152990
1231
1232         Reviewed by Alex Christensen.
1233
1234         No new tests (Covered by re-enabling existing test).
1235
1236         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1237         (WebCore::IDBClient::IDBRequest::dispatchEvent): Use String::utf8() instead of AtomicString::characters8() for
1238           the format string, as the latter fails under ASAN.
1239           
1240         * Modules/indexeddb/server/IndexValueStore.cpp:
1241         (WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey): We can't save off pointers to IDBKeyDatas
1242           used as keys in the map, because the moment we start mutating the map the keys can be rehashed, invalidating
1243           our pointers. Save off the IDBKeyDatas by value instead.
1244
1245 2016-01-11  Joseph Pecoraro  <pecoraro@apple.com>
1246
1247         Web Inspector: Migrate Page Timeline recording to ScriptProfiler
1248         https://bugs.webkit.org/show_bug.cgi?id=152727
1249
1250         Reviewed by Brian Burg.
1251
1252         Test: inspector/script-profiler/event-type-Other.html
1253
1254         This now shares the JavaScript profiling code between JSContext and Page
1255         inspection. It also moves forward splitting the Page's Timeline domain
1256         into smaller components that can be turned on/off individually.
1257
1258         * bindings/js/JSCallbackData.cpp:
1259         (WebCore::JSCallbackData::invokeCallback):
1260         * bindings/js/JSErrorHandler.cpp:
1261         (WebCore::JSErrorHandler::handleEvent):
1262         * bindings/js/JSEventListener.cpp:
1263         (WebCore::JSEventListener::handleEvent):
1264         * bindings/js/JSMainThreadExecState.h:
1265         (WebCore::JSMainThreadExecState::profiledCall):
1266         (WebCore::JSMainThreadExecState::profiledEvaluate):
1267         * bindings/js/JSMutationCallback.cpp:
1268         (WebCore::JSMutationCallback::call):
1269         * bindings/js/ScheduledAction.cpp:
1270         (WebCore::ScheduledAction::executeFunctionInContext):
1271         * bindings/js/ScriptController.cpp:
1272         (WebCore::ScriptController::evaluateInWorld):
1273         * bindings/objc/WebScriptObject.mm:
1274         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1275         (-[WebScriptObject evaluateWebScript:]):
1276         Identify entry points into JSC that we want to profile for the frontend.
1277         These were nearly all already classified for the Timeline. We added missing
1278         support for ErrorHandlers (window.onerror handler functions).
1279
1280         * inspector/InspectorTimelineAgent.cpp:
1281         (WebCore::InspectorTimelineAgent::didCallFunction):
1282         (WebCore::InspectorTimelineAgent::didEvaluateScript):
1283         (WebCore::startProfiling): Deleted.
1284         (WebCore::stopProfiling): Deleted.
1285         (WebCore::InspectorTimelineAgent::willCallFunction): Deleted.
1286         (WebCore::InspectorTimelineAgent::willEvaluateScript): Deleted.
1287         * inspector/InspectorTimelineAgent.h:
1288         TimelineAgent no longer needs to start/stop the Legacy Profiler
1289         since ScriptProfiler will automatically do that for us. Delete
1290         all code associated with that. There is still an open question
1291         regarding `console.profile` and `console.profileEnd` that
1292         starts/stops the profiler.
1293
1294 2016-01-11  Anders Carlsson  <andersca@apple.com>
1295
1296         Get rid of CFMakeCollectable, it is a no-op
1297         https://bugs.webkit.org/show_bug.cgi?id=152988
1298
1299         Reviewed by Sam Weinig.
1300
1301         * platform/mac/WebCoreNSURLExtras.mm:
1302         (WebCore::URLByTruncatingOneCharacterBeforeComponent):
1303         (WebCore::URLByRemovingComponentAndSubsequentCharacter):
1304
1305 2016-01-11  Commit Queue  <commit-queue@webkit.org>
1306
1307         Unreviewed, rolling out r194866.
1308         https://bugs.webkit.org/show_bug.cgi?id=152986
1309
1310         This change broke the mac build (Requested by ryanhaddad on
1311         #webkit).
1312
1313         Reverted changeset:
1314
1315         "[Cocoa] Add SPI to opt out a URL scheme from the memory
1316         cache"
1317         https://bugs.webkit.org/show_bug.cgi?id=152950
1318         http://trac.webkit.org/changeset/194866
1319
1320 2016-01-11  Zalan Bujtas  <zalan@apple.com>
1321
1322         Padding added to table-cell element after font-size change.
1323         https://bugs.webkit.org/show_bug.cgi?id=152796
1324
1325         Reviewed by David Hyatt.
1326
1327         Do not include intrinsicPaddingBefore value while figuring out the height of a row.
1328         In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
1329         without the additional padding (normal padding is included).
1330
1331         Test: fast/table/table-baseline-grows.html
1332
1333         * rendering/RenderTableSection.cpp:
1334         (WebCore::RenderTableSection::calcRowLogicalHeight):
1335
1336 2016-01-11  Andy Estes  <aestes@apple.com>
1337
1338         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
1339         https://bugs.webkit.org/show_bug.cgi?id=152950
1340         rdar://problem/24066652
1341
1342         Reviewed by Tim Horton.
1343
1344         Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
1345         return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
1346
1347         New API test: WebKit2.AlwaysRevalidatedURLSchemes
1348
1349         * loader/cache/CachedResource.cpp:
1350         (WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
1351         (WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
1352         that scheme should always be revalidated according to SchemeRegistry.
1353         * platform/SchemeRegistry.cpp:
1354         (WebCore::alwaysRevalidatedSchemes):
1355         (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
1356         (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
1357         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
1358         There was no reason for this to be in SchemeRegistry.
1359         * platform/SchemeRegistry.h:
1360
1361 2016-01-11  Dave Hyatt  <hyatt@apple.com>
1362
1363         Picture element needs to work with the preload scanner and select the correct
1364         source element instead of loading the image.
1365         https://bugs.webkit.org/show_bug.cgi?id=152983
1366
1367         Reviewed by Dean Jackson.
1368
1369         Added new tests in http/tests/loading.
1370
1371         * html/parser/HTMLPreloadScanner.cpp:
1372         (WebCore::TokenPreloadScanner::tagIdFor):
1373         (WebCore::TokenPreloadScanner::initiatorFor):
1374         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
1375         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1376         (WebCore::TokenPreloadScanner::StartTagScanner::processImageAndScriptAttribute):
1377         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1378         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
1379         (WebCore::TokenPreloadScanner::scan):
1380         * html/parser/HTMLPreloadScanner.h:
1381         (WebCore::TokenPreloadScanner::setPredictedBaseElementURL):
1382         (WebCore::TokenPreloadScanner::inPicture):
1383
1384 2016-01-11  Brady Eidson  <beidson@apple.com>
1385
1386         Modern IDB: storage/indexeddb/key-generator.html fails.
1387         https://bugs.webkit.org/show_bug.cgi?id=152981
1388
1389         Reviewed by Alex Christensen.
1390
1391         No new tests (One failing test now passes, and one test's results get a progression).
1392
1393         * Modules/indexeddb/server/IDBBackingStore.h:
1394         
1395         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1396         (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber): Throw an error if the current
1397           value is already over 2^53.
1398         (WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
1399         (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): Handle double -> uint64_t
1400           conversions properly when calculating the next key.
1401         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1402         
1403         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1404         (WebCore::IDBServer::ScopeGuard::ScopeGuard): Add this utility class to call a function 
1405           any time it goes out of scope.
1406         (WebCore::IDBServer::ScopeGuard::~ScopeGuard):
1407         (WebCore::IDBServer::ScopeGuard::enable):
1408         (WebCore::IDBServer::ScopeGuard::disable):
1409         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Revert the key generator value if
1410           the put/add operation ends in error.
1411
1412 2016-01-11  Brady Eidson  <beidson@apple.com>
1413
1414         Modern IDB: storage/indexeddb/lazy-index-population.html fails.
1415         https://bugs.webkit.org/show_bug.cgi?id=152976
1416
1417         Reviewed by Alex Christensen.
1418
1419         No new tests (At least one failing test now passes).
1420
1421         We were restoring objectstores/indexes incorrectly on transaction abort.
1422
1423         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1424         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
1425         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1426         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
1427
1428 2016-01-11  Brady Eidson  <beidson@apple.com>
1429
1430         Modern IDB: Make MemoryIndex and MemoryObjectStore RefCounted.
1431         https://bugs.webkit.org/show_bug.cgi?id=152966
1432
1433         Reviewed by Alex Christensen.
1434
1435         No new tests (Refactor, no change in behavior)
1436
1437         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1438         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
1439         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
1440         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
1441         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1442         
1443         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1444         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
1445         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
1446         (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
1447         (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
1448         (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
1449         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1450         
1451         * Modules/indexeddb/server/MemoryIndex.cpp:
1452         (WebCore::IDBServer::MemoryIndex::create):
1453         * Modules/indexeddb/server/MemoryIndex.h:
1454         
1455         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1456         (WebCore::IDBServer::MemoryObjectStore::create):
1457         (WebCore::IDBServer::MemoryObjectStore::createIndex):
1458         (WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
1459         (WebCore::IDBServer::MemoryObjectStore::takeIndexByName):
1460         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
1461         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForDeleteRecord):
1462         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
1463         (WebCore::IDBServer::MemoryObjectStore::registerIndex):
1464         * Modules/indexeddb/server/MemoryObjectStore.h:
1465
1466 2016-01-11  Andreas Kling  <akling@apple.com>
1467
1468         Fix other builds after my MSVC build fix. :-|
1469
1470         * css/StyleResolver.cpp:
1471
1472 2016-01-11  Andreas Kling  <akling@apple.com>
1473
1474         Fix MSVC build after r194848.
1475
1476         Since MSVC refuses to recognize the friendship between LazyNeverDestroyed
1477         and some CSS*Value classes, make their constructors public in MSVC builds.
1478
1479         Added FIXME's to make it look extra gross.
1480
1481         * css/CSSInheritedValue.h:
1482         (WebCore::CSSInheritedValue::create): Deleted.
1483         * css/CSSInitialValue.h:
1484         * css/CSSPrimitiveValue.h:
1485         * css/CSSRevertValue.h:
1486         (WebCore::CSSRevertValue::create): Deleted.
1487         * css/CSSUnsetValue.h:
1488         (WebCore::CSSUnsetValue::create): Deleted.
1489         * css/StyleResolver.cpp:
1490         (WebCore::StyleResolver::applyProperty):
1491
1492 2016-01-11  Andreas Kling  <akling@apple.com>
1493
1494         CSSValuePool should use nonfragmented storage for eternal caches.
1495         <https://webkit.org/b/152960>
1496
1497         Reviewed by Antti Koivisto.
1498
1499         Store all of the common cached CSS value objects in contiguous arrays
1500         instead of lazily allocating them on the heap.
1501
1502         This reduces heap fragmentation (win) and removes indirection (win)
1503
1504         * css/CSSInheritedValue.h:
1505         * css/CSSInitialValue.h:
1506         * css/CSSPrimitiveValue.h:
1507         * css/CSSRevertValue.h:
1508         * css/CSSUnsetValue.h:
1509         * css/CSSValuePool.cpp:
1510         (WebCore::CSSValuePool::CSSValuePool):
1511         (WebCore::CSSValuePool::createIdentifierValue):
1512         (WebCore::CSSValuePool::createColorValue):
1513         (WebCore::CSSValuePool::createValue):
1514         (WebCore::CSSValuePool::drain): Deleted.
1515         * css/CSSValuePool.h:
1516         (WebCore::CSSValuePool::createInheritedValue):
1517         (WebCore::CSSValuePool::createImplicitInitialValue):
1518         (WebCore::CSSValuePool::createExplicitInitialValue):
1519         (WebCore::CSSValuePool::createUnsetValue):
1520         (WebCore::CSSValuePool::createRevertValue):
1521
1522 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1523
1524         [GTK] Cleanup RenderThemeGtk
1525         https://bugs.webkit.org/show_bug.cgi?id=152888
1526
1527         Reviewed by Michael Catanzaro.
1528
1529         Use a common path for GTK+ 3.19 and previous versions, simplifying
1530         the code and removing a lot of ifdefs.
1531
1532          - createStyleContext() now receives a theme part enum value, and
1533            an optional parent GtkStyleContext. It encapsulates all the
1534            differences between GTK+ 3.19 and previous version leaving the
1535            rendering code common and free of ifdefs.
1536          - Stock icons support have been removed, simplifying the code
1537            that now always renders symbolic icons, updating the colors
1538            depending on the current state.
1539          - Media button and colors have been removed, because they are
1540            unused now that we render the media controls with CSS.
1541          - ComboBox separators support has also been removed. In GTK+ 3.19
1542            combo boxes no longer have separators and most of the GTK+
1543            themes don't use the either, so it's better to simple not render
1544            them anymore in WebKit either.
1545          - Code to paint caps lock indicator has been removed too, since
1546            caps lock indicator is now shadow dom and automatically
1547            rendered by WebCore.
1548
1549         * rendering/RenderThemeGtk.cpp:
1550         (WebCore::createStyleContext):
1551         (WebCore::loadThemedIcon):
1552         (WebCore::gtkIconStateFlags):
1553         (WebCore::RenderThemeGtk::adjustRepaintRect):
1554         (WebCore::setToggleSize):
1555         (WebCore::paintToggle):
1556         (WebCore::RenderThemeGtk::setCheckboxSize):
1557         (WebCore::RenderThemeGtk::paintCheckbox):
1558         (WebCore::RenderThemeGtk::setRadioSize):
1559         (WebCore::RenderThemeGtk::paintRadio):
1560         (WebCore::RenderThemeGtk::paintButton):
1561         (WebCore::getComboBoxMetrics):
1562         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
1563         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
1564         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
1565         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
1566         (WebCore::RenderThemeGtk::paintMenuList):
1567         (WebCore::RenderThemeGtk::paintTextField):
1568         (WebCore::adjustSearchFieldIconStyle):
1569         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
1570         (WebCore::paintIcon):
1571         (WebCore::paintEntryIcon):
1572         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
1573         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
1574         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
1575         (WebCore::RenderThemeGtk::shouldHaveCapsLockIndicator):
1576         (WebCore::RenderThemeGtk::paintSliderTrack):
1577         (WebCore::RenderThemeGtk::paintSliderThumb):
1578         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
1579         (WebCore::RenderThemeGtk::paintProgressBar):
1580         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
1581         (WebCore::paintSpinArrowButton):
1582         (WebCore::RenderThemeGtk::paintInnerSpinButton):
1583         (WebCore::styleColor):
1584         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
1585         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
1586         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
1587         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
1588         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
1589         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
1590         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
1591         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
1592         (WebCore::RenderThemeGtk::systemColor):
1593         (WebCore::RenderThemeGtk::paintMediaButton):
1594         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
1595         (WebCore::RenderThemeGtk::paintMediaMuteButton):
1596         (WebCore::RenderThemeGtk::paintMediaPlayButton):
1597         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
1598         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
1599         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
1600         * rendering/RenderThemeGtk.h:
1601
1602 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1603
1604         [GTK] Cleanup ScrollbarThemeGtk
1605         https://bugs.webkit.org/show_bug.cgi?id=152830
1606
1607         Reviewed by Michael Catanzaro.
1608
1609         Use a common path for GTK+ 3.19 and previous versions, simplifying
1610         the code and removing a lot of ifdefs. Use always a new
1611         GtkStyleContext, but when painting cache the newly created one so
1612         all paint methods use that one. We were also caching some theme
1613         properties assuming they don't change unless the theme changes,
1614         but some of them can have different values depending on the state,
1615         for example, when hovered or pressed. Those properties are now
1616         only cached when we create a new GtkStyleContext.
1617         The method updateScrollbarsFrameThickness() has also been removed,
1618         since the Scrollbar constructor already initializes the frame rect
1619         using the scrollbarThickness(). This method was not doing anything
1620         anyway, since that was called on the constructor of the theme,
1621         when there were no scrollbars registered. This also means we no
1622         longer need to track registered/unregistered scrollbars.
1623
1624         * platform/gtk/ScrollbarThemeGtk.cpp:
1625         (WebCore::ScrollbarThemeGtk::backButtonRect): Use the cached
1626         GtkStyleContext and properties or create a new.
1627         (WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
1628         (WebCore::ScrollbarThemeGtk::trackRect): Ditto.
1629         (WebCore::orientationStyleClass):
1630         (WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Create a
1631         new GtkStyleContext for the scrollbar if there isn't a cached
1632         one. Also initialize the properties that depend on the state.
1633         (WebCore::createChildStyleContext): Create a new GtkStyleContext
1634         from a parent one.
1635         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Get the
1636         properties that can only change when the theme changes.
1637         (WebCore::ScrollbarThemeGtk::thumbRect): Use the cached
1638         GtkStyleContext and properties or create a new.
1639         (WebCore::adjustRectAccordingToMargin): Use always the
1640         GtkStyleContext state instead of receiving it and setting it again.
1641         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Get or create
1642         a GtkStyleContext for the scrollbar and create a child one for the trough.
1643         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Use the
1644         cached GtkStyleContext or create a new one.
1645         (WebCore::ScrollbarThemeGtk::paintThumb): Get or create a
1646         GtkStyleContext for the scrollbar and create a child ones for
1647         trough and slider.
1648         (WebCore::ScrollbarThemeGtk::paintButton): Get or create a
1649         GtkStyleContext for the scrollbar and create a child one for the button.
1650         (WebCore::ScrollbarThemeGtk::paint): Create a GtkStyleContext and
1651         cache it temporarily using TemporaryChange until the method finishes.
1652         (WebCore::ScrollbarThemeGtk::scrollbarThickness): Use the cached
1653         GtkStyleContext and properties or create a new.
1654         (WebCore::ScrollbarThemeGtk::buttonSize): Ditto.
1655         * platform/gtk/ScrollbarThemeGtk.h:
1656
1657 2016-01-10  Myles C. Maxfield  <mmaxfield@apple.com>
1658
1659         [SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
1660         https://bugs.webkit.org/show_bug.cgi?id=152772
1661         <rdar://problem/24043104>
1662
1663         Reviewed by Simon Fraser.
1664
1665         Originally, if we fail to parse a glyph, we would simply skip the glyph. However, this means that
1666         we will create an incomplete font without all the necessary glyphs. This causes very distressing
1667         text where all the occurances of a particular letter are missing. Instead, we should treat the
1668         entire font as invalid.
1669
1670         Test: fast/text/svg-font-invalid-glyph-path-failure.html
1671
1672         * css/CSSFontFaceSource.cpp:
1673         (WebCore::CSSFontFaceSource::font):
1674         * loader/cache/CachedSVGFont.cpp:
1675         (WebCore::CachedSVGFont::ensureCustomFontData):
1676         * svg/SVGToOTFFontConversion.cpp:
1677         (WebCore::SVGToOTFFontConverter::error):
1678         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
1679         (WebCore::SVGToOTFFontConverter::processGlyphElement):
1680         (WebCore::convertSVGToOTFFont):
1681         * svg/SVGToOTFFontConversion.h:
1682
1683 2016-01-10  Andreas Kling  <akling@apple.com>
1684
1685         Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL cont'd
1686         <https://webkit.org/b/152902>
1687
1688         Reviewed by Andy Estes.
1689
1690         Convert some more of the remaining clients to use NeverDestroyed.
1691
1692         * html/track/VTTRegion.cpp:
1693         (WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
1694         (WebCore::VTTRegion::textTrackRegionShadowPseudoId):
1695         * svg/properties/SVGAnimatedPropertyMacros.h:
1696
1697 2016-01-09  Simon Fraser  <simon.fraser@apple.com>
1698
1699         Hook up display-list drawing in GraphicsLayerCA
1700         https://bugs.webkit.org/show_bug.cgi?id=152946
1701
1702         Reviewed by Zalan Bujtas.
1703
1704         Have GraphicsLayerCA hold a DisplayList. If enabled, do a display-list record
1705         in GraphicsLayerCA::recursiveCommitChanges(), and a playback in GraphicsLayerCA::platformCALayerPaintContents().
1706         
1707         GraphicsLayerCA needs to maintain a m_hasEverPainted flag to know to do a full record
1708         at first paint (when there are no dirty rects).
1709         
1710         Plumb 'isUsingDisplayListDrawing' through to TileGrid via PlatformCALayer{Client}
1711         so that we can decorate the tile paint counters with an outline.
1712         
1713         Have RenderLayerCompositor push the displayListDrawingEnabled state down through
1714         RenderLayerBackings to GraphicsLayers.
1715         
1716         Convert RenderLayerCompositor to use initializers.
1717
1718         * platform/graphics/GraphicsLayer.cpp:
1719         (WebCore::GraphicsLayer::GraphicsLayer):
1720         * platform/graphics/GraphicsLayer.h:
1721         (WebCore::GraphicsLayer::usesDisplayListDrawing):
1722         (WebCore::GraphicsLayer::setUsesDisplayListDrawing):
1723         * platform/graphics/ca/GraphicsLayerCA.cpp:
1724         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1725         (WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):
1726         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1727         (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
1728         (WebCore::GraphicsLayerCA::updateDrawsContent):
1729         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
1730         * platform/graphics/ca/GraphicsLayerCA.h:
1731         * platform/graphics/ca/PlatformCALayer.cpp:
1732         (WebCore::PlatformCALayer::drawRepaintIndicator):
1733         * platform/graphics/ca/PlatformCALayerClient.h:
1734         (WebCore::PlatformCALayerClient::isUsingDisplayListDrawing):
1735         * platform/graphics/ca/TileGrid.cpp:
1736         (WebCore::TileGrid::platformCALayerShowRepaintCounter):
1737         (WebCore::TileGrid::isUsingDisplayListDrawing):
1738         * platform/graphics/ca/TileGrid.h:
1739         * platform/graphics/displaylists/DisplayList.h: Sadly need to include DisplayListItems.h
1740         to get things to compile. I wasn't able to avoid this even when making functions non-inline.
1741         * rendering/RenderLayerBacking.cpp:
1742         (WebCore::RenderLayerBacking::createGraphicsLayer):
1743         * rendering/RenderLayerCompositor.cpp:
1744         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1745         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1746         * rendering/RenderLayerCompositor.h:
1747
1748 2016-01-09  Zalan Bujtas  <zalan@apple.com>
1749
1750         REGRESSION (r194426): First email field is not autofilled on amazon.com
1751         https://bugs.webkit.org/show_bug.cgi?id=152945
1752         <rdar://problem/24082914>
1753
1754         Reviewed by Simon Fraser.
1755
1756         r194426 missed marking the m_layoutRoot for layout while converting to full layout (it only marked the new layout root).
1757
1758         Test: fast/forms/multiple-subtree-layout-failure.html
1759
1760         * page/FrameView.cpp:
1761         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1762
1763 2016-01-09  Dan Bernstein  <mitz@apple.com>
1764
1765         [Cocoa] Allow overriding the frameworks directory independently of using a staging install path
1766         https://bugs.webkit.org/show_bug.cgi?id=152926
1767
1768         Reviewed by Tim Horton.
1769
1770         Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
1771         where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
1772         WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.
1773
1774         Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.
1775
1776         * Configurations/WebCore.xcconfig:
1777         - Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with
1778           WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces.
1779         - Define WEBCORE_FRAMEWORKS_DIR and PRODUCTION_FRAMEWORKS_DIR based on
1780           WK_OVERRIDE_FRAMEWORKS_DIR.
1781
1782         * WebCore.xcodeproj/project.pbxproj: Work around make’s inability to handle spaces in paths
1783           by creating a symlink to JAVASCRIPTCORE_PRIVATE_HEADERS_DIR under BUILT_PRODUCTS_DIR and
1784           using the symlink as the value of JavaScriptCore_SCRIPTS_DIR.
1785
1786 2016-01-09  Andreas Kling  <akling@apple.com>
1787
1788         Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
1789         <https://webkit.org/b/152902>
1790
1791         Reviewed by Anders Carlsson.
1792
1793         Mostly mechanical conversion to NeverDestroyed throughout WebCore.
1794
1795         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
1796         (WebCore::stringForPlaybackTargetAvailability):
1797         * Modules/indexeddb/IDBCursor.cpp:
1798         (WebCore::IDBCursor::directionNext):
1799         (WebCore::IDBCursor::directionNextUnique):
1800         (WebCore::IDBCursor::directionPrev):
1801         (WebCore::IDBCursor::directionPrevUnique):
1802         * Modules/indexeddb/IDBTransaction.cpp:
1803         (WebCore::IDBTransaction::modeReadOnly):
1804         (WebCore::IDBTransaction::modeReadWrite):
1805         (WebCore::IDBTransaction::modeVersionChange):
1806         (WebCore::IDBTransaction::modeReadOnlyLegacy):
1807         (WebCore::IDBTransaction::modeReadWriteLegacy):
1808         * Modules/indexeddb/legacy/LegacyRequest.cpp:
1809         (WebCore::LegacyRequest::readyState):
1810         * Modules/mediacontrols/MediaControlsHost.cpp:
1811         (WebCore::MediaControlsHost::automaticKeyword):
1812         (WebCore::MediaControlsHost::forcedOnlyKeyword):
1813         (WebCore::MediaControlsHost::alwaysOnKeyword):
1814         (WebCore::MediaControlsHost::externalDeviceType):
1815         * Modules/mediasource/MediaSource.cpp:
1816         (WebCore::MediaSource::openKeyword):
1817         (WebCore::MediaSource::closedKeyword):
1818         (WebCore::MediaSource::endedKeyword):
1819         (WebCore::MediaSource::streamEndedWithError):
1820         * Modules/plugins/QuickTimePluginReplacement.mm:
1821         (WebCore::quickTimePluginReplacementScript):
1822         (WebCore::QuickTimePluginReplacement::supportsMimeType):
1823         (WebCore::QuickTimePluginReplacement::supportsFileExtension):
1824         * Modules/speech/SpeechSynthesis.cpp:
1825         (WebCore::SpeechSynthesis::boundaryEventOccurred):
1826         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1827         (WebCore::cssPropertyIDForJSCSSPropertyName):
1828         * bridge/c/c_instance.cpp:
1829         (JSC::Bindings::globalExceptionString):
1830         * css/MediaList.cpp:
1831         (WebCore::addResolutionWarningMessageToConsole):
1832         * css/StyleSheetContents.cpp:
1833         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1834         * dom/ChildListMutationScope.cpp:
1835         (WebCore::accumulatorMap):
1836         * dom/DOMImplementation.cpp:
1837         (WebCore::isSupportedSVG10Feature):
1838         (WebCore::isSupportedSVG11Feature):
1839         * dom/Document.cpp:
1840         (WebCore::Document::readyState):
1841         * dom/Element.cpp:
1842         (WebCore::Element::webkitRegionOverset):
1843         * dom/EventDispatcher.cpp:
1844         (WebCore::EventDispatcher::dispatchSimulatedClick):
1845         * dom/InlineStyleSheetOwner.cpp:
1846         (WebCore::isValidCSSContentType):
1847         * dom/MutationObserver.cpp:
1848         (WebCore::activeMutationObservers):
1849         (WebCore::suspendedMutationObservers):
1850         * dom/MutationRecord.cpp:
1851         * dom/PseudoElement.cpp:
1852         (WebCore::pseudoElementTagName):
1853         (WebCore::PseudoElement::pseudoElementNameForEvents):
1854         * dom/QualifiedName.cpp:
1855         (WebCore::qualifiedNameCache):
1856         (WebCore::nullQName):
1857         * dom/ScriptElement.cpp:
1858         (WebCore::isLegacySupportedJavaScriptLanguage):
1859         (WebCore::ScriptElement::notifyFinished):
1860         * editing/ApplyStyleCommand.cpp:
1861         (WebCore::styleSpanClassString):
1862         * editing/MarkupAccumulator.cpp:
1863         (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
1864         * editing/ReplaceSelectionCommand.cpp:
1865         (WebCore::isInterchangeNewlineNode):
1866         (WebCore::isInterchangeConvertedSpaceSpan):
1867         * editing/htmlediting.cpp:
1868         (WebCore::nonBreakingSpaceString):
1869         * editing/markup.cpp:
1870         (WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
1871         (WebCore::createMarkupInternal):
1872         * fileapi/Blob.cpp:
1873         (WebCore::BlobURLRegistry::registry):
1874         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1875         (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
1876         * html/DateInputType.cpp:
1877         (WebCore::DateInputType::createStepRange):
1878         * html/DateTimeInputType.cpp:
1879         (WebCore::DateTimeInputType::createStepRange):
1880         * html/DateTimeLocalInputType.cpp:
1881         (WebCore::DateTimeLocalInputType::createStepRange):
1882         * html/EmailInputType.cpp:
1883         (WebCore::isValidEmailAddress):
1884         * html/FormController.cpp:
1885         (WebCore::FormKeyGenerator::formKey):
1886         (WebCore::formStateSignature):
1887         * html/HTMLAnchorElement.cpp:
1888         (WebCore::rootEditableElementMap):
1889         * html/HTMLButtonElement.cpp:
1890         (WebCore::HTMLButtonElement::formControlType):
1891         * html/HTMLFieldSetElement.cpp:
1892         (WebCore::HTMLFieldSetElement::formControlType):
1893         * html/HTMLFrameOwnerElement.h:
1894         (WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
1895         * html/HTMLKeygenElement.cpp:
1896         (WebCore::HTMLKeygenElement::formControlType):
1897         * html/HTMLLinkElement.cpp:
1898         (WebCore::linkLoadEventSender):
1899         * html/HTMLMediaElement.cpp:
1900         (WebCore::documentToElementSetMap):
1901         * html/HTMLObjectElement.cpp:
1902         (WebCore::isRecognizedTagName):
1903         * html/HTMLOptGroupElement.cpp:
1904         (WebCore::HTMLOptGroupElement::formControlType):
1905         * html/HTMLOutputElement.cpp:
1906         (WebCore::HTMLOutputElement::formControlType):
1907         * html/HTMLPlugInElement.cpp:
1908         (WebCore::registeredPluginReplacements):
1909         * html/HTMLPlugInImageElement.cpp:
1910         (WebCore::titleText):
1911         (WebCore::subtitleText):
1912         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
1913         * html/HTMLSelectElement.cpp:
1914         (WebCore::HTMLSelectElement::formControlType):
1915         * html/HTMLStyleElement.cpp:
1916         (WebCore::styleLoadEventSender):
1917         * html/HTMLTextAreaElement.cpp:
1918         (WebCore::HTMLTextAreaElement::formControlType):
1919         * html/HTMLTextFormControlElement.cpp:
1920         (WebCore::directionString):
1921         * html/ImageInputType.cpp:
1922         (WebCore::ImageInputType::appendFormData):
1923         * html/InputTypeNames.cpp:
1924         (WebCore::InputTypeNames::button):
1925         (WebCore::InputTypeNames::checkbox):
1926         (WebCore::InputTypeNames::color):
1927         (WebCore::InputTypeNames::date):
1928         (WebCore::InputTypeNames::datetime):
1929         (WebCore::InputTypeNames::datetimelocal):
1930         (WebCore::InputTypeNames::email):
1931         (WebCore::InputTypeNames::file):
1932         (WebCore::InputTypeNames::hidden):
1933         (WebCore::InputTypeNames::image):
1934         (WebCore::InputTypeNames::month):
1935         (WebCore::InputTypeNames::number):
1936         (WebCore::InputTypeNames::password):
1937         (WebCore::InputTypeNames::radio):
1938         (WebCore::InputTypeNames::range):
1939         (WebCore::InputTypeNames::reset):
1940         (WebCore::InputTypeNames::search):
1941         (WebCore::InputTypeNames::submit):
1942         (WebCore::InputTypeNames::telephone):
1943         (WebCore::InputTypeNames::text):
1944         (WebCore::InputTypeNames::time):
1945         (WebCore::InputTypeNames::url):
1946         (WebCore::InputTypeNames::week):
1947         * html/MediaController.cpp:
1948         (playbackStateWaiting):
1949         (playbackStatePlaying):
1950         (playbackStateEnded):
1951         * html/MonthInputType.cpp:
1952         (WebCore::MonthInputType::createStepRange):
1953         * html/NumberInputType.cpp:
1954         (WebCore::NumberInputType::createStepRange):
1955         * html/RangeInputType.cpp:
1956         (WebCore::RangeInputType::createStepRange):
1957         * html/StepRange.cpp:
1958         (WebCore::StepRange::acceptableError):
1959         (WebCore::StepRange::alignValueForStep):
1960         (WebCore::StepRange::stepMismatch):
1961         * html/TimeInputType.cpp:
1962         (WebCore::TimeInputType::createStepRange):
1963         * html/WeekInputType.cpp:
1964         (WebCore::WeekInputType::createStepRange):
1965         * html/canvas/CanvasRenderingContext2D.cpp:
1966         (WebCore::CanvasRenderingContext2D::getImageData):
1967         * html/parser/XSSAuditor.cpp:
1968         (WebCore::XSSAuditor::init):
1969         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
1970         * html/shadow/MediaControlElements.cpp:
1971         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
1972         (WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId):
1973         (WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId):
1974         * html/shadow/MeterShadowElement.cpp:
1975         (WebCore::MeterInnerElement::MeterInnerElement):
1976         (WebCore::MeterValueElement::valuePseudoId):
1977         * html/shadow/MeterShadowElement.h:
1978         * html/shadow/SliderThumbElement.cpp:
1979         (WebCore::sliderThumbShadowPseudoId):
1980         (WebCore::mediaSliderThumbShadowPseudoId):
1981         (WebCore::SliderContainerElement::shadowPseudoId):
1982         * html/track/AudioTrack.cpp:
1983         (WebCore::AudioTrack::alternativeKeyword):
1984         (WebCore::AudioTrack::descriptionKeyword):
1985         (WebCore::AudioTrack::mainKeyword):
1986         (WebCore::AudioTrack::mainDescKeyword):
1987         (WebCore::AudioTrack::translationKeyword):
1988         (WebCore::AudioTrack::commentaryKeyword):
1989         * html/track/TextTrack.cpp:
1990         (WebCore::TextTrack::subtitlesKeyword):
1991         (WebCore::TextTrack::captionsKeyword):
1992         (WebCore::TextTrack::descriptionsKeyword):
1993         (WebCore::TextTrack::chaptersKeyword):
1994         (WebCore::TextTrack::metadataKeyword):
1995         (WebCore::TextTrack::forcedKeyword):
1996         (WebCore::TextTrack::disabledKeyword):
1997         (WebCore::TextTrack::hiddenKeyword):
1998         (WebCore::TextTrack::showingKeyword):
1999         * html/track/TextTrackCue.h:
2000         (WebCore::TextTrackCue::cueShadowPseudoId):
2001         * html/track/VTTCue.cpp:
2002         (WebCore::startKeyword):
2003         (WebCore::middleKeyword):
2004         (WebCore::endKeyword):
2005         (WebCore::leftKeyword):
2006         (WebCore::rightKeyword):
2007         (WebCore::verticalGrowingLeftKeyword):
2008         (WebCore::verticalGrowingRightKeyword):
2009         (WebCore::VTTCueBox::vttCueBoxShadowPseudoId):
2010         (WebCore::VTTCue::cueBackdropShadowPseudoId):
2011         (WebCore::VTTCue::determineTextDirection):
2012         (WebCore::VTTCue::markFutureAndPastNodes):
2013         * html/track/VTTRegion.cpp:
2014         (WebCore::VTTRegion::scroll):
2015         (WebCore::VTTRegion::setScroll):
2016         (WebCore::VTTRegion::parseSettingValue):
2017         (WebCore::VTTRegion::textTrackCueContainerScrollingClass):
2018         * html/track/VideoTrack.cpp:
2019         (WebCore::VideoTrack::alternativeKeyword):
2020         (WebCore::VideoTrack::captionsKeyword):
2021         (WebCore::VideoTrack::mainKeyword):
2022         (WebCore::VideoTrack::signKeyword):
2023         (WebCore::VideoTrack::subtitlesKeyword):
2024         (WebCore::VideoTrack::commentaryKeyword):
2025         * html/track/WebVTTElement.cpp:
2026         (WebCore::nodeTypeToTagName):
2027         * html/track/WebVTTElement.h:
2028         * html/track/WebVTTParser.cpp:
2029         (WebCore::WebVTTParser::collectMetadataHeader):
2030         * inspector/InspectorCSSAgent.cpp:
2031         (WebCore::computePseudoClassMask):
2032         * inspector/InspectorPageAgent.cpp:
2033         (WebCore::InspectorPageAgent::sourceMapURLForResource):
2034         * inspector/InspectorStyleSheet.cpp:
2035         (WebCore::selectorsFromSource):
2036         * inspector/PageDebuggerAgent.cpp:
2037         (WebCore::PageDebuggerAgent::sourceMapURLForScript):
2038         * loader/ImageLoader.cpp:
2039         (WebCore::ImageLoader::notifyFinished):
2040         * loader/TextTrackLoader.cpp:
2041         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
2042         * loader/cache/CachedResourceRequest.cpp:
2043         (WebCore::CachedResourceRequest::initiatorName):
2044         * loader/icon/IconDatabase.cpp:
2045         (WebCore::IconDatabase::defaultDatabaseFilename):
2046         * page/CaptionUserPreferences.cpp:
2047         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
2048         * page/CaptionUserPreferencesMediaAF.cpp:
2049         (WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
2050         (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
2051         * page/ContentSecurityPolicy.cpp:
2052         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
2053         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
2054         (WebCore::CSPDirectiveList::allowInlineScript):
2055         (WebCore::CSPDirectiveList::allowInlineStyle):
2056         (WebCore::CSPDirectiveList::allowEval):
2057         (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
2058         * page/DOMWindow.cpp:
2059         (WebCore::windowsWithUnloadEventListeners):
2060         (WebCore::windowsWithBeforeUnloadEventListeners):
2061         * page/EventHandler.cpp:
2062         (WebCore::EventHandler::dragState):
2063         (WebCore::focusDirectionForKey):
2064         * page/Frame.cpp:
2065         (WebCore::createRegExpForLabels):
2066         * page/NavigatorBase.cpp:
2067         (WebCore::NavigatorBase::platform):
2068         * page/PageVisibilityState.cpp:
2069         (WebCore::pageVisibilityStateString):
2070         * page/SecurityPolicy.cpp:
2071         (WebCore::originAccessMap):
2072         * page/UserContentURLPattern.cpp:
2073         (WebCore::UserContentURLPattern::parse):
2074         * page/animation/CSSPropertyAnimation.cpp:
2075         (WebCore::shadowForBlending):
2076         * page/animation/CompositeAnimation.cpp:
2077         (WebCore::CompositeAnimation::updateKeyframeAnimations):
2078         * platform/Cursor.cpp:
2079         (WebCore::pointerCursor):
2080         (WebCore::crossCursor):
2081         (WebCore::handCursor):
2082         (WebCore::moveCursor):
2083         (WebCore::verticalTextCursor):
2084         (WebCore::cellCursor):
2085         (WebCore::contextMenuCursor):
2086         (WebCore::aliasCursor):
2087         (WebCore::zoomInCursor):
2088         (WebCore::zoomOutCursor):
2089         (WebCore::copyCursor):
2090         (WebCore::noneCursor):
2091         (WebCore::progressCursor):
2092         (WebCore::noDropCursor):
2093         (WebCore::notAllowedCursor):
2094         (WebCore::iBeamCursor):
2095         (WebCore::waitCursor):
2096         (WebCore::helpCursor):
2097         (WebCore::eastResizeCursor):
2098         (WebCore::northResizeCursor):
2099         (WebCore::northEastResizeCursor):
2100         (WebCore::northWestResizeCursor):
2101         (WebCore::southResizeCursor):
2102         (WebCore::southEastResizeCursor):
2103         (WebCore::southWestResizeCursor):
2104         (WebCore::westResizeCursor):
2105         (WebCore::northSouthResizeCursor):
2106         (WebCore::eastWestResizeCursor):
2107         (WebCore::northEastSouthWestResizeCursor):
2108         (WebCore::northWestSouthEastResizeCursor):
2109         (WebCore::columnResizeCursor):
2110         (WebCore::rowResizeCursor):
2111         (WebCore::middlePanningCursor):
2112         (WebCore::eastPanningCursor):
2113         (WebCore::northPanningCursor):
2114         (WebCore::northEastPanningCursor):
2115         (WebCore::northWestPanningCursor):
2116         (WebCore::southPanningCursor):
2117         (WebCore::southEastPanningCursor):
2118         (WebCore::southWestPanningCursor):
2119         (WebCore::westPanningCursor):
2120         (WebCore::grabCursor):
2121         (WebCore::grabbingCursor):
2122         * platform/Language.cpp:
2123         (WebCore::preferredLanguagesOverride):
2124         * platform/LocalizedStrings.cpp:
2125         (WebCore::truncatedStringForLookupMenuItem):
2126         * platform/MIMETypeRegistry.cpp:
2127         (WebCore::mediaMIMETypeMap):
2128         (WebCore::defaultMIMEType):
2129         * platform/SchemeRegistry.cpp:
2130         (WebCore::localURLSchemes):
2131         (WebCore::displayIsolatedURLSchemes):
2132         (WebCore::secureSchemes):
2133         (WebCore::schemesWithUniqueOrigins):
2134         (WebCore::emptyDocumentSchemes):
2135         (WebCore::schemesForbiddenFromDomainRelaxation):
2136         (WebCore::canDisplayOnlyIfCanRequestSchemes):
2137         (WebCore::notAllowingJavascriptURLsSchemes):
2138         (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
2139         (WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
2140         (WebCore::CORSEnabledSchemes):
2141         (WebCore::ContentSecurityPolicyBypassingSchemes):
2142         * platform/ScrollbarTheme.cpp:
2143         (WebCore::ScrollbarTheme::theme):
2144         * platform/URL.cpp:
2145         (WebCore::blankURL):
2146         * platform/animation/Animation.cpp:
2147         (WebCore::Animation::initialName):
2148         * platform/audio/AudioSession.cpp:
2149         (WebCore::AudioSession::sharedSession):
2150         * platform/audio/AudioSession.h:
2151         * platform/audio/HRTFElevation.cpp:
2152         (WebCore::getConcatenatedImpulseResponsesForSubject):
2153         * platform/audio/ios/AudioDestinationIOS.cpp:
2154         (WebCore::audioDestinations):
2155         * platform/graphics/GraphicsLayer.cpp:
2156         (WebCore::repaintRectMap):
2157         * platform/graphics/ImageBuffer.cpp:
2158         (WebCore::ImageBuffer::transformColorSpace):
2159         * platform/graphics/MediaPlayer.cpp:
2160         (WebCore::applicationOctetStream):
2161         (WebCore::textPlain):
2162         (WebCore::codecs):
2163         * platform/graphics/ShadowBlur.cpp:
2164         (WebCore::ScratchBuffer::singleton):
2165         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2166         (WebCore::playerToPrivateMap):
2167         * platform/graphics/filters/SourceAlpha.cpp:
2168         (WebCore::SourceAlpha::effectName):
2169         * platform/graphics/filters/SourceGraphic.cpp:
2170         (WebCore::SourceGraphic::effectName):
2171         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2172         (WebCore::mimeCommonTypesCache):
2173         (WebCore::mimeModernTypesCache):
2174         * platform/ios/CursorIOS.cpp:
2175         (WebCore::cursor):
2176         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
2177         (WebCore::tileControllerMemoryHandler):
2178         * platform/ios/WebCoreMotionManager.mm:
2179         (+[WebCoreMotionManager sharedManager]):
2180         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2181         (WebVideoFullscreenModelVideoElement::updateForEventName):
2182         * platform/ios/wak/WKContentObservation.cpp:
2183         (WebThreadGetObservedContentModifiers):
2184         * platform/mac/DragImageMac.mm:
2185         (WebCore::fontFromNSFont):
2186         * platform/mac/ThemeMac.mm:
2187         (WebCore::platformTheme):
2188         * platform/mac/ThreadCheck.mm:
2189         (WebCoreReportThreadViolation):
2190         * platform/mediastream/mac/AVCaptureDeviceManager.h:
2191         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2192         (WebCore::AVCaptureDeviceManager::singleton):
2193         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2194         (WebCore::RealtimeMediaSourceCenter::platformCenter):
2195         * platform/mock/mediasource/MockBox.cpp:
2196         (WebCore::MockTrackBox::type):
2197         (WebCore::MockInitializationBox::type):
2198         (WebCore::MockSampleBox::type):
2199         * platform/network/HTTPParsers.cpp:
2200         (WebCore::parseXSSProtectionHeader):
2201         * platform/network/ResourceHandle.cpp:
2202         (WebCore::builtinResourceHandleConstructorMap):
2203         (WebCore::builtinResourceHandleSynchronousLoaderMap):
2204         * platform/network/cf/ResourceHandleCFNet.cpp:
2205         (WebCore::allowsAnyHTTPSCertificateHosts):
2206         (WebCore::clientCerts):
2207         * platform/text/AtomicStringKeyedMRUCache.h:
2208         (WebCore::AtomicStringKeyedMRUCache::get):
2209         * platform/text/cf/HyphenationCF.cpp:
2210         (WebCore::cfLocaleCache):
2211         * rendering/RenderBlock.cpp:
2212         (WebCore::continuationOutlineTable):
2213         * rendering/RenderCounter.cpp:
2214         (WebCore::counterMaps):
2215         * rendering/RenderDeprecatedFlexibleBox.cpp:
2216         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2217         * rendering/RenderLayer.cpp:
2218         (WebCore::RenderLayer::drawPlatformResizerImage):
2219         * rendering/RenderScrollbarTheme.cpp:
2220         (WebCore::RenderScrollbarTheme::renderScrollbarTheme):
2221         * rendering/RenderTheme.cpp:
2222         (WebCore::customFocusRingColor):
2223         * rendering/RenderWidget.cpp:
2224         (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
2225         * rendering/shapes/ShapeOutsideInfo.h:
2226         * rendering/style/RenderStyle.cpp:
2227         (WebCore::RenderStyle::hyphenString):
2228         (WebCore::RenderStyle::textEmphasisMarkString):
2229         (WebCore::RenderStyle::initialDashboardRegions):
2230         (WebCore::RenderStyle::noneDashboardRegions):
2231         * rendering/style/RenderStyle.h:
2232         * rendering/svg/RenderSVGPath.cpp:
2233         (WebCore::RenderSVGPath::zeroLengthLinecapPath):
2234         * rendering/svg/RenderSVGShape.cpp:
2235         (WebCore::RenderSVGShape::nonScalingStrokePath):
2236         * rendering/svg/SVGRenderingContext.cpp:
2237         (WebCore::currentContentTransformation):
2238         * rendering/svg/SVGResources.cpp:
2239         (WebCore::clipperFilterMaskerTags):
2240         (WebCore::markerTags):
2241         (WebCore::fillAndStrokeTags):
2242         (WebCore::chainableResourceTags):
2243         * svg/SVGAngle.cpp:
2244         (WebCore::SVGAngle::valueAsString):
2245         * svg/SVGAnimateColorElement.cpp:
2246         (WebCore::attributeValueIsCurrentColor):
2247         * svg/SVGAnimateMotionElement.cpp:
2248         (WebCore::SVGAnimateMotionElement::rotateMode):
2249         * svg/SVGAnimationElement.cpp:
2250         (WebCore::SVGAnimationElement::setCalcMode):
2251         (WebCore::SVGAnimationElement::setAttributeType):
2252         (WebCore::SVGAnimationElement::isAdditive):
2253         (WebCore::SVGAnimationElement::isAccumulated):
2254         (WebCore::inheritsFromProperty):
2255         * svg/SVGFEConvolveMatrixElement.cpp:
2256         (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
2257         (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
2258         (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
2259         (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
2260         * svg/SVGFEDiffuseLightingElement.cpp:
2261         (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
2262         (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
2263         * svg/SVGFEDropShadowElement.cpp:
2264         (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
2265         (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
2266         * svg/SVGFEGaussianBlurElement.cpp:
2267         (WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
2268         (WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
2269         * svg/SVGFEMorphologyElement.cpp:
2270         (WebCore::SVGFEMorphologyElement::radiusXIdentifier):
2271         (WebCore::SVGFEMorphologyElement::radiusYIdentifier):
2272         * svg/SVGFESpecularLightingElement.cpp:
2273         (WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
2274         (WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
2275         * svg/SVGFETurbulenceElement.cpp:
2276         (WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
2277         (WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
2278         * svg/SVGFilterElement.cpp:
2279         (WebCore::SVGFilterElement::filterResXIdentifier):
2280         (WebCore::SVGFilterElement::filterResYIdentifier):
2281         * svg/SVGGlyphMap.h:
2282         (WebCore::SVGGlyphMap::svgGlyphForGlyph):
2283         * svg/SVGLangSpace.cpp:
2284         (WebCore::SVGLangSpace::xmlspace):
2285         (WebCore::SVGLangSpace::addSupportedAttributes):
2286         * svg/SVGMarkerElement.cpp:
2287         (WebCore::SVGMarkerElement::orientTypeIdentifier):
2288         (WebCore::SVGMarkerElement::orientAngleIdentifier):
2289         (WebCore::SVGMarkerElement::synchronizeOrientType):
2290         * svg/SVGStyleElement.cpp:
2291         (WebCore::SVGStyleElement::type):
2292         (WebCore::SVGStyleElement::media):
2293         * svg/SVGTransform.cpp:
2294         (WebCore::SVGTransform::transformTypePrefixForParsing):
2295         * svg/SVGViewSpec.cpp:
2296         (WebCore::SVGViewSpec::viewBoxIdentifier):
2297         (WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
2298         (WebCore::SVGViewSpec::transformIdentifier):
2299         * svg/animation/SVGSMILElement.cpp:
2300         (WebCore::SVGSMILElement::parseClockValue):
2301         (WebCore::SVGSMILElement::isSupportedAttribute):
2302         (WebCore::SVGSMILElement::restart):
2303         (WebCore::SVGSMILElement::fill):
2304         (WebCore::SVGSMILElement::repeatCount):
2305         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
2306
2307 2016-01-08  Zalan Bujtas  <zalan@apple.com>
2308
2309         Absolute positioning -webkit-search-cancel-button crashes Safari.
2310         https://bugs.webkit.org/show_bug.cgi?id=152847
2311         <rdar://problem/24112087>
2312
2313         Reviewed by Simon Fraser.
2314
2315         Do not call offsetFromContainer while resolving the painting position for the search/cancel button renderer.
2316         It skips the static positioned parent input renderer, when the search/cancel renderer is absolute positioned.
2317         This patch also fixes a rendering glitch when the margin-right is > 0.
2318
2319         Test: fast/forms/absolute-positioned-custom-search-cancel-crash.html
2320
2321         * rendering/RenderTheme.h:
2322         (WebCore::RenderTheme::paintSearchFieldCancelButton):
2323         (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
2324         (WebCore::RenderTheme::paintSearchFieldResultsButton):
2325         * rendering/RenderThemeMac.h:
2326         * rendering/RenderThemeMac.mm:
2327         (WebCore::convertToPaintingPosition):
2328         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2329         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
2330         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2331         (WebCore::RenderThemeMac::convertToPaintingRect): Deleted.
2332
2333 2016-01-08  Simon Fraser  <simon.fraser@apple.com>
2334
2335         Add display-list drawing hooks to platform-specific GraphicsContext files
2336         https://bugs.webkit.org/show_bug.cgi?id=152940
2337
2338         Reviewed by Zalan Bujtas.
2339
2340         Call into the display list recorder for top-level entrypoints implemented in platform-specific
2341         files.
2342         
2343         The convention is that if a function begins with "platform", it's not a top-level
2344         entry point, and should only be called when there's a platform context (i.e. not
2345         recording, and not paintingDisabled).
2346         
2347         A few instances are stubbed out until we have a more complete display list implementation.
2348
2349         * platform/graphics/GraphicsContext.cpp:
2350         (WebCore::GraphicsContext::drawText):
2351         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2352         (WebCore::GraphicsContext::getCTM):
2353         (WebCore::GraphicsContext::savePlatformState):
2354         (WebCore::GraphicsContext::restorePlatformState):
2355         (WebCore::GraphicsContext::drawRect):
2356         (WebCore::GraphicsContext::drawNativeImage):
2357         (WebCore::GraphicsContext::drawLine):
2358         (WebCore::GraphicsContext::drawEllipse):
2359         (WebCore::GraphicsContext::drawConvexPolygon):
2360         (WebCore::GraphicsContext::clipConvexPolygon):
2361         (WebCore::GraphicsContext::fillPath):
2362         (WebCore::GraphicsContext::strokePath):
2363         (WebCore::GraphicsContext::fillRect):
2364         (WebCore::GraphicsContext::clip):
2365         (WebCore::GraphicsContext::clipPath):
2366         (WebCore::GraphicsContext::clipBounds):
2367         (WebCore::GraphicsContext::drawLinesForText):
2368         (WebCore::GraphicsContext::roundToDevicePixels):
2369         (WebCore::GraphicsContext::translate):
2370         (WebCore::GraphicsContext::setPlatformStrokeThickness):
2371         (WebCore::GraphicsContext::setPlatformStrokeStyle):
2372         (WebCore::GraphicsContext::concatCTM):
2373         (WebCore::GraphicsContext::setCTM):
2374         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2375         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2376         (WebCore::GraphicsContext::clearRect):
2377         (WebCore::GraphicsContext::strokeRect):
2378         (WebCore::GraphicsContext::setLineCap):
2379         (WebCore::GraphicsContext::setLineDash):
2380         (WebCore::GraphicsContext::setLineJoin):
2381         (WebCore::GraphicsContext::clipOut):
2382         (WebCore::GraphicsContext::rotate):
2383         (WebCore::GraphicsContext::scale):
2384         (WebCore::GraphicsContext::platformFillRoundedRect):
2385         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2386         (WebCore::GraphicsContext::drawPattern):
2387         (WebCore::GraphicsContext::setPlatformShouldAntialias):
2388         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
2389         (WebCore::GraphicsContext::isAcceleratedContext):
2390         * platform/graphics/cg/GraphicsContextCG.cpp:
2391         (WebCore::GraphicsContext::savePlatformState):
2392         (WebCore::GraphicsContext::restorePlatformState):
2393         (WebCore::GraphicsContext::drawNativeImage):
2394         (WebCore::GraphicsContext::drawPattern):
2395         (WebCore::GraphicsContext::drawRect):
2396         (WebCore::GraphicsContext::drawLine):
2397         (WebCore::GraphicsContext::drawEllipse):
2398         (WebCore::GraphicsContext::drawConvexPolygon):
2399         (WebCore::GraphicsContext::clipConvexPolygon):
2400         (WebCore::GraphicsContext::applyStrokePattern):
2401         (WebCore::GraphicsContext::applyFillPattern):
2402         (WebCore::GraphicsContext::drawPath):
2403         (WebCore::GraphicsContext::fillPath):
2404         (WebCore::GraphicsContext::strokePath):
2405         (WebCore::GraphicsContext::fillRect):
2406         (WebCore::GraphicsContext::platformFillRoundedRect):
2407         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2408         (WebCore::GraphicsContext::clip):
2409         (WebCore::GraphicsContext::clipOut):
2410         (WebCore::GraphicsContext::clipPath):
2411         (WebCore::GraphicsContext::clipBounds):
2412         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2413         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2414         (WebCore::GraphicsContext::setPlatformShadow):
2415         (WebCore::GraphicsContext::setMiterLimit):
2416         (WebCore::GraphicsContext::clearRect):
2417         (WebCore::GraphicsContext::strokeRect):
2418         (WebCore::GraphicsContext::setLineCap):
2419         (WebCore::GraphicsContext::setLineDash):
2420         (WebCore::GraphicsContext::setLineJoin):
2421         (WebCore::GraphicsContext::scale):
2422         (WebCore::GraphicsContext::rotate):
2423         (WebCore::GraphicsContext::translate):
2424         (WebCore::GraphicsContext::concatCTM):
2425         (WebCore::GraphicsContext::setCTM):
2426         (WebCore::GraphicsContext::getCTM):
2427         (WebCore::GraphicsContext::roundToDevicePixels):
2428         (WebCore::GraphicsContext::drawLinesForText):
2429         (WebCore::GraphicsContext::setURLForRect):
2430         (WebCore::GraphicsContext::setIsCALayerContext):
2431         (WebCore::GraphicsContext::isCALayerContext):
2432         (WebCore::GraphicsContext::setIsAcceleratedContext):
2433         (WebCore::GraphicsContext::isAcceleratedContext):
2434         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
2435         (WebCore::GraphicsContext::setPlatformStrokeColor):
2436         (WebCore::GraphicsContext::setPlatformStrokeThickness):
2437         (WebCore::GraphicsContext::setPlatformFillColor):
2438         (WebCore::GraphicsContext::setPlatformShouldAntialias):
2439         (WebCore::GraphicsContext::setPlatformShouldSmoothFonts):
2440         (WebCore::GraphicsContext::setPlatformAlpha):
2441         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2442         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
2443         (WebCore::GraphicsContext::platformFillEllipse):
2444         (WebCore::GraphicsContext::platformStrokeEllipse):
2445
2446 2016-01-08  Simon Fraser  <simon.fraser@apple.com>
2447
2448         Add DisplayList hooks into GraphicsContext
2449         https://bugs.webkit.org/show_bug.cgi?id=152932
2450
2451         Reviewed by Zalan Bujtas.
2452
2453         Add the hooks into GraphicsContext that call into the DisplayListRecorder if there
2454         is one.
2455         
2456         Rename size() to something less ambiguous.
2457         
2458         Out-of-line some DisplayList functions so that the header doesn't need to see
2459         DisplayListItems.h.
2460
2461         * platform/graphics/GraphicsContext.cpp:
2462         (WebCore::GraphicsContext::save):
2463         (WebCore::GraphicsContext::restore):
2464         (WebCore::GraphicsContext::setStrokeThickness):
2465         (WebCore::GraphicsContext::setStrokeStyle):
2466         (WebCore::GraphicsContext::setStrokeColor):
2467         (WebCore::GraphicsContext::setShadow):
2468         (WebCore::GraphicsContext::setLegacyShadow):
2469         (WebCore::GraphicsContext::clearShadow):
2470         (WebCore::GraphicsContext::setFillColor):
2471         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
2472         (WebCore::GraphicsContext::setShouldAntialias):
2473         (WebCore::GraphicsContext::setShouldSmoothFonts):
2474         (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
2475         (WebCore::GraphicsContext::setImageInterpolationQuality):
2476         (WebCore::GraphicsContext::setAntialiasedFontDilationEnabled):
2477         (WebCore::GraphicsContext::setStrokePattern):
2478         (WebCore::GraphicsContext::setFillPattern):
2479         (WebCore::GraphicsContext::setStrokeGradient):
2480         (WebCore::GraphicsContext::setFillRule):
2481         (WebCore::GraphicsContext::setFillGradient):
2482         (WebCore::GraphicsContext::beginTransparencyLayer):
2483         (WebCore::GraphicsContext::endTransparencyLayer):
2484         (WebCore::GraphicsContext::drawGlyphs):
2485         (WebCore::GraphicsContext::drawImage):
2486         (WebCore::GraphicsContext::drawTiledImage):
2487         (WebCore::GraphicsContext::setTextDrawingMode):
2488         (WebCore::GraphicsContext::fillRect):
2489         (WebCore::GraphicsContext::fillRoundedRect):
2490         (WebCore::GraphicsContext::setAlpha):
2491         (WebCore::GraphicsContext::setCompositeOperation):
2492         (WebCore::GraphicsContext::setDrawLuminanceMask):
2493         (WebCore::GraphicsContext::applyDeviceScaleFactor):
2494         (WebCore::GraphicsContext::applyState):
2495         * platform/graphics/GraphicsContext.h:
2496         (WebCore::GraphicsContext::setDisplayListRecorder):
2497         (WebCore::GraphicsContext::isRecording):
2498         (WebCore::GraphicsContext::setFillRule): Deleted.
2499         (WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted.
2500         (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted.
2501         (WebCore::GraphicsContext::setDrawLuminanceMask): Deleted.
2502         * platform/graphics/displaylists/DisplayList.cpp:
2503         (WebCore::DisplayList::DisplayList::clear):
2504         (WebCore::DisplayList::DisplayList::removeItemsFromIndex):
2505         * platform/graphics/displaylists/DisplayList.h:
2506         (WebCore::DisplayList::DisplayList::itemCount):
2507         (WebCore::DisplayList::DisplayList::clear): Deleted.
2508         (WebCore::DisplayList::DisplayList::size): Deleted.
2509         (WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
2510         * platform/graphics/displaylists/DisplayListRecorder.cpp:
2511         (WebCore::DisplayList::Recorder::save):
2512         (WebCore::DisplayList::Recorder::restore):
2513         * platform/graphics/displaylists/DisplayListRecorder.h:
2514         (WebCore::DisplayList::Recorder::itemCount):
2515         (WebCore::DisplayList::Recorder::size): Deleted.
2516         * platform/graphics/displaylists/DisplayListReplayer.cpp:
2517         (WebCore::DisplayList::Replayer::replay):
2518
2519 2016-01-08  Brady Eidson  <beidson@apple.com>
2520
2521         Modern IDB: imported/w3c/indexeddb/keyorder.htm times out.
2522         https://bugs.webkit.org/show_bug.cgi?id=152929
2523
2524         Reviewed by Alex Christensen.
2525
2526         No new tests (Existing test now runs in the test harness).
2527
2528         * Modules/indexeddb/client/IDBCursorImpl.cpp:
2529         (WebCore::IDBClient::IDBCursor::setGetResult):
2530
2531 2016-01-08  Simon Fraser  <simon.fraser@apple.com>
2532
2533         Consider painting to be disabled on a GraphicsContext with no platform data, and make updatingControlTints() immutable state
2534         https://bugs.webkit.org/show_bug.cgi?id=152927
2535
2536         Reviewed by Tim Horton.
2537
2538         GraphicsContext had setters for paintingDisabled and updatingControlTints, but neither
2539         were changed dynamically.
2540         
2541         We can eliminate paintingDisabled by simply considering a GraphicsContext that was
2542         created with no platform context to be paint-disabled.
2543         
2544         We make updatingControlTints immutable state by providing a constructor that takes
2545         a "NonPaintingReasons" enum, and doesn't create platform data.
2546         
2547         More functions in platform code were protected by if (paintingDisabled())...
2548
2549         * page/FrameView.cpp:
2550         (WebCore::FrameView::paintControlTints):
2551         * platform/graphics/GraphicsContext.cpp:
2552         (WebCore::GraphicsContext::GraphicsContext):
2553         (WebCore::GraphicsContext::fillRoundedRect):
2554         (WebCore::GraphicsContext::setUpdatingControlTints): Deleted.
2555         (WebCore::GraphicsContext::clip): Deleted.
2556         * platform/graphics/GraphicsContext.h:
2557         (WebCore::GraphicsContext::paintingDisabled):
2558         (WebCore::GraphicsContext::updatingControlTints):
2559         (WebCore::GraphicsContextState::GraphicsContextState): Deleted.
2560         (WebCore::GraphicsContext::setPaintingDisabled): Deleted.
2561         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2562         (WebCore::GraphicsContext::GraphicsContext):
2563         (WebCore::GraphicsContext::platformInit):
2564         * platform/graphics/cg/GraphicsContextCG.cpp:
2565         (WebCore::GraphicsContext::platformInit):
2566         (WebCore::GraphicsContext::savePlatformState):
2567         (WebCore::GraphicsContext::restorePlatformState):
2568         (WebCore::GraphicsContext::drawNativeImage):
2569         (WebCore::GraphicsContext::drawPattern):
2570         (WebCore::GraphicsContext::drawRect):
2571         (WebCore::GraphicsContext::applyStrokePattern):
2572         (WebCore::GraphicsContext::applyFillPattern):
2573         (WebCore::GraphicsContext::clip):
2574         (WebCore::GraphicsContext::clipBounds):
2575         (WebCore::GraphicsContext::setLineDash):
2576         (WebCore::GraphicsContext::roundToDevicePixels):
2577         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
2578         (WebCore::GraphicsContext::setIsCALayerContext):
2579         (WebCore::GraphicsContext::isCALayerContext):
2580         (WebCore::GraphicsContext::setIsAcceleratedContext):
2581         (WebCore::GraphicsContext::isAcceleratedContext):
2582         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
2583         * platform/graphics/win/GraphicsContextCGWin.cpp:
2584         (WebCore::GraphicsContext::platformInit):
2585         (WebCore::GraphicsContext::GraphicsContext): Deleted.
2586         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2587         (WebCore::GraphicsContext::platformInit):
2588         (WebCore::GraphicsContext::GraphicsContext): Deleted.
2589
2590 2016-01-08  Anders Carlsson  <andersca@apple.com>
2591
2592         InputType::findClosestTickMarkValue should return an Optional<Decimal>
2593         https://bugs.webkit.org/show_bug.cgi?id=152931
2594
2595         Reviewed by Andreas Kling.
2596
2597         This will make it possible to get rid of the notion of infinity from Decimal, allowing for more code simplification.
2598
2599         * html/HTMLInputElement.cpp:
2600         (WebCore::HTMLInputElement::findClosestTickMarkValue):
2601         * html/HTMLInputElement.h:
2602         * html/InputType.cpp:
2603         (WebCore::InputType::findClosestTickMarkValue):
2604         * html/InputType.h:
2605         * html/RangeInputType.cpp:
2606         (WebCore::RangeInputType::findClosestTickMarkValue):
2607         * html/RangeInputType.h:
2608         * html/shadow/SliderThumbElement.cpp:
2609         (WebCore::SliderThumbElement::setPositionFromPoint):
2610
2611 2016-01-08  Brady Eidson  <beidson@apple.com>
2612
2613         Modern IDB: IDBBindingUtilities chokes on unicode strings for get/set.
2614         https://bugs.webkit.org/show_bug.cgi?id=152921
2615
2616         Reviewed by Alex Christensen.
2617
2618         No new tests (Covered by existing tests).
2619
2620         * bindings/js/IDBBindingUtilities.cpp:
2621         (WebCore::get): Don't do a potentially lossy utf8() conversion on the string.
2622         (WebCore::set): Ditto.
2623
2624 2016-01-08  Per Arne Vollan  <peavo@outlook.com>
2625
2626         [WinCairo] Support more video formats.
2627         https://bugs.webkit.org/show_bug.cgi?id=152890
2628
2629         Reviewed by Alex Christensen.
2630
2631         Use MediaFoundation api to detect all supported video/audio formats.
2632
2633         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2634         (WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
2635         (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
2636
2637 2016-01-08  Brady Eidson  <beidson@apple.com>
2638
2639         Modern IDB: Blocked event can fire on a delete request even after the last open connection has closed.
2640         https://bugs.webkit.org/show_bug.cgi?id=152896
2641
2642         Reviewed by Alex Christensen.
2643
2644         No new tests (Progression in many tests).
2645
2646         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
2647         (WebCore::IDBClient::IDBFactory::deleteDatabase):
2648         
2649         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2650         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation): Allow for handling 2+ delete operations in a row.
2651         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Ditto.
2652         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient): Call "notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent"
2653           after the connection is actually removed from the set of open connections.
2654         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2655
2656 2016-01-08  Zalan Bujtas  <zalan@apple.com>
2657
2658         Hovering link on http://help.apple.com/appletv/#/ does not show text underline.
2659         https://bugs.webkit.org/show_bug.cgi?id=152906
2660         <rdar://problem/23339617>
2661
2662         Reviewed by Simon Fraser.
2663
2664         GraphicsContext::computeLineBoundsAndAntialiasingModeForText() always integral ceils the origin y position to offset underline text.
2665         This additional visual overflow offset is not taken into account by visualOverflowForDecorations().
2666         Unfortunately we can't compute the exact same offset value while collecting repaint rects, because
2667         computeLineBoundsAndAntialiasingModeForText() uses CTM scaling before adjusting the offset position.
2668         Use 1px (css) bottom offset to cover this underling overflow.
2669
2670         Test: fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html
2671
2672         * platform/graphics/GraphicsContext.cpp:
2673         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
2674         * rendering/SimpleLineLayoutResolver.cpp: Add visual overflow to simple line layout.
2675         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
2676         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
2677         * rendering/SimpleLineLayoutResolver.h:
2678         * style/InlineTextBoxStyle.cpp:
2679         (WebCore::visualOverflowForDecorations):
2680
2681 2016-01-08  Brady Eidson  <beidson@apple.com>
2682
2683         Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
2684         https://bugs.webkit.org/show_bug.cgi?id=152891
2685
2686         Reviewed by Alex Christensen.
2687
2688         No new tests (At least two failing tests now pass).
2689
2690         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2691         (WebCore::IDBClient::IDBRequest::dispatchEvent): Whenever we add the IDBTransaction as an event target,
2692           also add the IDBDatabase.
2693
2694 2016-01-07  Antti Koivisto  <antti@apple.com>
2695
2696         Enable selector filtering for shadow trees
2697         https://bugs.webkit.org/show_bug.cgi?id=152831
2698
2699         Reviewed by Simon Fraser.
2700
2701         Selector filtering doesn't currently work in shadow trees making style resolve for them slow.
2702         This is because SelectorFilter is not in "consistent" state.
2703
2704         This patch moves SelectorFilter ownership from StyleResolver to TreeResolver and guarantees
2705         it is always upadated consistently. It eliminates a bunch of now unnecessary consistency checks
2706         and special cases.
2707
2708         * css/ElementRuleCollector.cpp:
2709         (WebCore::ElementRuleCollector::ElementRuleCollector):
2710
2711             Assert for consistency instead of testing for it.
2712
2713         (WebCore::ElementRuleCollector::matchedResult):
2714         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2715
2716             Selector filter can now be used if it exists.
2717
2718         * css/ElementRuleCollector.h:
2719         (WebCore::ElementRuleCollector::ElementRuleCollector): Deleted.
2720         * css/RuleSet.cpp:
2721         (WebCore::RuleSet::addRule):
2722
2723             Disable selector filtering for custom shadow pseudo rules. They are resolved by shadow DOM resolver
2724             but may contain components matching the normal DOM.
2725
2726         * css/RuleSet.h:
2727         (WebCore::RuleData::descendantSelectorIdentifierHashes):
2728         (WebCore::RuleData::disableSelectorFiltering):
2729         (WebCore::RuleData::compilationStatus):
2730         (WebCore::RuleData::compiledSelectorCodeRef):
2731         * css/SelectorFilter.cpp:
2732         (WebCore::collectElementIdentifierHashes):
2733         (WebCore::SelectorFilter::parentStackIsConsistent):
2734
2735             New consistency conditions. This is now used for asserts only.
2736
2737         (WebCore::SelectorFilter::pushParentStackFrame):
2738         (WebCore::SelectorFilter::popParentStackFrame):
2739
2740             Selector filter only filters the current tree context, replace parentOrShadowHostElement with parentElement.
2741
2742         (WebCore::SelectorFilter::setupParentStack): Deleted.
2743
2744             No longer needed.
2745
2746         (WebCore::SelectorFilter::pushParent):
2747
2748             Remove consistency check. These cases no longer happen.
2749
2750         * css/SelectorFilter.h:
2751         (WebCore::SelectorFilter::popParent):
2752         (WebCore::SelectorFilter::parentStackIsEmpty):
2753         (WebCore::SelectorFilter::fastRejectSelector):
2754         (WebCore::SelectorFilter::parentStackIsConsistent): Deleted.
2755         * css/StyleInvalidationAnalysis.cpp:
2756         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
2757         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
2758         * css/StyleResolver.cpp:
2759         (WebCore::StyleResolver::appendAuthorStyleSheets):
2760         (WebCore::StyleResolver::addKeyframeStyle):
2761         (WebCore::StyleResolver::initElement):
2762         (WebCore::StyleResolver::State::initForStyleResolve):
2763
2764             We no longer owner the selector filter. Move it to State.
2765
2766         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2767         (WebCore::isAtShadowBoundary):
2768         (WebCore::StyleResolver::styleForElement):
2769         (WebCore::StyleResolver::pseudoStyleForElement):
2770         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2771         (WebCore::StyleResolver::pushParentElement): Deleted.
2772         (WebCore::StyleResolver::popParentElement): Deleted.
2773
2774             No need for this logic.
2775
2776         * css/StyleResolver.h:
2777         (WebCore::StyleResolver::ruleSets):
2778         (WebCore::StyleResolver::mediaQueryEvaluator):
2779         (WebCore::StyleResolver::State::document):
2780         (WebCore::StyleResolver::State::setAuthorRollback):
2781         (WebCore::StyleResolver::State::setUserRollback):
2782         (WebCore::StyleResolver::State::selectorFilter):
2783         (WebCore::StyleResolver::state):
2784         (WebCore::checkRegionSelector):
2785         (WebCore::StyleResolver::selectorFilter): Deleted.
2786         (WebCore::StyleResolverParentPusher::StyleResolverParentPusher): Deleted.
2787         (WebCore::StyleResolverParentPusher::push): Deleted.
2788         (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher): Deleted.
2789         * style/StyleTreeResolver.cpp:
2790
2791             This now owns the selector filter for a tree context.
2792
2793         (WebCore::Style::SelectorFilterPusher::SelectorFilterPusher):
2794         (WebCore::Style::SelectorFilterPusher::push):
2795         (WebCore::Style::SelectorFilterPusher::~SelectorFilterPusher):
2796         (WebCore::Style::TreeResolver::TreeResolver):
2797         (WebCore::Style::TreeResolver::styleForElement):
2798         (WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
2799         (WebCore::Style::TreeResolver::createRenderTreeRecursively):
2800         (WebCore::Style::TreeResolver::resolveChildren):
2801         (WebCore::Style::TreeResolver::resolveRecursively):
2802
2803             Push the filter in a few more places to keep it consistent in shadow trees.
2804
2805         * style/StyleTreeResolver.h:
2806
2807 2016-01-07  Zalan Bujtas  <zalan@apple.com>
2808
2809         Move computeLineBoundsForText from GraphicsContext* to GraphicsContext.
2810         https://bugs.webkit.org/show_bug.cgi?id=152882
2811
2812         Reviewed by Simon Fraser.
2813
2814         There is nothing platform specific about it.
2815
2816         No change in functionality.
2817
2818         * platform/graphics/GraphicsContext.cpp:
2819         (WebCore::GraphicsContext::computeUnderlineBoundsForText): Rename to reflect its usage.
2820         * platform/graphics/GraphicsContext.h:
2821         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2822         (WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
2823         * platform/graphics/cg/GraphicsContextCG.cpp:
2824         (WebCore::GraphicsContext::drawLinesForText):
2825         (WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
2826         * rendering/TextDecorationPainter.cpp:
2827         (WebCore::drawSkipInkUnderline):
2828
2829 2016-01-07  Brady Eidson  <beidson@apple.com>
2830
2831         Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as its target.
2832         https://bugs.webkit.org/show_bug.cgi?id=152875
2833
2834         Reviewed by Alex Christensen.
2835
2836         No new tests (At least 2 failing tests now pass).
2837
2838         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2839         (WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
2840
2841         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2842         (WebCore::IDBClient::IDBRequest::dispatchEvent): Only add the transaction and database as potential
2843           targets for this event if it is *not* the success-after-open event.
2844         * Modules/indexeddb/client/IDBRequestImpl.h:
2845
2846 2016-01-07  Brent Fulgham  <bfulgham@apple.com>
2847
2848         Correct missing EXT_sRGB Format Handling
2849         https://bugs.webkit.org/show_bug.cgi?id=152876
2850         <rdar://problem/23284389>
2851
2852         Reviewed by Alex Christensen.
2853
2854         Tested by WebGL 1.0.4 suite.
2855
2856         * platform/graphics/GraphicsContext3D.cpp:
2857         (getDataFormat): Handle missing SRGB and SRGB_ALPHA cases.
2858         * platform/graphics/GraphicsContext3D.h: Add missing SRGB_ALPHA value from the Khronos standard.
2859         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2860         (WebCore::GraphicsContext3D::texImage2D): Add an assertion that we are not being handed
2861         an internal format to a method that works with normal formats.
2862
2863 2016-01-07  Simon Fraser  <simon.fraser@apple.com>
2864
2865         Use an appropriate buffer format for swipe snapshots
2866         https://bugs.webkit.org/show_bug.cgi?id=152880
2867         rdar://problem/23728299
2868
2869         Reviewed by Tim Horton.
2870
2871         Choose an appropriate buffer format for swipe snapshots, and avoid converting
2872         them to YUV422.
2873
2874         * platform/graphics/cocoa/IOSurface.h:
2875         * platform/graphics/cocoa/IOSurface.mm:
2876         (IOSurface::allowConversionFromFormatToFormat):
2877
2878 2016-01-07  Jer Noble  <jer.noble@apple.com>
2879
2880         [EME] Secure stop information not written to disk
2881         https://bugs.webkit.org/show_bug.cgi?id=152855
2882
2883         Reviewed by Eric Carlson.
2884
2885         Two separate bugs for the two APIs provided by AVFoundation. For the AVStreamSession path,
2886         we were not calling the lazy-creation function which creates the AVStreamSession, and were
2887         rather accessing the ivar directly. For the AVContentKeySession, we were not creating the
2888         intermediate paths containing the secure stop database.
2889
2890         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2891         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
2892         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2893         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
2894
2895 2016-01-07  Zalan Bujtas  <zalan@apple.com>
2896
2897         Use wavy offset for decoration painting when line style is TextDecorationStyleWavy.
2898         https://bugs.webkit.org/show_bug.cgi?id=152856
2899
2900         Reviewed by Simon Fraser.
2901
2902         No change in functionality.
2903
2904         * rendering/TextDecorationPainter.cpp:
2905         (WebCore::TextDecorationPainter::paintTextDecoration):
2906
2907 2016-01-07  Brady Eidson  <beidson@apple.com>
2908
2909         Modern IDB: Various imported/w3c/indexeddb tests fail due to expecting the wrong exception.
2910         https://bugs.webkit.org/show_bug.cgi?id=152866
2911
2912         Reviewed by Alex Christensen.
2913
2914         No new tests (5 skipped tests now pass).
2915
2916         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2917         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Reorder the exceptions, violating the spec but matching
2918           a vast majority of browsers.
2919         (WebCore::IDBClient::IDBObjectStore::deleteFunction): Ditto.
2920         (WebCore::IDBClient::IDBObjectStore::clear): Ditto.
2921         (WebCore::IDBClient::IDBObjectStore::doCount): Ditto.
2922
2923 2016-01-07  Zalan Bujtas  <zalan@apple.com>
2924
2925         Remove unused shouldAntialias parameter from GraphicsContext::computeLineBoundsAndAntialiasingModeForText()
2926         https://bugs.webkit.org/show_bug.cgi?id=152859
2927
2928         Reviewed by Simon Fraser.
2929
2930         No change in functionality.
2931
2932         * platform/graphics/GraphicsContext.cpp:
2933         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
2934         * platform/graphics/GraphicsContext.h:
2935         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2936         (WebCore::GraphicsContext::computeLineBoundsForText):
2937         (WebCore::GraphicsContext::drawLinesForText):
2938         * platform/graphics/cg/GraphicsContextCG.cpp:
2939         (WebCore::GraphicsContext::computeLineBoundsForText):
2940         (WebCore::GraphicsContext::drawLinesForText):
2941
2942 2016-01-07  Brady Eidson  <beidson@apple.com>
2943
2944         Modern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
2945         https://bugs.webkit.org/show_bug.cgi?id=152849
2946
2947         Reviewed by Alex Christensen.
2948
2949         No new tests (At least one failing test now passes).
2950
2951         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
2952         (WebCore::IDBServer::MemoryIndexCursor::iterate): Don't allow returning an iterator outside of
2953           the cursor's assigned range.
2954
2955 2016-01-07  Zalan Bujtas  <zalan@apple.com>
2956
2957         Incorrect position: fixed; rendering when child of position:relative/sticky.
2958         https://bugs.webkit.org/show_bug.cgi?id=147284
2959
2960         Reviewed by Simon Fraser and David Hyatt.
2961
2962         Computing logical left for positioned objects should take the relative positioned ancestors' offset
2963         into account.
2964
2965         Tests: fast/block/positioning/fixed-container-with-relative-parent.html
2966                fast/block/positioning/fixed-container-with-sticky-parent.html
2967
2968         * rendering/RenderBox.cpp:
2969         (WebCore::computeInlineStaticDistance):
2970
2971 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
2972
2973         Initial implementation files for display-list recording and playback
2974         https://bugs.webkit.org/show_bug.cgi?id=152816
2975
2976         Reviewed by Zalan Bujtas.
2977
2978         Add files for:
2979         - DisplayList, a class that holds a vector of display items, and in the future will hold metadata
2980           on the list for optimizations etc.
2981         - DisplayList::Recorder, the outward-facing recording API which GraphicsContext will
2982           call into.
2983         - DisplayList::Replayer, which plays back a DisplayList, possibly applying optimizations.
2984         - Various DisplayList::Items, one type for each display list operation. They cover most of the
2985           GraphicsContext functionality, other than clipping to an image buffer. Text drawing is stubbed
2986           out for now.
2987
2988         Added a "DisplayLists" log channel.
2989
2990         Added GraphicsContextState functions for tracking state deltas with change bits. It may
2991         make sense to combine GraphicsContextStateChange and GraphicsContextState, and use the
2992         dirty bits in non-display-list drawing as well.
2993
2994         * CMakeLists.txt:
2995         * WebCore.xcodeproj/project.pbxproj:
2996         * platform/Logging.h:
2997         * platform/graphics/GraphicsContext.h:
2998         * platform/graphics/displaylists/DisplayList.cpp: Added.
2999         (WebCore::DisplayList::DisplayList::description):
3000         (WebCore::DisplayList::DisplayList::dump):
3001         (WebCore::operator<<):
3002         * platform/graphics/displaylists/DisplayListItems.cpp: Added.
3003         * platform/graphics/displaylists/DisplayListItems.h: Added.
3004         * platform/graphics/displaylists/DisplayListRecorder.cpp: Added.
3005         * platform/graphics/displaylists/DisplayListRecorder.h: Added.
3006         * platform/graphics/displaylists/DisplayListReplayer.cpp: Added.
3007         (WebCore::DisplayList::Replayer::Replayer):
3008         (WebCore::DisplayList::Replayer::~Replayer):
3009         (WebCore::DisplayList::Replayer::replay):
3010         * platform/graphics/displaylists/DisplayListReplayer.h: Added.
3011
3012 2016-01-07  Chris Dumez  <cdumez@apple.com>
3013
3014         Directly-composited animated GIFs never resume once scrolled offscreen
3015         https://bugs.webkit.org/show_bug.cgi?id=152817
3016         <rdar://problem/19982020>
3017
3018         Reviewed by Daniel Bates.
3019
3020         Directly-composited animated GIFs would never resume once scrolled
3021         offscreen. This is because calling repaint() in this case would not
3022         cause BitmapImage::draw() to be called and the animation would thus
3023         not be resumed. To address the problem,
3024         repaintForPausedImageAnimationsIfNeeded() now calls
3025         RenderBoxModelObject::contentChanged(ImageChanged) in addition to
3026         repaint() to make sure the animation actually gets resumed, even in
3027         the directly-composited animated GIF case.
3028
3029         Test: fast/images/composited-animated-gif-outside-viewport.html
3030
3031         * platform/graphics/BitmapImage.h:
3032         Make currentFrame() public so it can be exposed via Internals for the
3033         purpose of testing.
3034
3035         * rendering/RenderElement.cpp:
3036         (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded):
3037         Call RenderBoxModelObject::contentChanged(ImageChanged) in addition to
3038         calling repaint() to make sure the animation actually gets resumed in
3039         the directly-composited animated GIFs case.
3040
3041         * testing/Internals.cpp:
3042         (WebCore::Internals::imageFrameIndex):
3043         * testing/Internals.h:
3044         * testing/Internals.idl:
3045         Expose new "unsigned long imageFrameIndex(Element)" operation on
3046         Internals so layout tests can better check if an image is actually
3047         animating. Previously, we would rely on the output of
3048         internals.hasPausedImageAnimations(Element) but this is not sufficient
3049         to cover this bug as our rendering code believed it has resumed the
3050         animations but the GIF was not actually animating due to it being
3051         directly-composited.
3052
3053 2016-01-07  Michael Catanzaro  <mcatanzaro@igalia.com>
3054
3055         [SOUP] Consider reducing max simultaneous connections
3056         https://bugs.webkit.org/show_bug.cgi?id=137282
3057
3058         Reviewed by Carlos Garcia Campos.
3059
3060         Reduce max simultaneous connections from 35 to 17, because (a) all major browsers except
3061         Chrome use 17, and (b) Chrome uses 10. The only reason we previously used 35 was that other
3062         browsers were using 35 at the time.
3063
3064         * platform/network/soup/SoupNetworkSession.cpp:
3065         (WebCore::SoupNetworkSession::SoupNetworkSession):
3066
3067 2016-01-06  Antti Koivisto  <antti@apple.com>
3068
3069         Factor free standing tree style resolve functions into a class
3070         https://bugs.webkit.org/show_bug.cgi?id=152786
3071
3072         Reviewed by Simon Fraser.
3073
3074         Factor the free standing tree style resolve functions into a class that can keep state.
3075         Style::TreeResolver instances resolve a single tree scope. It is instantiated for resolving
3076         the document style and then recursively for each encountered shadow tree.
3077
3078         This will enable new features and optimizations later.
3079
3080         * dom/Document.cpp:
3081         (WebCore::Document::recalcStyle):
3082
3083             Move the root style computation code back to Document. It fits better here and avoid some
3084             awkwardness with style resolver construction order.
3085
3086         * style/StyleResolveTree.cpp:
3087         (WebCore::Style::TreeResolver::TreeResolver):
3088
3089             TreeResolver knows the current tree context and the StyleResolver to use for it.
3090             Switch the functions to use these instead of recomputing them repeatedly.
3091
3092         (WebCore::Style::shouldCreateRenderer):
3093         (WebCore::Style::TreeResolver::styleForElement):
3094         (WebCore::Style::moveToFlowThreadIfNeeded):
3095         (WebCore::Style::TreeResolver::createRenderer):
3096         (WebCore::Style::updateTextRendererAfterContentChange):
3097         (WebCore::Style::TreeResolver::createRenderTreeForChildren):
3098         (WebCore::Style::TreeResolver::createRenderTreeForShadowRoot):
3099         (WebCore::Style::needsPseudoElement):
3100         (WebCore::Style::TreeResolver::createRenderTreeForBeforeOrAfterPseudoElement):
3101         (WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
3102         (WebCore::Style::TreeResolver::createRenderTreeRecursively):
3103
3104             Rename to reduce the use of confusing "attach" terminology.
3105
3106         (WebCore::Style::pseudoStyleCacheIsInvalid):
3107         (WebCore::Style::TreeResolver::resolveLocally):
3108         (WebCore::Style::resolveTextNode):
3109         (WebCore::Style::TreeResolver::resolveChildAtShadowBoundary):
3110         (WebCore::Style::TreeResolver::resolveShadowTree):
3111         (WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement):
3112         (WebCore::Style::TreeResolver::resolveChildren):
3113         (WebCore::Style::TreeResolver::resolveSlotAssignees):
3114         (WebCore::Style::TreeResolver::resolveRecursively):
3115         (WebCore::Style::TreeResolver::resolve):
3116         (WebCore::Style::detachRenderTree):
3117         (WebCore::Style::styleForElement): Deleted.
3118         (WebCore::Style::createRendererIfNeeded): Deleted.
3119         (WebCore::Style::attachChildren): Deleted.
3120         (WebCore::Style::attachShadowRoot): Deleted.
3121         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Deleted.
3122         (WebCore::Style::attachSlotAssignees): Deleted.
3123         (WebCore::Style::attachRenderTree): Deleted.
3124         (WebCore::Style::resolveLocal): Deleted.
3125         (WebCore::Style::resolveChildAtShadowBoundary): Deleted.
3126         (WebCore::Style::resolveShadowTree): Deleted.
3127         (WebCore::Style::updateBeforeOrAfterPseudoElement): Deleted.
3128         (WebCore::Style::resolveChildren): Deleted.
3129         (WebCore::Style::resolveSlotAssignees): Deleted.
3130         (WebCore::Style::resolveTree): Deleted.
3131         * style/StyleResolveTree.h:
3132
3133 2016-01-07  Doug Russell  <d_russell@apple.com>
3134
3135         AX: AXObjectCacheMac is passing WebCore enum values directly to VoiceOver
3136         https://bugs.webkit.org/show_bug.cgi?id=151755
3137
3138         Reviewed by Chris Fleizach.
3139
3140         No new tests, covered by existing tests.
3141
3142         * accessibility/mac/AXObjectCacheMac.mm:
3143         (platformChangeTypeForWebCoreChangeType):
3144         (platformEditTypeForWebCoreEditType):
3145         (platformDirectionForWebCoreDirection):
3146         (platformGranularityForWebCoreGranularity):
3147         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3148         (WebCore::textReplacementChangeDictionary):
3149         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3150
3151 2016-01-06  Brady Eidson  <beidson@apple.com>
3152
3153         Modern IDB: Fix up IDBDatabaseIdentifier hash issues.
3154         https://bugs.webkit.org/show_bug.cgi?id=152822
3155
3156         Reviewed by Alex Christensen.
3157
3158         No new tests (No explicitly testable behavior change, existing tests pass, flakiness will be reduced).
3159
3160         * Modules/indexeddb/IDBDatabaseIdentifier.h:
3161         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
3162         (WebCore::IDBDatabaseIdentifier::isEmpty):
3163         (WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):
3164         * page/SecurityOriginData.h:
3165
3166 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
3167
3168         Sort the project file.
3169
3170         * WebCore.xcodeproj/project.pbxproj:
3171
3172 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
3173
3174         Add a setting and preferences to enable display-list drawing. Does nothing yet.
3175         https://bugs.webkit.org/show_bug.cgi?id=152807
3176
3177         Reviewed by Zalan Bujtas.
3178
3179         Setting for display-list drawing.
3180
3181         * page/Settings.in:
3182
3183 2016-01-06  Eric Carlson  <eric.carlson@apple.com>
3184
3185         AirPlay route availability event not always sent
3186         https://bugs.webkit.org/show_bug.cgi?id=152802
3187
3188         Reviewed by Jer Noble.
3189
3190         Test: media/airplay-target-availability.html
3191
3192         * Modules/mediasession/WebMediaSessionManager.cpp:
3193         (WebCore::mediaProducerStateString): Log the new flags.
3194         (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule a client reconfiguration if
3195           the 'requires monitoring', 'has listener', or 'has audio or video' flags have changed.
3196         (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Start monitoring if
3197           at least one client has a listener and at least one has audio/video.
3198
3199         * html/HTMLMediaElement.cpp:
3200         (WebCore::HTMLMediaElement::mediaState): Set new flags.
3201         * html/HTMLMediaElement.h:
3202
3203         * page/MediaProducer.h: Define new flags. Add new state enum.
3204
3205         * platform/graphics/MediaPlaybackTargetContext.h: Initial state is "Unknown".
3206
3207         * platform/mock/MediaPlaybackTargetMock.h:
3208         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
3209         (WebCore::MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable): Enums not bitfields.
3210         (WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets): Ditto. Don't make
3211           device change callback if the device state is "Unknown".
3212         (WebCore::MediaPlaybackTargetPickerMock::setState): Ditto.
3213         * platform/mock/MediaPlaybackTargetPickerMock.h:
3214
3215         * testing/Internals.cpp:
3216         (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Support new state.
3217
3218 2016-01-06  Brady Eidson  <beidson@apple.com>
3219
3220         Modern IDB: storage/indexeddb/odd-strings.html is flaky.
3221         https://bugs.webkit.org/show_bug.cgi?id=152800
3222
3223         Reviewed by Alex Christensen.
3224
3225         No new tests (Existing flaky test is now rock solid and unskipped).
3226
3227         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3228         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
3229         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer): Only refuse to close in the server if there
3230           are active transactions. In the case of page navigation where stop() has been called on active DOM objects,
3231           there will never be any active transactions.
3232         
3233         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3234         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
3235
3236 2016-01-06  Brady Eidson  <beidson@apple.com>
3237
3238         Modern IDB: storage/indexeddb/intversion-gated-on-delete.html is flaky.
3239         https://bugs.webkit.org/show_bug.cgi?id=152795
3240
3241         Reviewed by Alex Christensen.
3242
3243         No new tests (At least one failing test now passes).
3244
3245         Change the HashSet of open connection into a ListHashSet.
3246         
3247         This enforces a reliable order of event delivery, which this test relies on, 
3248         and which seems better in general.
3249
3250         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3251         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
3252         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3253
3254 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
3255
3256         [iOS] Revert overflow:hidden on the body affecting viewport scale (r186786)
3257         https://bugs.webkit.org/show_bug.cgi?id=152803
3258         rdar://problem/22242515
3259
3260         Reviewed by Tim Horton.
3261
3262         You can't assume that if an author uses overflow:hidden on the body, they have no
3263         content outside the body that is important. Sites like Google Translate put
3264         abspos elements outside the body.
3265         
3266         So revert the change.
3267
3268         * page/FrameView.cpp:
3269         (WebCore::FrameView::contentsSizeRespectingOverflow): Deleted.
3270         * page/FrameView.h:
3271
3272 2016-01-06  Brent Fulgham  <bfulgham@apple.com>
3273
3274         Port blocking bypass issue using 307 redirect
3275         https://bugs.webkit.org/show_bug.cgi?id=152801
3276         <rdar://problem/24048554>
3277
3278         Reviewed by Anders Carlsson.
3279
3280         Tested by http/tests/security/blocked-on-redirect.html.
3281
3282         Make sure that 307 redirects check the requested URL via 'portAllowed'. 
3283
3284         * loader/DocumentLoader.cpp:
3285         (WebCore::DocumentLoader::willSendRequest): Confirm that the requested port
3286         is valid, and block load if it is not.
3287         * loader/FrameLoader.cpp:
3288         (WebCore::FrameLoader::reportBlockedPortFailed): Added.
3289         (WebCore::FrameLoader::blockedError): Added.
3290         * loader/FrameLoader.h:
3291
3292 2016-01-06  Myles C. Maxfield  <mmaxfield@apple.com>
3293
3294         [Cocoa] Tiny cleanup in FontPlatformData::ctFont()
3295         https://bugs.webkit.org/show_bug.cgi?id=152793
3296
3297         Reviewed by Zalan Bujtas.
3298
3299         No new tests because there is no behavior change.
3300
3301         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3302         (WebCore::FontPlatformData::ctFont):
3303
3304 2016-01-06  Brady Eidson  <beidson@apple.com>
3305
3306         Modern IDB: storage/indexeddb/transaction-scope-sequencing.html fails
3307         https://bugs.webkit.org/show_bug.cgi?id=152775
3308
3309         Reviewed by Alex Christensen.
3310
3311         No new tests (At least one failing test now passes, plus changes to another existing test).
3312         
3313         Any transaction enqueued after a read-write transaction whose scope overlaps with
3314         that read-write transaction cannot run until after that read-write transaction runs.
3315         
3316         Additionally, read-only transactions were actually sometimes running even though their scopes
3317         overlapped with a running read-write transaction.
3318         
3319         This patch fixes both of those issues.
3320     
3321         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3322         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
3323         (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
3324         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
3325         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3326
3327 2016-01-06  Zalan Bujtas  <zalan@apple.com>
3328
3329         Float with media query positioned incorrectly after window resize.
3330         https://bugs.webkit.org/show_bug.cgi?id=152558
3331
3332         Reviewed by Simon Fraser and David Hyatt.
3333
3334         This patch ensures that when a renderer becomes floated, it is moved
3335         to the right containing block.
3336         When this floated renderer's previous sibling is an anonymous block, it needs
3337         to be reparented so that the float is positioned as if there was no anonymous block at all.
3338
3339         Test: fast/block/float/float-with-anonymous-previous-sibling.html
3340
3341         * rendering/RenderElement.cpp:
3342         (WebCore::RenderElement::styleDidChange):
3343
3344 2016-01-06  Zalan Bujtas  <zalan@apple.com>
3345
3346         isAnonymousInlineBlock() should exclude any ruby content.
3347         https://bugs.webkit.org/show_bug.cgi?id=152648
3348         <rdar://problem/23872549>
3349
3350         Reviewed by David Hyatt.
3351
3352         isAnonymousInlineBlock is designed for the new Block-Inside-Inline Model
3353         and all other anonymous inline-block renderers (including Ruby) should bail out of it.
3354         (see webkit.org/b/143145)
3355
3356         Test: fast/ruby/ruby-inline-margin-collapse-crash.html
3357
3358         * rendering/RenderObject.cpp:
3359         (WebCore::RenderObject::isAnonymousInlineBlock):
3360         * rendering/RenderObject.h:
3361         (WebCore::RenderObject::isAnonymousInlineBlock): Deleted.
3362
3363 2016-01-05  Zalan Bujtas  <zalan@apple.com>
3364
3365         showRenderTree: add inline-block/inline/block column.
3366         https://bugs.webkit.org/show_bug.cgi?id=152771
3367
3368         Reviewed by Simon Fraser.
3369
3370         The name of the renderer (RenderBlock etc) does not always reflect the associated display type.
3371
3372         No change in functionality.
3373
3374         * rendering/RenderObject.cpp:
3375         (WebCore::showRenderTreeLegend):
3376         (WebCore::RenderObject::showRenderObject):
3377
3378 2016-01-05  Simon Fraser  <simon.fraser@apple.com>
3379
3380         Move ImageBuffer::clip() code into GraphicsContext
3381         https://bugs.webkit.org/show_bug.cgi?id=152769
3382
3383         Reviewed by Zalan Bujtas.
3384
3385         For CG, GraphicsContext had clipToNativeImage(PassNativeImagePtr...), which
3386         was ugly and platform-specific.
3387         
3388         Fix by moving code from ImageBuffer::clip() for CG and Cairo into the platform-specific
3389         GraphicsContext implementations. This required some minor refactoring of scaleSizeToUserSpace()
3390         in ImageBufferCG.
3391
3392         * platform/graphics/GraphicsContext.cpp:
3393         (WebCore::GraphicsContext::clipToImageBuffer): Deleted.
3394         * platform/graphics/ImageBuffer.cpp:
3395         (WebCore::ImageBuffer::sizeForDestinationSize):
3396         * platform/graphics/ImageBuffer.h:
3397         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3398         (WebCore::GraphicsContext::clipToImageBuffer):
3399         * platform/graphics/cairo/ImageBufferCairo.cpp:
3400         (WebCore::ImageBuffer::clip): Deleted.
3401         * platform/graphics/cg/GraphicsContextCG.cpp:
3402         (WebCore::GraphicsContext::clipToImageBuffer):
3403         (WebCore::GraphicsContext::clipToNativeImage): Deleted.
3404         * platform/graphics/cg/ImageBufferCG.cpp:
3405         (WebCore::ImageBuffer::ImageBuffer):
3406         (WebCore::ImageBuffer::sizeForDestinationSize):
3407         (WebCore::ImageBuffer::putByteArray):
3408         (WebCore::ImageBuffer::toDataURL):
3409         (WebCore::ImageBuffer::clip): Deleted.
3410
3411 2016-01-05  Simon Fraser  <simon.fraser@apple.com>
3412
3413         Remove GraphicsContext::drawJoinedLines()
3414         https://bugs.webkit.org/show_bug.cgi?id=152764
3415
3416         Reviewed by Zalan Bujtas.
3417
3418         GraphicsContext::drawJoinedLines() was only used by iOS form-control drawing
3419         and polluted GraphicsContext with platform-specific types.
3420
3421         Rewrite RenderThemeIOS::paintCheckboxDecorations() to use the CGContextRef directly.
3422
3423         * platform/graphics/GraphicsContext.h:
3424         * platform/graphics/cg/GraphicsContextCG.cpp:
3425         (WebCore::GraphicsContext::drawJoinedLines): Deleted.
3426         * rendering/RenderThemeIOS.mm: