Modern IDB: Using existing database info from SQLite backing store is busted.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-02-26  Brady Eidson  <beidson@apple.com>
2
3         Modern IDB: Using existing database info from SQLite backing store is busted.
4         <rdar://problem/24848143> and https://bugs.webkit.org/show_bug.cgi?id=154735
5
6         Reviewed by Alex Christensen.
7
8         No new tests.
9         
10         Reproducing the bug requires having a known database on disk *before* launching the DatabaseProcess to
11         read in the existing IDBDatabaseInfo.
12         
13         Our automated infrastructure currently has no way of testing this.
14
15         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
16         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
17         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
18         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): Do the optional migrate on
19           the IndexRecords table here; *every* time we open a SQLite backing store.
20         (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): Deleted.
21         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
22         (WebCore::IDBDatabaseInfo::isolatedCopy): Copy the entire object, not just name/version.
23
24 2016-02-25  Gavin Barraclough  <barraclough@apple.com>
25
26         RefCounter value changed callback should be called on all changes (not just zero edge).
27         https://bugs.webkit.org/show_bug.cgi?id=154699
28
29         Reviewed by Anders Carlsson.
30
31         RefCounter currently only triggers a callback when the count goes from zero
32         to non-zero and vice-versa. Change that, to be useful to more clients.
33
34         * page/PageThrottler.cpp:
35         (WebCore::PageThrottler::PageThrottler):
36             - Updated for change in RefCounter callback siganture.
37         * platform/VNodeTracker.cpp:
38         (WebCore::VNodeTracker::VNodeTracker):
39             - Can now use RefCounter callback to trigger checkPressureState().
40         (WebCore::VNodeTracker::pressureWarningTimerFired):
41             - RefCounter count is now a size_t (%d -> %ul).
42         * platform/VNodeTracker.h:
43             - simplified VNodeTracker::token() [no longer needs to call checkPressureState()].
44
45 2016-02-26  Andreas Kling  <akling@apple.com>
46
47         Remove unused CFNetwork disk cache mmap optimization in WebKit2.
48         <https://webkit.org/b/154727>
49
50         Reviewed by Darin Adler.
51
52         Remove some now-unused SPI.
53
54         * platform/spi/cf/CFNetworkSPI.h:
55
56 2016-02-26  Commit Queue  <commit-queue@webkit.org>
57
58         Unreviewed, rolling out r197167.
59         https://bugs.webkit.org/show_bug.cgi?id=154730
60
61         This change broke the Mac build (Requested by ryanhaddad on
62         #webkit).
63
64         Reverted changeset:
65
66         "REGRESSION (188611): Search field Cancel button should not
67         overlap search text on extensions page."
68         https://bugs.webkit.org/show_bug.cgi?id=154692
69         http://trac.webkit.org/changeset/197167
70
71 2016-02-26  Martin Robinson  <mrobinson@igalia.com>
72
73         Remove libqcms support
74         https://bugs.webkit.org/show_bug.cgi?id=154707
75
76         Reviewed by Žan Doberšek.
77
78         No new tests. This change simply removes dead code.
79
80         * platform/image-decoders/ImageDecoder.h: Remove QCMS support.
81         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Deleted.
82         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Remove QCMS support.
83         (WebCore::JPEGImageReader::JPEGImageReader): Deleted.
84         (WebCore::JPEGImageReader::close): Deleted.
85         (WebCore::JPEGImageReader::decode): Deleted.
86         (WebCore::JPEGImageReader::colorTransform): Deleted.
87         (WebCore::JPEGImageReader::createColorTransform): Deleted.
88         (WebCore::JPEGImageDecoder::outputScanlines): Deleted.
89         * platform/image-decoders/png/PNGImageDecoder.cpp: Remove QCMS support.
90         (WebCore::PNGImageReader::PNGImageReader): Deleted.
91         (WebCore::PNGImageReader::close): Deleted.
92         (WebCore::PNGImageReader::rowBuffer): Deleted.
93         (WebCore::PNGImageReader::createRowBuffer): Deleted.
94         (WebCore::PNGImageReader::colorTransform): Deleted.
95         (WebCore::PNGImageReader::createColorTransform): Deleted.
96         (WebCore::PNGImageDecoder::headerAvailable): Deleted.
97         (WebCore::PNGImageDecoder::rowAvailable): Deleted.
98         (WebCore::PNGImageDecoder::frameComplete): Deleted.
99         * platform/image-decoders/webp/WEBPImageDecoder.cpp: Remove QCMS support.
100         (WebCore::WEBPImageDecoder::decode): Remove QCMS support.
101         (WebCore::WEBPImageDecoder::WEBPImageDecoder): Deleted.
102         (WebCore::WEBPImageDecoder::clear): Deleted.
103         (WebCore::WEBPImageDecoder::createColorTransform): Deleted.
104         (WebCore::WEBPImageDecoder::readColorProfile): Deleted.
105         (WebCore::WEBPImageDecoder::applyColorProfile): Deleted.
106         * platform/image-decoders/webp/WEBPImageDecoder.h: Remove QCMS support.
107         (WebCore::WEBPImageDecoder::colorTransform): Deleted.
108
109 2016-02-26  Zalan Bujtas  <zalan@apple.com>
110
111         RenderTheme::controlSize* methods should take const RenderStyle&.
112         https://bugs.webkit.org/show_bug.cgi?id=154708
113
114         Reviewed by Darin Adler.
115
116         No change in functionality.
117
118         * rendering/RenderTheme.h:
119         (WebCore::RenderTheme::minimumMenuListSize):
120         (WebCore::RenderTheme::popupInternalPaddingLeft):
121         (WebCore::RenderTheme::popupInternalPaddingRight):
122         (WebCore::RenderTheme::popupInternalPaddingTop):
123         (WebCore::RenderTheme::popupInternalPaddingBottom):
124         * rendering/RenderThemeMac.h:
125         * rendering/RenderThemeMac.mm:
126         (WebCore::RenderThemeMac::controlSizeForFont):
127         (WebCore::RenderThemeMac::sizeForFont):
128         (WebCore::RenderThemeMac::sizeForSystemFont):
129         (WebCore::RenderThemeMac::controlSizeForSystemFont):
130         (WebCore::RenderThemeMac::minimumProgressBarHeight):
131         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
132         (WebCore::RenderThemeMac::popupInternalPaddingRight):
133         (WebCore::RenderThemeMac::popupInternalPaddingTop):
134         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
135         (WebCore::RenderThemeMac::minimumMenuListSize):
136
137 2016-02-26  Zalan Bujtas  <zalan@apple.com>
138
139         REGRESSION (188611): Search field Cancel button should not overlap search text on extensions page.
140         https://bugs.webkit.org/show_bug.cgi?id=154692
141         <rdar://problem/22840453>
142
143         Reviewed by Brent Fulgham.
144
145         Adjust the cancel button position using the actual size of the cancel button.
146
147         When the input box and the font height trigger different cancel button sizes, we need to readjust
148         the rectangle returned by cancelButtonRectForBounds.
149         This fixes both the mispositioned cancel button and the squared off icon when the input field is zoomed all the way in.
150
151         Covered by existing tests.
152
153         * rendering/RenderThemeMac.mm:
154         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
155         (WebCore::RenderThemeMac::cancelButtonSizes): Update button size.
156
157 2016-02-25  Antti Koivisto  <antti@apple.com>
158
159         Implement ::slotted pseudo element
160         https://bugs.webkit.org/show_bug.cgi?id=149441
161         <rdar://problem/22731987>
162
163         Reviewed by Andreas Kling.
164
165         Based on latest in https://github.com/w3c/webcomponents/issues/331
166
167         * css/CSSGrammar.y.in:
168
169             Parse ::slotted.
170
171         * css/CSSParser.cpp:
172         (WebCore::CSSParser::detectFunctionTypeToken):
173         * css/CSSParserValues.cpp:
174         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
175         (WebCore::CSSParserSelector::parsePseudoElementSlottedFunctionSelector):
176
177             Tokenize ::slotted.
178
179         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
180         * css/CSSParserValues.h:
181         * css/CSSSelector.cpp:
182         (WebCore::CSSSelector::pseudoId):
183         * css/CSSSelector.h:
184         * css/ElementRuleCollector.cpp:
185         (WebCore::ElementRuleCollector::matchAuthorRules):
186         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
187         (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
188
189             Match ::slotted selector.
190
191         (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
192
193             Collect ::slotted rules that may apply to an element in a slot.
194
195         (WebCore::ElementRuleCollector::matchUserRules):
196         (WebCore::ElementRuleCollector::matchUARules):
197         (WebCore::findSlottedPseudoElementSelector):
198         (WebCore::ElementRuleCollector::ruleMatches):
199         * css/ElementRuleCollector.h:
200         * css/RuleSet.cpp:
201         (WebCore::RuleSet::addRule):
202
203             Collect ::slotted rules.
204
205         (WebCore::RuleSet::shrinkToFit):
206         * css/RuleSet.h:
207         (WebCore::RuleSet::hostPseudoClassRules):
208         (WebCore::RuleSet::slottedPseudoElementRules):
209         (WebCore::RuleSet::focusPseudoClassRules):
210         (WebCore::RuleSet::universalRules):
211         * css/SelectorChecker.cpp:
212         (WebCore::SelectorChecker::checkOne):
213         * style/StyleSharingResolver.cpp:
214         (WebCore::Style::SharingResolver::resolve):
215
216             Disable style sharing for children of shadow host. They may be affected by the shadow tree style
217             which is not considered in style sharing checks.
218
219 2016-02-25  Myles C. Maxfield  <mmaxfield@apple.com>
220
221         Font size computed style is innaccurate
222         https://bugs.webkit.org/show_bug.cgi?id=154705
223         <rdar://problem/23474068>
224
225         Reviewed by Timothy Hatcher.
226
227         Safari rounds the font size value reported to getComputedStyle(). Neither Firefox
228         nor Chrome do this.
229
230         Covered by existing tests.
231
232         * css/CSSComputedStyleDeclaration.cpp:
233         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
234         (WebCore::fontSizeFromStyle):
235
236 2016-02-25  Chris Dumez  <cdumez@apple.com>
237
238         [Web IDL] Mark DOMString parameters as nullable when they should be
239         https://bugs.webkit.org/show_bug.cgi?id=154666
240
241         Reviewed by Darin Adler.
242
243         Mark DOMString parameters as nullable when they should be. We previously
244         emulated nullable DOMString attributes by using:
245         [TreatNullAs=NullString, TreatUndefinedAs=NullString]
246         However, this was non-standard and very verbose. Also, developers would
247         sometimes forget the [TreatUndefinedAs=NullString] part and the behavior
248         would end up being wrong for undefined.
249
250         After this clean up, the non-standard [TreatUndefinedAs=NullString] is
251         no longer used so this patch drops support for it. Only
252         [TreatNullAs=NullString] remains and this one will be renamed to
253         [TreatNullAs=EmptyString] via Bug 154654 to match Web IDL standard.
254
255         Tests: fast/dom/Element/getElementsByTagNameNS-nullable.html
256                fast/dom/Node/nullable-parameters.html
257                fast/events/storageevent-initStorageEvent-nullable.html
258
259         * Modules/mediastream/RTCPeerConnection.idl:
260         Drop [TreatUndefinedAs=NullString] from createDataChannel()'s first
261         parameter instead of marking it as nullable. This matches the
262         specification:
263         - http://w3c.github.io/webrtc-pc/#rtcpeerconnection-interface-extensions-1
264         This means there is a slight behavior change when undefined is passed, it
265         now becomes the string "undefined" instead of a null String.
266
267         * bindings/scripts/CodeGeneratorJS.pm:
268         (JSValueToNative):
269         Drop handling of [TreatUndefinedAs=] as it is no longer used.
270
271         * bindings/scripts/IDLAttributes.txt:
272         Drop support for [TreatUndefinedAs=] as it is no longer used.
273
274         * bindings/scripts/test/TestObj.idl:
275
276         * dom/DOMImplementation.idl:
277         Make a few parameters nullable and drop [TreatNullAs=NullString,
278         TreatUndefinedAs=NullString]. There is no web-exposed behavior
279         change.
280
281         * dom/Document.idl:
282         - Make a few parameters nullable and drop [TreatNullAs=NullString,
283           TreatUndefinedAs=NullString]. There is no web-exposed behavior
284           change from this.
285         - Drop these attributes from ObjC-specific bindings as they only
286           matter to JS bindings.
287         - The namespaceURI parameter to getElementsByTagNameNS() is now marked
288           as nullable even though it only treated null as a null String, not
289           undefined. This was a bug and did not match the specification:
290           https://dom.spec.whatwg.org/#document
291
292         * dom/Element.idl:
293         - Make a few parameters nullable and drop [TreatNullAs=NullString,
294           TreatUndefinedAs=NullString]. There is no web-exposed behavior
295           change from this.
296         - Drop these attributes from ObjC-specific bindings as they only
297           matter to JS bindings.
298         - The namespaceURI parameter to getElementsByTagNameNS() is now marked
299           as nullable even though it only treated null as a null String, not
300           undefined. This was a bug and did not match the specification:
301           https://dom.spec.whatwg.org/#interface-element
302
303         * dom/NamedNodeMap.idl:
304         Make a few parameters nullable and drop [TreatNullAs=NullString,
305         TreatUndefinedAs=NullString]. There is no web-exposed behavior
306         change from this.
307
308         * dom/Node.idl:
309         - Drop these attributes from isSupported() as this is not exposed
310           to JS (only native bindings) and these attributes only matter to
311           JS bindings.
312         - Make the first parameter to lookupPrefix() / isDefaultNamespace()
313           and lookupNamespaceURI() nullable. Previously, we treated null
314           as a null string but not undefined. There is therefore a slight
315           behavior change but this matches the specification:
316           https://dom.spec.whatwg.org/#node
317
318         * fileapi/Blob.idl:
319         * html/HTMLButtonElement.idl:
320         * html/HTMLCanvasElement.idl:
321         * html/HTMLFieldSetElement.idl:
322         * html/HTMLInputElement.idl:
323         * html/HTMLKeygenElement.idl:
324         * html/HTMLMediaElement.idl:
325         * html/HTMLObjectElement.idl:
326         * html/HTMLOutputElement.idl:
327         * html/HTMLSelectElement.idl:
328         * html/HTMLTextAreaElement.idl:
329         * page/DOMWindow.idl:
330         Make a few parameters nullable and drop [TreatNullAs=NullString,
331         TreatUndefinedAs=NullString]. There is no web-exposed behavior
332         change from this.
333
334         * storage/StorageEvent.idl:
335         Mark oldValueArg / newValueArg parameters to initStorageEvent()
336         as nullable. Previously, we only treated null as a null string,
337         not undefined. This is therefore a slight behavior change but
338         it matches the specification:
339         https://www.w3.org/TR/webstorage/#storageeventinit
340
341 2016-02-25  David Kilzer  <ddkilzer@apple.com>
342
343         REGRESSION (r196744): NetworkExtension.framework and NEFilterSource class are not available on Recovery partition
344         <http://webkit.org/b/154703>
345
346         Reviewed by Andy Estes.
347
348         * platform/cocoa/NetworkExtensionContentFilter.mm: Make
349         soft-linking of NetworkExtension.framework and NEFilterSource
350         class optional since they are not available on the Recovery
351         partition.  Note that NetworkExtensionContentFilter::enabled()
352         does not need to change since it already had the correct
353         behavior when getNEFilterSourceClass() returned nullptr.
354
355 2016-02-25  Ada Chan  <adachan@apple.com>
356
357         Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
358         https://bugs.webkit.org/show_bug.cgi?id=154702
359
360         Reviewed by Dan Bernstein.
361
362         * Configurations/FeatureDefines.xcconfig:
363
364 2016-02-25  David Kilzer  <ddkilzer@apple.com>
365
366         Change ASSERT to RELEASE_ASSERT in SOFT_LINK_CLASS() macro
367
368         Follow-up fix noted by Andy Estes for:
369
370             [Cocoa] Always check the return value of dlopen() and dlsym() in Release builds
371             <http://webkit.org/b/154364>
372
373         * platform/mac/SoftLinking.h:
374         (SOFT_LINK_CLASS): Change ASSERT to RELEASE_ASSERT to check the
375         return value of objc_getClass().  This matches what we do for
376         SOFT_LINK_CLASS_FOR_SOURCE().
377
378 2016-02-25  Daniel Bates  <dabates@apple.com>
379
380         CSP: Remove SecurityPolicy script interface
381         https://bugs.webkit.org/show_bug.cgi?id=154694
382         <rdar://problem/24846482>
383
384         Reviewed by Andy Estes.
385
386         Remove the Content Security Policy script interface, SecurityPolicy. This interface was only
387         enabled when building with ENABLE(CSP_NEXT) (disabled by default).
388
389         For completeness, the SecurityPolicy interface was removed from the Content Security Policy 1.1 spec.
390         in <https://github.com/w3c/webappsec/commit/18882953ce2d8afca25f685557fef0e0471b2c9a> (12/26/2013).
391
392         * CMakeLists.txt: Remove files to DOMSecurityPolicy.{cpp, idl}.
393         * DerivedSources.cpp: Remove file JSDOMSecurityPolicy.cpp.
394         * DerivedSources.make: Remove file DOMSecurityPolicy.idl.
395         * PlatformGTK.cmake: Ditto.
396         * PlatformMac.cmake: Ditto.
397         * WebCore.xcodeproj/project.pbxproj: Remove files DOMSecurityPolicy files.
398         * bindings/scripts/CodeGeneratorGObject.pm: Remove reference to DOMSecurityPolicy.
399         * dom/Document.cpp:
400         (WebCore::Document::securityPolicy): Deleted.
401         * dom/Document.h:
402         * dom/Document.idl: Remove attribute securityPolicy.
403         * page/DOMSecurityPolicy.cpp: Removed.
404         * page/DOMSecurityPolicy.h: Removed.
405         * page/DOMSecurityPolicy.idl: Removed.
406
407 2016-02-25  Andreas Kling  <akling@apple.com>
408
409         Don't clear the weak JSString cache on memory pressure.
410         <https://webkit.org/b/154693>
411
412         Reviewed by Antti Koivisto.
413
414         This was stupid. The cache is a WeakGCMap, so all the JSStrings pointed to are
415         still alive anyway. This way we keep the ability to deduplicate common strings.
416
417         * platform/MemoryPressureHandler.cpp:
418         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory): Deleted.
419
420 2016-02-25  Chris Dumez  <cdumez@apple.com>
421
422         Drop [TreatReturnedNullStringAs=Undefined] WebKit-specific IDL attribute
423         https://bugs.webkit.org/show_bug.cgi?id=154662
424
425         Reviewed by Darin Adler.
426
427         Drop [TreatReturnedNullStringAs=Undefined] WebKit-specific IDL attribute.
428         This has no standard equivalent and all uses in WebKit are either useless
429         or wrong.
430
431         Test: fast/frames/detached-frame-document-defaultCharset.html
432
433         * bindings/scripts/CodeGeneratorJS.pm:
434         (NativeToJSValue): Deleted.
435         * bindings/scripts/IDLAttributes.txt:
436         Drop support for [TreatReturnedNullStringAs=X] entirely.
437
438         * dom/Document.cpp:
439         (WebCore::Document::defaultCharset):
440         Fall back to return "UTF-8" instead of the null string, similarly to
441         what is done in for Document.characterSet. Note that this attribute
442         is non-standard and is an IE extension. Firefox never supported it
443         and Chrome dropped it last year.
444
445         * dom/Document.idl:
446         - Drop extended attribute for Document.defaultCharset as the
447           implementation has been updated to never return a null String.
448         - Drop extended attribute for Document.readyState. It was useless
449           because the implementation could never return a null String.
450
451         * xml/XMLHttpRequest.cpp:
452         (WebCore::XMLHttpRequest::getAllResponseHeaders):
453         Update implementation to return emptyString() instead of "" in case
454         of error.
455
456         * xml/XMLHttpRequest.idl:
457         Drop extended attribute from XMLHttpRequest.getAllResponseHeaders().
458         It was useless because the implementation could never return a
459         null String.
460
461         * xml/XSLTProcessor.idl:
462         Drop extended attribute from XSLTProcessor.getParameter(). The
463         operation is already marked as [Custom] so the extended attribute
464         had no effect.
465
466 2016-02-25  Gavin Barraclough  <barraclough@apple.com>
467
468         Should template RefCounter instead of RefCounter::Token
469         https://bugs.webkit.org/show_bug.cgi?id=154691
470
471         Reviewed by Anders Carlsson.
472
473         Mechanical update per RefCounter interface change.
474
475         * page/PageThrottler.cpp:
476         (WebCore::PageThrottler::mediaActivityToken):
477         (WebCore::PageThrottler::pageLoadActivityToken):
478         (WebCore::PageThrottler::setActivityFlag):
479         * page/PageThrottler.h:
480         * platform/VNodeTracker.h:
481
482 2016-02-25  Brady Eidson  <beidson@apple.com>
483
484         Remove LegacyIDB.
485         https://bugs.webkit.org/show_bug.cgi?id=150854
486
487         Reviewed by Alex Christensen.
488
489         No new tests (No change in behavior).
490
491         * CMakeLists.txt:
492         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
493         (WebCore::DOMWindowIndexedDatabase::indexedDB):
494         * Modules/indexeddb/IDBDatabaseMetadata.cpp: Removed.
495         * Modules/indexeddb/IDBDatabaseMetadata.h: Removed.
496         * Modules/indexeddb/IDBFactory.h:
497         * Modules/indexeddb/IDBIndex.h:
498         * Modules/indexeddb/IDBIndexMetadata.h: Removed.
499         * Modules/indexeddb/IDBObjectStoreMetadata.h: Removed.
500         * Modules/indexeddb/IDBOperation.h: Removed.
501         * Modules/indexeddb/IDBServerConnection.h: Removed.
502         * Modules/indexeddb/IDBTransaction.h:
503         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
504         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
505         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
506         * Modules/indexeddb/legacy/IDBCallbacks.h: Removed.
507         * Modules/indexeddb/legacy/IDBCursorBackend.cpp: Removed.
508         * Modules/indexeddb/legacy/IDBCursorBackend.h: Removed.
509         * Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Removed.
510         * Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Removed.
511         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Removed.
512         * Modules/indexeddb/legacy/IDBDatabaseBackend.h: Removed.
513         * Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Removed.
514         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Removed.
515         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Removed.
516         * Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Removed.
517         * Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Removed.
518         * Modules/indexeddb/legacy/IDBPendingOpenCall.h: Removed.
519         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Removed.
520         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Removed.
521         * Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Removed.
522         * Modules/indexeddb/legacy/IDBTransactionBackend.h: Removed.
523         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Removed.
524         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Removed.
525         * Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Removed.
526         * Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Removed.
527         * Modules/indexeddb/legacy/LegacyAny.cpp: Removed.
528         * Modules/indexeddb/legacy/LegacyAny.h: Removed.
529         * Modules/indexeddb/legacy/LegacyCursor.cpp: Removed.
530         * Modules/indexeddb/legacy/LegacyCursor.h: Removed.
531         * Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Removed.
532         * Modules/indexeddb/legacy/LegacyCursorWithValue.h: Removed.
533         * Modules/indexeddb/legacy/LegacyDatabase.cpp: Removed.
534         * Modules/indexeddb/legacy/LegacyDatabase.h: Removed.
535         * Modules/indexeddb/legacy/LegacyFactory.cpp: Removed.
536         * Modules/indexeddb/legacy/LegacyFactory.h: Removed.
537         * Modules/indexeddb/legacy/LegacyIndex.cpp: Removed.
538         * Modules/indexeddb/legacy/LegacyIndex.h: Removed.
539         * Modules/indexeddb/legacy/LegacyObjectStore.cpp: Removed.
540         * Modules/indexeddb/legacy/LegacyObjectStore.h: Removed.
541         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Removed.
542         * Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Removed.
543         * Modules/indexeddb/legacy/LegacyRequest.cpp: Removed.
544         * Modules/indexeddb/legacy/LegacyRequest.h: Removed.
545         * Modules/indexeddb/legacy/LegacyTransaction.cpp: Removed.
546         * Modules/indexeddb/legacy/LegacyTransaction.h: Removed.
547         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Removed.
548         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Removed.
549         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
550         (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
551         (WebCore::IDBServer::SQLiteIDBCursor::establishStatement):
552         (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
553         * Modules/indexeddb/server/SQLiteIDBCursor.h:
554         * Modules/indexeddb/shared/IDBIndexInfo.h:
555         * WebCore.xcodeproj/project.pbxproj:
556         * bindings/js/IDBBindingUtilities.cpp:
557         (WebCore::generateIndexKeysForValue): Deleted.
558         * bindings/js/IDBBindingUtilities.h:
559         * bindings/js/JSMainThreadExecState.cpp:
560         (WebCore::JSMainThreadExecState::didLeaveScriptContext): Deleted.
561         * inspector/InspectorIndexedDBAgent.cpp:
562         * loader/EmptyClients.cpp:
563         * page/DatabaseProvider.cpp:
564         (WebCore::DatabaseProvider::idbFactoryBackend): Deleted.
565         * page/DatabaseProvider.h:
566         * platform/CrossThreadCopier.cpp:
567         (WebCore::IDBDatabaseMetadata>::copy): Deleted.
568         (WebCore::IDBIndexMetadata>::copy): Deleted.
569         (WebCore::IDBObjectStoreMetadata>::copy): Deleted.
570         * platform/CrossThreadCopier.h:
571
572 2016-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
573
574         REGRESSION (r196268): Many assertion failures and crashes on SVG path animation tests when JS garbage collection happens quickly
575         https://bugs.webkit.org/show_bug.cgi?id=154331
576
577         Reviewed by Darin Adler.
578
579         This is not an actual regression. The bug did exist before r196268 but
580         the whole document was leaking once an SVGAnimatedProperty was created
581         so there was no way to produce this bug. After fixing the leak, one crash
582         and one assert got uncovered. Both of them happen because of the fact:
583         "if an SVGAnimatedProperty is not referenced it will be deleted."
584
585         * svg/SVGPathElement.cpp:
586         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
587         The code in this function was assuming that the wrapper will be created
588         only once which happens when SVGAnimatedProperty::lookupOrCreateWrapper()
589         is called. Before making this single call, lookupOrCreateDWrapper() was
590         building an initial SVGPathSegList from byte stream. But now
591         SVGAnimatedProperty::lookupWrapper() can return false even after creating
592         the SVGAnimatedProperty because it was deleted later. Calling
593         buildSVGPathSegListFromByteStream() more than once was causing
594         SVGAnimatedListPropertyTearOff::animationStarted() to fire the assertion
595         ASSERT(m_values.size() == m_wrappers.size()) because the path segments were
596         appended twice to m_values which is in fact SVGPathElement::m_pathSegList.value.
597         The fix is to build the initial SVGPathSegList only once which should happen
598         when m_pathSegList.value.isEmpty().
599         
600         (WebCore::SVGPathElement::animatedPropertyWillBeDeleted):
601         * svg/SVGPathElement.h:
602         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
603         (WebCore::SVGAnimatedPathSegListPropertyTearOff::~SVGAnimatedPathSegListPropertyTearOff):
604         SVGPathElement is assuming the following equivalence relation:
605         m_pathSegList.shouldSynchronize ~ SVGAnimatedProperty_is_created_and_not_null.
606         SVGPathElement::animatedPathSegList() and animatedNormalizedPathSegList()
607         set m_pathSegList.shouldSynchronize to true when SVGAnimatedProperty is
608         created but nothing sets m_pathSegList.shouldSynchronize back to false.
609         This was not a problem when the SVGAnimatedProperty was leaking but after
610         ensuring it is deleted when it is not referenced this equivalence relation
611         becomes untrue sometimes. This caused SVGPathElement::svgAttributeChanged()
612         to crash when we check m_pathSegList.shouldSynchronize and if it is true we
613         assume that SVGAnimatedProperty::lookupWrapper() will return a non-null pointer
614         and therefore we deference this pointer and call SVGAnimatedProperty::isAnimating().
615         To fix this crash we need to set m_pathSegList.shouldSynchronize back to false
616         when the associated SVGAnimatedProperty is deleted.
617
618 2016-02-25  Brady Eidson  <beidson@apple.com>
619
620         Modern IDB: WebKit 2 IPC layer.
621         https://bugs.webkit.org/show_bug.cgi?id=153808
622
623         Reviewed by Alex Christensen.
624
625         No new tests (Covered by over 1,000 existing tests).
626
627         * Modules/indexeddb/IDBKeyData.h:
628         (WebCore::IDBKeyData::encode): It's okay to encode Min and Max.
629         (WebCore::IDBKeyData::decode): It's okay to decode Min and Max.
630
631 2016-02-25  Daniel Bates  <dabates@apple.com>
632
633         CSP: Make SecurityPolicyViolationEvent more closely conform to CSP spec and enable it by default
634         https://bugs.webkit.org/show_bug.cgi?id=154522
635         <rdar://problem/24762078>
636
637         Reviewed by Brent Fulgham.
638
639         Include attributes statusCode and columnNumber in a dispatched SecurityPolicyViolationEvent and
640         as part of the SecurityPolicyViolationEventInit dictionary as per section Violation DOM Events
641         of the Content Security Policy Level 3 spec., <https://w3c.github.io/webappsec-csp/> (24 February 2016).
642         Additionally, enable dispatching of this event when a Content Security Policy violation occurs regardless
643         of whether ENABLE(CSP_NEXT) is enabled.
644
645         Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https.html
646
647         * WebCore.xcodeproj/project.pbxproj: Add files JSSecurityPolicyViolationEvent.{cpp, h}.
648         * dom/EventNames.in: Enable support for SecurityPolicyViolationEvent unconditionally.
649         * dom/SecurityPolicyViolationEvent.h: Remove ENABLE(CSP_NEXT)-guard so that we compile this
650         code unconditionally. Modified SecurityPolicyViolationEventInit and SecurityPolicyViolationEvent
651         to support attributes statusCode and columnNumebr.
652         * dom/SecurityPolicyViolationEvent.idl: Add attributes statusCode and columnNumber.
653         * page/csp/ContentSecurityPolicy.cpp:
654         (WebCore::ContentSecurityPolicy::reportViolation): Modified to both dispatch a SecurityPolicyViolationEvent
655         and send a violation report (if applicable).
656
657 2016-02-25  Eric Carlson  <eric.carlson@apple.com>
658
659         [MediaStream] MediaDeviceInfo deviceId and groupId must be unique to the page's origin
660         https://bugs.webkit.org/show_bug.cgi?id=153163
661         <rdar://problem/24334526>
662
663         Reviewed by Tim Horton.
664
665         Tests: http/tests/media/media-stream/enumerate-devices-source-id-persistent.html
666                http/tests/media/media-stream/enumerate-devices-source-id.html
667
668         * Modules/mediastream/MediaDevicesRequest.cpp:
669         (WebCore::MediaDevicesRequest::start): Don't check document.hasHadActiveMediaStreamTrack, do it
670           in didCompleteTrackSourceInfoRequest where we need the information.
671         (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Renamed from didCompleteCheck, save
672           device ID hash string.
673         (WebCore::hashString): Hash a string with SHA1.
674         (WebCore::MediaDevicesRequest::hashID): Hash and ID.
675         (WebCore::MediaDevicesRequest::didCompleteTrackSourceInfoRequest): Hash deviceId and groupId.
676         (WebCore::MediaDevicesRequest::didCompleteCheck): Deleted.
677         (WebCore::MediaDevicesRequest::getTrackSources): Deleted.
678         (WebCore::MediaDevicesRequest::didCompleteRequest): Deleted.
679         * Modules/mediastream/MediaDevicesRequest.h:
680
681         * Modules/mediastream/UserMediaPermissionCheck.cpp:
682         (WebCore::UserMediaPermissionCheck::userMediaDocumentOrigin): Renamed from securityOrigin.
683         (WebCore::UserMediaPermissionCheck::topLevelDocumentOrigin): New, return the top level document origin.
684         (WebCore::UserMediaPermissionCheck::setUserMediaAccessInfo): Renamed from setHasPersistentPermission.
685         (WebCore::UserMediaPermissionCheck::securityOrigin): Deleted.
686         (WebCore::UserMediaPermissionCheck::setHasPersistentPermission): Deleted.
687         * Modules/mediastream/UserMediaPermissionCheck.h:
688
689         * Modules/mediastream/UserMediaRequest.cpp:
690         (WebCore::UserMediaRequest::userMediaDocumentOrigin): Renamed from securityOrigin.
691         (WebCore::UserMediaRequest::topLevelDocumentOrigin): New, return the top level document origin.
692         (WebCore::UserMediaRequest::securityOrigin): Deleted.
693         * Modules/mediastream/UserMediaRequest.h:
694         (WebCore::UserMediaRequest::requiresAudio): Deleted, unused.
695         (WebCore::UserMediaRequest::requiresVideo): Ditto.
696
697         * html/HTMLMediaElement.cpp:
698         (WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory): Deleted, unused.
699         * html/HTMLMediaElement.h:
700
701         * platform/graphics/MediaPlayer.h:
702         (WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory): Deleted.
703
704         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
705         (WebCore::MediaStreamTrackSourcesRequestClient::didCompleteTrackSourceInfoRequest): Renamed from didCompleteRequest.
706
707         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
708         (WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources): Ditto.
709
710         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
711         (WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources): Ditto.
712
713 2016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
714
715         [GTK] Tearing when entering AC mode
716         https://bugs.webkit.org/show_bug.cgi?id=150955
717
718         Reviewed by Michael Catanzaro.
719
720         * platform/gtk/GtkUtilities.cpp:
721         (WebCore::widgetIsOnscreenToplevelWindow): Allow passing nullptr.
722
723 2016-02-24  Chris Dumez  <cdumez@apple.com>
724
725         Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
726         https://bugs.webkit.org/show_bug.cgi?id=154659
727
728         Reviewed by Sam Weinig.
729
730         Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute and
731         use nullable DOMString types instead:
732         http://heycam.github.io/webidl/#idl-nullable-type
733
734         This is the standard way of doing things. We already had support
735         in the bindings generator for nullable DOMString attributes so
736         we now just leverage this support. However, our IDL parser did
737         not correctly parse nullable DOMString return values for operations.
738         This patch fixes this.
739
740         This patch also drops [TreatNullAs=NullString] and
741         [TreatUndefinedAs=NullString] for writable DOMString attributes that
742         are now marked as nullable because they are implied.
743
744         * Modules/fetch/FetchHeaders.idl:
745         * Modules/indexeddb/IDBObjectStore.idl:
746         * Modules/mediasource/DOMURLMediaSource.idl:
747         * Modules/mediastream/DOMURLMediaStream.idl:
748         * Modules/websockets/WebSocket.idl:
749         * bindings/scripts/CodeGeneratorJS.pm:
750         (NativeToJSValue): Deleted.
751         * bindings/scripts/IDLAttributes.txt:
752         * bindings/scripts/IDLParser.pm:
753         (parseAttributeOrOperationRest):
754         (parseOperationOrIterator):
755         (parseSpecialOperation):
756         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
757         (webkit_dom_test_obj_nullable_string_method):
758         (webkit_dom_test_obj_nullable_string_special_method):
759         (webkit_dom_test_obj_conditional_method3): Deleted.
760         (webkit_dom_test_obj_convert1): Deleted.
761         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
762         * bindings/scripts/test/JS/JSTestObj.cpp:
763         (WebCore::JSTestObj::getOwnPropertySlot):
764         (WebCore::JSTestObj::getOwnPropertySlotByIndex):
765         (WebCore::JSTestObj::getOwnPropertyNames):
766         (WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
767         (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
768         (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
769         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): Deleted.
770         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2): Deleted.
771         * bindings/scripts/test/JS/JSTestObj.h:
772         * bindings/scripts/test/ObjC/DOMTestObj.h:
773         * bindings/scripts/test/ObjC/DOMTestObj.mm:
774         (-[DOMTestObj nullableStringMethod]):
775         (-[DOMTestObj nullableStringStaticMethod]):
776         (-[DOMTestObj nullableStringSpecialMethod:]):
777         (-[DOMTestObj overloadedMethod1:]): Deleted.
778         (-[DOMTestObj getSVGDocument]): Deleted.
779         * bindings/scripts/test/TestObj.idl:
780         * css/CSSCharsetRule.idl:
781         * css/CSSImportRule.idl:
782         * css/CSSKeyframesRule.idl:
783         * css/CSSPageRule.idl:
784         * css/CSSRule.idl:
785         * css/CSSStyleDeclaration.idl:
786         * css/CSSStyleRule.idl:
787         * css/CSSValue.idl:
788         * css/MediaList.idl:
789         * css/StyleSheet.idl:
790         * dom/Attr.idl:
791         * dom/CharacterData.idl:
792         * dom/DOMStringList.idl:
793         * dom/Document.idl:
794         * dom/DocumentType.idl:
795         * dom/Element.idl:
796         * dom/Entity.idl:
797         * dom/MutationRecord.idl:
798         * dom/Node.idl:
799         * dom/ProcessingInstruction.idl:
800         * html/DOMSettableTokenList.idl:
801         * html/DOMTokenList.idl:
802         * html/DOMURL.idl:
803         * html/canvas/WebGLDebugShaders.idl:
804         * html/canvas/WebGLRenderingContextBase.idl:
805         * page/DOMWindow.idl:
806         * storage/Storage.idl:
807         * storage/StorageEvent.idl:
808         * xml/XMLHttpRequest.idl:
809         * xml/XPathNSResolver.idl:
810
811 2016-02-24  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
812
813         [web-animations] Add AnimationTimeline, DocumentTimeline and add extensions to Document interface
814         https://bugs.webkit.org/show_bug.cgi?id=151688
815
816         Reviewed by Dean Jackson.
817
818         - Adds DocumentTimeline interface and class implementation
819         - Implements the DocumentAnimation extension to the Document Interface that contains a default DocumentTimeline
820         - Add AnimationTimeline interface stub (i.e. without getAnimations and currentTime)
821         - Adds AnimationTimeline class implementation for AnimationTimeline interface stub
822         - Adds Javascript bindings for the above classes and interfaces
823         - Enables the WEB_ANIMATIONS compiler switch
824
825         No tests yet.  Tests will be added as class functionality is added incrementally.
826
827         * CMakeLists.txt:
828         * Configurations/FeatureDefines.xcconfig:
829         * DerivedSources.make:
830         * PlatformGTK.cmake:
831         * WebCore.vcxproj/WebCore.vcxproj:
832         * WebCore.vcxproj/WebCore.vcxproj.filters:
833         * WebCore.vcxproj/WebCoreIncludeCommon.props:
834         * WebCore.vcxproj/copyForwardingHeaders.cmd:
835         * WebCore.xcodeproj/project.pbxproj:
836         * animation/AnimationTimeline.cpp: Added.
837         (WebCore::AnimationTimeline::AnimationTimeline):
838         (WebCore::AnimationTimeline::~AnimationTimeline):
839         (WebCore::AnimationTimeline::destroy):
840         * animation/AnimationTimeline.h: Added.
841         (WebCore::AnimationTimeline::deref):
842         (WebCore::AnimationTimeline::isDocumentTimeline):
843         (WebCore::AnimationTimeline::classType):
844         * animation/AnimationTimeline.idl: Added.
845         * animation/DocumentAnimation.cpp: Added.
846         (WebCore::DocumentAnimation::DocumentAnimation):
847         (WebCore::DocumentAnimation::~DocumentAnimation):
848         (WebCore::DocumentAnimation::timeline):
849         (WebCore::DocumentAnimation::supplementName):
850         (WebCore::DocumentAnimation::from):
851         * animation/DocumentAnimation.h: Added.
852         * animation/DocumentAnimation.idl: Added.
853         * animation/DocumentTimeline.cpp: Added.
854         (WebCore::DocumentTimeline::create):
855         (WebCore::DocumentTimeline::DocumentTimeline):
856         (WebCore::DocumentTimeline::~DocumentTimeline):
857         * animation/DocumentTimeline.h: Added.
858         * animation/DocumentTimeline.idl: Added.
859         * bindings/js/JSAnimationTimelineCustom.cpp: Added.
860         (WebCore::toJS):
861         * bindings/js/JSBindingsAllInOne.cpp:
862         * bindings/scripts/CodeGeneratorGObject.pm:
863         * dom/Document.h:
864
865 2016-02-24  Brady Eidson  <beidson@apple.com>
866
867         Modern IDB: Some w3c objectstore tests crash under GuardMalloc.
868         https://bugs.webkit.org/show_bug.cgi?id=154460
869
870         Reviewed by Alex Christensen.
871
872         No new tests (Covered by existing tests).
873
874         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
875         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
876         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
877         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):  Don't delete the UniqueIDBDatabase yet 
878           if there are still any connections pending close.
879         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
880         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
881         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): It's possible that with this
882           transaction completing, and a connection finished its close process, that the UniqueIDBDatabase is
883           now ready to be deleted.
884
885         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
886         (WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):
887         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
888
889         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
890         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):
891
892 2016-02-24  Konstantin Tokarev  <annulen@yandex.ru>
893
894         [cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
895         https://bugs.webkit.org/show_bug.cgi?id=154651
896
897         Reviewed by Alex Christensen.
898
899         No new tests needed.
900
901         * CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.
902
903 2016-02-24  Ryosuke Niwa  <rniwa@webkit.org>
904
905         Use more references in FocusNavigationScope
906         https://bugs.webkit.org/show_bug.cgi?id=154637
907
908         Reviewed by Chris Dumez.
909
910         Use references in various functions of FocusNavigationScope as well as m_treeScope.
911
912         * page/FocusController.cpp:
913         (WebCore::FocusNavigationScope::FocusNavigationScope): Takes TreeScope& instead of TreeScope*.
914         (WebCore::FocusNavigationScope::rootNode): Returns ContainerNode& instead of ContainerNode*.
915         (WebCore::FocusNavigationScope::owner):
916         (WebCore::FocusNavigationScope::scopeOf): Takes Node& instead of Node*. Renamed from focusNavigationScopeOf.
917         (WebCore::FocusNavigationScope::scopeOwnedByShadowHost): Ditto. Renamed from focusNavigationScopeOwnedByShadowHost.
918         (WebCore::FocusNavigationScope::scopeOwnedByIFrame): Ditto. Renamed from focusNavigationScopeOwnedByIFrame.
919         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
920         (WebCore::FocusController::advanceFocusInDocumentOrder):
921         (WebCore::FocusController::findFocusableElementAcrossFocusScope): Define currentScope inside the loop now that
922         the copy constructor of FocusNavigationScope no longer exists (since m_treeScope is a reference).
923         (WebCore::FocusController::findFocusableElementRecursively):
924         (WebCore::nextElementWithGreaterTabIndex):
925         (WebCore::FocusController::nextFocusableElement):
926         (WebCore::FocusController::previousFocusableElement):
927
928 2016-02-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
929
930         WebRTC: Add MediaEndpoint interface (WebRTC backend abstraction)
931         https://bugs.webkit.org/show_bug.cgi?id=150165
932
933         Reviewed by Eric Carlson.
934
935         Add the MediaEndpoint interface along with its companion objects.
936
937         MediaEndpoint interface: A WebRTC platform abstraction that is used to
938         configure how the the WebRTC backend sends and receives. It also abstracts
939         ICE functionality such as generating local candidates and doing
940         checking on remote candidates. The RTCPeerConnection API, and other API
941         objects such as RTCRtpSender/Receiver, live above MediaEndpoint.
942
943         MediaEndpointConfiguration: A settings object used to configure a
944         MediaEndpoint with, for example, ICE helper servers and other polices.
945         A MediaEndpointConfiguration is used to initialize a MediaEndpoint, but
946         can also be used to update settings.
947
948         MediaEndpointSessionConfiguration: An object that describes how the
949         MediaEndpoint should send and receive. Contains PeerMediaDescription,
950         MediaPayload and IceCandidate objects.
951
952         Tests: The MediaEndpoint platform interface has no implementations yet.
953
954         * CMakeLists.txt:
955         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
956         (WebCore::MediaEndpointPeerConnection::gotDtlsFingerprint):
957         (WebCore::MediaEndpointPeerConnection::gotIceCandidate):
958         (WebCore::MediaEndpointPeerConnection::doneGatheringCandidates):
959         (WebCore::MediaEndpointPeerConnection::gotRemoteSource):
960         * Modules/mediastream/MediaEndpointPeerConnection.h:
961         * WebCore.xcodeproj/project.pbxproj:
962         * platform/mediastream/IceCandidate.h: Added.
963         (WebCore::IceCandidate::create):
964         (WebCore::IceCandidate::~IceCandidate):
965         (WebCore::IceCandidate::type):
966         (WebCore::IceCandidate::setType):
967         (WebCore::IceCandidate::foundation):
968         (WebCore::IceCandidate::setFoundation):
969         (WebCore::IceCandidate::componentId):
970         (WebCore::IceCandidate::setComponentId):
971         (WebCore::IceCandidate::transport):
972         (WebCore::IceCandidate::setTransport):
973         (WebCore::IceCandidate::priority):
974         (WebCore::IceCandidate::setPriority):
975         (WebCore::IceCandidate::address):
976         (WebCore::IceCandidate::setAddress):
977         (WebCore::IceCandidate::port):
978         (WebCore::IceCandidate::setPort):
979         (WebCore::IceCandidate::tcpType):
980         (WebCore::IceCandidate::setTcpType):
981         (WebCore::IceCandidate::relatedAddress):
982         (WebCore::IceCandidate::setRelatedAddress):
983         (WebCore::IceCandidate::relatedPort):
984         (WebCore::IceCandidate::setRelatedPort):
985         (WebCore::IceCandidate::clone):
986         (WebCore::IceCandidate::IceCandidate):
987         * platform/mediastream/MediaEndpoint.cpp: Added.
988         (WebCore::createMediaEndpoint):
989         * platform/mediastream/MediaEndpoint.h: Added.
990         (WebCore::MediaEndpointClient::~MediaEndpointClient):
991         (WebCore::MediaEndpoint::~MediaEndpoint):
992         * platform/mediastream/MediaEndpointConfiguration.cpp: Added.
993         (WebCore::IceServerInfo::IceServerInfo):
994         (WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
995         * platform/mediastream/MediaEndpointConfiguration.h: Added.
996         (WebCore::IceServerInfo::create):
997         (WebCore::IceServerInfo::~IceServerInfo):
998         (WebCore::IceServerInfo::urls):
999         (WebCore::IceServerInfo::credential):
1000         (WebCore::IceServerInfo::username):
1001         (WebCore::MediaEndpointConfiguration::create):
1002         (WebCore::MediaEndpointConfiguration::iceServers):
1003         (WebCore::MediaEndpointConfiguration::iceTransportPolicy):
1004         (WebCore::MediaEndpointConfiguration::bundlePolicy):
1005         * platform/mediastream/MediaEndpointSessionConfiguration.h: Added.
1006         (WebCore::MediaEndpointSessionConfiguration::create):
1007         (WebCore::MediaEndpointSessionConfiguration::~MediaEndpointSessionConfiguration):
1008         (WebCore::MediaEndpointSessionConfiguration::sessionId):
1009         (WebCore::MediaEndpointSessionConfiguration::setSessionId):
1010         (WebCore::MediaEndpointSessionConfiguration::sessionVersion):
1011         (WebCore::MediaEndpointSessionConfiguration::setSessionVersion):
1012         (WebCore::MediaEndpointSessionConfiguration::mediaDescriptions):
1013         (WebCore::MediaEndpointSessionConfiguration::addMediaDescription):
1014         (WebCore::MediaEndpointSessionConfiguration::clone):
1015         (WebCore::MediaEndpointSessionConfiguration::MediaEndpointSessionConfiguration):
1016         * platform/mediastream/MediaPayload.h: Added.
1017         (WebCore::MediaPayload::create):
1018         (WebCore::MediaPayload::~MediaPayload):
1019         (WebCore::MediaPayload::type):
1020         (WebCore::MediaPayload::setType):
1021         (WebCore::MediaPayload::encodingName):
1022         (WebCore::MediaPayload::setEncodingName):
1023         (WebCore::MediaPayload::clockRate):
1024         (WebCore::MediaPayload::setClockRate):
1025         (WebCore::MediaPayload::channels):
1026         (WebCore::MediaPayload::setChannels):
1027         (WebCore::MediaPayload::ccmfir):
1028         (WebCore::MediaPayload::setCcmfir):
1029         (WebCore::MediaPayload::nackpli):
1030         (WebCore::MediaPayload::setNackpli):
1031         (WebCore::MediaPayload::nack):
1032         (WebCore::MediaPayload::setNack):
1033         (WebCore::MediaPayload::parameters):
1034         (WebCore::MediaPayload::addParameter):
1035         (WebCore::MediaPayload::clone):
1036         (WebCore::MediaPayload::MediaPayload):
1037         * platform/mediastream/PeerMediaDescription.h: Added.
1038         (WebCore::PeerMediaDescription::create):
1039         (WebCore::PeerMediaDescription::~PeerMediaDescription):
1040         (WebCore::PeerMediaDescription::type):
1041         (WebCore::PeerMediaDescription::setType):
1042         (WebCore::PeerMediaDescription::port):
1043         (WebCore::PeerMediaDescription::setPort):
1044         (WebCore::PeerMediaDescription::address):
1045         (WebCore::PeerMediaDescription::setAddress):
1046         (WebCore::PeerMediaDescription::mode):
1047         (WebCore::PeerMediaDescription::setMode):
1048         (WebCore::PeerMediaDescription::payloads):
1049         (WebCore::PeerMediaDescription::addPayload):
1050         (WebCore::PeerMediaDescription::setPayloads):
1051         (WebCore::PeerMediaDescription::rtcpMux):
1052         (WebCore::PeerMediaDescription::setRtcpMux):
1053         (WebCore::PeerMediaDescription::rtcpAddress):
1054         (WebCore::PeerMediaDescription::setRtcpAddress):
1055         (WebCore::PeerMediaDescription::rtcpPort):
1056         (WebCore::PeerMediaDescription::setRtcpPort):
1057         (WebCore::PeerMediaDescription::mediaStreamId):
1058         (WebCore::PeerMediaDescription::setMediaStreamId):
1059         (WebCore::PeerMediaDescription::mediaStreamTrackId):
1060         (WebCore::PeerMediaDescription::setMediaStreamTrackId):
1061         (WebCore::PeerMediaDescription::dtlsSetup):
1062         (WebCore::PeerMediaDescription::setDtlsSetup):
1063         (WebCore::PeerMediaDescription::dtlsFingerprintHashFunction):
1064         (WebCore::PeerMediaDescription::setDtlsFingerprintHashFunction):
1065         (WebCore::PeerMediaDescription::dtlsFingerprint):
1066         (WebCore::PeerMediaDescription::setDtlsFingerprint):
1067         (WebCore::PeerMediaDescription::cname):
1068         (WebCore::PeerMediaDescription::setCname):
1069         (WebCore::PeerMediaDescription::ssrcs):
1070         (WebCore::PeerMediaDescription::addSsrc):
1071         (WebCore::PeerMediaDescription::clearSsrcs):
1072         (WebCore::PeerMediaDescription::iceUfrag):
1073         (WebCore::PeerMediaDescription::setIceUfrag):
1074         (WebCore::PeerMediaDescription::icePassword):
1075         (WebCore::PeerMediaDescription::setIcePassword):
1076         (WebCore::PeerMediaDescription::iceCandidates):
1077         (WebCore::PeerMediaDescription::addIceCandidate):
1078         (WebCore::PeerMediaDescription::source):
1079         (WebCore::PeerMediaDescription::setSource):
1080         (WebCore::PeerMediaDescription::clone):
1081         (WebCore::PeerMediaDescription::PeerMediaDescription):
1082
1083 2016-02-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1084
1085         [Fetch API] Implement Fetch API Response
1086         https://bugs.webkit.org/show_bug.cgi?id=154536
1087
1088         Reviewed by Alex Christensen.
1089
1090         Tests: imported/w3c/web-platform-tests/fetch/api/response/response-clone.html
1091                imported/w3c/web-platform-tests/fetch/api/response/response-consume.html
1092                imported/w3c/web-platform-tests/fetch/api/response/response-error.html
1093                imported/w3c/web-platform-tests/fetch/api/response/response-idl.html
1094                imported/w3c/web-platform-tests/fetch/api/response/response-init-001.html
1095                imported/w3c/web-platform-tests/fetch/api/response/response-init-002.html
1096                imported/w3c/web-platform-tests/fetch/api/response/response-static-error.html
1097                imported/w3c/web-platform-tests/fetch/api/response/response-static-redirect.html
1098
1099         Adding Fetch Response as FetchResponse class.
1100         Constructor uses a built-in to pre-process the parameters.
1101         Support of body as ReadableStream is missing.
1102
1103         * CMakeLists.txt:
1104         * DerivedSources.make:
1105         * Modules/fetch/FetchBody.h:
1106         (WebCore::FetchBody::empty):
1107         * Modules/fetch/FetchResponse.cpp: Added.
1108         (WebCore::JSFetchResponse::body):
1109         (WebCore::isRedirectStatus):
1110         (WebCore::isNullBodyStatus):
1111         (WebCore::FetchResponse::error):
1112         (WebCore::FetchResponse::redirect):
1113         (WebCore::FetchResponse::initializeWith):
1114         (WebCore::FetchResponse::FetchResponse):
1115         (WebCore::FetchResponse::clone):
1116         (WebCore::FetchResponse::type):
1117         * Modules/fetch/FetchResponse.h: Added.
1118         (WebCore::FetchResponse::create):
1119         (WebCore::FetchResponse::redirect):
1120         (WebCore::FetchResponse::url):
1121         (WebCore::FetchResponse::redirected):
1122         (WebCore::FetchResponse::status):
1123         (WebCore::FetchResponse::ok):
1124         (WebCore::FetchResponse::statusText):
1125         (WebCore::FetchResponse::headers):
1126         (WebCore::FetchResponse::isDisturbed):
1127         (WebCore::FetchResponse::arrayBuffer):
1128         (WebCore::FetchResponse::formData):
1129         (WebCore::FetchResponse::blob):
1130         (WebCore::FetchResponse::json):
1131         (WebCore::FetchResponse::text):
1132         * Modules/fetch/FetchResponse.idl: Added.
1133         * Modules/fetch/FetchResponse.js: Added.
1134         (initializeFetchResponse):
1135         * WebCore.xcodeproj/project.pbxproj:
1136         * bindings/js/WebCoreJSBuiltins.cpp:
1137         * bindings/js/WebCoreJSBuiltins.h:
1138         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
1139         (WebCore::JSBuiltinFunctions::fetchResponseBuiltins):
1140
1141 2016-02-24  Ryosuke Niwa  <rniwa@webkit.org>
1142
1143         A function named canTakeNextToken executing blocking scripts is misleading
1144         https://bugs.webkit.org/show_bug.cgi?id=154636
1145
1146         Reviewed by Darin Adler.
1147
1148         Merged canTakeNextToken into pumpTokenizer and extracted pumpTokenizerLoop out of pumpTokenizer.
1149
1150         Inlined m_parserChunkSize in HTMLParserScheduler into checkForYieldBeforeToken, and removed needsYield
1151         from PumpSession in favor of making checkForYieldBeforeToken and checkForYieldBeforeScript return a bool.
1152
1153         No new tests since this is a pure refactoring.
1154
1155         * html/parser/HTMLDocumentParser.cpp:
1156         (WebCore::HTMLDocumentParser::canTakeNextToken): Deleted.
1157         (WebCore::HTMLDocumentParser::pumpTokenizerLoop): Extracted from pumpTokenizer. We don't have to check
1158         isStopped() at the beginning since pumpTokenizer asserts that. Return true when session.needsYield would
1159         have been set to true in the old code and return false elsewhere (for stopping or incomplete token).
1160         (WebCore::HTMLDocumentParser::pumpTokenizer):
1161         * html/parser/HTMLDocumentParser.h:
1162         * html/parser/HTMLParserScheduler.cpp:
1163         (WebCore::PumpSession::PumpSession):
1164         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
1165         (WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript): Renamed from checkForYieldBeforeScript.
1166         * html/parser/HTMLParserScheduler.h:
1167         (WebCore::HTMLParserScheduler::shouldYieldBeforeToken): Renamed from checkForYieldBeforeToken.
1168         (WebCore::HTMLParserScheduler::isScheduledForResume):
1169         (WebCore::HTMLParserScheduler::checkForYield): Extracted from checkForYieldBeforeToken. Reset
1170         processedTokens to 1 instead of setting it to 0 here and incrementing it later as done in the old code.
1171
1172 2016-02-24  Daniel Bates  <dabates@apple.com>
1173
1174         CSP: Enable plugin-types directive by default
1175         https://bugs.webkit.org/show_bug.cgi?id=154420
1176         <rdar://problem/24730322>
1177
1178         Reviewed by Brent Fulgham.
1179
1180         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
1181         (WebCore::isExperimentalDirectiveName): Move plugin-types from the directives considered
1182         experimental to...
1183         (WebCore::isCSPDirectiveName): ...the list of standard directives.
1184         (WebCore::ContentSecurityPolicyDirectiveList::addDirective): Move logic to parse the plugin-types
1185         directive outside the ENABLE(CSP_NEXT) macro guarded section/experimental feature runtime flag.
1186
1187 2016-02-24  Ryan Haddad  <ryanhaddad@apple.com>
1188
1189         Speculative fix for ios build.
1190
1191         Unreviewed build fix.
1192
1193         * bindings/objc/DOM.mm:
1194         (-[DOMNode nextFocusNode]):
1195         (-[DOMNode previousFocusNode]):
1196
1197 2016-02-24  Zalan Bujtas  <zalan@apple.com>
1198
1199         Background of an absolutely positioned inline element inside text-indented parent is positioned statically.
1200         https://bugs.webkit.org/show_bug.cgi?id=154019
1201
1202         Reviewed by Simon Fraser.
1203
1204         This patch ensures that statically positioned out-of-flow renderers are also text-aligned
1205         even when none of the renderers on the first line generate a linebox (so we end up with no bidi runs at all).
1206         The fix is to pass IndentTextOrNot information to startAlignedOffsetForLine through updateStaticInlinePositionForChild
1207         so that we can compute the left position for this statically positioned out of flow renderer.
1208
1209         Test: fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html
1210
1211         * rendering/RenderBlockFlow.cpp:
1212         (WebCore::RenderBlockFlow::adjustPositionedBlock):
1213         (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
1214         * rendering/RenderBlockFlow.h:
1215         * rendering/RenderBlockLineLayout.cpp:
1216         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1217         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
1218         * rendering/line/LineBreaker.cpp:
1219         (WebCore::LineBreaker::skipTrailingWhitespace):
1220         (WebCore::LineBreaker::skipLeadingWhitespace):
1221         * rendering/line/LineInlineHeaders.h: webkit.org/b/154628 fixes the bool vs IndentTextOrNot issue.
1222         (WebCore::setStaticPositions):
1223
1224 2016-02-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1225
1226         Remove IteratorKey and IteratorValue declarations from JSXX class declarations.
1227         https://bugs.webkit.org/show_bug.cgi?id=154577
1228
1229         Reviewed by Myles C. Maxfield.
1230
1231         No change of behavior.
1232
1233         * bindings/scripts/CodeGeneratorJS.pm:
1234         (GenerateHeader): Deleted declaration of IteratorKey and IteratorValue.
1235         * bindings/scripts/test/JS/JSTestObj.h:
1236         (WebCore::JSTestObj::createStructure): Rebasing of binding test expectation.
1237
1238 2016-02-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1239
1240         [Fetch API] Refactor FetchHeaders initialization with iterators
1241         https://bugs.webkit.org/show_bug.cgi?id=154537
1242
1243         Reviewed by Darin Adler.
1244
1245         Covered by existing tests.
1246
1247         * Modules/fetch/FetchHeaders.cpp:
1248         (WebCore::initializeWith): Deleted.
1249         * Modules/fetch/FetchHeaders.h: Removed FetchHeaders::initializeWith.
1250         * Modules/fetch/FetchHeaders.idl: Ditto.
1251         * Modules/fetch/FetchHeaders.js:
1252         (initializeFetchHeaders): Making use of iterators to fill headers.
1253
1254 2016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1255
1256         Unreviewed. Fix GObject DOM bindings API break after r196998.
1257
1258         webkit_dom_node_clone_node can now raise exceptions, so rename it
1259         as webkit_dom_node_clone_node_with_error and deprecate the old one
1260         that calls the new one ignoring the error.
1261
1262         * bindings/gobject/WebKitDOMDeprecated.cpp:
1263         (webkit_dom_node_clone_node):
1264         * bindings/gobject/WebKitDOMDeprecated.h:
1265         * bindings/gobject/WebKitDOMDeprecated.symbols:
1266         * bindings/gobject/webkitdom.symbols:
1267         * bindings/scripts/CodeGeneratorGObject.pm:
1268         (FunctionUsedToNotRaiseException):
1269         (GenerateFunction):
1270
1271 2016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1272
1273         REGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since r195949
1274         https://bugs.webkit.org/show_bug.cgi?id=153747
1275
1276         Reviewed by Michael Catanzaro.
1277
1278         Do not return early when reaching a boundary if there's a range
1279         selection. In that case, the selection will be cleared and
1280         accessibility will be notified.
1281
1282         Test: editing/selection/move-to-line-boundary-clear-selection.html
1283
1284         * editing/FrameSelection.cpp:
1285         (WebCore::FrameSelection::modify):
1286
1287 2016-02-24  Alejandro G. Castro  <alex@igalia.com>
1288
1289         [Gstreamer] Mediaplayer should observe the tracks and not the source
1290         https://bugs.webkit.org/show_bug.cgi?id=154582
1291
1292         Reviewed by Philippe Normand.
1293
1294         We have to observe the track objects that define the
1295         mediastream. Replace the source attributes with the new tracks and
1296         use them properly in the class.
1297
1298         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
1299         (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
1300         Make sure we are not observing anymore the tracks after
1301         destruction.
1302         (WebCore::MediaPlayerPrivateGStreamerOwr::hasVideo): Used the track
1303         instead of the source.
1304         (WebCore::MediaPlayerPrivateGStreamerOwr::hasAudio): Ditto.
1305         (WebCore::MediaPlayerPrivateGStreamerOwr::currentTime): Ditto.
1306         (WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad): Ditto.
1307         (WebCore::MediaPlayerPrivateGStreamerOwr::stop): Ditto.
1308         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): Added, new
1309         track observer API, make sure we disable the ended tracks.
1310         (WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
1311         Added, new track observer API.
1312         (WebCore::MediaPlayerPrivateGStreamerOwr::trackSettingsChanged):
1313         Added, new track observer API.
1314         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
1315         Added, new track observer API.
1316         (WebCore::MediaPlayerPrivateGStreamerOwr::sourceStopped): Deleted,
1317         source observer API.
1318         (WebCore::MediaPlayerPrivateGStreamerOwr::sourceMutedChanged):
1319         Deleted, source observer API.
1320         (WebCore::MediaPlayerPrivateGStreamerOwr::sourceSettingsChanged):
1321         Deleted, source observer API.
1322         (WebCore::MediaPlayerPrivateGStreamerOwr::preventSourceFromStopping):
1323         Deleted, source observer API.
1324         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
1325         Replaced the attributes representing the source with the tracks
1326         and added the new track observer functions.
1327
1328 2016-02-23  Sergio Villar Senin  <svillar@igalia.com>
1329
1330         [css-grid] Swap the order of columns/rows in grid-gap shorthand
1331         https://bugs.webkit.org/show_bug.cgi?id=154584
1332
1333         The latest editor's draft have just changed the order. Now it
1334         should be <grid-row-gap> <grid-column-gap>?.
1335
1336         Reviewed by Darin Adler.
1337
1338         * css/CSSParser.cpp:
1339         (WebCore::CSSParser::parseGridGapShorthand):
1340         * css/CSSPropertyNames.in:
1341
1342 2016-02-24  Ryosuke Niwa  <rniwa@webkit.org>
1343
1344         Move FocusNavigationScope into FocusController.cpp
1345         https://bugs.webkit.org/show_bug.cgi?id=154630
1346
1347         Reviewed by Darin Adler.
1348
1349         Moved FocusNavigationScope from FocusController.h to FocusController.cpp.
1350
1351         * bindings/objc/DOM.mm:
1352         (-[DOMNode nextFocusNode]):
1353         (-[DOMNode previousFocusNode]):
1354         * page/FocusController.cpp:
1355         (WebCore::parentInScope):
1356         (WebCore::FocusNavigationScope::firstChildInScope): Moved into FocusNavigationScope.
1357         (WebCore::FocusNavigationScope::lastChildInScope): Ditto.
1358         (WebCore::FocusNavigationScope::nextInScope): Ditto.
1359         (WebCore::FocusNavigationScope::previousInScope): Ditto.
1360         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
1361         (WebCore::FocusController::findFocusableElementRecursively):
1362         (WebCore::FocusController::findFocusableElement):
1363         (WebCore::nextElementWithGreaterTabIndex):
1364         (WebCore::previousElementWithLowerTabIndex):
1365         (WebCore::FocusController::nextFocusableElement): Added a variant for DOM.mm and WebPageIOS.mm.
1366         (WebCore::FocusController::previousFocusableElement): Ditto.
1367         (WebCore::FocusController::nextFocusableElement):
1368         (WebCore::FocusController::previousFocusableElement): Use if instead of for loop for clarity.
1369         * page/FocusController.h:
1370
1371 2016-02-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1372
1373         WebRTC: RTCPeerConnection: Sort out responsibilities of close() and stop()
1374         https://bugs.webkit.org/show_bug.cgi?id=154581
1375
1376         Reviewed by Eric Carlson.
1377
1378         Let RTCPeerConnection::close() contain all teardown logic be called by stop().
1379         close() is also responisble for stopping the PeerConnectionBackend and stopping
1380         all RTCRtpSender objects.
1381
1382         Test coverage:
1383         fast/mediastream/RTCRtpSender-replaceTrack.html (updated)
1384         fast/mediastream/RTCPeerConnection-closed-state.html
1385
1386         * Modules/mediastream/RTCPeerConnection.cpp:
1387         (WebCore::RTCPeerConnection::close):
1388         (WebCore::RTCPeerConnection::stop):
1389         (WebCore::RTCPeerConnection::RTCPeerConnection): Deleted.
1390         * Modules/mediastream/RTCPeerConnection.h:
1391
1392 2016-02-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1393
1394         WebRTC: Add addReceiver() function to PeerConnectionBackendClient interface
1395         https://bugs.webkit.org/show_bug.cgi?id=154583
1396
1397         Reviewed by Eric Carlson.
1398
1399         The addRecevier() notifies the PeerConnectionBackendClient that a new RTCRtpReceiver,
1400         representing an MediaStreamTrack received from a remote peer, is added.
1401
1402         * Modules/mediastream/PeerConnectionBackend.h:
1403         * Modules/mediastream/RTCPeerConnection.cpp:
1404         (WebCore::RTCPeerConnection::addReceiver):
1405         * Modules/mediastream/RTCPeerConnection.h:
1406
1407 2016-02-23  Olivier Blin  <olivier.blin@softathome.com>
1408
1409         Support building LocaleICU with light ICU (UCONFIG_NO_FORMATTING)
1410         https://bugs.webkit.org/show_bug.cgi?id=154484
1411
1412         Reviewed by Darin Adler.
1413
1414         In this mode, this makes LocaleICU with UCONFIG_NO_FORMATTING
1415         essentially the same as LocaleNone, but allows to keep using ICU for
1416         other features.
1417
1418         * platform/text/LocaleICU.cpp:
1419         (WebCore::LocaleICU::LocaleICU):
1420         (WebCore::LocaleICU::~LocaleICU):
1421         (WebCore::LocaleICU::initializeLocaleData):
1422         * platform/text/LocaleICU.h:
1423
1424 2016-02-23  Myles C. Maxfield  <mmaxfield@apple.com>
1425
1426         Remove dead FontLoader code
1427         https://bugs.webkit.org/show_bug.cgi?id=154625
1428
1429         Reviewed by Darin Adler.
1430
1431         This code has been replaced by FontFaceSet.
1432
1433         No new tests because there is no behavior change.
1434
1435         * CMakeLists.txt:
1436         * DerivedSources.cpp:
1437         * DerivedSources.make:
1438         * WebCore.vcxproj/WebCore.vcxproj:
1439         * WebCore.vcxproj/WebCore.vcxproj.filters:
1440         * WebCore.xcodeproj/project.pbxproj:
1441         * css/CSSAllInOne.cpp:
1442         * css/FontLoader.cpp: Removed.
1443         (WebCore::LoadFontCallback::create): Deleted.
1444         (WebCore::LoadFontCallback::createFromParams): Deleted.
1445         (WebCore::LoadFontCallback::~LoadFontCallback): Deleted.
1446         (WebCore::LoadFontCallback::familyCount): Deleted.
1447         (WebCore::LoadFontCallback::LoadFontCallback): Deleted.
1448         (WebCore::LoadFontCallback::notifyLoaded): Deleted.
1449         (WebCore::LoadFontCallback::notifyError): Deleted.
1450         (WebCore::FontLoader::loadFontDone): Deleted.
1451         (WebCore::FontLoader::FontLoader): Deleted.
1452         (WebCore::FontLoader::~FontLoader): Deleted.
1453         (WebCore::FontLoader::eventTargetData): Deleted.
1454         (WebCore::FontLoader::ensureEventTargetData): Deleted.
1455         (WebCore::FontLoader::eventTargetInterface): Deleted.
1456         (WebCore::FontLoader::scriptExecutionContext): Deleted.
1457         (WebCore::FontLoader::didLayout): Deleted.
1458         (WebCore::FontLoader::activeDOMObjectName): Deleted.
1459         (WebCore::FontLoader::canSuspendForDocumentSuspension): Deleted.
1460         (WebCore::FontLoader::scheduleEvent): Deleted.
1461         (WebCore::FontLoader::firePendingEvents): Deleted.
1462         (WebCore::FontLoader::beginFontLoading): Deleted.
1463         (WebCore::FontLoader::fontLoaded): Deleted.
1464         (WebCore::FontLoader::loadError): Deleted.
1465         (WebCore::FontLoader::notifyWhenFontsReady): Deleted.
1466         (WebCore::FontLoader::loadingDone): Deleted.
1467         (WebCore::FontLoader::loadFont): Deleted.
1468         (WebCore::FontLoader::checkFont): Deleted.
1469         (WebCore::applyPropertyToCurrentStyle): Deleted.
1470         (WebCore::FontLoader::resolveFontStyle): Deleted.
1471         * css/FontLoader.h: Removed.
1472         * css/FontLoader.idl: Removed.
1473         * page/FrameView.cpp:
1474
1475 2016-02-23  Per Arne Vollan  <peavo@outlook.com>
1476
1477         [WinCairo][MediaFoundation] Implement methods to set volume.
1478         https://bugs.webkit.org/show_bug.cgi?id=154580
1479
1480         Reviewed by Alex Christensen.
1481
1482         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1483         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
1484         (WebCore::MediaPlayerPrivateMediaFoundation::setVolume):
1485         (WebCore::MediaPlayerPrivateMediaFoundation::supportsMuting):
1486         (WebCore::MediaPlayerPrivateMediaFoundation::setMuted):
1487         (WebCore::MediaPlayerPrivateMediaFoundation::networkState):
1488         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1489
1490 2016-02-23  Chris Dumez  <cdumez@apple.com>
1491
1492         [Reflected] IDL attributes of integer types should use HTML rules for parsing integers
1493         https://bugs.webkit.org/show_bug.cgi?id=154573
1494
1495         Reviewed by Darin Adler.
1496
1497         [Reflected] IDL attributes of integer types should use HTML rules for
1498         parsing integers:
1499         - https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes
1500
1501         Those rules are defined here:
1502         - https://html.spec.whatwg.org/#rules-for-parsing-integers
1503         - https://html.spec.whatwg.org/#rules-for-parsing-non-negative-integers
1504
1505         We already had an implementation for parsing HTML integers but our reflected
1506         attributes currently use WTFString::toInt() / toUint() instead.
1507
1508         No new tests, already covered by existing tests.
1509
1510         * dom/Element.cpp:
1511         (WebCore::Element::getIntegralAttribute):
1512         This method used by the bindings only, for reflected IDL attributed of
1513         type 'long'. Now call parseHTMLInteger() instead of String::toInt() to
1514         parse the content attribute as per the HTML specification.
1515
1516         (WebCore::Element::getUnsignedIntegralAttribute):
1517         This method used by the bindings only, for reflected IDL attributed of
1518         type 'unsigned long'. Now call parseHTMLNonNegativeInteger() instead of
1519         String::toUInt() to parse the content attribute as per the HTML
1520         specification.
1521
1522         * html/parser/HTMLParserIdioms.cpp:
1523         (WebCore::parseHTMLIntegerInternal):
1524         Fix a bug in our implementation of parseHTMLIntegerInternal() that
1525         would cause the string "−2147483648" to be parsed as 0. It should
1526         be parsed as −2147483648, which is in the valid range as per:
1527         http://heycam.github.io/webidl/#idl-long
1528
1529 2016-02-23  Chris Dumez  <cdumez@apple.com>
1530
1531         Align our implementation of Range.createContextualFragment with the specification
1532         https://bugs.webkit.org/show_bug.cgi?id=154627
1533
1534         Reviewed by Ryosuke Niwa.
1535
1536         Align our implementation of Range.createContextualFragment with the
1537         specification:
1538         - https://w3c.github.io/DOM-Parsing/#widl-Range-createContextualFragment-DocumentFragment-DOMString-fragment
1539
1540         In particular, if the Range's start node is a Document / DocumentFragment,
1541         we now create a new HTMLBodyElement and use it as context element, instead
1542         of throwing an exception.
1543
1544         This also aligns our behavior with Firefox and Chrome.
1545
1546         Tests: imported/blink/fast/dom/Range/create-contextual-fragment-from-bodyless-document-range.html
1547                imported/blink/fast/dom/Range/create-contextual-fragment-from-detached-text-node-range.html
1548                imported/blink/fast/dom/Range/create-contextual-fragment-from-document-fragment-range.html
1549                imported/blink/fast/dom/Range/create-contextual-fragment-from-document-range.html
1550                imported/blink/fast/dom/Range/create-contextual-fragment-from-xhtml-document-range.xhtml
1551                imported/blink/fast/dom/Range/create-contextual-fragment-script-not-ran.html
1552                imported/blink/fast/dom/Range/create-contextual-fragment-script-unmark-already-started.html
1553
1554         * dom/Range.cpp:
1555         (WebCore::Range::createContextualFragment):
1556
1557 2016-02-23  Dan Bernstein  <mitz@apple.com>
1558
1559         [Xcode] Linker errors display mangled names, but no longer should
1560         https://bugs.webkit.org/show_bug.cgi?id=154632
1561
1562         Reviewed by Sam Weinig.
1563
1564         * Configurations/Base.xcconfig: Stop setting LINKER_DISPLAYS_MANGLED_NAMES to YES.
1565
1566 2016-02-23  Dean Jackson  <dino@apple.com>
1567
1568         [WebGL] iOS doesn't respect the alpha:false context creation attribute
1569         https://bugs.webkit.org/show_bug.cgi?id=154617
1570         <rdar://problem/13417023>
1571
1572         Reviewed by Sam Weinig.
1573
1574         On iOS we were not respecting the alpha:false context creation
1575         attribute, which meant you always got output that could
1576         have an alpha channel.
1577
1578         The good news is that now we're setting the opaque flag on
1579         the CALayer, there should be a performance improvement when
1580         compositing WebGL into the page.
1581
1582         Test: fast/canvas/webgl/context-attributes-alpha.html
1583
1584         * platform/graphics/mac/GraphicsContext3DMac.mm:
1585         (WebCore::GraphicsContext3D::GraphicsContext3D): Don't tell the layer
1586         to be transparent.
1587         (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): Do it
1588         here instead, but based on the value of the alpha attribute.
1589
1590 2016-02-23  Daniel Bates  <dabates@apple.com>
1591
1592         CSP: Enable base-uri directive by default
1593         https://bugs.webkit.org/show_bug.cgi?id=154521
1594         <rdar://problem/24762032>
1595
1596         Reviewed by Brent Fulgham.
1597
1598         Tests: http/tests/security/contentSecurityPolicy/1.1/base-uri-default-ignored.html
1599                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-base-uri-deny.html
1600
1601         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
1602         (WebCore::isExperimentalDirectiveName): Move base-uri from the directives considered
1603         experimental to...
1604         (WebCore::isCSPDirectiveName): ...the list of standard directives.
1605         (WebCore::ContentSecurityPolicyDirectiveList::addDirective): Move logic to parse the base-uri
1606         directive outside the ENABLE(CSP_NEXT) macro guarded section/experimental feature runtime flag.
1607
1608 2016-02-23  Gavin Barraclough  <barraclough@apple.com>
1609
1610         Remove HIDDEN_PAGE_DOM_TIMER_THROTTLING feature define
1611         https://bugs.webkit.org/show_bug.cgi?id=112323
1612
1613         Reviewed by Chris Dumez.
1614
1615         This feature is controlled by a runtime switch, and defaults off.
1616
1617         * Configurations/FeatureDefines.xcconfig:
1618         * page/Page.cpp:
1619         (WebCore::Page::setTimerThrottlingEnabled):
1620         * page/Settings.cpp:
1621         (WebCore::Settings::Settings):
1622         (WebCore::Settings::shouldRespectPriorityInCSSAttributeSetters):
1623         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
1624         (WebCore::Settings::setHiddenPageDOMTimerThrottlingAutoIncreases):
1625         * page/Settings.h:
1626         (WebCore::Settings::layoutInterval):
1627         (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
1628         (WebCore::Settings::hiddenPageDOMTimerThrottlingAutoIncreases):
1629
1630 2016-02-23  Gavin Barraclough  <barraclough@apple.com>
1631
1632         Add a mechanism to automatically ramp up timer alignment.
1633         https://bugs.webkit.org/show_bug.cgi?id=154578
1634
1635         Reviewed by Antti Koivisto & Chris Dumez.
1636
1637         Allow timer alignment duration to be proportional to the time the page
1638         has been hidden. This implementation does so by scaling up the throttle
1639         in exponential steps, spaced exponentially far apart.
1640
1641         * page/Page.cpp:
1642         (WebCore::Page::Page):
1643             - initialize timer.
1644         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged):
1645             - if setting are changed fully disable/reenable to ensure new setting are read.
1646         (WebCore::Page::setTimerThrottlingEnabled):
1647             - enebled bool flag converted to an Optional<double>, tracking time throttling
1648               is enabled.
1649         (WebCore::Page::setDOMTimerAlignmentInterval):
1650             - when new mechanism is enabled schedule a timer to step up alignment.
1651         (WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):
1652             - when timer fires increase alignment.
1653         * page/Page.h:
1654             - added new member.
1655         * page/Settings.cpp:
1656         (WebCore::Settings::Settings):
1657             - initialize new member.
1658         (WebCore::Settings::setHiddenPageDOMTimerThrottlingAutoIncreaseLimit):
1659             - added, update new setting. Setting to zero disabled. A non-zero value is a
1660               duration in seconds for timer throttling to ramp up to.
1661         * page/Settings.h:
1662         (WebCore::Settings::hiddenPageDOMTimerThrottlingAutoIncreases):
1663             - read as boolean whether throttle increasing is enabled.
1664         (WebCore::Settings::hiddenPageDOMTimerThrottlingAutoIncreaseLimit):
1665             - read throttle increasing limit.
1666
1667 2016-02-22  Ada Chan  <adachan@apple.com>
1668
1669         Refactor script that updates fullscreen buttons.
1670         https://bugs.webkit.org/show_bug.cgi?id=154562
1671
1672         Reviewed by Dean Jackson.
1673
1674         Also expose extra property and element in getCurrentControlsStatus() for future testing.
1675
1676         * Modules/mediacontrols/mediaControlsApple.js:
1677         (Controller.prototype.updatePictureInPictureButton):
1678         (Controller.prototype.updateFullscreenButtons):
1679
1680 2016-02-22  Ryosuke Niwa  <rniwa@webkit.org>
1681
1682         Calling importNode on shadow root causes a crash
1683         https://bugs.webkit.org/show_bug.cgi?id=154570
1684
1685         Reviewed by Anders Carlsson.
1686
1687         The bug was caused by a missing check in cloneNode. Added cloneNodeForBindings to explicitly throw
1688         an NotSupportedError when it's called on a shadow root. We don't clone shadow root when deep-cloning
1689         the tree so we don't have to check that condition.
1690
1691         The behavior of cloneNode is specified at:
1692         http://w3c.github.io/webcomponents/spec/shadow/#the-shadowroot-interface
1693         (it current says we should throw DATA_CLONE_ERR but I have an spec bug filed at
1694         https://github.com/w3c/webcomponents/issues/393)
1695
1696         The behavior of importNode and adoptNode are specified in DOM4 specification:
1697         https://dom.spec.whatwg.org/#dom-document-importnode
1698         https://dom.spec.whatwg.org/#dom-document-adoptnode
1699
1700         Tests: fast/shadow-dom/Document-prototype-adoptNode.html
1701                fast/shadow-dom/Document-prototype-importNode.html
1702                fast/shadow-dom/Node-prototype-cloneNode.html
1703
1704         * dom/Document.cpp:
1705         (WebCore::Document::importNode): Throw NotSupportedError when importing a shadow root.
1706         * dom/Node.cpp:
1707         (WebCore::Node::cloneNodeForBindings): Added.
1708         * dom/Node.h:
1709         * dom/Node.idl: Use cloneNodeForBindings here.
1710
1711 2016-02-23  Daniel Bates  <dabates@apple.com>
1712
1713         REGRESSION (r196892): No longer emit error message when CSP form-action directive is used as a source expression
1714         https://bugs.webkit.org/show_bug.cgi?id=154555
1715         <rdar://problem/24776777>
1716
1717         Reviewed by Andy Estes.
1718
1719         Fixes an issue where an error message is not emitted when directive form-action is used as a
1720         source expression. Prior to <http://trac.webkit.org/changeset/196892>, when directive form-action
1721         was used as a source expression a console error message would be emitted with the form:
1722
1723             The Content Security Policy directive 'script-src' contains 'form-action' as a source expression.
1724             Did you mean 'script-src ...; form-action...' (note the semicolon)?
1725
1726         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
1727         (WebCore::isCSPDirectiveName): Return true if the specified directive name is "form-action".
1728
1729 2016-02-23  Simon Fraser  <simon.fraser@apple.com>
1730
1731         Lay the groundwork for more constness in StyleResolver-related code
1732         https://bugs.webkit.org/show_bug.cgi?id=154598
1733
1734         Reviewed by Antti Koivisto.
1735
1736         Make some of the leaf functions that are used by the style resolver take 
1737         const CSSValues, and use 'auto' more to automatically get const stack variables
1738         when appropriate.
1739
1740         * css/CSSBorderImageSliceValue.h:
1741         (WebCore::CSSBorderImageSliceValue::slices):
1742         * css/CSSPrimitiveValue.h:
1743         (WebCore::CSSPrimitiveValue::isQuirkValue):
1744         * css/FontVariantBuilder.cpp:
1745         (WebCore::extractFontVariantLigatures):
1746         (WebCore::extractFontVariantNumeric):
1747         (WebCore::extractFontVariantEastAsian):
1748         * css/FontVariantBuilder.h:
1749         * css/StyleBuilderConverter.h:
1750         (WebCore::StyleBuilderConverter::convertReflection):
1751         (WebCore::StyleBuilderConverter::convertGridAutoFlow):
1752         * css/StyleBuilderCustom.h:
1753         (WebCore::StyleBuilderCustom::applyValueSize):
1754         (WebCore::StyleBuilderCustom::applyValueStroke):
1755         * css/StyleResolver.cpp:
1756         (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement):
1757         (WebCore::StyleResolver::colorFromPrimitiveValue):
1758         (WebCore::StyleResolver::createFilterOperations):
1759         * css/StyleResolver.h:
1760         * css/TransformFunctions.cpp:
1761         (WebCore::transformsForValue):
1762         * css/TransformFunctions.h:
1763         * rendering/style/StylePendingImage.h:
1764         * svg/SVGLength.cpp:
1765         (WebCore::SVGLength::fromCSSPrimitiveValue):
1766         * svg/SVGLength.h:
1767
1768 2016-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
1769
1770         [css-grid] Avoid duplicated calls to resolution code
1771         https://bugs.webkit.org/show_bug.cgi?id=154336
1772
1773         Reviewed by Sergio Villar Senin.
1774
1775         We were calling GridResolvedPosition::resolveGridPositionsFromStyle()
1776         several times per item.
1777
1778         We can store the GridCoordinates in
1779         RenderGrid::populateExplicitGridAndOrderIterator()
1780         and reuse them in the placement code.
1781         Once RenderGrid::placeItemsOnGrid() is over,
1782         all the items will have a definite position in both axis.
1783
1784         No new tests, no change of behavior.
1785
1786         * rendering/RenderGrid.cpp:
1787         (WebCore::RenderGrid::insertItemIntoGrid):
1788         (WebCore::RenderGrid::placeItemsOnGrid):
1789         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
1790         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1791         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1792         (WebCore::RenderGrid::cachedGridCoordinate):
1793         (WebCore::RenderGrid::cachedGridSpan):
1794         * rendering/RenderGrid.h:
1795
1796 2016-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
1797
1798         [css-grid] Rows track sizes are optional in grid-template shorthand
1799         https://bugs.webkit.org/show_bug.cgi?id=154586
1800
1801         Reviewed by Sergio Villar Senin.
1802
1803         You can omit the size of the rows in grid-template shorthand,
1804         even if you specify a named grid line for the end of the row,
1805         due to a change in the spec back in 2014:
1806         https://github.com/w3c/csswg-drafts/commit/9f660c4183c73c1f5279c46904dc6cb314f76194
1807
1808         Before if you want to specify a named grid line,
1809         you need to set the row size.
1810
1811         Update parsing, so it nows accepts things like:
1812             grid-template: 100px / "a" [bottom];
1813
1814         * css/CSSParser.cpp:
1815         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns):
1816         (WebCore::CSSParser::parseGridTemplateShorthand):
1817
1818 2016-02-23  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
1819
1820         [SVG] Update SVG source to return string literals as ASCIILiteral and add test cases for case sensitivity
1821         https://bugs.webkit.org/show_bug.cgi?id=154373
1822
1823         Reviewed by Youenn Fablet.
1824
1825         Update SVGAnimatedEnumeration toString method to return ASCIILiteral for string literals and add test cases for
1826         case-sensitivity for these elements.
1827
1828         Test: svg/dom/SVGAnimatedEnumeration-case-sensitive.html
1829
1830         * svg/SVGComponentTransferFunctionElement.h:
1831         (WebCore::SVGPropertyTraits<ComponentTransferType>::toString):
1832         * svg/SVGFEBlendElement.h:
1833         (WebCore::SVGPropertyTraits<BlendMode>::toString):
1834         * svg/SVGFEColorMatrixElement.h:
1835         (WebCore::SVGPropertyTraits<ColorMatrixType>::toString):
1836         * svg/SVGFECompositeElement.h:
1837         (WebCore::SVGPropertyTraits<CompositeOperationType>::toString):
1838         * svg/SVGFEConvolveMatrixElement.h:
1839         (WebCore::SVGPropertyTraits<EdgeModeType>::toString):
1840         * svg/SVGFEDisplacementMapElement.h:
1841         (WebCore::SVGPropertyTraits<ChannelSelectorType>::toString):
1842         * svg/SVGFEMorphologyElement.h:
1843         (WebCore::SVGPropertyTraits<MorphologyOperatorType>::toString):
1844         * svg/SVGFETurbulenceElement.h:
1845         (WebCore::SVGPropertyTraits<SVGStitchOptions>::toString):
1846         (WebCore::SVGPropertyTraits<TurbulenceType>::toString):
1847         * svg/SVGGradientElement.h:
1848         (WebCore::SVGPropertyTraits<SVGSpreadMethodType>::toString):
1849         * svg/SVGMarkerElement.h:
1850         (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString):
1851         * svg/SVGTextContentElement.h:
1852         (WebCore::SVGPropertyTraits<SVGLengthAdjustType>::toString):
1853         * svg/SVGTextPathElement.h:
1854         (WebCore::SVGPropertyTraits<SVGTextPathMethodType>::toString):
1855         (WebCore::SVGPropertyTraits<SVGTextPathSpacingType>::toString):
1856         * svg/SVGUnitTypes.h:
1857         (WebCore::SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::toString):
1858
1859 2016-02-23  Csaba Osztrogonác  <ossy@webkit.org>
1860
1861         [Mac][cmake] Unreviewed speculative buildfix after r196779. Just for fun.
1862
1863         * PlatformMac.cmake:
1864
1865 2016-02-23  Antti Koivisto  <antti@apple.com>
1866
1867         Remove tab suspension code
1868         https://bugs.webkit.org/show_bug.cgi?id=154585
1869
1870         Reviewed by Andreas Kling.
1871
1872         It causes too many problems.
1873
1874         * page/Page.cpp:
1875         (WebCore::networkStateChanged):
1876         (WebCore::Page::Page):
1877         (WebCore::Page::setPageActivityState):
1878         (WebCore::Page::setIsVisible):
1879         (WebCore::Page::setIsVisibleInternal):
1880         (WebCore::Page::setIsPrerender):
1881         (WebCore::Page::setResourceUsageOverlayVisible):
1882         (WebCore::Page::canTabSuspend): Deleted.
1883         (WebCore::Page::setIsTabSuspended): Deleted.
1884         (WebCore::Page::setTabSuspensionEnabled): Deleted.
1885         (WebCore::Page::updateTabSuspensionState): Deleted.
1886         (WebCore::Page::tabSuspensionTimerFired): Deleted.
1887         * page/Page.h:
1888         (WebCore::Page::setEditable):
1889         (WebCore::Page::isEditable):
1890         (WebCore::Page::setShowAllPlugins):
1891
1892 2016-02-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1893
1894         Refactor DOM Iterator next signature
1895         https://bugs.webkit.org/show_bug.cgi?id=154531
1896
1897         Reviewed by Myles C. Maxfield.
1898
1899         Covered by existing tests.
1900
1901         * Modules/fetch/FetchHeaders.cpp:
1902         (WebCore::FetchHeaders::Iterator::next): Using Optional<KeyValuePair> to return iterator value.
1903         * Modules/fetch/FetchHeaders.h:
1904         * bindings/js/JSKeyValueIterator.h: Using Optional<KeyValuePair> as returned iterator value.
1905         (WebCore::keyValueIteratorForEach):
1906         (WebCore::JSKeyValueIterator<JSWrapper>::next):
1907         * css/FontFaceSet.cpp:
1908         (WebCore::FontFaceSet::Iterator::next): Using Optional<KeyValuePair> to return iterator value.
1909         * css/FontFaceSet.h:
1910
1911 2016-02-22  Gavin Barraclough  <barraclough@apple.com>
1912
1913         Some timer alignment cleanup.
1914         https://bugs.webkit.org/show_bug.cgi?id=154559
1915
1916         Reviewed by Chris Dumez.
1917
1918         Document shouldn't override Page's timer alignment policy with a lower alignment,
1919         and m_domTimerAlignmentInterval isn't really a Settings, it's just the current state
1920         for the page.
1921
1922         * dom/Document.cpp:
1923         (WebCore::Document::timerAlignmentInterval):
1924             - take the max of the possible intervals.
1925         * page/Page.cpp:
1926         (WebCore::Page::Page):
1927         (WebCore::Page::setTimerThrottlingEnabled):
1928         (WebCore::Page::setDOMTimerAlignmentInterval):
1929             - moved here from Settings.
1930         * page/Page.h:
1931         (WebCore::Page::domTimerAlignmentInterval):
1932             - moved here from Settings.
1933         * page/Settings.cpp:
1934         (WebCore::Settings::setDOMTimerAlignmentInterval): Deleted.
1935             - moved to Page.
1936         * page/Settings.h:
1937         (WebCore::Settings::domTimerAlignmentInterval): Deleted.
1938             - moved to Page.
1939
1940 2016-02-22  Myles C. Maxfield  <mmaxfield@apple.com>
1941
1942         Font features specified in @font-face blocks don't apply to local() families
1943         https://bugs.webkit.org/show_bug.cgi?id=154554
1944
1945         Reviewed by Dean Jackson.
1946
1947         The correct variables just need to be wired up. In addition, our caches need to be sensitive
1948         to the new data.
1949
1950         Test: css3/font-feature-font-face-local.html
1951
1952         * css/CSSFontFaceSource.cpp:
1953         (WebCore::CSSFontFaceSource::font):
1954         * platform/graphics/FontCache.cpp:
1955         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1956         (WebCore::FontPlatformDataCacheKey::operator==):
1957         (WebCore::FontPlatformDataCacheKeyHash::hash):
1958         (WebCore::FontCache::getCachedFontPlatformData):
1959         (WebCore::FontCache::fontForFamily):
1960         * platform/graphics/FontCache.h:
1961         * platform/graphics/FontFeatureSettings.h:
1962         (WebCore::FontFeature::operator!=):
1963         (WebCore::FontFeatureSettings::operator!=):
1964         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1965         (WebCore::fontWithFamily):
1966         (WebCore::FontCache::createFontPlatformData):
1967         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1968         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1969         * platform/graphics/mac/FontCacheMac.mm:
1970         (WebCore::FontCache::lastResortFallbackFont):
1971         * platform/text/TextFlags.h:
1972         (WebCore::FontVariantSettings::operator==):
1973         (WebCore::FontVariantSettings::operator!=):
1974         (WebCore::FontVariantSettings::uniqueValue):
1975
1976 2016-02-22  Daniel Bates  <dabates@apple.com>
1977
1978         REGRESSION (r196892): Crash in DocumentLoader::startLoadingMainResource()
1979         https://bugs.webkit.org/show_bug.cgi?id=154563
1980         <rdar://problem/24780678>
1981
1982         Reviewed by Alexey Proskuryakov.
1983
1984         Fixes an issue where the provisional loader may be deallocated when starting
1985         a load. One example where this can occur is when cancelling the provisional load
1986         as part of a form submission because the Content Security Policy of the page
1987         blocks the submission (it violates the directive form-action).
1988
1989         This crash is covered by the test http/tests/security/contentSecurityPolicy/1.1/form-action-src-blocked.html.
1990
1991         * loader/DocumentLoader.cpp:
1992         (WebCore::DocumentLoader::startLoadingMainResource): Take a ref before calling
1993         DocumentLoader::willSendRequest().
1994
1995 2016-02-16  Ada Chan  <adachan@apple.com>
1996
1997         Implement basic functionality in WebVideoFullscreenInterfaceMac.
1998         https://bugs.webkit.org/show_bug.cgi?id=153241
1999
2000         Reviewed by Beth Dakin.
2001
2002         * platform/cocoa/WebVideoFullscreenInterface.h:
2003         * platform/mac/WebVideoFullscreenInterfaceMac.h:
2004         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
2005         (WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
2006         (WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
2007         (WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
2008         (WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
2009         (WebCore::WebVideoFullscreenInterfaceMac::invalidate):
2010         (WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
2011
2012 2016-02-22  Chris Dumez  <cdumez@apple.com>
2013
2014         REGRESSION (r196563): Images not loading on https://klim.co.nz/blog/paypal-sans-design-information/
2015         https://bugs.webkit.org/show_bug.cgi?id=154547
2016         <rdar://problem/24772167>
2017
2018         Reviewed by Gavin Barraclough.
2019
2020         The Website was doing the following:
2021         $ var e = window.addEventListener;
2022         $ e("eventname", handler)
2023
2024         In such case, the jsEventTargetPrototypeFunctionDispatchEvent() bindings
2025         implementation was caused with a thisValue which is a JSLexicalEnvironment
2026         and the implementation did not know how to convert it into a global object.
2027         The previous implementation on JSDOMWindow used to handle tis correctly
2028         because it was always calling JSValue::toThis() on the thisValue before
2029         trying to cast it to a JSDOMWindow, and JSLexicalEnvironment::toThis()
2030         gets the globalThisValue. This patch updates the EventTarget bindings
2031         code to call always call toThis() on the thisValue before trying to
2032         cast it. This should correctly deal with JSLexicalEnvironment and be a
2033         no-op in usual cases.
2034
2035         No new tests, extended existing test.
2036
2037         * bindings/scripts/CodeGeneratorJS.pm:
2038         (GenerateFunctionCastedThis):
2039
2040 2016-02-22  Simon Fraser  <simon.fraser@apple.com>
2041
2042         Repeated background images have the wrong position when using bottom/right-relative background-position
2043         https://bugs.webkit.org/show_bug.cgi?id=154478
2044
2045         Reviewed by Dave Hyatt.
2046
2047         Fix RenderBoxModelObject::calculateBackgroundImageGeometry() to use the right position when
2048         painting repeated background images when right/bottom edges are used.
2049
2050         Also rename BackgroundEdgeOrigin to Edge
2051
2052         Test: fast/images/background-position.html
2053
2054         * css/CSSPrimitiveValueMappings.h:
2055         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2056         (WebCore::CSSPrimitiveValue::operator Edge):
2057         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin): Deleted.
2058         * rendering/RenderBoxModelObject.cpp:
2059         (WebCore::resolveEdgeRelativeLength):
2060         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2061         * rendering/style/FillLayer.cpp:
2062         (WebCore::FillLayer::FillLayer):
2063         * rendering/style/FillLayer.h:
2064         (WebCore::FillLayer::backgroundXOrigin):
2065         (WebCore::FillLayer::backgroundYOrigin):
2066         (WebCore::FillLayer::setBackgroundXOrigin):
2067         (WebCore::FillLayer::setBackgroundYOrigin):
2068         * rendering/style/RenderStyleConstants.cpp:
2069         (WebCore::operator<<):
2070         * rendering/style/RenderStyleConstants.h:
2071
2072 2016-02-22  Commit Queue  <commit-queue@webkit.org>
2073
2074         Unreviewed, rolling out r196935.
2075         https://bugs.webkit.org/show_bug.cgi?id=154557
2076
2077         This change causes timeouts and crashes in LayoutTests
2078         (Requested by ryanhaddad on #webkit).
2079
2080         Reverted changeset:
2081
2082         "Enable AVFoundationNSURLSessionEnabled by default"
2083         https://bugs.webkit.org/show_bug.cgi?id=154469
2084         http://trac.webkit.org/changeset/196935
2085
2086 2016-02-22  Myles C. Maxfield  <mmaxfield@apple.com>
2087
2088         [Font Loading] Split CSSFontSelector into a FontFaceSet implementation and the rest of the class
2089         https://bugs.webkit.org/show_bug.cgi?id=153347
2090
2091         Reviewed by Antti Koivisto.
2092
2093         This patch implements the document.fonts Javascript object. It does so by briding the
2094         already-existing FontFaceSet Javascript object with the CSSFontSelector WebCore object.
2095         CSSFontSelector used to hold internal objects for each @font-face object in the
2096         Document. These objects have been moved into CSSFontFaceSet, so CSSFontSelector simply
2097         just owns an instance of a CSSFontFaceSet.
2098
2099         The lifetime of the FontFace and FontFaceSet objects is a little interesting: because
2100         all the ownership references are inside the WebCore CSSFontFace{,Set} objects, the
2101         higher-level Javascript FontFace{,Set} objects are held through a WeakPtr. This means
2102         that if all the references to these higher-level objects go away, and you re-query the
2103         document for its FontFace objects, you may get a new object (albeit with the same
2104         state as a previous object). However, this won't occur if there are any references to
2105         the old object, which means it is almost not observable.
2106
2107         This patch doesn't implement the relationship between the CSSOM and the FontFace
2108         objects. Changing one should result in a change in the other, but that will be
2109         implemented in a forthcoming patch.
2110
2111         This patch also doesn't alter the lifetime of the CSSFontSelector, which means that all
2112         the Document's fonts may be destroyed and recreated from CSS. There are a few things
2113         which can trigger this. A subsequent patch will make the CSSFontSelector outlive the
2114         Document.
2115
2116         This patch does implement (and test) the ability to add a new FontFace to the Document
2117         to cause a relayout, as well as changing properties of existing FontFace objects already
2118         in the Document to cause a relayout.
2119
2120         Test: fast/text/font-face-set-document.html
2121
2122         * Modules/fetch/FetchHeaders.cpp:
2123         (WebCore::FetchHeaders::Iterator::next): Pass an extra argument.
2124         * Modules/fetch/FetchHeaders.h:
2125         * bindings/js/JSKeyValueIterator.h: The ExecState is necessary to build an external
2126         wrapper from an existing CSSFontFace object.
2127         (WebCore::JSKeyValueIterator<JSWrapper>::next):
2128         * css/CSSFontFace.cpp:
2129         (WebCore::CSSFontFace::appendSources): Moved from CSSFontSelector.
2130         (WebCore::CSSFontFace::CSSFontFace):
2131         (WebCore::CSSFontFace::notifyClientsOfFontPropertyChange):
2132         (WebCore::CSSFontFace::setFamilies):
2133         (WebCore::CSSFontFace::calculateStyle): Shared code between CSSFontFaceSet and
2134         CSSFontFace.
2135         (WebCore::CSSFontFace::setStyle): Update to use calculateStyle().
2136         (WebCore::CSSFontFace::calculateWeight): Ditto.
2137         (WebCore::CSSFontFace::setWeight): Update to use caculateWeight().
2138         (WebCore::CSSFontFace::setUnicodeRange): Notify clients.
2139         (WebCore::CSSFontFace::setVariantLigatures): Ditto.
2140         (WebCore::CSSFontFace::setVariantPosition): Ditto.
2141         (WebCore::CSSFontFace::setVariantCaps): Ditto.
2142         (WebCore::CSSFontFace::setVariantNumeric): Ditto.
2143         (WebCore::CSSFontFace::setVariantAlternates): Ditto.
2144         (WebCore::CSSFontFace::setVariantEastAsian): Ditto.
2145         (WebCore::CSSFontFace::setFeatureSettings): Ditto.
2146         (WebCore::CSSFontFace::removeClient):
2147         (WebCore::CSSFontFace::wrapper): Build a new wrapper if one doesn't already
2148         exist. Note that this requires an ExecState to create a promise.
2149         (WebCore::CSSFontFace::setStatus):
2150         (WebCore::CSSFontFace::fontLoaded):
2151         (WebCore::CSSFontFace::pump):
2152         (WebCore::CSSFontFace::font):
2153         * css/CSSFontFace.h:
2154         * css/CSSFontFaceSet.cpp:
2155         (WebCore::CSSFontFaceSet::CSSFontFaceSet): Moved code from CSSFontSelector.
2156         (WebCore::CSSFontFaceSet::~CSSFontFaceSet):
2157         (WebCore::CSSFontFaceSet::addClient): This object can now have multiple
2158         clients.
2159         (WebCore::CSSFontFaceSet::removeClient):
2160         (WebCore::CSSFontFaceSet::incrementActiveCount): Update for multiple clients.
2161         (WebCore::CSSFontFaceSet::decrementActiveCount): Ditto.
2162         (WebCore::CSSFontFaceSet::hasFace):
2163         (WebCore::CSSFontFaceSet::registerLocalFontFacesForFamily): Moved from
2164         CSSFontSelector.
2165         (WebCore::CSSFontFaceSet::familyNameFromPrimitive): Ditto.
2166         (WebCore::CSSFontFaceSet::addToFacesLookupTable): This helper function can
2167         be used when a property of a FontFace is changed.
2168         (WebCore::CSSFontFaceSet::add): Update to use addToFacesLookupTable().
2169         (WebCore::CSSFontFaceSet::removeFromFacesLookupTable): Same as
2170         addToFacesLookupTable().
2171         (WebCore::CSSFontFaceSet::remove): Update to use removeFromFacesLookupTable().
2172         (WebCore::CSSFontFaceSet::clear):
2173         (WebCore::CSSFontFaceSet::operator[]):
2174         (WebCore::computeFontTraitsMask): Moved from CSSFontSelector.
2175         (WebCore::CSSFontFaceSet::matchingFaces): Update to use new data structures.
2176         (WebCore::FontFaceComparator::FontFaceComparator): Moved from
2177         CSSFontSelector.
2178         (WebCore::FontFaceComparator::operator()):
2179         (WebCore::CSSFontFaceSet::getFontFace): Update to use new data structures.
2180         (WebCore::CSSFontFaceSet::fontStateChanged): Update to use multiple clients.
2181         (WebCore::CSSFontFaceSet::fontPropertyChanged): We must update our internal
2182         data structure if the family name changed.
2183         (WebCore::extractFamilies): Deleted.
2184         (WebCore::familiesIntersect): Deleted.
2185         (WebCore::CSSFontFaceSet::load): Deleted.
2186         (WebCore::CSSFontFaceSet::stateChanged): Deleted.
2187         * css/CSSFontFaceSet.h: Now needs to be RefCounted. New data structures are
2188         taken from CSSFontSelector.
2189         (WebCore::CSSFontFaceSetClient::faceFinished):
2190         (WebCore::CSSFontFaceSetClient::fontModified):
2191         (WebCore::CSSFontFaceSetClient::startedLoading):
2192         (WebCore::CSSFontFaceSetClient::completedLoading):
2193         * css/CSSFontFaceSource.h:
2194         * css/CSSFontSelector.cpp: Move code into CSSFontFaceSet.
2195         (WebCore::CSSFontSelector::CSSFontSelector):
2196         (WebCore::CSSFontSelector::~CSSFontSelector):
2197         (WebCore::CSSFontSelector::fontFaceSet):
2198         (WebCore::CSSFontSelector::isEmpty):
2199         (WebCore::CSSFontSelector::addFontFaceRule):
2200         (WebCore::CSSFontSelector::fontModified):
2201         (WebCore::CSSFontSelector::fontRangesForFamily):
2202         (WebCore::CSSFontSelector::clearDocument):
2203         (WebCore::CSSFontSelector::appendSources): Deleted.
2204         (WebCore::CSSFontSelector::familyNameFromPrimitive): Deleted.
2205         (WebCore::CSSFontSelector::registerLocalFontFacesForFamily): Deleted.
2206         (WebCore::FontFaceComparator::FontFaceComparator): Deleted.
2207         (WebCore::FontFaceComparator::operator()): Deleted.
2208         (WebCore::CSSFontSelector::getFontFace): Deleted.
2209         * css/CSSFontSelector.h:
2210         * css/CSSSegmentedFontFace.cpp:
2211         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
2212         * css/CSSSegmentedFontFace.h:
2213         * css/FontFace.cpp:
2214         (WebCore::FontFace::create):
2215         (WebCore::FontFace::FontFace):
2216         (WebCore::FontFace::createWeakPtr):
2217         (WebCore::FontFace::fontStateChanged):
2218         (WebCore::FontFace::stateChanged): Deleted.
2219         * css/FontFace.h:
2220         * css/FontFaceSet.cpp:
2221         (WebCore::FontFaceSet::create):
2222         (WebCore::FontFaceSet::FontFaceSet):
2223         (WebCore::FontFaceSet::~FontFaceSet):
2224         (WebCore::FontFaceSet::Iterator::next):
2225         (WebCore::FontFaceSet::has):
2226         (WebCore::FontFaceSet::size):
2227         (WebCore::FontFaceSet::add):
2228         (WebCore::FontFaceSet::remove):
2229         (WebCore::FontFaceSet::clear):
2230         (WebCore::FontFaceSet::load):
2231         (WebCore::FontFaceSet::check):
2232         (WebCore::FontFaceSet::status):
2233         (WebCore::FontFaceSet::canSuspendForDocumentSuspension):
2234         (WebCore::FontFaceSet::faceFinished):
2235         * css/FontFaceSet.h:
2236         * css/FontFaceSet.idl:
2237         * dom/Document.cpp:
2238         (WebCore::Document::fonts):
2239         * dom/Document.h:
2240         * dom/Document.idl:
2241         * svg/SVGFontFaceElement.h:
2242
2243 2016-02-22  Konstantin Tokarev  <annulen@yandex.ru>
2244
2245         [cmake] Moved library setup code to WEBKIT_FRAMEWORK macro.
2246         https://bugs.webkit.org/show_bug.cgi?id=154450
2247
2248         Reviewed by Alex Christensen.
2249
2250         No new tests needed.
2251
2252         * CMakeLists.txt:
2253
2254 2016-02-22  Konstantin Tokarev  <annulen@yandex.ru>
2255
2256         Workaround for ICE in GCC 4.8 appeared in r196846.
2257         https://bugs.webkit.org/show_bug.cgi?id=154535
2258
2259         Reviewed by Chris Dumez.
2260
2261         No new tests needed.
2262
2263         * html/HTMLFormElement.cpp:
2264         (WebCore::HTMLFormElement::autocomplete):
2265
2266 2016-02-22  Jer Noble  <jer.noble@apple.com>
2267
2268         Enable AVFoundationNSURLSessionEnabled by default
2269         https://bugs.webkit.org/show_bug.cgi?id=154469
2270
2271         Reviewed by Sam Weinig.
2272
2273         * page/Settings.cpp:
2274
2275 2016-02-22  Manuel Rego Casasnovas  <rego@igalia.com>
2276
2277         [css-grid] Swap columns and rows in grid-template shorthand
2278         https://bugs.webkit.org/show_bug.cgi?id=154472
2279
2280         Reviewed by Darin Adler.
2281
2282         The spec was modified past December to change the order of
2283         columns and rows in the grid-template shorthand:
2284         https://github.com/w3c/csswg-drafts/commit/f6c7691679a519017a80ebae44fd86c3eae5c5f9
2285
2286         Updated the parsing and modified the tests to follow the new syntax.
2287
2288         * css/CSSParser.cpp:
2289         (WebCore::CSSParser::parseGridTemplateColumns):
2290         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns):
2291         (WebCore::CSSParser::parseGridTemplateShorthand):
2292         (WebCore::CSSParser::parseGridTemplateRowsAndAreas): Renamed to
2293         parseGridTemplateRowsAndAreasAndColumns().
2294         * css/CSSParser.h:
2295
2296 2016-02-22  Manuel Rego Casasnovas  <rego@igalia.com>
2297
2298         [css-grid] Swap columns and rows in grid shorthand
2299         https://bugs.webkit.org/show_bug.cgi?id=154449
2300
2301         Reviewed by Darin Adler.
2302
2303         The spec was modified past December to change the order of
2304         columns and rows in the grid shorthand:
2305         https://github.com/w3c/csswg-drafts/commit/7454c7c8c5857b61bbbe2ee5f07803c264bf37e4
2306
2307         Updated the parsing and modified the tests to follow the new syntax.
2308
2309         * css/CSSParser.cpp:
2310         (WebCore::CSSParser::parseGridShorthand):
2311
2312 2016-02-22  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2313
2314         Binding generator should support key value iterable
2315         https://bugs.webkit.org/show_bug.cgi?id=154413
2316
2317         Reviewed by Darin Adler.
2318
2319         Covered by added layout and binding tests.
2320
2321         iterable<key, value> in a IDL file will trigger the generation of entries, keys, values, [Symbol.iterator] and forEach methods to the prototype.
2322         Updated FetchHeaders and FontFaceSet to use it.
2323
2324         IDLParser.pm parses the iterable<> and adds an iterable field in the interface containing the iterable information and objects for the five operations.
2325         IDLParser.pm is cleaned up a bit to remove previous Iterator support, which does not seem to be supported.
2326
2327         CodeGeneratorJS.pm is updated to generate the code for the five operations, using JSKeyValueIterator. Set iterators are not yet supported.
2328         Moved definition of Iterator Key and Value Type to binding generated JSXX class based on iterable<> declaration in the IDL.
2329
2330         Added binding test and Fetch Headers tests.
2331
2332         * CMakeLists.txt:
2333         * Modules/fetch/FetchHeaders.idl:
2334         * WebCore.xcodeproj/project.pbxproj:
2335         * bindings/js/JSBindingsAllInOne.cpp:
2336         * bindings/js/JSFetchHeadersCustom.cpp: Removed.
2337         * bindings/js/JSFontFaceSetCustom.cpp:
2338         (WebCore::JSFontFaceSet::ready): Removed iterable custom methods.
2339         * bindings/js/JSKeyValueIterator.h:
2340         (WebCore::createKeyValueIterator):
2341         (WebCore::keyValueIteratorForEach):
2342         * bindings/scripts/CodeGeneratorJS.pm:
2343         (GetFunctionName):
2344         (PrototypeFunctionCount):
2345         (PrototypePropertyCount):
2346         (GeneratePropertiesHashTable):
2347         (GenerateImplementation):
2348         (GenerateImplementationFunctionCall):
2349         (GenerateImplementationIterableFunctions):
2350         * bindings/scripts/IDLParser.pm:
2351         (parseOperationOrIterator):
2352         (parseOperationOrIteratorRest):
2353         (parseIterableRest):
2354         (parseOptionalIterableInterface):
2355         (applyMemberList):
2356         (parseSpecial): Deleted.
2357         * bindings/scripts/test/JS/JSTestObj.cpp:
2358         (WebCore::JSTestObjPrototype::finishCreation):
2359         (WebCore::jsTestObjPrototypeFunctionSymbolIterator):
2360         (WebCore::jsTestObjPrototypeFunctionEntries):
2361         (WebCore::jsTestObjPrototypeFunctionKeys):
2362         (WebCore::jsTestObjPrototypeFunctionValues):
2363         (WebCore::jsTestObjPrototypeFunctionForEach):
2364         * bindings/scripts/test/TestObj.idl:
2365         * css/FontFaceSet.idl:
2366
2367 2016-02-21  Chris Dumez  <cdumez@apple.com>
2368
2369         HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only return known values
2370         https://bugs.webkit.org/show_bug.cgi?id=154502
2371
2372         Reviewed by Darin Adler.
2373
2374         HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only
2375         return known values and should be nullable as per the specification:
2376         - https://html.spec.whatwg.org/multipage/scripting.html#attr-script-crossorigin
2377         - https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-crossorigin
2378         - https://html.spec.whatwg.org/multipage/infrastructure.html#cors-settings-attribute
2379
2380         This aligns our behavior with the HTML specification and Firefox.
2381
2382         No new tests, already covered by existing tests.
2383
2384         * bindings/scripts/CodeGeneratorJS.pm:
2385         Add support for nullable DOMString attributes. If such attribute is
2386         marked as nullable:
2387         - A null string is passed to the implementation if the setter is called
2388           with null/undefined.
2389         - null is returned to the Javascript if the getter implementation
2390           returns a null string.
2391
2392         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2393         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2394         * bindings/scripts/test/JS/JSTestObj.cpp:
2395         * bindings/scripts/test/ObjC/DOMTestObj.h:
2396         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2397         * bindings/scripts/test/TestObj.idl:
2398         Add test coverage for nullable DOMString attributes
2399         and rebaseline bindings tests.
2400
2401         * html/HTMLImageElement.cpp:
2402         * html/HTMLImageElement.h:
2403         * html/HTMLImageElement.idl:
2404         * html/HTMLScriptElement.cpp:
2405         * html/HTMLScriptElement.h:
2406         * html/HTMLScriptElement.idl:
2407         * html/parser/HTMLParserIdioms.cpp:
2408         * html/parser/HTMLParserIdioms.h:
2409
2410 2016-02-21  Chris Dumez  <cdumez@apple.com>
2411
2412         Make HTMLSelectElement.size behave as per the specification
2413         https://bugs.webkit.org/show_bug.cgi?id=154504
2414
2415         Reviewed by Darin Adler.
2416
2417         Make HTMLSelectElement.size behave as per the specification:
2418         - https://html.spec.whatwg.org/#htmlselectelement
2419         - https://html.spec.whatwg.org/#dom-select-size
2420         - https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes:idl-unsigned-long
2421
2422         In particular, it should be unsigned and be in the range [0; 2147483647].
2423
2424         Also update several unsigned long attributes in our HTML implementation to use
2425         parseHTMLNonNegativeInteger() to parse unsigned integers as per the HTML
2426         specification, instead of calling String::toUint().
2427
2428         No new tests, already covered by existing tests.
2429
2430         * html/HTMLInputElement.cpp:
2431         (WebCore::HTMLInputElement::parseAttribute):
2432         (WebCore::HTMLInputElement::size):
2433         (WebCore::HTMLInputElement::setSize):
2434         * html/HTMLInputElement.h:
2435         * html/HTMLSelectElement.cpp:
2436         (WebCore::HTMLSelectElement::parseAttribute):
2437         (WebCore::HTMLSelectElement::setSize):
2438         (WebCore::HTMLSelectElement::namedItem): Deleted.
2439         (WebCore::HTMLSelectElement::item): Deleted.
2440         * html/HTMLSelectElement.h:
2441         (WebCore::HTMLSelectElement::size):
2442         * html/HTMLSelectElement.idl:
2443         * html/HTMLTableColElement.cpp:
2444         (WebCore::HTMLTableColElement::parseAttribute):
2445         (WebCore::HTMLTableColElement::setSpan):
2446         * html/HTMLTextAreaElement.cpp:
2447         (WebCore::HTMLTextAreaElement::parseAttribute):
2448         (WebCore::HTMLTextAreaElement::setCols):
2449         (WebCore::HTMLTextAreaElement::setRows):
2450         * html/parser/HTMLParserIdioms.h:
2451         (WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
2452         (WebCore::limitToOnlyHTMLNonNegative):
2453
2454 2016-02-21  Daniel Bates  <dabates@apple.com>
2455
2456         CSP: Enable form-action directive by default
2457         https://bugs.webkit.org/show_bug.cgi?id=154520
2458         <rdar://problem/24762029>
2459
2460         Reviewed by Sam Weinig.
2461
2462         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
2463         (WebCore::ContentSecurityPolicyDirectiveList::addDirective): Move logic to parse the form-action
2464         directive outside the ENABLE(CSP_NEXT) macro guarded section/experimental feature runtime flag.
2465         (WebCore::isExperimentalDirectiveName): Remove form-action from the directives considered
2466         experimental.
2467
2468 2016-02-21  Chris Dumez  <cdumez@apple.com>
2469
2470         Add username / password attributes to HTMLAnchorElement / HTMLAreaElement
2471         https://bugs.webkit.org/show_bug.cgi?id=154519
2472
2473         Reviewed by Sam Weinig.
2474
2475         Add username / password attributes to HTMLAnchorElement / HTMLAreaElement as per:
2476         https://html.spec.whatwg.org/#htmlhyperlinkelementutils
2477
2478         Firefox and Chrome already implement these.
2479
2480         Also stop treating null as the empty string for the HTMLHyperlinkElementUtils
2481         attributes. This behavior does not match the specification or other browsers
2482         (tested Firefox and Chrome).
2483
2484         Test: fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html
2485
2486         * CMakeLists.txt:
2487         * DerivedSources.make:
2488         * WebCore.xcodeproj/project.pbxproj:
2489         * html/HTMLAnchorElement.cpp:
2490         (WebCore::HTMLAnchorElement::username):
2491         (WebCore::HTMLAnchorElement::setUsername):
2492         (WebCore::HTMLAnchorElement::password):
2493         (WebCore::HTMLAnchorElement::setPassword):
2494         * html/HTMLAnchorElement.h:
2495         * html/HTMLAnchorElement.idl:
2496         * html/HTMLAreaElement.idl:
2497         * html/HTMLHyperlinkElementUtils.idl: Added.
2498
2499 2016-02-21  Chris Dumez  <cdumez@apple.com>
2500
2501         iframe/frame/object.contentDocument should be on the prototype
2502         https://bugs.webkit.org/show_bug.cgi?id=154409
2503
2504         Reviewed by Sam Weinig.
2505
2506         Move iframe/frame/object.contentDocument to the prototype. They used
2507         to be on the instance due to the [CheckSecurityForNode] IDL extended
2508         attribute. This patch updates the bindings generator so that such
2509         attributes are now on the prototype. While they are now on the
2510         prototype, the security checks are still generated in the
2511         corresponding getters and setters so cross origin access is still
2512         prevented.
2513
2514         Test: http/tests/security/cross-origin-iframe-contentDocument.html
2515
2516         * bindings/scripts/CodeGeneratorJS.pm:
2517         (AttributeShouldBeOnInstance): Deleted.
2518
2519 2016-02-21  Darin Adler  <darin@apple.com>
2520
2521         Refactor LazyEventListener creation to separate Element and Document cases
2522         https://bugs.webkit.org/show_bug.cgi?id=154231
2523
2524         Reviewed by Andreas Kling.
2525
2526         * bindings/js/JSLazyEventListener.cpp:
2527         (WebCore::JSLazyEventListener::create): Added. Newly factored to separate
2528         Element, Document, and DOMWindow with overloading.
2529         (WebCore::JSLazyEventListener::createForNode): Deleted.
2530         (WebCore::JSLazyEventListener::createForDOMWindow): Deleted.
2531
2532         * bindings/js/JSLazyEventListener.h: Replaced the separate createForNode
2533         and createForDOMWindow functions with a single overloaded function create,
2534         which takes an Element, Document, or DOMWindow. Also changed indentation
2535         to match the style guide.
2536
2537         * dom/Attr.h: Added newly needed forward class declaration.
2538
2539         * dom/ContainerNode.cpp:
2540         (WebCore::ContainerNode::setAttributeEventListener): Deleted.
2541         * dom/ContainerNode.h: Deleted setAttributeEventListener override; it's now
2542         done separately by Element and Document.
2543
2544         * dom/Document.cpp:
2545         (WebCore::Document::setAttributeEventListener): Added. Makes the lazy event
2546         listener and calls through to the base class's setAttributeEventListener.
2547         (WebCore::Document::setWindowAttributeEventListener): Updated to call just
2548         create instead of createForDOMWindow.
2549
2550         * dom/Document.h: Removed some unneeded forward declarations. Added the
2551         overload for setAttributeEventListener. Removed a no longer useful comment.
2552
2553         * dom/Element.cpp:
2554         (WebCore::Element::setAttributeEventListener): Added. Makes the lazy event
2555         listener and calls through to the base class's setAttributeEventListener.
2556
2557         * dom/Element.h: Removed some unneeded forward declarations. Added the
2558         overload for setAttributeEventListener.
2559
2560         * dom/Node.h: Removed many unneeded forward declarations.
2561
2562         * dom/NodeRareData.h: Added one forward declaration.
2563
2564         * editing/Editor.h: Added one forward declaration.
2565
2566 2016-02-21  Daniel Bates  <dabates@apple.com>
2567
2568         CSP: Violation report should include column number
2569         https://bugs.webkit.org/show_bug.cgi?id=154418
2570         <rdar://problem/24729525>
2571
2572         Reviewed by Brent Fulgham.
2573
2574         Include column-number in the Content Security Policy violation report for the column number
2575         in the source script where the violation occurred (for a script violation) as per section
2576         Reporting of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
2577
2578         When a CSP report is created for a script violation the source file and line number of the
2579         source code line where the violation occurred are included in the report. We now include
2580         the column number in the source file where the violation occurred so as to help narrow
2581         down the operation that triggered the violation in a complicated source code line.
2582
2583         * page/csp/ContentSecurityPolicy.cpp:
2584         (WebCore::ContentSecurityPolicy::reportViolation):
2585
2586 2016-02-21  Daniel Bates  <dabates@apple.com>
2587
2588         CSP: Violation report should include HTTP status code and effective-directive of protected resource
2589         https://bugs.webkit.org/show_bug.cgi?id=154288
2590         <rdar://problem/24674982>
2591         And
2592         https://bugs.webkit.org/show_bug.cgi?id=115707
2593         <rdar://problem/24383128>
2594
2595         Reviewed by Brent Fulgham.
2596
2597         Include status-code and effective-directive in the Content Security Policy violation report for
2598         the HTTP status code of the protected resource and name of the policy directive that was violated,
2599         respectively, as per section Reporting of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
2600
2601         Test: http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html
2602
2603         * page/csp/ContentSecurityPolicy.cpp:
2604         (WebCore::ContentSecurityPolicy::reportViolation): Add key status-code to the report with value
2605         equal to the HTTP response code for the document or 0 depending on whether the document was
2606         delivered over HTTP or not. Additionally, remove ENABLE(CSP_NEXT)-guard/experimentalFeaturesEnabled()-condition
2607         around code to include the effective-directive property in the report.
2608
2609 2016-02-21  Daniel Bates  <dabates@apple.com>
2610
2611         CSP: report-url directive should be ignored when contained in a policy defined via a meta element
2612         https://bugs.webkit.org/show_bug.cgi?id=154307
2613         <rdar://problem/24684817>
2614
2615         Reviewed by Brent Fulgham.
2616
2617         The Content Security Policy report-uri directive should only be honored when defined via an HTTP header
2618         as per section report-uri of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
2619
2620         Currently we honor the report-uri directive when enforcing or monitoring a policy defined either via
2621         an HTML meta element or an HTTP header. Instead we should only honor this directive when defined
2622         via an HTTP header and log a message to the Web Inspector console to explain that the directive
2623         was ignored as suggested in <https://www.w3.org/TR/2015/CR-CSP2-20150721/#delivery-html-meta-element>.
2624
2625         Test: http/tests/security/contentSecurityPolicy/report-uri-in-meta-tag-ignored.html
2626
2627         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
2628         (WebCore::ContentSecurityPolicyDirectiveList::parse): Modified to ignore the directive report-uri when
2629         the Content Security Policy came from an HTML meta element.
2630
2631 2016-02-21  Daniel Bates  <dabates@apple.com>
2632
2633         CSP: sandbox directive should be ignored when contained in a policy defined via a meta element
2634         https://bugs.webkit.org/show_bug.cgi?id=154299
2635         <rdar://problem/24680433>
2636
2637         Reviewed by Brent Fulgham.
2638
2639         The Content Security Policy sandbox directive should only be honored when enforcing a policy
2640         defined via an HTTP header as per section sandbox of the Content Security Policy 2.0 spec.,
2641         <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
2642
2643         Currently we honor the sandbox directive when enforcing a policy defined either via an HTML
2644         meta element or an HTTP header. Instead we should only honor this directive when defined
2645         via an HTTP header and log a message to the Web Inspector console to explain that the directive
2646         was ignored as suggested in <https://www.w3.org/TR/2015/CR-CSP2-20150721/#delivery-html-meta-element>.
2647
2648         Tests: http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header2.php
2649                http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe.php
2650                http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header.php
2651                http/tests/security/contentSecurityPolicy/sandbox-in-meta-tag-ignored.html
2652
2653         * dom/Document.cpp:
2654         (WebCore::Document::processHttpEquiv): Substitute ContentSecurityPolicy::processHTTPEquiv() for
2655         ContentSecurityPolicy::didReceiveHeader() as the latter was made private.
2656         * page/csp/ContentSecurityPolicy.cpp:
2657         (WebCore::ContentSecurityPolicy::copyStateFrom): Updated as needed based on ContentSecurityPolicy::didReceiveHeader() change below.
2658         (WebCore::ContentSecurityPolicy::didReceiveHeaders): Ditto.
2659         (WebCore::ContentSecurityPolicy::didReceiveHeader): Modified to take argument of type ContentSecurityPolicy::PolicyFrom
2660         and pass it through to ContentSecurityPolicyDirectiveList::create().
2661         (WebCore::ContentSecurityPolicy::reportInvalidDirectiveInHTTPEquivMeta): Logs a message to the Web Inspector console
2662         that the specified directive was ignored because it was delivered via an HTML meta element.
2663         * page/csp/ContentSecurityPolicy.h: Made member function ContentSecurityPolicy::didReceiveHeader() private. Defined
2664         enum class PolicyFrom to represent the source of the Content Security Policy: HTTP equiv meta element, HTTP header, or
2665         inherited from another ContentSecurityPolicy object (this value is only used by ContentSecurityPolicy::copyStateFrom()).
2666         (WebCore::ContentSecurityPolicy::processHTTPEquiv): Added; turns around and calls ContentSecurityPolicy::didReceiveHeader().
2667         The name of this function better describes its purpose - to handle the processing of a Content Security Policy
2668         delivered via <meta http-equiv="Content-Security-Policy" content="...">.
2669         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
2670         (WebCore::ContentSecurityPolicyDirectiveList::create): Modified to take argument of type ContentSecurityPolicy::PolicyFrom
2671         as pass it through to ContentSecurityPolicyDirectiveList::parse().
2672         (WebCore::ContentSecurityPolicyDirectiveList::parse): Modified to ignore the directive sandbox when the Content Security
2673         Policy came from an HTML meta element.
2674         * page/csp/ContentSecurityPolicyDirectiveList.h:
2675
2676 2016-02-21  Commit Queue  <commit-queue@webkit.org>
2677
2678         Unreviewed, rolling out r196866.
2679         https://bugs.webkit.org/show_bug.cgi?id=154515
2680
2681         still crashy on EFL/GTK (Requested by smfr on #webkit).
2682
2683         Reverted changeset:
2684
2685         "Wheel event callback removing the window causes crash in
2686         WebCore."
2687         https://bugs.webkit.org/show_bug.cgi?id=150871
2688         http://trac.webkit.org/changeset/196866
2689
2690 2016-02-20  Simon Fraser  <simon.fraser@apple.com>
2691
2692         Wheel event callback removing the window causes crash in WebCore.
2693         https://bugs.webkit.org/show_bug.cgi?id=150871
2694
2695         Reviewed by Brent Fulgham.
2696
2697         Null check the FrameView before using it, since the iframe may have been removed
2698         from its parent document inside the event handler.
2699
2700         The new test triggered a cross-load side-effect, where wheel event filtering wasn't
2701         reset between page loads. Fix by calling clearLatchedState() in EventHandler::clear(),
2702         which resets the filtering.
2703
2704         Test: fast/events/wheel-event-destroys-frame.html
2705
2706         * page/EventHandler.cpp:
2707         (WebCore::EventHandler::clear):
2708         (WebCore::EventHandler::clearLatchedState):
2709         * page/Frame.cpp:
2710         (WebCore::Frame::setView): If the view doesn't change (e.g. was and is null)
2711         don't bother clearing the event handler; should avoid EventHandler::clearLatchedState()
2712         from accessing a deleted MainFrame.
2713         * page/WheelEventDeltaFilter.cpp:
2714         (WebCore::WheelEventDeltaFilter::filteredDelta):
2715         * page/mac/EventHandlerMac.mm:
2716         (WebCore::EventHandler::platformCompleteWheelEvent):
2717         * rendering/RenderLayer.cpp:
2718         (WebCore::RenderLayer::scrollTo):
2719
2720 2016-02-20  Antti Koivisto  <antti@apple.com>
2721
2722         Resolve style iteratively
2723         https://bugs.webkit.org/show_bug.cgi?id=154355
2724
2725         Reviewed by Andreas Kling.
2726
2727         Instead of a set of recursive functions use ComposedTreeIterator for traversing the DOM
2728         tree in composed tree order.
2729
2730         This, along with maintaining explicit parent stack makes style resolve code more tractable
2731         for future work.
2732
2733         It also makes the ComposedTreeIterator the definite authority for the shape of the composed tree
2734         instead of duplicating it as a set of recursive style resolve functions. This eliminates
2735         a significant source of bugs and confusion.
2736
2737         The render tree building code path remains recursive for now.
2738
2739         * css/StyleInvalidationAnalysis.cpp:
2740         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
2741
2742             Invalidate the host element instead of the shadow root. This reduces need for special handling for shadow roots.
2743
2744         * dom/ComposedTreeIterator.cpp:
2745         (WebCore::ComposedTreeIterator::initializeContextStack):
2746         (WebCore::ComposedTreeIterator::dropAssertions):
2747
2748             Add support for dropping DOM mutation assertions.
2749
2750         (WebCore::ComposedTreeIterator::traverseShadowRoot):
2751         * dom/ComposedTreeIterator.h:
2752         (WebCore::ComposedTreeIterator::context):
2753         (WebCore::ComposedTreeIterator::current):
2754         * dom/PseudoElement.h:
2755         * style/StyleTreeResolver.cpp:
2756         (WebCore::Style::TreeResolver::TreeResolver):
2757         (WebCore::Style::TreeResolver::Scope::Scope):
2758         (WebCore::Style::TreeResolver::Parent::Parent):
2759         (WebCore::Style::TreeResolver::pushScope):
2760         (WebCore::Style::resetStyleForNonRenderedDescendants):
2761         (WebCore::Style::pseudoStyleCacheIsInvalid):
2762         (WebCore::Style::TreeResolver::resolveElement):
2763         (WebCore::Style::resolveTextNode):
2764         (WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement):
2765         (WebCore::Style::TreeResolver::pushParent):
2766         (WebCore::Style::TreeResolver::popParent):
2767         (WebCore::Style::TreeResolver::popParentsToDepth):
2768
2769             Maintain explicit parent stack.
2770
2771         (WebCore::Style::TreeResolver::resolveComposedTree):
2772
2773             The main loop that iterates over the composed tree and computes style for dirty elements.
2774
2775         (WebCore::Style::TreeResolver::resolve):
2776         (WebCore::Style::detachRenderTree):
2777         (WebCore::Style::TreeResolver::resolveLocally): Deleted.
2778         (WebCore::Style::TreeResolver::resolveChildAtShadowBoundary): Deleted.
2779         (WebCore::Style::TreeResolver::resolveShadowTree): Deleted.
2780         (WebCore::Style::TreeResolver::resolveChildren): Deleted.
2781         (WebCore::Style::TreeResolver::resolveSlotAssignees): Deleted.
2782         (WebCore::Style::TreeResolver::resolveRecursively): Deleted.
2783
2784             Recursive functions go away.
2785
2786         * style/StyleTreeResolver.h:
2787         (WebCore::Style::TreeResolver::scope):
2788         (WebCore::Style::TreeResolver::parent):
2789
2790 2016-02-20  Andreas Kling  <akling@apple.com>
2791
2792         REGRESSION(r196780): Fake memory handler takes too long to run now.
2793
2794         Unreviewed bot fix.
2795
2796         Put the footprint comparison code behind a compile-time flag for now.
2797         It's taking too long to run on bots, and memory is getting measured
2798         before all the pressure relief code has a chance to run.
2799
2800         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2801         (WebCore::MemoryPressureHandler::install):
2802
2803 2016-02-20  Olivier Blin  <olivier.blin@softathome.com>
2804
2805         Do not require UDate in LocaleICU with !ENABLE_DATE_AND_TIME_INPUT_TYPES
2806         https://bugs.webkit.org/show_bug.cgi?id=154483
2807
2808         Reviewed by Michael Catanzaro.
2809
2810         Put initializeShortDateFormat(), dateFormat(), m_shortDateFormat and
2811         m_didCreateShortDateFormat under flag, since they are only used by
2812         code under the ENABLE_DATE_AND_TIME_INPUT_TYPES flag.
2813
2814         This helps to build with a light ICU that does not provide UDate
2815         features (with UCONFIG_NO_FORMATTING).
2816
2817         * platform/text/LocaleICU.cpp:
2818         (WebCore::LocaleICU::LocaleICU):
2819         (WebCore::LocaleICU::~LocaleICU):
2820         (WebCore::createFallbackMonthLabels): Deleted.
2821         (WebCore::createFallbackAMPMLabels): Deleted.
2822         * platform/text/LocaleICU.h:
2823
2824 2016-02-20  Olivier Blin  <olivier.blin@softathome.com>
2825
2826         Remove declaration of unimplemented methods in LocaleICU
2827         https://bugs.webkit.org/show_bug.cgi?id=154482
2828
2829         Reviewed by Michael Catanzaro.
2830
2831         detectSignAndGetDigitRange() and matchedDecimalSymbolIndex() are
2832         implemented in PlatformLocale, not LocaleICU.
2833
2834         They were moved out from LocaleICU to NumberLocalizer in r124459
2835         (2012), which has then been renamed as Localizer, then Locale, and
2836         finally PlatformLocale.
2837
2838         * platform/text/LocaleICU.h:
2839
2840 2016-02-20  Commit Queue  <commit-queue@webkit.org>
2841
2842         Unreviewed, rolling out r196837.
2843         https://bugs.webkit.org/show_bug.cgi?id=154495
2844
2845         It caused a lot of crashes in EFL and GTK bots (Requested by
2846         KaL on #webkit).
2847
2848         Reverted changeset:
2849
2850         "Wheel event callback removing the window causes crash in
2851         WebCore."
2852         https://bugs.webkit.org/show_bug.cgi?id=150871
2853         http://trac.webkit.org/changeset/196837
2854
2855 2016-02-19  Chris Dumez  <cdumez@apple.com>
2856
2857         Land release assertions to help track down a possible HTMLCollection lifetime bug
2858         https://bugs.webkit.org/show_bug.cgi?id=154490
2859
2860         Reviewed by Ryosuke Niwa.
2861
2862         Land release assertions to help track down a possible HTMLCollection
2863         lifetime bug: <rdar://problem/24457478>.
2864
2865         * bindings/js/JSHTMLCollectionCustom.cpp:
2866         (WebCore::JSHTMLCollection::getOwnPropertyNames):
2867         * html/HTMLCollection.cpp:
2868         (WebCore::HTMLCollection::HTMLCollection):
2869         (WebCore::HTMLCollection::~HTMLCollection):
2870         * html/HTMLCollection.h:
2871         (WebCore::HTMLCollection::wasDeletionStarted):
2872         * html/HTMLCollection.idl:
2873
2874 2016-02-19  Doug Russell  <d_russell@apple.com>
2875
2876         Bug 154366 - AX: AXObjectCache::visiblePositionForTextMarkerData() doesn't account for equivalent visibly equivalent positions
2877         https://bugs.webkit.org/show_bug.cgi?id=154366
2878
2879         Reviewed by Chris Fleizach.
2880
2881         Test: accessibility/mac/text-marker-line-boundary.html
2882
2883         * accessibility/AXObjectCache.cpp:
2884         (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
2885
2886 2016-02-19  Simon Fraser  <simon.fraser@apple.com>
2887
2888         Use more concrete types for parsing positions
2889         https://bugs.webkit.org/show_bug.cgi?id=154481
2890
2891         Reviewed by Dean Jackson.
2892
2893         Use CSSPrimitiveValues for position-parsing functions where possible, to avoid
2894         the need to downcast<> the values returned by the parsing functions.
2895
2896         * css/CSSParser.cpp:
2897         (WebCore::CSSParser::parseValue):
2898         (WebCore::CSSParser::parsePositionX):
2899         (WebCore::CSSParser::parsePositionY):
2900         (WebCore::CSSParser::parse4ValuesFillPosition):
2901         (WebCore::CSSParser::parse3ValuesFillPosition):
2902         (WebCore::CSSParser::parseFillPosition):
2903         (WebCore::CSSParser::parse2ValuesFillPosition):
2904         (WebCore::CSSParser::parseFillProperty):
2905         (WebCore::CSSParser::parseTransformOriginShorthand):
2906         (WebCore::CSSParser::parseBasicShapeCircle):
2907         (WebCore::CSSParser::parseBasicShapeEllipse):
2908         (WebCore::CSSParser::parseDeprecatedRadialGradient):
2909         (WebCore::CSSParser::parseRadialGradient):
2910         (WebCore::CSSParser::parseTransformOrigin):
2911         (WebCore::CSSParser::parsePerspectiveOrigin):
2912         * css/CSSParser.h:
2913
2914 2016-02-18  Gavin Barraclough  <barraclough@apple.com>
2915
2916         JSObject::getPropertySlot - index-as-propertyname, override on prototype, & shadow
2917         https://bugs.webkit.org/show_bug.cgi?id=154416
2918
2919         Reviewed by Geoff Garen.
2920
2921         * testing/Internals.cpp:
2922         (WebCore::Internals::isReadableStreamDisturbed):
2923             - fastGetOwnPropertySlot -> getOwnPropertySlot
2924               (internal method removed; test shouldn't really have been using this anyway)
2925
2926 2016-02-19  Chris Dumez  <cdumez@apple.com>
2927
2928         HTMLFormElement.autocomplete should only return known values
2929         https://bugs.webkit.org/show_bug.cgi?id=154247
2930         <rdar://problem/24658195>
2931
2932         Reviewed by Ryosuke Niwa.
2933
2934         Update HTMLFormElement.autocomplete to only return known values:
2935         - https://html.spec.whatwg.org/multipage/forms.html#dom-form-autocomplete
2936         - https://html.spec.whatwg.org/multipage/forms.html#attr-form-autocomplete
2937
2938         Also, update HTMLInputElement.autocomplete to fall back to using the form
2939         owner's autocomplete attribute ("on" or "off") when it's autocomplete
2940         attribute is omitted and the input element is wearing the "autofill
2941         expectation mantle" (i.e. the input is not hidden). If there is no
2942         form owner, the "on" value is used instead. This behavior is specified
2943         in:
2944         https://html.spec.whatwg.org/multipage/forms.html#autofilling-form-controls:-the-autocomplete-attribute:attr-fe-autocomplete-7
2945
2946         No new tests, already covered by existing tests.
2947
2948         * html/HTMLFormControlElement.cpp:
2949         (WebCore::HTMLFormControlElement::autocomplete):
2950         * html/HTMLFormElement.cpp:
2951         (WebCore::HTMLFormElement::setAutocomplete):
2952         (WebCore::HTMLFormElement::autocomplete):
2953         * html/HTMLFormElement.h:
2954         * html/HTMLFormElement.idl:
2955
2956 2016-02-19  Chris Dumez  <cdumez@apple.com>
2957
2958         Drop UnsafeVectorOverflow on ElementDescendantConstIterator::m_ancestorSiblingStack
2959         https://bugs.webkit.org/show_bug.cgi?id=154477
2960
2961         Reviewed by Ryosuke Niwa.
2962
2963         Drop UnsafeVectorOverflow on ElementDescendantConstIterator::m_ancestorSiblingStack to
2964         restore bounds checking.
2965
2966         Andreas already dropped in on ElementDescendantIterator::m_ancestorSiblingStack in
2967         r178253 but did not update the "Const" counterpart.
2968
2969         * dom/ElementDescendantIterator.h:
2970
2971 2016-02-19  Simon Fraser  <simon.fraser@apple.com>
2972
2973         Wheel event callback removing the window causes crash in WebCore.
2974         https://bugs.webkit.org/show_bug.cgi?id=150871
2975
2976         Reviewed by Brent Fulgham.
2977
2978         Null check the FrameView before using it, since the iframe may have been removed
2979         from its parent document inside the event handler.
2980         
2981         The new test triggered a cross-load side-effect, where wheel event filtering wasn't
2982         reset between page loads. Fix by calling clearLatchedState() in EventHandler::clear(),
2983         which resets the filtering.
2984
2985         Test: fast/events/wheel-event-destroys-frame.html
2986
2987         * page/EventHandler.cpp:
2988         (WebCore::EventHandler::clear):
2989         * page/WheelEventDeltaFilter.cpp:
2990         (WebCore::WheelEventDeltaFilter::filteredDelta):
2991         * page/mac/EventHandlerMac.mm:
2992         (WebCore::EventHandler::platformCompleteWheelEvent):
2993         * rendering/RenderLayer.cpp:
2994         (WebCore::RenderLayer::scrollTo):
2995
2996 2016-02-19  Myles C. Maxfield  <mmaxfield@apple.com>
2997
2998         [Win] [SVG -> OTF Converter] All uses of a font except the first one are invisible
2999         https://bugs.webkit.org/show_bug.cgi?id=154465
3000
3001         Reviewed by Alex Christensen.
3002
3003         We should re-use the existing converted data if it exists.
3004
3005         Covered by existing tests.
3006
3007         * css/CSSFontFaceSource.cpp:
3008         (WebCore::CSSFontFaceSource::font):
3009
3010 2016-02-19  Antti Koivisto  <antti@apple.com>
3011
3012         ComposedTreeIterator traverses normal children for elements with empty shadow root
3013         https://bugs.webkit.org/show_bug.cgi?id=154464
3014
3015         Reviewed by Ryosuke Niwa.
3016
3017         Test: fast/shadow-dom/composed-tree-basic.html
3018
3019         * dom/ComposedTreeIterator.cpp:
3020         (WebCore::ComposedTreeIterator::initializeContextStack):
3021         (WebCore::ComposedTreeIterator::traverseShadowRoot):
3022
3023             If the shadow root is empty continue by skipping the real children.
3024
3025         (WebCore::ComposedTreeIterator::traverseNextInShadowTree):
3026         (WebCore::composedTreeAsText):
3027         (WebCore::ComposedTreeIterator::pushContext): Deleted.
3028         * dom/ComposedTreeIterator.h:
3029         (WebCore::ComposedTreeIterator::context):
3030         (WebCore::ComposedTreeIterator::current):
3031         (WebCore::ComposedTreeIterator::traverseNext):
3032         (WebCore::composedTreeChildren):
3033         * testing/Internals.cpp:
3034         (WebCore::Internals::composedTreeAsText):
3035
3036             Testing support.
3037
3038         * testing/Internals.h:
3039         * testing/Internals.idl:
3040
3041 2016-02-19  Jer Noble  <jer.noble@apple.com>
3042
3043         Adopt CachedRawResourceClient::shouldCacheResponse() in MediaResourceLoader and WebCoreNSURLSession
3044         https://bugs.webkit.org/show_bug.cgi?id=154466
3045
3046         Reviewed by Alex Christensen.
3047
3048         Adopt the new shouldCacheResponse() callback so that byte-range
3049         requests generated by WebCoreNSURLSession are not cached.
3050
3051         * loader/MediaResourceLoader.cpp:
3052         (WebCore::MediaResource::shouldCacheResponse):
3053         * loader/MediaResourceLoader.h:
3054         * platform/graphics/PlatformMediaResourceLoader.h:
3055         (WebCore::PlatformMediaResourceClient::shouldCacheResponse):
3056         * platform/network/cocoa/WebCoreNSURLSession.mm:
3057         (-[WebCoreNSURLSession downloadTaskWithRequest:]):
3058         (-[WebCoreNSURLSession streamTaskWithHostName:port:]):
3059         (-[WebCoreNSURLSession streamTaskWithNetService:]):
3060         (-[WebCoreNSURLSessionDataTask _timingData]):
3061         (-[WebCoreNSURLSessionDataTask resource:sentBytes:totalBytesToBeSent:]):
3062
3063 2016-02-12  Jer Noble  <jer.noble@apple.com>
3064
3065         [Mac] CORS-compliant videos throw security errors when painting to Canvas
3066         https://bugs.webkit.org/show_bug.cgi?id=154188
3067         <rdar://problem/22959556>
3068
3069         Reviewed by Alex Christensen.
3070
3071         Pass the CORS access check results from WebCoreNSURLSession to it's client,
3072         MediaPlayerPrivateAVFoundationObjC.
3073
3074         * WebCore.xcodeproj/project.pbxproj:
3075         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3076         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3077         (WebCore::MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck): Ask the WebCoreNSURLSession.
3078         * platform/network/cocoa/WebCoreNSURLSession.h:
3079         * platform/network/cocoa/WebCoreNSURLSession.mm:
3080         (-[WebCoreNSURLSession task:didReceiveCORSAccessCheckResult:]): Conditionally set _corsResults.
3081         (-[WebCoreNSURLSession didPassCORSAccessChecks]): Return _corsResults.
3082         (WebCoreNSURLSessionDataTaskClient::accessControlCheckFailed): Call -resource:accessControlCheckFailedWithError:.
3083         (WebCoreNSURLSessionDataTaskClient::loadFailed): Call -resource:loadFailedWithError:.
3084         (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Set _response within the delegate queue.
3085         (-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]): Renamed from resourceFinished:
3086         (-[WebCoreNSURLSessionDataTask resource:accessControlCheckFailedWithError:]): Ditto.
3087         (-[WebCoreNSURLSessionDataTask resource:loadFailedWithError:]): Ditto.
3088         (-[WebCoreNSURLSessionDataTask resourceFinished:]): Ditto.
3089
3090 2016-02-19  Chris Dumez  <cdumez@apple.com>
3091
3092         Unreviewed build fix.
3093
3094         * loader/cocoa/SubresourceLoaderCocoa.mm:
3095         (WebCore::SubresourceLoader::willCacheResponse):
3096
3097 2016-02-19  Nan Wang  <n_wang@apple.com>
3098
3099         AX: Inconsistency between CharacterOffset and VisiblePostition
3100         https://bugs.webkit.org/show_bug.cgi?id=154431
3101
3102         Reviewed by Chris Fleizach.
3103
3104         VoiceOver is not getting the correct text marker from VisiblePostition when
3105         navigating using arrow keys. We should make the CharacterOffset behavior consistent
3106         with VisiblePosition so that the conversion between the two won't create different
3107         text markers.
3108         
3109         Changes are covered in the modified tests.
3110
3111         * accessibility/AXObjectCache.cpp:
3112         (WebCore::AXObjectCache::characterOffsetForTextMarkerData):
3113         (WebCore::AXObjectCache::traverseToOffsetInRange):
3114         (WebCore::AXObjectCache::startOrEndCharacterOffsetForRange):
3115         (WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
3116         (WebCore::AXObjectCache::characterOffsetForNodeAndOffset):
3117         (WebCore::AXObjectCache::textMarkerDataForNextCharacterOffset):
3118         (WebCore::AXObjectCache::textMarkerDataForPreviousCharacterOffset):
3119         (WebCore::AXObjectCache::visiblePositionFromCharacterOffset):
3120         (WebCore::AXObjectCache::characterOffsetFromVisiblePosition):
3121         (WebCore::AXObjectCache::accessibilityObjectForTextMarkerData):
3122         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
3123         (WebCore::AXObjectCache::nextCharacterOffset):
3124         (WebCore::AXObjectCache::previousCharacterOffset):
3125         (WebCore::AXObjectCache::startCharacterOffsetOfWord):
3126         (WebCore::AXObjectCache::endCharacterOffsetOfWord):
3127         (WebCore::AXObjectCache::previousWordStartCharacterOffset):
3128         (WebCore::AXObjectCache::previousParagraphStartCharacterOffset):
3129         (WebCore::AXObjectCache::previousSentenceStartCharacterOffset):
3130         * accessibility/AXObjectCache.h:
3131         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3132         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
3133
3134 2016-02-19  Jer Noble  <jer.noble@apple.com>
3135
3136         Allow CachedRawResource clients to opt out of caching on a per-response basis
3137         https://bugs.webkit.org/show_bug.cgi?id=154453
3138
3139         Reviewed by Brady Eidson.
3140
3141         For CF or NS networking clients, the system loader will ask whether the client (the
3142         SubResourceLoader in this case) wants the response to be cached. This breaks for byte
3143         range requests due to <rdar://problem/20001985>. Allow the SubresourceLoader to query
3144         its clients, and return null, if they opt out.
3145
3146         * loader/cache/CachedRawResource.cpp:
3147         (WebCore::CachedRawResource::shouldCacheResponse):
3148         * loader/cache/CachedRawResource.h:
3149         * loader/cache/CachedRawResourceClient.h:
3150         (WebCore::CachedRawResourceClient::shouldCacheResponse):
3151         * loader/cache/CachedResource.h:
3152         (WebCore::CachedResource::shouldCacheResponse):
3153         * loader/cocoa/SubresourceLoaderCocoa.mm:
3154         (WebCore::SubresourceLoader::willCacheResponse):
3155
3156 2016-02-19  Zalan Bujtas  <zalan@apple.com>
3157
3158         Blocked plug-in placeholder is sometimes not shown.
3159         https://bugs.webkit.org/show_bug.cgi?id=154434
3160         <rdar://problem/22584973>
3161
3162         Reviewed by Brent Fulgham.
3163
3164         m_isUnavailablePluginIndicatorHidden was set to false incorrectly as initial value.
3165         It prevented RenderEmbeddedObject from issuing repaint when the plugin indicator
3166         was set to visible (m_isUnavailablePluginIndicatorHidden <- false) the first time.
3167         (The reason why the indicator showed up most of the time was because some renderer
3168         triggered repaint on the view.)
3169
3170         Unable to test.
3171
3172         * rendering/RenderEmbeddedObject.cpp:
3173         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden):
3174         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject): Deleted.
3175         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed): Deleted.
3176         * rendering/RenderEmbeddedObject.h:
3177         (WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
3178
3179 2016-02-19  Csaba Osztrogonác  <ossy@webkit.org>
3180
3181         Fix pessimizing-move warnings
3182         https://bugs.webkit.org/show_bug.cgi?id=154395
3183
3184         Reviewed by Michael Catanzaro.
3185
3186         * platform/graphics/efl/CairoUtilitiesEfl.cpp:
3187         (WebCore::evasObjectFromCairoImageSurface):
3188         * platform/graphics/surfaces/GLTransportSurface.cpp:
3189         (WebCore::GLTransportSurface::createTransportSurface):
3190         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
3191
3192 2016-02-19  Philippe Normand  <pnormand@igalia.com>
3193
3194         [GStreamer] clean-up various leaks
3195         https://bugs.webkit.org/show_bug.cgi?id=154285
3196
3197         Reviewed by Carlos Garcia Campos.
3198
3199         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
3200         (webkit_web_audio_src_init): Take full ownership of the GstTask.
3201         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
3202         (WTF::adoptGRef): Null pointer support in ASSERTs.
3203         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3204         (WebCore::initializeGStreamerAndRegisterWebKitElements): Take full ownership of the GstElementFactory pointers.
3205         (WebCore::MediaPlayerPrivateGStreamer::isAvailable): Ditto.
3206
3207 2016-02-18  Andy Estes  <aestes@apple.com>
3208
3209         Revert to dispatching the popstate event synchronously
3210         https://bugs.webkit.org/show_bug.cgi?id=153297
3211         rdar://problem/24092294
3212
3213         Reviewed by Brent Fulgham.
3214
3215         r192369 made the popstate event dispatch asynchronously, which matches what the HTML5 spec says to do. However,
3216         due to compatibility regressions we need to revert back to dispatching synchronously. This change reverts
3217         r192369's changes to Document.cpp, but retains the new tests.
3218
3219         Firing popstate synchronously makes both fast/loader/remove-iframe-during-history-navigation-different.html and
3220         fast/loader/remove-iframe-during-history-navigation-same.html crash, because their onpopstate handlers remove
3221         frames from the document that will later be accessed by HistoryController::recursiveGoToItem().
3222
3223         To prevent the crashes, this change does two things:
3224         1. Keep a reference to the current frame inside FrameLoader::loadSameDocumentItem(), since calling
3225            loadInSameDocument() might otherwise delete it.
3226         2. Handle a null frame when iterating a HistoryItem's child frames in HistoryController::recursiveGoToItem(),
3227            since calling goToItem() on one frame might cause another frame to be deleted.
3228
3229         Covered by existing tests. fast/loader/stateobjects/popstate-is-asynchronous.html was renamed to
3230         fast/loader/stateobjects/popstate-is-synchronous.html and modified to expect synchronous dispatch.
3231
3232         * dom/Document.cpp:
3233         (WebCore::Document::enqueuePopstateEvent):
3234         * loader/FrameLoader.cpp:
3235         (WebCore::FrameLoader::loadSameDocumentItem):
3236         * loader/HistoryController.cpp:
3237         (WebCore::HistoryController::recursiveGoToItem):
3238
3239 2016-02-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3240
3241         Unreviewed. Fix GObject DOM bindings API break after r196769.
3242
3243         * html/HTMLTextAreaElement.idl:
3244
3245 2016-02-18  Gwang Yoon Hwang  <yoon@igalia.com>
3246
3247         [GTK] Limit the number of tiles according to the visible area
3248         https://bugs.webkit.org/show_bug.cgi?id=126122
3249
3250         Reviewed by Carlos Garcia Campos.
3251
3252         TextureMapperTiledBackingStore creates tiles for whole layer bounds, which
3253         means it creates the huge amount of textures if there is an excessively big
3254         layer.  Not only it wastes the memory and the CPU time, it even can crash GPU
3255         drivers.
3256
3257         This patch modifies TextureMapperTiledBackingStore to take into account the
3258         visible area with a coverage multiplier when creating tiles.
3259
3260         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3261         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
3262         Set a flag to recalculate the visible area of the layer when there are
3263         geometric changes.
3264         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
3265         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
3266         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
3267         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
3268         (WebCore::GraphicsLayerTextureMapper::markVisibleRectAsDirty):
3269         (WebCore::GraphicsLayerTextureMapper::selfOrAncestorHasActiveTransformAnimation):
3270         (WebCore::GraphicsLayerTextureMapper::computeTransformedVisibleRect):
3271         Compute the inverse transform matrix to map a global visible are to
3272         the local visible area.
3273         (WebCore::clampToContentsRectIfRectIsInfinite):
3274         (WebCore::GraphicsLayerTextureMapper::transformedVisibleRect):
3275         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
3276         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
3277         In HiDPI, the directly composited image is uploaded to the unscaled
3278         texture to reduce memory usages. So we should apply device scale
3279         factor to render it correctly.
3280         (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
3281         Create tiles which covered by visible rect with a coverage multiplier.
3282
3283 2016-02-18  Brent Fulgham  <bfulgham@apple.com>
3284
3285         Extend HashCountedSet with a method to efficiently set the count of an entry
3286         https://bugs.webkit.org/show_bug.cgi?id=154352
3287
3288         Reviewed by Geoffrey Garen.
3289
3290         Tested by new TestWebKitAPI tests.
3291
3292         * loader/ResourceLoadStatistics.cpp:
3293         (WebCore::decodeHashCountedSet): Update to use new HashCountedSet::add method.
3294
3295 2016-02-18  Commit Queue  <commit-queue@webkit.org>
3296
3297         Unreviewed, rolling out r196790.
3298         https://bugs.webkit.org/show_bug.cgi?id=154439
3299
3300         made fast/events/wheelevent-basic-actual.txt fail in WK2
3301         (Requested by alexchristensen on #webkit).
3302
3303         Reverted changeset:
3304
3305         "Wheel event callback removing the window causes crash in
3306         WebCore."
3307         https://bugs.webkit.org/show_bug.cgi?id=150871
3308         http://trac.webkit.org/changeset/196790
3309
3310 2016-02-18  Commit Queue  <commit-queue@webkit.org>
3311
3312         Unreviewed, rolling out r196791.
3313         https://bugs.webkit.org/show_bug.cgi?id=154438
3314
3315         broke windows build (Requested by alexchristensen on #webkit).
3316
3317         Reverted changeset:
3318
3319         "Extend HashCountedSet with a method to efficiently set the
3320         count of an entry"
3321         https://bugs.webkit.org/show_bug.cgi?id=154352
3322         http://trac.webkit.org/changeset/196791
3323
3324 2016-02-18  Chris Dumez  <cdumez@apple.com>
3325
3326         window.history / window.navigator should not be replaceable
3327         https://bugs.webkit.org/show_bug.cgi?id=154412
3328
3329         Reviewed by Ryosuke Niwa.
3330
3331         window.history / window.navigator should not be replaceable as per
3332         the latest HTML specification:
3333         https://html.spec.whatwg.org/multipage/browsers.html#the-window-object
3334
3335         Firefox and Chrome already match the specification. This patch aligns
3336         our behavior.
3337
3338         No new tests, already covered by existing tests.
3339
3340         * page/DOMWindow.idl:
3341
3342 2016-02-18  Chris Dumez  <cdumez@apple.com>
3343
3344         HTMLTableHeaderCellElement.scope should only return known values
3345         https://bugs.webkit.org/show_bug.cgi?id=154423
3346         <rdar://problem/24731018>
3347
3348         Reviewed by Ryosuke Niwa.
3349
3350         HTMLTableHeaderCellElement.scope should only return known values as per:
3351         - https://html.spec.whatwg.org/multipage/tables.html#dom-th-scope
3352
3353         Known values are document here:
3354         - https://html.spec.whatwg.org/multipage/tables.html#attr-th-scope
3355
3356         No new tests, already covered by existing test.
3357
3358         * CMakeLists.txt:
3359         * WebCore.vcxproj/WebCore.vcxproj:
3360         * WebCore.vcxproj/WebCore.vcxproj.filters:
3361         * WebCore.xcodeproj/project.pbxproj:
3362         * html/HTMLElementsAllInOne.cpp:
3363         * html/HTMLTableHeaderCellElement.cpp: Copied from Source/WebCore/html/HTMLTableHeaderCellElement.h.
3364         (WebCore::HTMLTableHeaderCellElement::scope):
3365         (WebCore::HTMLTableHeaderCellElement::setScope):
3366         * html/HTMLTableHeaderCellElement.h:
3367         * html/HTMLTableHeaderCellElement.idl:
3368
3369 2016-02-18  Brent Fulgham  <bfulgham@apple.com>
3370
3371         Extend HashCountedSet with a method to efficiently set the count of an entry
3372         https://bugs.webkit.org/show_bug.cgi?id=154352
3373
3374         Reviewed by Geoffrey Garen.
3375
3376         Tested by new TestWebKitAPI tests.
3377
3378         * loader/ResourceLoadStatistics.cpp:
3379         (WebCore::decodeHashCountedSet): Update to use new HashCountedSet::add method.
3380
3381 2016-02-18  Simon Fraser  <simon.fraser@apple.com>
3382
3383         Wheel event callback removing the window causes crash in WebCore.
3384         https://bugs.webkit.org/show_bug.cgi?id=150871
3385
3386         Reviewed by Brent Fulgham.
3387         
3388         Null check the FrameView before using it, since the iframe may have been removed
3389         from its parent document inside the event handler.
3390
3391         Test: fast/events/wheel-event-destroys-frame.html
3392
3393         * page/mac/EventHandlerMac.mm:
3394         (WebCore::EventHandler::platformCompleteWheelEvent):
3395
3396 2016-02-18  Brady Eidson  <beidson@apple.com>
3397
3398         Modern IDB: Fix IDBGetResult encoder/decoder.
3399         https://bugs.webkit.org/show_bug.cgi?id=154421
3400
3401         Reviewed by Alex Christensen.
3402
3403         No new tests, as Modern IDB is still disabled for WK2.
3404         
3405         But if you manually enable it, "Basic IndexedDB Seems To Work"
3406
3407         * Modules/indexeddb/IDBGetResult.h:
3408         (WebCore::IDBGetResult::encode):
3409         (WebCore::IDBGetResult::decode):
3410
3411 2016-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
3412
3413         Addressing post-review comments after r196747.
3414
3415         Unreviewed.
3416
3417         * css/CSSFontFaceSet.h:
3418         * css/FontFaceSet.cpp:
3419         (WebCore::FontFaceSet::size):
3420         (WebCore::FontFaceSet::clear):
3421         * css/FontFaceSet.h:
3422
3423 2016-02-18  Zalan Bujtas  <zalan@apple.com>
3424
3425         Soft hyphen is not shown when it is placed at the end of an inline element
3426         https://bugs.webkit.org/show_bug.cgi?id=153980
3427
3428         Reviewed by David Hyatt.
3429
3430         This patch handles the case when the character at the breaking position does not fit the
3431         line and soft-hyphen, as the first breaking opportunity, is followed by this overflowing character.
3432         (foo&shy;bar where b overflows the line).
3433         In such cases we don't yet have an item in the breaking history so&nb