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