5b6205e368852b6fc7c34a0c79bba08bbcc3dc3a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-29  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2
3         [Streams API] Turn WS states into integers and fix state initialization
4         https://bugs.webkit.org/show_bug.cgi?id=150667
5
6         Reviewed by Youenn Fablet.
7
8         The goal of this patch is turning the writable stream states into integers instead of strings.
9
10         First readable stream states were reworked to be shared with writable stream too, they are now just @stream*.
11
12         Next step was having writable stream using integers instead of strings and translating those integers back to
13         strings to be able to return them correctly with the writable stream state attribute.
14
15         The state initialization was fixed and now it is not needed to check for the state to be undefined.
16
17         Rework, no new tests needed.
18
19         * Modules/streams/ReadableStream.js:
20         (initializeReadableStream):
21         * Modules/streams/ReadableStreamController.js:
22         (enqueue):
23         (error):
24         (close):
25         * Modules/streams/ReadableStreamInternals.js:
26         (privateInitializeReadableStreamReader):
27         (errorReadableStream):
28         (cancelReadableStream):
29         (finishClosingReadableStream):
30         (closeReadableStream):
31         (closeReadableStreamReader):
32         (enqueueInReadableStream):
33         (readFromReadableStreamReader):
34         * Modules/streams/ReadableStreamReader.js:
35         (cancel):
36         * Modules/streams/WritableStream.js:
37         (initializeWritableStream):
38         (abort):
39         (close):
40         (write):
41         (state):
42         * Modules/streams/WritableStreamInternals.js:
43         (syncWritableStreamStateWithQueue):
44         (errorWritableStream):
45         * bindings/js/JSDOMWindowBase.cpp:
46         (WebCore::JSDOMWindowBase::finishCreation):
47         * bindings/js/WebCoreBuiltinNames.h:
48
49 2015-10-28  Brady Eidson  <beidson@apple.com>
50
51         Modern IDB: Support IDBDatabase.transaction() (and transaction scheduling in general).
52         https://bugs.webkit.org/show_bug.cgi?id=150614
53
54         Reviewed by Alex Christensen.
55
56         Tests: storage/indexeddb/modern/idbdatabase-transaction-failures.html
57                storage/indexeddb/modern/transaction-scheduler-1.html
58                storage/indexeddb/modern/transaction-scheduler-2.html
59                storage/indexeddb/modern/transaction-scheduler-3.html
60                storage/indexeddb/modern/transaction-scheduler-4.html
61                storage/indexeddb/modern/transaction-scheduler-5.html
62                storage/indexeddb/modern/transaction-scheduler-6.html
63
64         * Modules/indexeddb/IDBDatabase.idl:
65
66         * Modules/indexeddb/IndexedDB.h:
67
68         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
69         (WebCore::IDBClient::IDBConnectionToServer::establishTransaction):
70         (WebCore::IDBClient::IDBConnectionToServer::didStartTransaction):
71         (WebCore::IDBClient::IDBConnectionToServer::hasRecordOfTransaction):
72         * Modules/indexeddb/client/IDBConnectionToServer.h:
73         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
74
75         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
76         (WebCore::IDBClient::IDBDatabase::transaction):
77         (WebCore::IDBClient::IDBDatabase::didStartTransaction):
78         * Modules/indexeddb/client/IDBDatabaseImpl.h:
79
80         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
81         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
82         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
83         (WebCore::IDBClient::IDBTransaction::didStart):
84         (WebCore::IDBClient::IDBTransaction::establishOnServer):
85         (WebCore::IDBClient::IDBTransaction::activate):
86         (WebCore::IDBClient::IDBTransaction::deactivate):
87         * Modules/indexeddb/client/IDBTransactionImpl.h:
88
89         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
90         (WebCore::IDBServer::IDBConnectionToClient::didStartTransaction):
91         * Modules/indexeddb/server/IDBConnectionToClient.h:
92         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
93
94         * Modules/indexeddb/server/IDBServer.cpp:
95         (WebCore::IDBServer::IDBServer::establishTransaction):
96         * Modules/indexeddb/server/IDBServer.h:
97
98         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
99         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
100         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
101         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
102         (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
103         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord):
104         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord):
105         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
106         (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
107         (WebCore::IDBServer::MemoryIDBBackingStore::unregisterObjectStore):
108         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
109
110         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
111         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
112         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
113         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
114         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
115         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
116         (WebCore::IDBServer::UniqueIDBDatabase::transactionSchedulingTimerFired):
117         (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):
118         (WebCore::IDBServer::UniqueIDBDatabase::performActivateTransactionInBackingStore):
119         (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
120         (WebCore::IDBServer::scopesOverlap):
121         (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
122         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
123         * Modules/indexeddb/server/UniqueIDBDatabase.h:
124
125         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
126         (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
127         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
128
129         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
130         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
131         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
132         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::objectStoreIdentifiers):
133         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::didActivateInBackingStore):
134         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
135         
136         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
137         (WebCore::IDBTransactionInfo::clientTransaction):
138         (WebCore::IDBTransactionInfo::isolatedCopy):
139         * Modules/indexeddb/shared/IDBTransactionInfo.h:
140         
141         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
142         (WebCore::InProcessIDBServer::establishTransaction):
143         (WebCore::InProcessIDBServer::didStartTransaction):
144         * Modules/indexeddb/shared/InProcessIDBServer.h:
145         
146         * bindings/js/IDBBindingUtilities.cpp:
147         (WebCore::deserializeIDBValueData):
148         
149         * bindings/js/JSIDBDatabaseCustom.cpp:
150         (WebCore::JSIDBDatabase::transaction):
151         
152         * bindings/js/ScriptState.cpp:
153         (WebCore::execStateFromPage):
154
155 2015-10-28  Eric Carlson  <eric.carlson@apple.com>
156
157         [MediaStream] Play MediaStream through media element and rendered to canvas
158         https://bugs.webkit.org/show_bug.cgi?id=150449
159
160         Reviewed by Jer Noble.
161
162         * Modules/mediastream/MediaStream.cpp:
163         (WebCore::MediaStream::create): Don't die a recursive death.
164         (WebCore::MediaStream::MediaStream): setClient -> addObserver. Set private stream's public stream pointer.
165         (WebCore::MediaStream::~MediaStream): setClient -> addObserver. Clear private stream's public stream pointer.
166         (WebCore::MediaStream::didAddTrack): Short circuit calling internalAddTrack when the track is unknown.
167         (WebCore::MediaStream::didRemoveTrack): ASSERT that the track is known.
168         * Modules/mediastream/MediaStream.h:
169
170         * Modules/mediastream/MediaStreamTrack.cpp:
171         (WebCore::MediaStreamTrack::trackProducingDataChanged): New.
172         (WebCore::MediaStreamTrack::trackEnabledChanged): New.
173         * Modules/mediastream/MediaStreamTrack.h:
174
175         * Modules/mediastream/RTCPeerConnection.cpp:
176         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Use the new MediaStreamPrivate::publicStream() method.
177
178         * Modules/webaudio/MediaStreamAudioSource.cpp:
179 ]        (WebCore::MediaStreamAudioSource::capabilities): capabilities isn't const.
180         * Modules/webaudio/MediaStreamAudioSource.h:
181
182         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
183         (WebCore::MediaStreamAudioSourceNode::setFormat): Reformat to make it use early return.
184
185         * WebCore.xcodeproj/project.pbxproj: Remove MediaStreamPrivateAVFObjC.mm/h, they are no longer necessary.
186
187         * platform/graphics/MediaPlayer.cpp:
188         (WebCore::buildMediaEnginesVector): Register MediaPlayerPrivateMediaStreamAVFObjC engine.
189
190         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
191         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
192         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Cleanup, add logging.
193         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Add
194           logging, remove private stream observer.
195         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine): Cleanup.
196         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Ditto.
197         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes): Return an empty vector.
198         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Use the MediaStreamPrivate passed instead
199           of creating a new private stream. 
200         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Pause output.
201         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareToPlay): Add logging.
202         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): m_previewLayer -> m_videoBackgroundLayer.
203         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPausedImageVisible): New, show/hide the preview layer and configure
204           the background layer so we show a still image even though the capture device continues to run. Start/stop clock.
205         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Don't need to start the source, that happens in in load. Just
206           set flags and hide the paused image.
207         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Don't stop the source, it may be shared by more than one 
208           stream/track. Just set the playing flag and show the paused image.
209         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paused): Fix.
210         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::internalSetVolume): New, called by setMuted and setVolume.
211         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume): New.
212         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted): Don't mute the source, it doesn't do what you think.
213         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo): Pass-through to stream.
214         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio): Ditto.
215         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime): Return clock time.
216         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): New.
217         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Update readyState.
218         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize): Update intrinsic size, create layers if necessary.
219         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Create preview layers.
220         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Update for changed characteristics.
221         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable): 'seekable' must return an empty TimeRanges object.
222         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): New.
223         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::scheduleDeferredTask):
224         (WebCore::mimeTypeCache): Deleted.
225         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformMedia): Deleted.
226         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Deleted.
227         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pauseInternal): Deleted.
228         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sizeChanged): Deleted.
229         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::maxMediaTimeSeekable): Deleted.
230         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::minMediaTimeSeekable): Deleted.
231         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createImageFromSampleBuffer): Deleted.
232         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsAcceleratedRendering): Deleted.
233         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::movieLoadType): Deleted.
234         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::extraMemoryCost): Deleted.
235
236         Delete MediaStreamPrivateAVFObjC.mm/.h as they aren't necessary. 
237         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h: Removed.
238         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm: Removed.
239
240         * platform/mediastream/MediaStreamPrivate.cpp:
241         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Add track observer!
242         (WebCore::MediaStreamPrivate::addObserver): New.
243         (WebCore::MediaStreamPrivate::removeObserver): New.
244         (WebCore::MediaStreamPrivate::updateActiveState): Remember the first active video track.
245         (WebCore::MediaStreamPrivate::addTrack): Notify observers.
246         (WebCore::MediaStreamPrivate::removeTrack): Ditto.
247         (WebCore::MediaStreamPrivate::startProducingData): Pass-through to tracks.
248         (WebCore::MediaStreamPrivate::stopProducingData): Ditto.
249         (WebCore::MediaStreamPrivate::isProducingData): Ditto.
250         (WebCore::MediaStreamPrivate::hasVideo): Ditto.
251         (WebCore::MediaStreamPrivate::hasAudio): Ditto.
252         (WebCore::MediaStreamPrivate::platformLayer): Ditto.
253         (WebCore::MediaStreamPrivate::paintCurrentFrameInContext): Either pass-through to first active video
254           track, or paint the context black.
255         (WebCore::MediaStreamPrivate::currentFrameImage): Pass-through to first active video track.
256         (WebCore::MediaStreamPrivate::characteristicsChanged): Inform observers.
257         (WebCore::MediaStreamPrivate::trackMutedChanged):
258         (WebCore::MediaStreamPrivate::trackStatesChanged):
259         (WebCore::MediaStreamPrivate::trackEnabledChanged):
260         (WebCore::MediaStreamPrivate::trackProducingDataChanged):
261         (WebCore::MediaStreamPrivate::scheduleDeferredTask): New, call a function asynchronously on
262           the main thread.
263         * platform/mediastream/MediaStreamPrivate.h:
264
265         * platform/mediastream/MediaStreamTrackPrivate.cpp:
266         (WebCore::MediaStreamTrackPrivate::endTrack):
267         (WebCore::MediaStreamTrackPrivate::sourceProducingDataChanged): New, inform observers.
268         (WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Ditto.
269         * platform/mediastream/MediaStreamTrackPrivate.h:
270
271         * platform/mediastream/RealtimeMediaSource.cpp:
272         (WebCore::RealtimeMediaSource::isProducingDataDidChange): New, inform observers.
273         (WebCore::RealtimeMediaSource::setEnabled): Ditto.
274         (WebCore::RealtimeMediaSource::stop): Call reset();
275         * platform/mediastream/RealtimeMediaSource.h: Don't declare "capabilities" as const so 
276           capabilities can be created and initialized lazily.
277
278         * platform/mediastream/mac/AVAudioCaptureSource.h:
279         * platform/mediastream/mac/AVAudioCaptureSource.mm:
280         (WebCore::AVAudioCaptureSource::initializeCapabilities): New.
281         (WebCore::AVAudioCaptureSource::addObserver): Hold the lock while calling observers so the list
282           can't be mutated.
283         (WebCore::AVAudioCaptureSource::setupCaptureSession): Log and fail if the session won't add the
284           input or output.
285         (WebCore::AVAudioCaptureSource::shutdownCaptureSession): Cleanup.
286         (WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Don't block
287           if it isn't possible to acquire the lock. Hold the lock while calling observers.
288         (WebCore::AVAudioCaptureSource::capabilities): Deleted.
289
290         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
291         (WebCore::refreshCaptureDeviceList): Don't include devices that can't be used.
292         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):  Use AVCaptureDeviceManager::sourceWithUID
293           so constraints are considered.
294         (WebCore::AVCaptureDeviceManager::sourceWithUID): Don't consider disabled devices. Always
295           create a new capture device so each track starts out with a unique source.
296         * platform/mediastream/mac/AVMediaCaptureSource.h:
297
298         * platform/mediastream/mac/AVMediaCaptureSource.mm:
299         (WebCore::globaAudioCaptureSerialQueue):
300         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource):
301         (WebCore::AVMediaCaptureSource::~AVMediaCaptureSource): Remove KVO observers.
302         (WebCore::AVMediaCaptureSource::startProducingData): m_isRunning is changed in captureSessionIsRunningDidChange.
303         (WebCore::AVMediaCaptureSource::stopProducingData): Ditto.
304         (WebCore::AVMediaCaptureSource::capabilities): New.
305         (WebCore::AVMediaCaptureSource::setupSession): Add KVObservers for the properties we care about.
306         (WebCore::AVMediaCaptureSource::reset): New, cleanup.
307         (WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Dispatch to the main thread 
308           to set m_isRunning, call isProducingDataDidChange so observers can find out.
309         (WebCore::sessionKVOProperties):
310         (-[WebCoreAVMediaCaptureSourceObserver disconnect]):
311         (-[WebCoreAVMediaCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):
312         (-[WebCoreAVMediaCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]): Respond
313           to running changes.
314         (WebCore::AVMediaCaptureSource::captureSessionStoppedRunning): Deleted.
315         (-[WebCoreAVMediaCaptureSourceObserver captureSessionStoppedRunning:]): Deleted.
316
317         * platform/mediastream/mac/AVVideoCaptureSource.h:
318         * platform/mediastream/mac/AVVideoCaptureSource.mm:
319         (WebCore::AVVideoCaptureSource::initializeCapabilities): Partial implementation.
320         (WebCore::AVVideoCaptureSource::setupCaptureSession):  Log and fail if the session won't add the
321           input or output.
322         (WebCore::AVVideoCaptureSource::shutdownCaptureSession): Cleanup.
323         (WebCore::AVVideoCaptureSource::updateFramerate): Renamed from calculateFramerate.
324         (WebCore::AVVideoCaptureSource::currentFrameImage): Return an Image.
325         (WebCore::AVVideoCaptureSource::platformLayer): New.
326         (WebCore::AVVideoCaptureSource::capabilities): Deleted.
327         (WebCore::AVVideoCaptureSource::calculateFramerate): Deleted.
328
329         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
330         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
331         (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC): AudioConverterRef is
332           not a CF/ObjC object so we can't use a RetainPtr<> for it.
333         (WebCore::WebAudioSourceProviderAVFObjC::provideInput): Ditto.
334         (WebCore::WebAudioSourceProviderAVFObjC::prepare): Ditto.
335         (WebCore::WebAudioSourceProviderAVFObjC::unprepare): Ditto.
336         (WebCore::WebAudioSourceProviderAVFObjC::process): Fix typo in logging.
337
338         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
339         (WebCore::MockSource::capabilities): Update for capabilities change.
340
341         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Update for capabilities change.
342
343 2015-10-28  Chris Dumez  <cdumez@apple.com>
344
345         Regression(r191673): [WIN][EFL][GTK] layout tests using data URLs time out
346         https://bugs.webkit.org/show_bug.cgi?id=150661
347
348         Reviewed by Gyuyoung Kim.
349
350         Do a partial revert of r191673. For some reason, using a Timer in
351         DataURLDecoder does not work (it does not fire). Since non COCOA ports
352         don't support RunLoopTimer, this patch reintroduces the use of
353         callOnMainThread() on non-COCOA ports.
354
355         * platform/network/DataURLDecoder.cpp:
356         (WebCore::DataURLDecoder::decode):
357         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer): Deleted.
358
359 2015-10-28  Joseph Pecoraro  <pecoraro@apple.com>
360
361         Web Inspector: Rename InspectorResourceAgent to InspectorNetworkAgent
362         https://bugs.webkit.org/show_bug.cgi?id=150654
363
364         Reviewed by Geoffrey Garen.
365
366         * CMakeLists.txt:
367         * WebCore.vcxproj/WebCore.vcxproj:
368         * WebCore.vcxproj/WebCore.vcxproj.filters:
369         * WebCore.xcodeproj/project.pbxproj:
370         * inspector/InspectorAllInOne.cpp:
371         * inspector/InspectorController.cpp:
372         (WebCore::InspectorController::InspectorController):
373         * inspector/InspectorController.h:
374         * inspector/InspectorDOMDebuggerAgent.h:
375         * inspector/InspectorFrontendClient.h:
376         * inspector/InspectorInstrumentation.cpp:
377         (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
378         (WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
379         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
380         (WebCore::InspectorInstrumentation::willSendRequestImpl):
381         (WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
382         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
383         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
384         (WebCore::InspectorInstrumentation::didReceiveDataImpl):
385         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
386         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
387         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
388         (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
389         (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
390         (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
391         (WebCore::InspectorInstrumentation::scriptImportedImpl):
392         (WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
393         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
394         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
395         (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
396         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
397         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
398         (WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
399         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl):
400         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl):
401         (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
402         * inspector/InspectorLayerTreeAgent.h:
403         * inspector/InspectorNetworkAgent.cpp: Renamed from Source/WebCore/inspector/InspectorResourceAgent.cpp.
404         (WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
405         (WebCore::InspectorNetworkAgent::didCreateFrontendAndBackend):
406         (WebCore::InspectorNetworkAgent::willDestroyFrontendAndBackend):
407         (WebCore::buildObjectForHeaders):
408         (WebCore::buildObjectForTiming):
409         (WebCore::buildObjectForResourceRequest):
410         (WebCore::buildObjectForResourceResponse):
411         (WebCore::buildObjectForCachedResource):
412         (WebCore::InspectorNetworkAgent::~InspectorNetworkAgent):
413         (WebCore::InspectorNetworkAgent::timestamp):
414         (WebCore::InspectorNetworkAgent::willSendRequest):
415         (WebCore::InspectorNetworkAgent::markResourceAsCached):
416         (WebCore::InspectorNetworkAgent::didReceiveResponse):
417         (WebCore::isErrorStatusCode):
418         (WebCore::InspectorNetworkAgent::didReceiveData):
419         (WebCore::InspectorNetworkAgent::didFinishLoading):
420         (WebCore::InspectorNetworkAgent::didFailLoading):
421         (WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
422         (WebCore::InspectorNetworkAgent::setInitialScriptContent):
423         (WebCore::InspectorNetworkAgent::didReceiveScriptResponse):
424         (WebCore::InspectorNetworkAgent::didFinishXHRLoading):
425         (WebCore::InspectorNetworkAgent::didReceiveXHRResponse):
426         (WebCore::InspectorNetworkAgent::willLoadXHRSynchronously):
427         (WebCore::InspectorNetworkAgent::didLoadXHRSynchronously):
428         (WebCore::InspectorNetworkAgent::willDestroyCachedResource):
429         (WebCore::InspectorNetworkAgent::willRecalculateStyle):
430         (WebCore::InspectorNetworkAgent::didRecalculateStyle):
431         (WebCore::InspectorNetworkAgent::didScheduleStyleRecalculation):
432         (WebCore::InspectorNetworkAgent::buildInitiatorObject):
433         (WebCore::InspectorNetworkAgent::didCreateWebSocket):
434         (WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest):
435         (WebCore::InspectorNetworkAgent::didReceiveWebSocketHandshakeResponse):
436         (WebCore::InspectorNetworkAgent::didCloseWebSocket):
437         (WebCore::InspectorNetworkAgent::didReceiveWebSocketFrame):
438         (WebCore::InspectorNetworkAgent::didSendWebSocketFrame):
439         (WebCore::InspectorNetworkAgent::didReceiveWebSocketFrameError):
440         (WebCore::InspectorNetworkAgent::enable):
441         (WebCore::InspectorNetworkAgent::disable):
442         (WebCore::InspectorNetworkAgent::setExtraHTTPHeaders):
443         (WebCore::InspectorNetworkAgent::getResponseBody):
444         (WebCore::InspectorNetworkAgent::setCacheDisabled):
445         (WebCore::InspectorNetworkAgent::loadResource):
446         (WebCore::InspectorNetworkAgent::mainFrameNavigated):
447         * inspector/InspectorNetworkAgent.h: Renamed from Source/WebCore/inspector/InspectorResourceAgent.h.
448         * inspector/InspectorPageAgent.h:
449         * inspector/InstrumentingAgents.cpp:
450         (WebCore::InstrumentingAgents::reset):
451         * inspector/InstrumentingAgents.h:
452         (WebCore::InstrumentingAgents::inspectorNetworkAgent):
453         (WebCore::InstrumentingAgents::setInspectorNetworkAgent):
454         (WebCore::InstrumentingAgents::inspectorResourceAgent): Deleted.
455         (WebCore::InstrumentingAgents::setInspectorResourceAgent): Deleted.
456         * inspector/NetworkResourcesData.h:
457
458 2015-10-28  Joseph Pecoraro  <pecoraro@apple.com>
459
460         Web Inspector: Remove unused / duplicate WebSocket timeline records
461         https://bugs.webkit.org/show_bug.cgi?id=150647
462
463         Reviewed by Timothy Hatcher.
464
465         * Modules/websockets/WebSocketChannel.cpp:
466         (WebCore::WebSocketChannel::connect):
467         Only send what is needed by inspector now.
468
469         * inspector/InspectorInstrumentation.h:
470         (WebCore::InspectorInstrumentation::didCreateWebSocket):
471         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
472         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
473         (WebCore::InspectorInstrumentation::didCloseWebSocket):
474         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
475         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
476         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
477         These can all fast return if there is no frontend because the inspector
478         doesn't record any information about web sockets until a frontend is connected.
479         The inspector in this case just sends events to the frontend when things happen.
480
481         * inspector/InspectorInstrumentation.cpp:
482         (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
483         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
484         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
485         (WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
486         Stop messaging the Timeline agent, we already message the Resource agent.
487
488         * inspector/InspectorTimelineAgent.cpp:
489         (WebCore::InspectorTimelineAgent::didCreateWebSocket): Deleted.
490         (WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest): Deleted.
491         (WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse): Deleted.
492         (WebCore::InspectorTimelineAgent::didDestroyWebSocket): Deleted.
493         * inspector/InspectorTimelineAgent.h:
494         * inspector/TimelineRecordFactory.h:
495         (WebCore::TimelineRecordFactory::createWebSocketCreateData): Deleted.
496         (WebCore::TimelineRecordFactory::createGenericWebSocketData): Deleted.
497         This is all duplicate information from the network domain.
498
499 2015-10-28  Andy Estes  <aestes@apple.com>
500
501         [Content Filtering] Crash when allowing a 0-byte resource to load
502         https://bugs.webkit.org/show_bug.cgi?id=150644
503         <rdar://problem/23288538>
504
505         Reviewed by Darin Adler.
506
507         Test: contentfiltering/allow-empty-document.html
508
509         * loader/ContentFilter.cpp:
510         (WebCore::ContentFilter::deliverResourceData): resourceBuffer will be null if the resource contained no data.
511
512 2015-10-28  Chris Dumez  <cdumez@apple.com>
513
514         Assertion failure in WebCore::FrameLoader::stopLoading() running fast/events tests
515         https://bugs.webkit.org/show_bug.cgi?id=150624
516
517         Reviewed by Darin Adler.
518
519         After r191652, a form's target attribute can no longer refer to a frame's id,
520         only its name. This is because the frame's id no longer sets the Window name
521         when the frame's name attribute is missing. This caused a change in behavior
522         for the fast/events/form-iframe-target-before-load-crash*.html tests, which
523         exposed a pre-existing bug.
524
525         This patch updates the fast/events/form-iframe-target-before-load-crash*.html
526         tests so they keep testing the same thing as before r191652. It also adds a
527         variant to keep covering the newly exposed bug.
528
529         The issue was that the frame was no longer navigated when submitting the form
530         (due to the form's target not matching the frame name). Therefore, when
531         removing the iframe from the document, its navigation has not started yet and
532         DocumentLoadTiming::navigationStart() is not initialized yet when
533         FrameLoader::stopLoading() is called and we hit an assertion. This patch
534         replaces the assertion with an if check as we now know it can happen and we
535         have test coverage for it.
536
537         Test: fast/events/form-iframe-target-before-load-crash.html
538
539         * loader/FrameLoader.cpp:
540         (WebCore::FrameLoader::stopLoading):
541
542 2015-10-28  Brian Burg  <bburg@apple.com>
543
544         Builtins generator should emit ENABLE(FEATURE) guards based on @conditional annotation
545         https://bugs.webkit.org/show_bug.cgi?id=150536
546
547         Reviewed by Yusuke Suzuki.
548
549         Replace @optional=FEATURE with @conditional=ENABLE(FEATURE) in builtins files.
550
551         * Modules/streams/ByteLengthQueuingStrategy.js:
552         * Modules/streams/CountQueuingStrategy.js:
553         * Modules/streams/ReadableStream.js:
554         * Modules/streams/ReadableStreamController.js:
555         * Modules/streams/ReadableStreamInternals.js:
556         * Modules/streams/ReadableStreamReader.js:
557         * Modules/streams/StreamInternals.js:
558         * Modules/streams/WritableStream.js:
559         * Modules/streams/WritableStreamInternals.js:
560
561 2015-10-28  Zalan Bujtas  <zalan@apple.com>
562
563         Should never be reached failure in WebCore::backgroundRectForBox
564         https://bugs.webkit.org/show_bug.cgi?id=150232
565
566         Reviewed by Simon Fraser.
567
568         We should never end up with simple container for composited layer when background-clip: text is present.
569         (not even when the box has no decoration to paint)
570
571         Test: fast/backgrounds/background-clip-text-with-simple-container.html
572
573         * rendering/RenderLayerBacking.cpp:
574         (WebCore::RenderLayerBacking::paintsBoxDecorations):
575         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
576         (WebCore::backgroundRectForBox):
577
578 2015-10-28  Chris Dumez  <cdumez@apple.com>
579
580         Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
581         https://bugs.webkit.org/show_bug.cgi?id=150609
582         <rdar://problem/22702894>
583
584         Reviewed by Antti Koivisto.
585
586         Use RunLoopTimer in DataURLDecoder to avoid issues related to RunLoops.
587         In particular, the callOnMainThread() call could fail to dispatch the
588         decoding result to the main thread if the client-side would spin its own
589         RunLoop.
590
591         This is similar to the approach used in DocumentLoader for
592         DocumentLoaderTimer.
593
594         No new tests, verified through manual testing.
595
596         * WebCore.xcodeproj/project.pbxproj:
597         * loader/ResourceLoader.cpp:
598         (WebCore::ResourceLoader::loadDataURL):
599         * page/Page.cpp:
600         (WebCore::Page::Page):
601         * page/Page.h:
602         * page/mac/PageMac.mm: Renamed from Source/WebCore/page/mac/PageMac.cpp.
603         (WebCore::Page::platformInitialize):
604         (WebCore::Page::addSchedulePair):
605         (WebCore::Page::removeSchedulePair):
606         * platform/network/DataURLDecoder.cpp:
607         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
608         (WebCore::DataURLDecoder::DecodingResultDispatcher::DecodingResultDispatcher):
609         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
610         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
611         (WebCore::DataURLDecoder::createDecodeTask):
612         (WebCore::DataURLDecoder::decode):
613         * platform/network/DataURLDecoder.h:
614
615 2015-10-28  Brady Eidson  <beidson@apple.com>
616
617         Modern IDB: Implement most readonly attributes of IDBObjectStore.
618         https://bugs.webkit.org/show_bug.cgi?id=150617
619
620         Reviewed by Alex Christensen.
621
622         Test: storage/indexeddb/modern/objectstore-attributes.html
623
624         * Modules/indexeddb/IDBObjectStore.h:
625
626         * Modules/indexeddb/client/IDBAnyImpl.cpp:
627         (WebCore::IDBClient::IDBAny::IDBAny):
628         * Modules/indexeddb/client/IDBAnyImpl.h:
629         (WebCore::IDBClient::IDBAny::create):
630
631         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
632         (WebCore::IDBClient::IDBObjectStore::name):
633         (WebCore::IDBClient::IDBObjectStore::keyPathAny):
634         (WebCore::IDBClient::IDBObjectStore::keyPath):
635         (WebCore::IDBClient::IDBObjectStore::transaction):
636         (WebCore::IDBClient::IDBObjectStore::id): Deleted.
637         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
638
639         * Modules/indexeddb/legacy/LegacyObjectStore.h:
640         (WebCore::LegacyObjectStore::transaction):
641
642 2015-10-28  Hunseop Jeong  <hs85.jeong@samsung.com>
643
644         Replace 0 and NULL with nullptr in WebCore/editing.
645         https://bugs.webkit.org/show_bug.cgi?id=150555
646
647         Reviewed by Darin Adler.
648
649         No new tests because there is no behavior change.
650
651         * editing/ApplyStyleCommand.cpp:
652         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
653         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
654         (WebCore::ApplyStyleCommand::applyInlineStyle):
655         * editing/ApplyStyleCommand.h:
656         (WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement):
657         * editing/CompositeEditCommand.cpp:
658         (WebCore::CompositeEditCommand::applyCommandToComposite):
659         (WebCore::CompositeEditCommand::deleteInsignificantText):
660         * editing/DeleteSelectionCommand.cpp:
661         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
662         (WebCore::DeleteSelectionCommand::initializeStartEnd):
663         * editing/EditCommand.cpp:
664         (WebCore::EditCommand::EditCommand):
665         * editing/EditCommand.h:
666         * editing/EditingStyle.cpp:
667         (WebCore::HTMLElementEquivalent::HTMLElementEquivalent):
668         * editing/EditingStyle.h:
669         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
670         * editing/Editor.h:
671         * editing/EditorCommand.cpp:
672         (WebCore::Editor::commandIsSupportedFromMenuOrKeyBinding):
673         (WebCore::Editor::Command::Command):
674         * editing/FrameSelection.cpp:
675         (WebCore::DragCaretController::setCaretPosition):
676         (WebCore::FrameSelection::directionOfSelection):
677         * editing/MarkupAccumulator.cpp:
678         (WebCore::MarkupAccumulator::entityMaskForText):
679         * editing/MarkupAccumulator.h:
680         * editing/RenderedPosition.cpp:
681         (WebCore::rendererFromPosition):
682         (WebCore::RenderedPosition::RenderedPosition):
683         * editing/RenderedPosition.h:
684         (WebCore::RenderedPosition::operator==):
685         (WebCore::RenderedPosition::uncachedInlineBox):
686         (WebCore::RenderedPosition::RenderedPosition):
687         * editing/ReplaceSelectionCommand.cpp:
688         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
689         * editing/SetNodeAttributeCommand.cpp:
690         (WebCore::SetNodeAttributeCommand::doUnapply):
691         * editing/SmartReplaceCF.cpp:
692         (WebCore::getSmartSet):
693         * editing/SpellChecker.cpp:
694         (WebCore::SpellCheckRequest::SpellCheckRequest):
695         (WebCore::SpellCheckRequest::didSucceed):
696         (WebCore::SpellCheckRequest::didCancel):
697         (WebCore::SpellCheckRequest::setCheckerAndSequence):
698         (WebCore::SpellCheckRequest::requesterDestroyed):
699         (WebCore::SpellChecker::SpellChecker):
700         * editing/SpellChecker.h:
701         * editing/VisiblePosition.cpp:
702         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
703         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
704         (WebCore::VisiblePosition::localCaretRect):
705         (WebCore::enclosingBlockFlowElement):
706         * editing/VisibleUnits.cpp:
707         (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
708         (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextOrLineBreakBox):
709         (WebCore::visualWordPosition):
710         (WebCore::previousLinePosition):
711         (WebCore::nextLinePosition):
712         * editing/htmlediting.cpp:
713         (WebCore::highestEnclosingNodeOfType):
714         (WebCore::highestNodeToRemoveInPruning):
715         * editing/htmlediting.h:
716         (WebCore::firstPositionInOrBeforeNode):
717         * editing/ios/EditorIOS.mm:
718         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
719         (WebCore::Editor::fontForSelection):
720         * editing/mac/AlternativeTextUIController.mm:
721         (WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext):
722         * editing/mac/EditorMac.mm:
723         (WebCore::Editor::fontForSelection):
724         * editing/markup.cpp:
725         * editing/markup.h:
726
727 2015-10-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
728
729         [Streams API] Add write method to writable stream
730         https://bugs.webkit.org/show_bug.cgi?id=150589
731
732         Reviewed by Darin Adler.
733
734         Write method implemented on writable streams according to the spec.
735
736         Current test set suffices. Expectations are updated accordingly.
737
738         * Modules/streams/WritableStream.js:
739         (write):
740
741 2015-10-27  Hunseop Jeong  <hs85.jeong@samsung.com>
742
743         [Cairo] Incorrect dashed and dotted border painting after r177686.
744         https://bugs.webkit.org/show_bug.cgi?id=141967
745
746         Reviewed by Gyuyoung Kim.
747
748         Fix the incorrect dashed/dotted border painting in cairo.
749
750         * platform/graphics/cairo/GraphicsContextCairo.cpp:
751         (WebCore::GraphicsContext::drawLine):
752         (WebCore::calculateStrokePatternOffset): Deleted.
753         (WebCore::drawLineOnCairoContext): Deleted.
754
755 2015-10-27  Chris Dumez  <cdumez@apple.com>
756
757         id of iframe incorrectly sets window name
758         https://bugs.webkit.org/show_bug.cgi?id=150565
759
760         Reviewed by Darin Adler.
761
762         As per the specification, the iframe's contentWindow name should be an
763         empty string if the frame's name attribute is unset:
764         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-name
765
766         Instead, WebKit was using the iframe's id as window name if the name
767         was unset.
768
769         Firefox, IE and Chrome behave according to the specification.
770
771         This is a merge of the following Blink commit:
772         https://src.chromium.org/viewvc/blink?revision=169803&view=revision
773
774         Test: fast/frames/iframe-no-name.html
775
776         * html/HTMLFrameElementBase.cpp:
777         (WebCore::HTMLFrameElementBase::parseAttribute):
778         (WebCore::HTMLFrameElementBase::insertedInto): Deleted.
779
780 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
781
782         Web Inspector: Remove Timeline MarkDOMContent and MarkLoad, data is already available
783         https://bugs.webkit.org/show_bug.cgi?id=150615
784
785         Reviewed by Timothy Hatcher.
786
787         The timestamp only event data is already available from `Page.domContentEventFired`
788         and `Page.loadEventFired` events. We can drop the Timeline specific events in
789         favor of these which have existed for a very long time (before iOS 7).
790
791         * inspector/InspectorInstrumentation.cpp:
792         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
793         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): Deleted.
794         * inspector/InspectorTimelineAgent.cpp:
795         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent): Deleted.
796         (WebCore::InspectorTimelineAgent::didMarkLoadEvent): Deleted.
797         (WebCore::toProtocol): Deleted.
798         * inspector/InspectorTimelineAgent.h:
799         * inspector/TimelineRecordFactory.cpp:
800         (WebCore::TimelineRecordFactory::createMarkData): Deleted.
801         * inspector/TimelineRecordFactory.h:
802
803 2015-10-27  Jiewen Tan  <jiewen_tan@apple.com>
804
805         Null dereference loading Blink layout test editing/execCommand/format-block-uneditable-crash.html
806         https://bugs.webkit.org/show_bug.cgi?id=150207
807         <rdar://problem/23137066>
808
809         Reviewed by Enrica Casucci.
810
811         This is a merge of Blink r200238:
812         https://codereview.chromium.org/1280263002
813
814         Test: editing/execCommand/format-block-uneditable-crash.html
815
816         * editing/ApplyBlockElementCommand.cpp:
817         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
818         splitTextNode() will return early if the given text node is not editable. Hence, check
819         its editablity before calling the method.
820
821 2015-10-27  Brady Eidson  <beidson@apple.com>
822
823         Modern IDB: IDBTransaction.objectStore() support.
824         https://bugs.webkit.org/show_bug.cgi?id=150607
825
826         Reviewed by Alex Christensen.
827
828         Tests: storage/indexeddb/modern/aborted-put.html
829                storage/indexeddb/modern/idbtransaction-objectstore-failures.html
830
831         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
832         (WebCore::IDBClient::IDBObjectStore::put):
833         
834         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
835         (WebCore::IDBClient::IDBTransaction::objectStore):
836         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
837         * Modules/indexeddb/client/IDBTransactionImpl.h:
838         
839         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
840         (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingObjectStore):
841         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
842         
843         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
844         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
845         
846         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
847         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
848         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
849         
850         * Modules/indexeddb/shared/IDBTransactionInfo.h:
851         (WebCore::IDBTransactionInfo::objectStores):
852
853 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
854
855         Web Inspector: Remove unused / duplicated XHR timeline instrumentation
856         https://bugs.webkit.org/show_bug.cgi?id=150605
857
858         Reviewed by Timothy Hatcher.
859
860         These records are just duplicates of "EventDispatch" records for XHR
861         load and readystatechange events. Due to the nesting, the XHR records
862         were themselves never getting looked at, and their data (URL / readyState)
863         not shown in the frontend.
864
865         * inspector/InspectorInstrumentation.cpp:
866         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl): Deleted.
867         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEventImpl): Deleted.
868         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl): Deleted.
869         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEventImpl): Deleted.
870         * inspector/InspectorInstrumentation.h:
871         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent): Deleted.
872         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent): Deleted.
873         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent): Deleted.
874         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent): Deleted.
875         * inspector/InspectorTimelineAgent.cpp:
876         (WebCore::InspectorTimelineAgent::willDispatchXHRReadyStateChangeEvent): Deleted.
877         (WebCore::InspectorTimelineAgent::didDispatchXHRReadyStateChangeEvent): Deleted.
878         (WebCore::InspectorTimelineAgent::willDispatchXHRLoadEvent): Deleted.
879         (WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
880         (WebCore::toProtocol): Deleted.
881         * inspector/InspectorTimelineAgent.h:
882         * inspector/TimelineRecordFactory.cpp:
883         (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData): Deleted.
884         (WebCore::TimelineRecordFactory::createXHRLoadData): Deleted.
885         * inspector/TimelineRecordFactory.h:
886         * xml/XMLHttpRequest.cpp:
887         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Deleted.
888
889 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
890
891         Web Inspector: Do not send RenderingFrame TimelineRecords that have no children
892         https://bugs.webkit.org/show_bug.cgi?id=150600
893
894         Reviewed by Timothy Hatcher.
895
896         * inspector/InspectorTimelineAgent.cpp:
897         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
898         The frontend already filters out empty RenderingFrame records
899         (in TimelineManager.prototype._processRecord). Filter them out
900         on the backend to reduce protocol traffic / noise.
901
902 2015-10-27  Alex Christensen  <achristensen@webkit.org>
903
904         Cancel navigation policy checks like we do content policy checks.
905         https://bugs.webkit.org/show_bug.cgi?id=150582
906         rdar://problem/22077579
907
908         Reviewed by Brent Fulgham.
909
910         This was verified manually and I'll write a layout test for it soon.
911
912         * loader/DocumentLoader.cpp:
913         (WebCore::DocumentLoader::DocumentLoader):
914         (WebCore::DocumentLoader::~DocumentLoader):
915         (WebCore::DocumentLoader::willSendRequest):
916         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
917         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):
918         * loader/DocumentLoader.h:
919         Add a bool to keep track of whether we are waiting for navigation policy checks, like we do with content policy checks.
920         Without this check, sometimes callbacks are made to DocumentLoaders that do not exist any more because they do not get
921         cancelled by cancelPolicyCheckIfNeeded when detaching from the frame.
922
923 2015-10-27  Brady Eidson  <beidson@apple.com>
924
925         Modern IDB: Support IDBObjectStore.put/get support.
926         https://bugs.webkit.org/show_bug.cgi?id=150468
927
928         Reviewed by Alex Christensen.
929
930         Tests: storage/indexeddb/modern/basic-put.html
931                storage/indexeddb/modern/keypath-basic.html
932
933         * CMakeLists.txt:
934         * WebCore.xcodeproj/project.pbxproj:
935
936         * Modules/indexeddb/IDBKeyData.cpp:
937         (WebCore::IDBKeyData::deletedValue):
938         (WebCore::IDBKeyData::operator<):
939         (WebCore::IDBKeyData::operator==):
940         * Modules/indexeddb/IDBKeyData.h:
941         (WebCore::IDBKeyData::isValid):
942         (WebCore::IDBKeyData::operator!=):
943         (WebCore::IDBKeyData::hash):
944         (WebCore::IDBKeyData::isDeletedValue):
945         (WebCore::IDBKeyDataHash::hash):
946         (WebCore::IDBKeyDataHash::equal):
947         (WebCore::IDBKeyDataHashTraits::constructDeletedValue):
948         (WebCore::IDBKeyDataHashTraits::isDeletedValue):
949         (WebCore::IDBKeyDataHashTraits::emptyValue):
950         (WebCore::IDBKeyDataHashTraits::isEmptyValue):
951
952         * Modules/indexeddb/IndexedDB.h:
953
954         * Modules/indexeddb/client/IDBAnyImpl.cpp:
955         (WebCore::IDBClient::IDBAny::IDBAny):
956         (WebCore::IDBClient::IDBAny::modernIDBObjectStore):
957         * Modules/indexeddb/client/IDBAnyImpl.h:
958         (WebCore::IDBClient::IDBAny::create):
959
960         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
961         (WebCore::IDBClient::IDBConnectionToServer::createObjectStore):
962         (WebCore::IDBClient::IDBConnectionToServer::didCreateObjectStore):
963         (WebCore::IDBClient::IDBConnectionToServer::putOrAdd):
964         (WebCore::IDBClient::IDBConnectionToServer::didPutOrAdd):
965         (WebCore::IDBClient::IDBConnectionToServer::getRecord):
966         (WebCore::IDBClient::IDBConnectionToServer::didGetRecord):
967         (WebCore::IDBClient::IDBConnectionToServer::saveOperation):
968         (WebCore::IDBClient::IDBConnectionToServer::completeOperation):
969         * Modules/indexeddb/client/IDBConnectionToServer.h:
970         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
971
972         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
973         (WebCore::IDBClient::IDBObjectStore::autoIncrement):
974         (WebCore::IDBClient::IDBObjectStore::put):
975         (WebCore::IDBClient::IDBObjectStore::get):
976         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
977         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
978         (WebCore::IDBClient::IDBObjectStore::info):
979
980         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
981         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest): Deleted.
982
983         * Modules/indexeddb/client/IDBRequestImpl.cpp:
984         (WebCore::IDBClient::IDBRequest::create):
985         (WebCore::IDBClient::IDBRequest::IDBRequest):
986         (WebCore::IDBClient::IDBRequest::sourceObjectStoreIdentifier):
987         (WebCore::IDBClient::IDBRequest::hasPendingActivity):
988         (WebCore::IDBClient::IDBRequest::dispatchEvent):
989         (WebCore::IDBClient::IDBRequest::setResult):
990         (WebCore::IDBClient::IDBRequest::setResultToStructuredClone):
991         (WebCore::IDBClient::IDBRequest::requestCompleted):
992         (WebCore::IDBClient::IDBRequest::onError):
993         (WebCore::IDBClient::IDBRequest::onSuccess):
994         * Modules/indexeddb/client/IDBRequestImpl.h:
995
996         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
997         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
998         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
999         (WebCore::IDBClient::IDBTransaction::isActive):
1000         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
1001         (WebCore::IDBClient::IDBTransaction::commit):
1002         (WebCore::IDBClient::IDBTransaction::didAbort):
1003         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
1004         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
1005         (WebCore::IDBClient::IDBTransaction::getRecordOnServer):
1006         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
1007         (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
1008         (WebCore::IDBClient::IDBTransaction::putOrAddOnServer):
1009         (WebCore::IDBClient::IDBTransaction::didPutOrAddOnServer):
1010         (WebCore::IDBClient::IDBTransaction::activate):
1011         (WebCore::IDBClient::IDBTransaction::deactivate):
1012         * Modules/indexeddb/client/IDBTransactionImpl.h:
1013         (WebCore::IDBClient::IDBTransaction::isReadOnly):
1014         (WebCore::IDBClient::TransactionActivator::TransactionActivator):
1015         (WebCore::IDBClient::TransactionActivator::~TransactionActivator):
1016
1017         * Modules/indexeddb/client/TransactionOperation.cpp: 
1018         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
1019         * Modules/indexeddb/client/TransactionOperation.h:
1020         (WebCore::IDBClient::TransactionOperation::objectStoreIdentifier):
1021         (WebCore::IDBClient::TransactionOperation::transaction):
1022         (WebCore::IDBClient::createTransactionOperation):
1023
1024         * Modules/indexeddb/server/IDBBackingStore.h:
1025         
1026         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1027         (WebCore::IDBServer::IDBConnectionToClient::didPutOrAdd):
1028         (WebCore::IDBServer::IDBConnectionToClient::didGetRecord):
1029         * Modules/indexeddb/server/IDBConnectionToClient.h:
1030         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1031
1032         * Modules/indexeddb/server/IDBServer.cpp:
1033         (WebCore::IDBServer::IDBServer::putOrAdd):
1034         (WebCore::IDBServer::IDBServer::getRecord):
1035         * Modules/indexeddb/server/IDBServer.h:
1036
1037         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1038         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
1039         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
1040         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1041
1042         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1043         (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
1044         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord):
1045         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord):
1046         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
1047         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1048
1049         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1050         (WebCore::IDBServer::MemoryObjectStore::containsRecord):
1051         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
1052         (WebCore::IDBServer::MemoryObjectStore::putRecord):
1053         (WebCore::IDBServer::MemoryObjectStore::valueForKey):
1054         * Modules/indexeddb/server/MemoryObjectStore.h:
1055
1056         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1057         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
1058         (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
1059         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
1060         (WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
1061         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
1062         (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
1063         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord):
1064         (WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback):
1065         (WebCore::IDBServer::UniqueIDBDatabase::performValueDataCallback):
1066         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1067
1068         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1069         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isReadOnly):
1070         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
1071         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
1072         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1073
1074         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
1075         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
1076         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
1077
1078         * Modules/indexeddb/shared/IDBError.cpp:
1079         (WebCore::idbErrorName):
1080         (WebCore::idbErrorDescription):
1081         * Modules/indexeddb/shared/IDBError.h:
1082
1083         * Modules/indexeddb/shared/IDBRequestData.cpp:
1084         (WebCore::IDBRequestData::IDBRequestData):
1085         (WebCore::IDBRequestData::serverConnectionIdentifier):
1086         (WebCore::IDBRequestData::objectStoreIdentifier):
1087         * Modules/indexeddb/shared/IDBRequestData.h:
1088
1089         * Modules/indexeddb/shared/IDBResultData.cpp:
1090         (WebCore::IDBResultData::IDBResultData):
1091         (WebCore::IDBResultData::putOrAddSuccess):
1092         (WebCore::IDBResultData::getRecordSuccess):
1093         * Modules/indexeddb/shared/IDBResultData.h:
1094         (WebCore::IDBResultData::resultKey):
1095         (WebCore::IDBResultData::resultData):
1096
1097         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1098         (WebCore::InProcessIDBServer::didPutOrAdd):
1099         (WebCore::InProcessIDBServer::didGetRecord):
1100         (WebCore::InProcessIDBServer::putOrAdd):
1101         (WebCore::InProcessIDBServer::getRecord):
1102         * Modules/indexeddb/shared/InProcessIDBServer.h:
1103
1104         * bindings/js/IDBBindingUtilities.cpp:
1105         (WebCore::idbKeyToJSValue):
1106         (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
1107         (WebCore::canInjectIDBKeyIntoScriptValue):
1108         (WebCore::deserializeIDBValueData):
1109         (WebCore::scriptValueToIDBKey):
1110         (WebCore::idbKeyDataToScriptValue):
1111         * bindings/js/IDBBindingUtilities.h:
1112
1113         * platform/CrossThreadCopier.cpp:
1114         (WebCore::ThreadSafeDataBuffer>::copy):
1115         * platform/CrossThreadCopier.h:
1116
1117         * platform/ThreadSafeDataBuffer.h: Added.
1118         (WebCore::ThreadSafeDataBufferImpl::ThreadSafeDataBufferImpl):
1119         (WebCore::ThreadSafeDataBuffer::adoptVector):
1120         (WebCore::ThreadSafeDataBuffer::copyVector):
1121         (WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer):
1122         (WebCore::ThreadSafeDataBuffer::data):
1123
1124 2015-10-27  Tim Horton  <timothy_horton@apple.com>
1125
1126         WKView being inside WKWebView leads to weird API issues
1127         https://bugs.webkit.org/show_bug.cgi?id=150174
1128
1129         Reviewed by Anders Carlsson.
1130
1131         * platform/spi/cg/CoreGraphicsSPI.h:
1132
1133 2015-10-27  Zhuo Li  <zachli@apple.com>
1134
1135         Add WebKit API to clear data type Search Field Recent Searches.
1136         https://bugs.webkit.org/show_bug.cgi?id=150019.
1137
1138         Reviewed by Anders Carlsson.
1139
1140         * platform/cocoa/SearchPopupMenuCocoa.h: Add a function to remove recent searches based on
1141         time.
1142         * platform/cocoa/SearchPopupMenuCocoa.mm:
1143         (WebCore::typeCheckedRecentSearchesArray): Return nil if the recent searches array is
1144         corrupted, otherwise return the array.
1145         (WebCore::typeCheckedDateInRecentSearch): Return nil if the date in recent search is
1146         corrupted, otherwise return the date.
1147         (WebCore::typeCheckedRecentSearchesRemovingRecentSearchesAddedAfterDate): Return nil if the recent searches plist is
1148         corrupted, otherwise return the recent searches plist.
1149         (WebCore::writeEmptyRecentSearchesPlist): Replace the existing recent searches plist if there is
1150         any with a clean one.
1151         (WebCore::loadRecentSearches): Use -typeCheckedRecentSearchesArray and -typeCheckedDateInRecentSearch.
1152         (WebCore::removeRecentlyModifiedRecentSearches):
1153         When the time passed in is equivalent to [NSDate distantPast], clear all recent searches in
1154         the Recent Searches plist. Otherwise, we only clear the recent searches that were created
1155         after or at the time that is passed in as the parameter. If all recent searches associated
1156         with an autosave name were created after or at the time that is passed in as the parameter,
1157         remove this autosave name key and all of its values in the plist. If all recent searches
1158         associated with every autosave name in the plist were created after or at the time that is
1159         passed in as the parameter, clear all recent searches in the Recent Searches plist.
1160
1161         Also, we clear all recent searches in the Recent Searches plist when we find the plist is
1162         corrupted.
1163
1164 2015-10-27  Keith Rollin  <krollin@apple.com>
1165
1166         Do not sanitize user input for input[type=url]
1167         https://bugs.webkit.org/show_bug.cgi?id=150346
1168         <rdar://problem/23243240>
1169
1170         Reviewed by Darin Adler.
1171
1172         Do not sanitize user input in text-based input fields that support
1173         the Selection API, in order to not break JavaScript code that expects
1174         element.value to match what's on the screen.
1175
1176         Test: fast/forms/input-user-input-sanitization.html
1177
1178         * html/TextFieldInputType.cpp:
1179         (WebCore::TextFieldInputType::subtreeHasChanged):
1180
1181 2015-10-20  Zalan Bujtas  <zalan@apple.com>
1182
1183         Subpixel layout: Convert RenderTable* and AutoTableLayout to use LayoutUnit.
1184         https://bugs.webkit.org/show_bug.cgi?id=149366
1185
1186         Reviewed by David Hyatt.
1187
1188         This patch enables non-integral cell space distribution for both
1189         auto and fixed table layout.
1190         Due to the tight layout, float is used to calculate each cell's dimension/position and
1191         we convert them to LayoutUnits while said values are set on the renderer.
1192         Due to the (lack of) LayoutUnit precision, a fudge factor is applied on table cell's minimum width.   
1193
1194         Collapsed table borders are still integral based, tracked here: webkit.org/b/150383
1195
1196         Covered by existing tests.
1197
1198         (WebCore::RenderTableSection::firstLineBaseline): Baseline is still integral (same as normal line layout)
1199         * rendering/RenderTreeAsText.cpp: flooring produces the least amount of rebaseline diff (still over 1200 tests). It doesn't really matter which direction we round
1200         as long as it is consistent.
1201         (WebCore::writeTextRun):
1202         (WebCore::writeSimpleLine):
1203         * platform/graphics/LayoutRect.h:
1204         (WebCore::LayoutRect::LayoutRect):
1205         * rendering/AutoTableLayout.cpp:
1206         (WebCore::AutoTableLayout::recalcColumn):
1207         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
1208         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
1209         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1210         (WebCore::AutoTableLayout::layout):
1211         * rendering/AutoTableLayout.h:
1212         * rendering/FixedTableLayout.cpp:
1213         (WebCore::FixedTableLayout::calcWidthArray):
1214         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
1215         (WebCore::FixedTableLayout::layout):
1216         * rendering/FixedTableLayout.h:
1217         * rendering/RenderBlock.cpp:
1218         (WebCore::RenderBlock::computePreferredLogicalWidths):
1219         * rendering/RenderTable.cpp:
1220         (WebCore::RenderTable::updateLogicalWidth):
1221         (WebCore::RenderTable::distributeExtraLogicalHeight):
1222         (WebCore::RenderTable::layout):
1223         (WebCore::RenderTable::addOverflowFromChildren):
1224         (WebCore::RenderTable::computePreferredLogicalWidths):
1225         (WebCore::RenderTable::offsetWidthForColumn):
1226         (WebCore::RenderTable::calcBorderStart):
1227         (WebCore::RenderTable::calcBorderEnd):
1228         (WebCore::RenderTable::outerBorderBefore):
1229         (WebCore::RenderTable::outerBorderAfter):
1230         (WebCore::RenderTable::outerBorderStart):
1231         (WebCore::RenderTable::outerBorderEnd):
1232         * rendering/RenderTable.h:
1233         (WebCore::RenderTable::hBorderSpacing):
1234         (WebCore::RenderTable::vBorderSpacing):
1235         (WebCore::RenderTable::outerBorderLeft):
1236         (WebCore::RenderTable::outerBorderRight):
1237         (WebCore::RenderTable::outerBorderTop):
1238         (WebCore::RenderTable::outerBorderBottom):
1239         (WebCore::RenderTable::columnPositions):
1240         (WebCore::RenderTable::setColumnPosition):
1241         * rendering/RenderTableCell.cpp:
1242         (WebCore::RenderTableCell::logicalWidthFromColumns):
1243         (WebCore::RenderTableCell::computeIntrinsicPadding):
1244         (WebCore::RenderTableCell::setCellLogicalWidth):
1245         (WebCore::RenderTableCell::layout):
1246         (WebCore::RenderTableCell::paddingTop):
1247         (WebCore::RenderTableCell::paddingBottom):
1248         (WebCore::RenderTableCell::paddingLeft):
1249         (WebCore::RenderTableCell::paddingRight):
1250         (WebCore::RenderTableCell::paddingBefore):
1251         (WebCore::RenderTableCell::paddingAfter):
1252         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
1253         (WebCore::RenderTableCell::borderLeft):
1254         (WebCore::RenderTableCell::borderRight):
1255         (WebCore::RenderTableCell::borderTop):
1256         (WebCore::RenderTableCell::borderBottom):
1257         (WebCore::RenderTableCell::borderStart):
1258         (WebCore::RenderTableCell::borderEnd):
1259         (WebCore::RenderTableCell::borderBefore):
1260         (WebCore::RenderTableCell::borderAfter):
1261         (WebCore::RenderTableCell::borderHalfLeft):
1262         (WebCore::RenderTableCell::borderHalfRight):
1263         (WebCore::RenderTableCell::borderHalfTop):
1264         (WebCore::RenderTableCell::borderHalfBottom):
1265         (WebCore::RenderTableCell::borderHalfStart):
1266         (WebCore::RenderTableCell::borderHalfEnd):
1267         (WebCore::RenderTableCell::borderHalfBefore):
1268         (WebCore::RenderTableCell::borderHalfAfter):
1269         (WebCore::CollapsedBorders::addBorder):
1270         (WebCore::RenderTableCell::paintCollapsedBorders):
1271         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1272         (WebCore::RenderTableCell::paintBoxDecorations):
1273         (WebCore::RenderTableCell::paintMask):
1274         * rendering/RenderTableCell.h:
1275         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1276         * rendering/RenderTableSection.cpp:
1277         (WebCore::RenderTableSection::calcRowLogicalHeight):
1278         (WebCore::RenderTableSection::layout):
1279         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
1280         (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
1281         (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
1282         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
1283         (WebCore::RenderTableSection::layoutRows):
1284         (WebCore::RenderTableSection::calcOuterBorderBefore):
1285         (WebCore::RenderTableSection::calcOuterBorderAfter):
1286         (WebCore::RenderTableSection::calcOuterBorderStart):
1287         (WebCore::RenderTableSection::calcOuterBorderEnd):
1288         (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection):
1289         (WebCore::RenderTableSection::dirtiedColumns):
1290         (WebCore::RenderTableSection::spannedColumns):
1291         (WebCore::RenderTableSection::offsetLeftForRowGroupBorder):
1292         (WebCore::RenderTableSection::offsetTopForRowGroupBorder):
1293         (WebCore::RenderTableSection::verticalRowGroupBorderHeight):
1294         (WebCore::RenderTableSection::horizontalRowGroupBorderWidth):
1295         (WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
1296         (WebCore::RenderTableSection::setLogicalPositionForCell):
1297         * rendering/RenderTableSection.h:
1298         (WebCore::RenderTableSection::outerBorderLeft):
1299         (WebCore::RenderTableSection::outerBorderRight):
1300         (WebCore::RenderTableSection::outerBorderTop):
1301         (WebCore::RenderTableSection::outerBorderBottom):
1302         * rendering/style/CollapsedBorderValue.h:
1303         (WebCore::CollapsedBorderValue::CollapsedBorderValue):
1304         (WebCore::CollapsedBorderValue::width):
1305
1306 2015-10-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1307
1308         [Streams API] Add close method to writable stream
1309         https://bugs.webkit.org/show_bug.cgi?id=150560
1310
1311         Reviewed by Darin Adler.
1312
1313         Added the close method which requires three additional writable stream internal functions plus a queuing
1314         function to retrieve a value from the queue according to the spec.
1315
1316         Current test set suffices. Expectations were updated accordingly.
1317
1318         * Modules/streams/StreamInternals.js:
1319         (peekQueueValue):
1320         * Modules/streams/WritableStream.js:
1321         (close):
1322         * Modules/streams/WritableStreamInternals.js:
1323         (callOrScheduleWritableStreamAdvanceQueue):
1324         (writableStreamAdvanceQueue):
1325         (closeWritableStream): Added as per spec.
1326
1327 2015-10-26  Brady Eidson  <beidson@apple.com>
1328
1329         Make IDBKeyData from a struct to a class.
1330         https://bugs.webkit.org/show_bug.cgi?id=150576
1331
1332         Reviewed by Alex Christensen.
1333
1334         No new tests (No change in behavior).
1335
1336         * Modules/indexeddb/IDBKeyData.cpp:
1337         (WebCore::IDBKeyData::IDBKeyData):
1338         (WebCore::IDBKeyData::maybeCreateIDBKey):
1339         (WebCore::IDBKeyData::isolatedCopy):
1340         (WebCore::IDBKeyData::encode):
1341         (WebCore::IDBKeyData::decode):
1342         (WebCore::IDBKeyData::compare):
1343         (WebCore::IDBKeyData::loggingString):
1344         (WebCore::IDBKeyData::setArrayValue):
1345         (WebCore::IDBKeyData::setStringValue):
1346         (WebCore::IDBKeyData::setDateValue):
1347         (WebCore::IDBKeyData::setNumberValue):
1348         * Modules/indexeddb/IDBKeyData.h:
1349         (WebCore::IDBKeyData::IDBKeyData):
1350         (WebCore::IDBKeyData::minimum):
1351         (WebCore::IDBKeyData::maximum):
1352         (WebCore::IDBKeyData::isNull):
1353         (WebCore::IDBKeyData::type):
1354         (WebCore::IDBKeyData::encode):
1355         (WebCore::IDBKeyData::decode):
1356         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
1357         (WebCore::GetOperation::perform):
1358         * bindings/js/IDBBindingUtilities.h:
1359         * platform/CrossThreadCopier.h:
1360
1361 2015-10-26  Philip Chimento  <philip.chimento@gmail.com>
1362
1363         [GTK] [Stable] Build GL texture mapper only if USE_TEXTURE_MAPPER_GL
1364         https://bugs.webkit.org/show_bug.cgi?id=148606
1365
1366         Unreviewed, build-only change.
1367
1368         No new tests, build-only change.
1369
1370         * PlatformGTK.cmake: Remove sources requiring GL from list of
1371         sources that are built when USE_TEXTURE_MAPPER is true, and add a
1372         separate condition within the USE_TEXTURE_MAPPER condition to
1373         build those sources when USE_TEXTURE_MAPPER_GL is true.
1374
1375 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
1376
1377         Remove redundant GraphicsContext::clip(const Path&, WindRule)
1378         https://bugs.webkit.org/show_bug.cgi?id=150584
1379
1380         Reviewed by Tim Horton.
1381
1382         GraphicsContext had both clipPath(const Path&, WindRule) and clip(const Path&, WindRule),
1383         which were mostly the same other than GraphicsContext::clipPath() not clipping if the path
1384         was empty (added, I think by mistake, in r72926), and not calling m_data->clip().
1385
1386         Make clipPath() be the winner, and have it behave like clip() with empty paths, and call m_data->clip().
1387
1388         * platform/graphics/GraphicsContext.cpp:
1389         (WebCore::GraphicsContext::clipRoundedRect):
1390         * platform/graphics/GraphicsContext.h:
1391         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1392         (WebCore::GraphicsContext::clipPath):
1393         (WebCore::GraphicsContext::clip): Deleted.
1394         * platform/graphics/cg/GraphicsContextCG.cpp:
1395         (WebCore::GraphicsContext::clipPath):
1396         (WebCore::GraphicsContext::canvasClip):
1397         (WebCore::GraphicsContext::clip): Deleted.
1398         * rendering/RenderBoxModelObject.cpp:
1399         (WebCore::RenderBoxModelObject::paintBoxShadow): Making a path, calling addRoundedRect() and then clipping
1400         to the path is the same as context.clipRoundedRect().
1401         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
1402         (WebCore::RenderMathMLRadicalOperator::paint):
1403
1404 2015-10-26  Zalan Bujtas  <zalan@apple.com>
1405
1406         Floating box is misplaced after content change.
1407         https://bugs.webkit.org/show_bug.cgi?id=150271
1408
1409         Reviewed by David Hyatt.
1410
1411         Collapse anonymous block when as the result of a sibling removal only floating siblings are left.
1412
1413         Test: fast/block/collapse-anon-block-with-float-siblings-only.html
1414
1415         * rendering/RenderBlock.cpp:
1416         (WebCore::canCollapseAnonymousBlock):
1417         (WebCore::canMergeContiguousAnonymousBlocks):
1418         (WebCore::RenderBlock::collapseAnonymousBoxChild):
1419         (WebCore::RenderBlock::removeChild):
1420         (WebCore::canMergeAnonymousBlock): Deleted.
1421         * rendering/RenderBlock.h:
1422         * rendering/RenderElement.cpp:
1423         (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
1424
1425 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1426
1427         Null dereference loading Blink layout test editing/execCommand/crash-replacing-list-by-list.html
1428         https://bugs.webkit.org/show_bug.cgi?id=149288
1429         <rdar://problem/22746310>
1430
1431         Reviewed by Chris Dumez.
1432
1433         This is a merge of Blink r170821:
1434         https://codereview.chromium.org/220233013
1435
1436         Test: editing/execCommand/crash-replacing-list-by-list.html
1437
1438         * editing/ReplaceSelectionCommand.cpp:
1439         (WebCore::ReplaceSelectionCommand::insertAsListItems):
1440
1441 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1442
1443         Null dereference loading Blink layout test editing/execCommand/insert-image-changing-visibility-crash.html
1444         https://bugs.webkit.org/show_bug.cgi?id=150208
1445         <rdar://problem/23137109>
1446
1447         Reviewed by Chris Dumez.
1448
1449         This is a merge from Blink r168502:
1450         https://codereview.chromium.org/183893018
1451
1452         Test: editing/execCommand/insert-image-changing-visibility-crash.html
1453
1454         * editing/ReplaceSelectionCommand.cpp:
1455         (WebCore::ReplaceSelectionCommand::doApply):
1456         We should check again the visibility of the inserted position again since
1457         the replacement might change the visibility.
1458
1459 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1460
1461         Null dereference loading Blink layout test editing/execCommand/insert-ordered-list-crash.html
1462         https://bugs.webkit.org/show_bug.cgi?id=150209
1463         <rdar://problem/23137198>
1464
1465         Reviewed by Chris Dumez.
1466
1467         This is a merge from Blink r168006:
1468         https://codereview.chromium.org/181283002
1469
1470         Test: editing/execCommand/insert-ordered-list-crash.html
1471
1472         * editing/InsertListCommand.cpp:
1473         (WebCore::InsertListCommand::doApply):
1474         setEndingSelection() might change endingSelection(), we should check again.
1475
1476 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1477
1478         Null dereference loading Blink layout test editing/execCommand/insert-html-to-document-element-crash.html
1479         https://bugs.webkit.org/show_bug.cgi?id=149294
1480         <rdar://problem/22746657>
1481
1482         Reviewed by Darin Adler.
1483
1484         This is a merge of Blink r175019:
1485         https://codereview.chromium.org/300143012
1486
1487         Test: editing/execCommand/insert-html-to-document-element-crash.html
1488
1489         * editing/ReplaceSelectionCommand.cpp:
1490         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1491         check nullable value |element->parentNode()| before using it.
1492
1493 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1494
1495         Null dereference loading Blink layout test editing/execCommand/indent-nested-blockquotes-crash.html
1496         https://bugs.webkit.org/show_bug.cgi?id=149291
1497         <rdar://problem/22746473>
1498
1499         Reviewed by Darin Adler.
1500
1501         This is a merge of Blink r172967:
1502         https://codereview.chromium.org/251723003
1503
1504         Test: editing/execCommand/indent-nested-blockquotes-crash.html
1505
1506         * editing/CompositeEditCommand.cpp:
1507         (WebCore::CompositeEditCommand::insertNodeAfter):
1508
1509 2015-10-26  Brady Eidson  <beidson@apple.com>
1510
1511         Modern IDB: Backing store objectStores (plumbing for b/150468).
1512         https://bugs.webkit.org/show_bug.cgi?id=150543
1513
1514         Reviewed by Alex Christensen.
1515
1516         No new tests (No change in behavior, plumbing for future testability)
1517
1518         * CMakeLists.txt:
1519         * WebCore.xcodeproj/project.pbxproj:
1520
1521         * Modules/indexeddb/server/IDBBackingStore.h:
1522
1523         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1524         (WebCore::IDBServer::MemoryBackingStoreTransaction::addNewObjectStore):
1525         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
1526         (WebCore::IDBServer::MemoryBackingStoreTransaction::commit):
1527         (WebCore::IDBServer::MemoryBackingStoreTransaction::finish):
1528         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1529         (WebCore::IDBServer::MemoryBackingStoreTransaction::isWriting):
1530
1531         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1532         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
1533         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
1534         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1535
1536         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1537         (WebCore::IDBServer::MemoryObjectStore::create):
1538         (WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):
1539         (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
1540         (WebCore::IDBServer::MemoryObjectStore::writeTransactionStarted):
1541         (WebCore::IDBServer::MemoryObjectStore::writeTransactionFinished):
1542         * Modules/indexeddb/server/MemoryObjectStore.h:
1543         (WebCore::IDBServer::MemoryObjectStore::info):
1544
1545         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1546         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
1547
1548         * Modules/indexeddb/shared/IDBError.cpp:
1549         (WebCore::idbErrorName):
1550         (WebCore::idbErrorDescription):
1551         * Modules/indexeddb/shared/IDBError.h:
1552
1553 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1554
1555         Null dereference loading Blink layout test editing/execCommand/indent-inline-box-crash.html
1556         https://bugs.webkit.org/show_bug.cgi?id=149290
1557         <rdar://problem/22746435>
1558
1559         Reviewed by Alex Christensen.
1560
1561         This is a merge of Blink r174952:
1562         https://codereview.chromium.org/297203004
1563
1564         Test: editing/execCommand/indent-inline-box-crash.html
1565
1566         * editing/IndentOutdentCommand.cpp:
1567         (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
1568
1569 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1570
1571         Null dereference loading Blink layout test editing/execCommand/indent-no-visible-contents-crash.html
1572         https://bugs.webkit.org/show_bug.cgi?id=149292
1573         <rdar://problem/22746530>
1574
1575         Reviewed by Alex Christensen.
1576
1577         This is a merge of Blink r176735:
1578         https://codereview.chromium.org/349143002
1579
1580         Test: editing/execCommand/indent-no-visible-contents-crash.html
1581
1582         * editing/CompositeEditCommand.cpp:
1583         (WebCore::CompositeEditCommand::moveParagraphWithClones):
1584         Sometimes callers of this method will pass null startOfParagraphToMove || endOfParagraphToMove,
1585         hence check them before proceeding.
1586
1587 2015-10-26  Anders Carlsson  <andersca@apple.com>
1588
1589         Remove dead context menu code
1590         https://bugs.webkit.org/show_bug.cgi?id=150567
1591
1592         Reviewed by Tim Horton.
1593
1594         * loader/EmptyClients.h:
1595         * page/ContextMenuClient.h:
1596         * page/ContextMenuController.cpp:
1597         (WebCore::ContextMenuController::showContextMenu): Deleted.
1598
1599 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
1600
1601         Implement 'round' and 'space' values for border-image
1602         https://bugs.webkit.org/show_bug.cgi?id=14185
1603
1604         Reviewed by Tim Horton.
1605         
1606         Add support for "round" and "space" values for border-image-repeat.
1607         Following "stretch" and "repeat", the code is added to Image::drawTiled().
1608         
1609         For "round", we compute an integral number of copies of the image that fit,
1610         and then adjust the tile scale.
1611         
1612         For "space", we also compute an integral number N of copies that will fit,
1613         and then divide the remaining space amongst N+1 gaps, adjusting the tiling
1614         phase so that with an even number of images, a gap is centered.
1615
1616         Tests: fast/borders/border-image-round.html
1617                fast/borders/border-image-space.html
1618
1619         * platform/graphics/Image.cpp:
1620         (WebCore::Image::drawTiled):
1621         * platform/graphics/cg/GraphicsContextCG.cpp:
1622         (WebCore::GraphicsContext::drawPattern):
1623
1624 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
1625
1626         Incorrect repeated background-size behavior in keyframes
1627         https://bugs.webkit.org/show_bug.cgi?id=150309
1628
1629         Reviewed by Zalan Bujtas.
1630         
1631         After computing the style for a keyframe, we failed to propagate unset
1632         fill-layer properties to all layers, which caused incorrect behavior when
1633         there were multiple background images, but only one value on a background
1634         property in the keyframes.
1635         
1636         Fix by calling adjustRenderStyle() on keyframe styles, which invokes
1637         style.adjustBackgroundLayers() which fixes the bug.
1638
1639         Test: animations/multiple-backgrounds.html
1640
1641         * css/StyleResolver.cpp:
1642         (WebCore::StyleResolver::styleForKeyframe):
1643
1644 2015-10-26  Chris Dumez  <cdumez@apple.com>
1645
1646         Indexing an object with an integer that is not a supported property index should not call the named property getter
1647         https://bugs.webkit.org/show_bug.cgi?id=148871
1648         <rdar://problem/22589952>
1649
1650         Reviewed by Darin Adler.
1651
1652         Indexing an object with an integer that is not a supported property
1653         index should not call the named property getter, as per the Web IDL
1654         specification:
1655         https://heycam.github.io/webidl/#idl-indexed-properties (Note in blue)
1656
1657         Firefox and Chrome both already behave according to the specification
1658         here so this patch aligns our behavior with other browsers as well.
1659
1660         No new tests, already covered by existing test.
1661
1662         * bindings/scripts/CodeGeneratorJS.pm:
1663         (GenerateGetOwnPropertySlotBody):
1664         (GenerateImplementation):
1665         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1666         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1667         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex): Deleted.
1668         (WebCore::jsTestEventTargetConstructor): Deleted.
1669
1670 2015-10-26  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1671
1672         [Streams API] Implement abort method on writable streams
1673         https://bugs.webkit.org/show_bug.cgi?id=150444
1674
1675         Reviewed by Darin Adler.
1676
1677         Abort method on writable streams implemented according to the spec.
1678
1679         Current test set suffices. Expectations are updated accordingly.
1680
1681         * Modules/streams/StreamInternals.js:
1682         (promiseInvokeOrFallbackOrNoop): Implemented according to the spec.
1683         * Modules/streams/WritableStream.js:
1684         (abort): Implemented according to the spec.
1685
1686 2015-10-25  Hunseop Jeong  <hs85.jeong@samsung.com>
1687
1688         Use modern for-loops in WebCore/editing.
1689         https://bugs.webkit.org/show_bug.cgi?id=150354
1690
1691         Reviewed by Darin Adler.
1692
1693         No new tests because there is no behavior change.
1694
1695         * editing/AlternativeTextController.cpp:
1696         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1697         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
1698         (WebCore::AlternativeTextController::rootViewRectForRange):
1699         (WebCore::AlternativeTextController::markCorrection):
1700         * editing/ApplyStyleCommand.cpp:
1701         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1702         (WebCore::dummySpanAncestorForNode):
1703         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
1704         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1705         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1706         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
1707         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1708         (WebCore::ApplyStyleCommand::joinChildTextNodes):
1709         * editing/CompositeEditCommand.cpp:
1710         (WebCore::EditCommandComposition::reapply):
1711         (WebCore::EditCommandComposition::getNodesInCommand):
1712         (WebCore::CompositeEditCommand::removeChildrenInRange):
1713         (WebCore::CompositeEditCommand::removeNode):
1714         (WebCore::copyMarkers):
1715         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1716         (WebCore::CompositeEditCommand::deleteInsignificantText):
1717         * editing/DictationCommand.cpp:
1718         (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
1719         (WebCore::DictationCommand::collectDictationAlternativesInRange):
1720         * editing/EditingStyle.cpp:
1721         (WebCore::isEditingProperty):
1722         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
1723         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
1724         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
1725         (WebCore::styleFromMatchedRulesForElement):
1726         (WebCore::diffTextDecorations):
1727         * editing/Editor.cpp:
1728         (WebCore::Editor::setComposition):
1729         (WebCore::Editor::markAndReplaceFor):
1730         * editing/EditorCommand.cpp:
1731         (WebCore::createCommandMap):
1732         * editing/MarkupAccumulator.cpp:
1733         (WebCore::MarkupAccumulator::totalLength):
1734         * editing/MergeIdenticalElementsCommand.cpp:
1735         (WebCore::MergeIdenticalElementsCommand::doApply):
1736         (WebCore::MergeIdenticalElementsCommand::doUnapply):
1737         * editing/ReplaceSelectionCommand.cpp:
1738         (WebCore::ReplacementFragment::removeUnrenderedNodes):
1739         (WebCore::ReplacementFragment::removeInterchangeNodes):
1740         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1741         (WebCore::removeHeadContents):
1742         * editing/SpellChecker.cpp:
1743         (WebCore::SpellChecker::~SpellChecker):
1744         (WebCore::SpellChecker::client):
1745         (WebCore::SpellChecker::enqueueRequest):
1746         * editing/SplitElementCommand.cpp:
1747         (WebCore::SplitElementCommand::executeApply):
1748         (WebCore::SplitElementCommand::doApply):
1749         (WebCore::SplitElementCommand::doUnapply):
1750         * editing/TextCheckingHelper.cpp:
1751         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
1752         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
1753         * editing/WrapContentsInDummySpanCommand.cpp:
1754         (WebCore::WrapContentsInDummySpanCommand::executeApply):
1755         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
1756         * editing/ios/EditorIOS.mm:
1757         (WebCore::Editor::createFragmentAndAddResources):
1758         * editing/mac/EditorMac.mm:
1759         (WebCore::Editor::WebContentReader::readFilenames):
1760         (WebCore::Editor::createFragmentAndAddResources):
1761         * editing/markup.cpp:
1762         (WebCore::completeURLs):
1763
1764 2015-10-25  Simon Fraser  <simon.fraser@apple.com>
1765
1766         Support bezier paths in clip-path property
1767         https://bugs.webkit.org/show_bug.cgi?id=149996
1768
1769         Reviewed by Darin Adler.
1770         
1771         Support path() in the -webkit-clip-path property, as specified in
1772         https://drafts.csswg.org/css-shapes-2/#supported-basic-shapes
1773         
1774         Added BasicShapePath and CSSBasicShapePath, which both represent the path
1775         as a SVGPathByteStream and wind rule.
1776         
1777         Make BasicShape::canBlend() a virtual function, and implement it on each subclass.
1778         Make various BasicShape subclass function overrides private, other than windRule()
1779         wich is called on derived classes in a few places.
1780         
1781         Add SVGPathBlender::canBlendPaths() which returns true if the given paths can be
1782         interpolated. Uses the same logic as blendAnimatedPath(), without doing any interpolation.
1783         
1784         RenderElement::createsGroup() is fixed to have clip-path trigger a group,
1785         which fixes rendering of clip-path with a descendant compositing layer.
1786
1787         Tests: compositing/masks/clip-path-composited-descendent.html
1788                css3/masking/clip-path-with-path.html
1789                transitions/clip-path-path-transitions.html
1790
1791         * css/BasicShapeFunctions.cpp:
1792         (WebCore::valueForBasicShape):
1793         (WebCore::basicShapeForValue):
1794         * css/CSSBasicShapes.cpp:
1795         (WebCore::CSSBasicShapePath::CSSBasicShapePath):
1796         (WebCore::CSSBasicShapePath::pathData):
1797         (WebCore::buildPathString):
1798         (WebCore::CSSBasicShapePath::cssText):
1799         (WebCore::CSSBasicShapePath::equals):
1800         * css/CSSBasicShapes.h:
1801         * css/CSSParser.cpp:
1802         (WebCore::CSSParser::parseBasicShapePath):
1803         (WebCore::CSSParser::parseBasicShape):
1804         * css/CSSParser.h:
1805         * rendering/RenderElement.h:
1806         (WebCore::RenderElement::createsGroup):
1807         * rendering/style/BasicShapes.cpp:
1808         (WebCore::BasicShapeCircle::canBlend):
1809         (WebCore::BasicShapeEllipse::canBlend):
1810         (WebCore::BasicShapePolygon::canBlend):
1811         (WebCore::BasicShapePath::BasicShapePath):
1812         (WebCore::BasicShapePath::path):
1813         (WebCore::BasicShapePath::operator==):
1814         (WebCore::BasicShapePath::canBlend):
1815         (WebCore::BasicShapePath::blend):
1816         (WebCore::BasicShapeInset::canBlend):
1817         (WebCore::BasicShape::canBlend): Deleted.
1818         * rendering/style/BasicShapes.h:
1819         * svg/SVGPathBlender.cpp:
1820         (WebCore::SVGPathBlender::addAnimatedPath):
1821         (WebCore::SVGPathBlender::blendAnimatedPath):
1822         (WebCore::SVGPathBlender::canBlendPaths):
1823         (WebCore::SVGPathBlender::SVGPathBlender):
1824         (WebCore::SVGPathBlender::blendMoveToSegment):
1825         (WebCore::SVGPathBlender::blendLineToSegment):
1826         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1827         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1828         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
1829         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
1830         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
1831         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
1832         (WebCore::SVGPathBlender::blendArcToSegment):
1833         * svg/SVGPathBlender.h:
1834         * svg/SVGPathByteStream.h:
1835         (WebCore::SVGPathByteStream::operator==):
1836         * svg/SVGPathUtilities.cpp:
1837         (WebCore::canBlendSVGPathByteStreams):
1838         * svg/SVGPathUtilities.h:
1839
1840 2015-10-25  Gwang Yoon Hwang  <yoon@igalia.com>
1841
1842         [TexMap] Fix a misused flag for GstGL
1843         https://bugs.webkit.org/show_bug.cgi?id=150545
1844
1845         Reviewed by Žan Doberšek.
1846
1847         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1848         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
1849         We should pass TextureMapperGL::Flags to the TextureMapperGL::drawTexture instead of
1850         BitmapTexture::Flags.
1851
1852 2015-10-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1853
1854         Use ImplementedAs for MediaDevices.getUserMediaFromJS
1855         https://bugs.webkit.org/show_bug.cgi?id=150439
1856
1857         Reviewed by Darin Adler.
1858
1859         No change in behavior.
1860
1861         * Modules/mediastream/MediaDevices.h: Removing getUserMediaFromJS C++ function.
1862         * Modules/mediastream/MediaDevices.idl: Marking getUserMediaFromJS as ImplementedAS=getUserMedia
1863
1864 2015-10-24  Gwang Yoon Hwang  <yoon@igalia.com>
1865
1866         Remove setApplyDeviceScaleFactorInCompositor
1867         https://bugs.webkit.org/show_bug.cgi?id=150538
1868
1869         Reviewed by Tim Horton.
1870
1871         It was used to support the device scale factor for chromium port and blackberry
1872         port. But it was removed quite a while ago.
1873
1874         * page/Settings.in:
1875         applyDeviceScaleFactorInCompositor: Deleted
1876         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1877         (WebCore::CompositingCoordinator::CompositingCoordinator): Remove uses
1878         of applyDeviceScaleFactorInCompositor.
1879
1880 2015-10-24  Tim Horton  <timothy_horton@apple.com>
1881
1882         Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
1883         https://bugs.webkit.org/show_bug.cgi?id=150525
1884
1885         Reviewed by Darin Adler.
1886
1887         Adjusted API test to cover this: WKWebView.EvaluateJavaScriptErrorCases.
1888
1889         * bindings/js/JSDOMBinding.cpp:
1890         (WebCore::reportException):
1891         * bindings/js/JSDOMBinding.h:
1892         Fill in the given struct with computed exception data if it was given.
1893
1894         * bindings/js/ScriptController.cpp:
1895         (WebCore::ScriptController::evaluateInWorld):
1896         (WebCore::ScriptController::evaluate):
1897         (WebCore::ScriptController::executeScript):
1898         * bindings/js/ScriptController.h:
1899         Plumb aforementioned struct through ScriptController.
1900
1901 2015-10-24  Gwang Yoon Hwang  <yoon@igalia.com>
1902
1903         [TexMap] Clean up BitmapTexture and BitmapTextureGL.
1904         https://bugs.webkit.org/show_bug.cgi?id=143298
1905
1906         Reviewed by Žan Doberšek.
1907
1908         No new tests, this is just a refactor.
1909
1910         * platform/graphics/texmap/BitmapTexture.h:
1911         (WebCore::BitmapTexture::canReuseWith): Deleted.
1912         Reuseability of a BitmapTexture is only decided by its size.
1913         We can use size() instead of this method.
1914
1915         * platform/graphics/texmap/BitmapTextureGL.h:
1916         (WebCore::driverSupportsExternalTextureBGRA): Deleted.
1917         We do not have to check a suitable texture format in every
1918         update/reset. It is enough to store the formats in construction time
1919         and reuse them.
1920
1921 2015-10-24  Simon Fraser  <simon.fraser@apple.com>
1922
1923         REGRESSION (r187121): Delayed instantaneous animations not honouring ' forwards' fill-mode
1924         https://bugs.webkit.org/show_bug.cgi?id=150326
1925
1926         Reviewed by Darin Adler.
1927         
1928         With a zero-duration, delayed fill-forwards animation, we'd end up trying
1929         to interpolate between the last and first keyframes, and picking the first
1930         because AnimationBase::progress() had a special case for zero duration. Removing
1931         this check fixes the bug.
1932
1933         Test: animations/fill-mode-forwards-zero-duration.html
1934
1935         * page/animation/AnimationBase.cpp:
1936         (WebCore::AnimationBase::progress):
1937
1938 2015-10-23  Chris Dumez  <cdumez@apple.com>
1939
1940         RadioNodeList should be exposed on Window
1941         https://bugs.webkit.org/show_bug.cgi?id=148869
1942         <rdar://problem/22589828>
1943
1944         Reviewed by Ryosuke Niwa.
1945
1946         RadioNodeList should be exposed on on the global Window object, as per
1947         the HTML specification:
1948         https://html.spec.whatwg.org/multipage/infrastructure.html#radionodelist
1949
1950         This patch addresses the issue, and aligns our behavior with Firefox
1951         and Chrome.
1952
1953         No new tests, already covered by existing tests.
1954
1955         * html/RadioNodeList.idl:
1956
1957 2015-10-23  Joseph Pecoraro  <pecoraro@apple.com>
1958
1959         Web Inspector: Remove unused ScrollLayer Timeline EventType
1960         https://bugs.webkit.org/show_bug.cgi?id=150518
1961
1962         Reviewed by Timothy Hatcher.
1963
1964         * inspector/InspectorInstrumentation.cpp:
1965         (WebCore::InspectorInstrumentation::willScrollLayerImpl): Deleted.
1966         (WebCore::InspectorInstrumentation::didScrollLayerImpl): Deleted.
1967         * inspector/InspectorInstrumentation.h:
1968         (WebCore::InspectorInstrumentation::willScrollLayer): Deleted.
1969         (WebCore::InspectorInstrumentation::didScrollLayer): Deleted.
1970         * inspector/InspectorTimelineAgent.cpp:
1971         (WebCore::InspectorTimelineAgent::willScroll): Deleted.
1972         (WebCore::InspectorTimelineAgent::didScroll): Deleted.
1973         * inspector/InspectorTimelineAgent.h:
1974         * rendering/RenderLayer.cpp:
1975         (WebCore::RenderLayer::scrollTo): Deleted.
1976
1977 2015-10-23  Joseph Pecoraro  <pecoraro@apple.com>
1978
1979         Web Inspector: Clean up InspectorInstrumentation includes
1980         https://bugs.webkit.org/show_bug.cgi?id=150523
1981
1982         Reviewed by Timothy Hatcher.
1983
1984         * Modules/webdatabase/DatabaseManager.cpp:
1985         * WebCore.vcxproj/WebCore.vcxproj:
1986         * WebCore.vcxproj/WebCore.vcxproj.filters:
1987         * WebCore.xcodeproj/project.pbxproj:
1988         * css/MediaQueryEvaluator.cpp:
1989         * dom/EventDispatcher.cpp:
1990         * dom/ExtensionStyleSheets.cpp:
1991         * inspector/InspectorController.h:
1992         * inspector/InspectorDOMDebuggerAgent.cpp:
1993         * inspector/InspectorDatabaseInstrumentation.h: Removed.
1994         * inspector/InspectorInstrumentation.h:
1995         (WebCore::InspectorInstrumentation::didOpenDatabase):
1996         * inspector/InspectorPageAgent.cpp:
1997         * inspector/InspectorTimelineAgent.cpp:
1998         (WebCore::toProtocol): Deleted.
1999         * loader/ResourceLoadScheduler.cpp:
2000         * loader/mac/ResourceLoaderMac.mm:
2001         * page/Screen.cpp:
2002         * rendering/TextAutosizer.cpp:
2003         * testing/Internals.cpp:
2004         (WebCore::Internals::consoleMessageArgumentCounts): Deleted.
2005         * testing/Internals.h:
2006         * testing/Internals.idl:
2007         * workers/AbstractWorker.cpp:
2008
2009 2015-10-23  Simon Fraser  <simon.fraser@apple.com>
2010
2011         Avoid SVG-induced layouts inside Element::absoluteEventBounds()
2012         https://bugs.webkit.org/show_bug.cgi?id=150516
2013
2014         Reviewed by Zalan Bujtas.
2015
2016         Speculative fix for a crash under RenderObject::localToContainerQuad() when
2017         computing the wheel event handler region, which uses Element::absoluteEventHandlerBounds().
2018         Element::absoluteEventBounds() was calling SVGElement::getBoundingBox() in a way
2019         that could trigger a layout.
2020
2021         * dom/Element.cpp:
2022         (WebCore::Element::absoluteEventBounds):
2023
2024 2015-10-23  Alex Christensen  <achristensen@webkit.org>
2025
2026         Progress towards CMake on Mac
2027         https://bugs.webkit.org/show_bug.cgi?id=150517
2028
2029         Reviewed by Tim Horton.
2030
2031         * PlatformMac.cmake:
2032
2033 2015-10-23  Per Arne Vollan  <peavo@outlook.com>
2034
2035         [WinCairo] Improve test results for fast layouttests.
2036         https://bugs.webkit.org/show_bug.cgi?id=150464
2037
2038         Reviewed by Alex Christensen.
2039
2040         Disable the Mac ascent hack for WinCairo.
2041
2042         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2043         (WebCore::Font::platformInit):
2044
2045 2015-10-23  Simon Fraser  <simon.fraser@apple.com>
2046
2047         REGRESSION (r187121): Multiple-keyframe animations not honouring ' forwards' fill-mode
2048         https://bugs.webkit.org/show_bug.cgi?id=150328
2049
2050         Reviewed by Dean Jackson.
2051         
2052         AnimationBase::getElapsedTime() for a finished animation would return 1 (a progress),
2053         rather than a time value as the caller expects. Fix it to return the total duration
2054         if the animation has finished. This fixes the bug.
2055         
2056         Change CompositeAnimation::pauseAnimationAtTime() to be more permissive, allowing
2057         testing of filling-forwards animations with the pause API.
2058
2059         Test: animations/fill-forwards-end-state.html
2060
2061         * page/animation/AnimationBase.cpp:
2062         (WebCore::AnimationBase::getElapsedTime):
2063         * page/animation/CompositeAnimation.cpp:
2064         (WebCore::CompositeAnimation::pauseAnimationAtTime):
2065
2066 2015-10-23  Chris Dumez  <cdumez@apple.com>
2067
2068         A label element not in a document should not label an element in a document
2069         https://bugs.webkit.org/show_bug.cgi?id=148863
2070         <rdar://problem/22589300>
2071
2072         Reviewed by Ryosuke Niwa.
2073
2074         As per the HTML specification, a label element's 'for' attribute may be
2075         specified to indicate a form control with which the caption is to be
2076         associated. If the attribute is specified, the attribute's value must
2077         be the ID of a labelable element in the same Document as the label
2078         element:
2079         https://html.spec.whatwg.org/multipage/forms.html#attr-label-for
2080
2081         However, our code was failing to check if the label element was actually
2082         in the document before calling document.getElementById(). In such case,
2083         we would potentially return a labelable Element that is not in the same
2084         document as the label Element. This patch fixes the problem.
2085
2086         The new behavior is consistent with Firefox.
2087
2088         No new tests, already covered by existing test.
2089
2090         * html/HTMLLabelElement.cpp:
2091         (WebCore::HTMLLabelElement::control):
2092
2093 2015-10-23  Antoine Quint  <graouts@apple.com>
2094
2095         Support for SVG `beginEvent` event and `onbegin` attribute
2096         https://bugs.webkit.org/show_bug.cgi?id=150442
2097
2098         Reviewed by Dean Jackson.
2099
2100         Add support for the SVG `beginEvent` event, which is fired as an SVG timing element enters its active interval.
2101         Also add support for the SVG `onbegin` attribute which allows the definition of a JS event listener declaratively
2102         for the SVG `beginEvent` event.
2103
2104         Tests: svg/animations/begin-event-attribute.svg
2105                svg/animations/begin-event-script.svg
2106                svg/animations/begin-event-syncbase.svg
2107
2108         * dom/EventNames.h:
2109         * svg/animation/SVGSMILElement.cpp:
2110         (WebCore::smilBeginEventSender):
2111         (WebCore::smilEndEventSender):
2112         (WebCore::SVGSMILElement::~SVGSMILElement):
2113         (WebCore::SVGSMILElement::parseAttribute):
2114         (WebCore::SVGSMILElement::progress):
2115         (WebCore::SVGSMILElement::dispatchPendingEvent):
2116         * svg/svgattrs.in:
2117
2118 2015-10-23  Hyemi Shin  <hyemi.sin@samsung.com>
2119
2120         ConvolverNode.buffer must have same sample-rate as the AudioContext 
2121         https://bugs.webkit.org/show_bug.cgi?id=150385 
2122
2123         Reviewed by Chris Dumez.
2124
2125         ConvolverNode.buffer must be of the same sample-rate as the AudioContext
2126         or an NOT_SUPPORTED_ERR exception MUST be thrown.
2127
2128         Test : webaudio/convolver-setBuffer-different-samplerate.html
2129
2130         * Modules/webaudio/ConvolverNode.cpp:
2131         (WebCore::ConvolverNode::setBuffer):
2132         * Modules/webaudio/ConvolverNode.h:
2133         * Modules/webaudio/ConvolverNode.idl:
2134
2135 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
2136
2137         [OS X] Migrate GraphicsContext::drawLineForDocumentMarker() away from LocalCurrentGraphicsContext
2138         https://bugs.webkit.org/show_bug.cgi?id=150483
2139
2140         Reviewed by Simon Fraser.
2141
2142         LocalCurrentGraphicsContext is an ugly hack to work around the problem that many NS* functions
2143         operate on the current context rather than a context passed as an argument. This patch
2144         migrates from NSRectFillUsingOperation() which has this behavior to CGContextDrawTiledImage()
2145         which performs the same operation but with a passed-in CGContextRef. An added benefit is that
2146         we don't have to mess around with pattern-based NSColors. 
2147
2148         No new tests because there is no behavior change.
2149
2150         * platform/graphics/mac/GraphicsContextMac.mm:
2151         (WebCore::findImage):
2152         (WebCore::GraphicsContext::updateDocumentMarkerResources):
2153         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2154         (WebCore::makePatternColor): Deleted.
2155
2156 2015-10-22  Sam Weinig  <sam@webkit.org>
2157
2158         Navigations on the same host (but with different schemes and ports) should not trigger universal links
2159         <rdar://problem/22811325>
2160         https://bugs.webkit.org/show_bug.cgi?id=150481
2161
2162         Reviewed by Dan Bernstein.
2163
2164         Add new helper which efficiently compares the hosts of two URLs.
2165
2166         * platform/URL.cpp:
2167         (WebCore::hostsAreEqual):
2168         * platform/URL.h:
2169
2170 2015-10-22  Joseph Pecoraro  <pecoraro@apple.com>
2171
2172         Web Inspector: Remove unused Timeline GCEvent Record type
2173         https://bugs.webkit.org/show_bug.cgi?id=150477
2174
2175         Reviewed by Timothy Hatcher.
2176
2177         This event is dispatched through the Heap domain, not Timelines.
2178
2179         * inspector/TimelineRecordFactory.cpp:
2180         (WebCore::TimelineRecordFactory::createGCEventData): Deleted.
2181         * inspector/TimelineRecordFactory.h:
2182
2183 2015-10-22  Gordon Sheridan  <gordon_sheridan@apple.com>
2184
2185         Fix build for clang-700.0.59.5 by replacing deprecated calls to convert points between screen and window coordinates for Mac.
2186         https://bugs.webkit.org/show_bug.cgi?id=150379
2187
2188         Reviewed by Andy Estes.
2189
2190         Provide WAKWindow versions of the non-deprecated methods for converting an NSRect between
2191         window and screen coordinates, which replace the deprecated methods that operated on an NSPoint.
2192
2193         * platform/ios/wak/WAKWindow.h:
2194         * platform/ios/wak/WAKWindow.mm:
2195         (-[WAKWindow convertRectToScreen:]): Added.
2196         (-[WAKWindow convertRectFromScreen:]): Added.
2197
2198 2015-10-22  Alex Christensen  <achristensen@webkit.org>
2199
2200         Fix Mac CMake build after r191433.
2201
2202         * PlatformMac.cmake:
2203         Use CMakeLists.txt to generate UserAgentScripts.h and cpp.
2204
2205 2015-10-22  Daniel Bates  <dabates@apple.com>
2206
2207         Unreviewed, rolling out r191113.
2208
2209         Rollout r144451 since it regressed the visibility of the
2210         search cancel button when a search field is empty or showing
2211         placeholder text. Further investigation is needed.
2212
2213         Reverted changeset:
2214
2215         "[iOS] DOM click event may not be dispatched when page has
2216         :active style and <input type="search">"
2217         https://bugs.webkit.org/show_bug.cgi?id=144451
2218         http://trac.webkit.org/changeset/191113
2219
2220 2015-10-22  Simon Fraser  <simon.fraser@apple.com>
2221
2222         Add ways to log to log channels via a functional syntax, and via a TextStream
2223         https://bugs.webkit.org/show_bug.cgi?id=150472
2224  
2225         Reviewed by Tim Horton.
2226  
2227         Make it possible to write to a WTFLogChannel with a std::function that returns
2228         a const char*, and with stream syntax.
2229  
2230         Enhance TextStream to allow it to generate single-line output.
2231
2232         * platform/Logging.cpp:
2233         (WebCore::logFunctionResult):
2234         * platform/Logging.h:
2235         * platform/text/TextStream.cpp:
2236         (WebCore::TextStream::startGroup):
2237         (WebCore::TextStream::endGroup):
2238         (WebCore::TextStream::nextLine):
2239         (WebCore::TextStream::writeIndent):
2240         * platform/text/TextStream.h:
2241         (WebCore::TextStream::TextStream):
2242
2243 2015-10-22  Alex Christensen  <achristensen@webkit.org>
2244
2245         Progress towards CMake on Mac
2246         https://bugs.webkit.org/show_bug.cgi?id=150466
2247
2248         Reviewed by Chris Dumez.
2249
2250         * PlatformMac.cmake:
2251         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
2252         (WebCore::createAndStoreMasterKey):
2253         * page/mac/WheelEventDeltaFilterMac.mm:
2254         * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
2255
2256 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
2257
2258         [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
2259         https://bugs.webkit.org/show_bug.cgi?id=150460
2260
2261         Reviewed by Tim Horton.
2262
2263         No reason to use WKSI for these calls.
2264
2265         No new tests because there is no behavior change.
2266
2267         * platform/graphics/cg/GraphicsContextCG.cpp:
2268         (WebCore::GraphicsContext::applyStrokePattern):
2269         (WebCore::GraphicsContext::applyFillPattern):
2270         (WebCore::GraphicsContext::setPlatformShadow):
2271         * platform/graphics/cg/GraphicsContextCG.h:
2272         (WebCore::getUserToBaseCTM):
2273         * platform/graphics/cg/ImageBufferCG.cpp:
2274         (WebCore::ImageBuffer::putByteArray):
2275         * platform/graphics/mac/GraphicsContextMac.mm:
2276         (WebCore::setPatternPhaseInUserSpace):
2277         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2278         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2279         * platform/mac/WebCoreSystemInterface.h:
2280         * platform/mac/WebCoreSystemInterface.mm:
2281
2282 2015-10-22  Brady Eidson  <beidson@apple.com>
2283
2284         Modern IDB: Basic createObjectStore implementation.
2285         https://bugs.webkit.org/show_bug.cgi?id=150455
2286
2287         Reviewed by Alex Christensen.
2288
2289         Tests: storage/indexeddb/modern/createobjectstore-basic.html
2290                storage/indexeddb/modern/createobjectstore-failures.html
2291
2292         * CMakeLists.txt:
2293         * WebCore.xcodeproj/project.pbxproj:
2294
2295         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2296         (WebCore::IDBClient::IDBConnectionToServer::createObjectStore):
2297         (WebCore::IDBClient::IDBConnectionToServer::didCreateObjectStore):
2298         * Modules/indexeddb/client/IDBConnectionToServer.h:
2299         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2300         
2301         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2302         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
2303         (WebCore::IDBClient::IDBDatabase::createObjectStore):
2304         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
2305         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2306         (WebCore::IDBClient::IDBDatabase::serverConnection):
2307         
2308         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp: Added.
2309         (WebCore::IDBClient::IDBObjectStore::create):
2310         (WebCore::IDBClient::IDBObjectStore::IDBObjectStore):
2311         (WebCore::IDBClient::IDBObjectStore::~IDBObjectStore):
2312         (WebCore::IDBClient::IDBObjectStore::id):
2313         (WebCore::IDBClient::IDBObjectStore::name):
2314         (WebCore::IDBClient::IDBObjectStore::keyPathAny):
2315         (WebCore::IDBClient::IDBObjectStore::keyPath):
2316         (WebCore::IDBClient::IDBObjectStore::indexNames):
2317         (WebCore::IDBClient::IDBObjectStore::transaction):
2318         (WebCore::IDBClient::IDBObjectStore::autoIncrement):
2319         (WebCore::IDBClient::IDBObjectStore::add):
2320         (WebCore::IDBClient::IDBObjectStore::put):
2321         (WebCore::IDBClient::IDBObjectStore::openCursor):
2322         (WebCore::IDBClient::IDBObjectStore::get):
2323         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
2324         (WebCore::IDBClient::IDBObjectStore::clear):
2325         (WebCore::IDBClient::IDBObjectStore::createIndex):
2326         (WebCore::IDBClient::IDBObjectStore::index):
2327         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
2328         (WebCore::IDBClient::IDBObjectStore::count):
2329         * Modules/indexeddb/client/IDBObjectStoreImpl.h: Added.
2330
2331         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2332         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
2333
2334         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2335         (WebCore::IDBClient::IDBTransaction::serverConnection):
2336         (WebCore::IDBClient::IDBTransaction::objectStore):
2337         (WebCore::IDBClient::IDBTransaction::scheduleOperation):
2338         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
2339         (WebCore::IDBClient::IDBTransaction::finishAbortOrCommit):
2340         (WebCore::IDBClient::IDBTransaction::didAbort):
2341         (WebCore::IDBClient::IDBTransaction::didCommit):
2342         (WebCore::IDBClient::IDBTransaction::createObjectStore):
2343         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
2344         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
2345         * Modules/indexeddb/client/IDBTransactionImpl.h:
2346         (WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):
2347         (WebCore::IDBClient::IDBTransaction::isVersionChange):
2348         
2349         * Modules/indexeddb/client/TransactionOperation.h: Added.
2350         (WebCore::IDBClient::TransactionOperation::perform):
2351         (WebCore::IDBClient::TransactionOperation::completed):
2352         (WebCore::IDBClient::TransactionOperation::identifier):
2353         (WebCore::IDBClient::TransactionOperation::transactionIdentifier):
2354         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
2355         (WebCore::IDBClient::createTransactionOperation):
2356         
2357         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2358         (WebCore::IDBServer::IDBConnectionToClient::didCreateObjectStore):
2359         * Modules/indexeddb/server/IDBConnectionToClient.h:
2360         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2361         
2362         * Modules/indexeddb/server/IDBServer.cpp:
2363         (WebCore::IDBServer::IDBServer::createObjectStore):
2364         * Modules/indexeddb/server/IDBServer.h:
2365         
2366         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2367         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
2368         (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
2369         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
2370         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
2371         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
2372         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction): Deleted.
2373         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2374         
2375         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2376         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore):
2377         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2378         
2379         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2380         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isVersionChange):
2381         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
2382         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2383         
2384         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
2385         (WebCore::IDBDatabaseInfo::hasObjectStore):
2386         (WebCore::IDBDatabaseInfo::createNewObjectStore):
2387         (WebCore::IDBDatabaseInfo::addExistingObjectStore):
2388         (WebCore::IDBDatabaseInfo::objectStoreNames):
2389         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
2390         
2391         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp.
2392         (WebCore::IDBObjectStoreInfo::IDBObjectStoreInfo):
2393         (WebCore::IDBObjectStoreInfo::isolatedCopy):
2394         * Modules/indexeddb/shared/IDBObjectStoreInfo.h: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h.
2395         (WebCore::IDBObjectStoreInfo::identifier):
2396         (WebCore::IDBObjectStoreInfo::name):
2397         (WebCore::IDBObjectStoreInfo::keyPath):
2398         (WebCore::IDBObjectStoreInfo::autoIncrement):
2399
2400         * Modules/indexeddb/shared/IDBRequestData.cpp:
2401         (WebCore::IDBRequestData::IDBRequestData):
2402         (WebCore::IDBRequestData::requestIdentifier):
2403         (WebCore::IDBRequestData::transactionIdentifier):
2404         * Modules/indexeddb/shared/IDBRequestData.h:
2405         (WebCore::IDBRequestData::databaseIdentifier):
2406         (WebCore::IDBRequestData::requestIdentifier): Deleted.
2407
2408         * Modules/indexeddb/shared/IDBResultData.cpp:
2409         (WebCore::IDBResultData::IDBResultData):
2410         (WebCore::IDBResultData::createObjectStoreSuccess):
2411         * Modules/indexeddb/shared/IDBResultData.h:
2412
2413         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2414         (WebCore::InProcessIDBServer::didCreateObjectStore):
2415         (WebCore::InProcessIDBServer::createObjectStore):
2416         * Modules/indexeddb/shared/InProcessIDBServer.h:
2417
2418         * platform/CrossThreadCopier.cpp:
2419         (WebCore::IDBObjectStoreInfo>::copy):
2420         * platform/CrossThreadCopier.h:
2421
2422 2015-10-22  Alex Christensen  <achristensen@webkit.org>
2423
2424         Initial NSURLSession WebResourceLoader implementation
2425         https://bugs.webkit.org/show_bug.cgi?id=150355
2426
2427         Reviewed by Antti Koivisto.
2428
2429         * platform/network/cf/AuthenticationChallenge.h:
2430         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Export constructor for use in WebKit2.
2431
2432 2015-10-22  Frederic Wang  <fred.wang@free.fr>
2433
2434         [Mac] Add support for the USE_TYPO_METRICS flag
2435         https://bugs.webkit.org/show_bug.cgi?id=150394
2436
2437         Reviewed by Myles C. Maxfield.
2438
2439         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
2440
2441         No new tests because this is already tested by fonts/use-typo-metrics-1.html
2442
2443         * platform/graphics/cocoa/FontCocoa.mm:
2444         (WebCore::fontHasMathTable): Add a function to verify whether a font has a MATH table.
2445         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
2446
2447 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
2448
2449         Implement touch-action: manipulation; for iOS
2450         https://bugs.webkit.org/show_bug.cgi?id=149854
2451         <rdar://problem/23017145>
2452
2453         Reviewed by Benjamin Poulain.
2454
2455         Implements the manipulation value for the CSS property touch-action. Adds support for
2456         parsing the touch-action property and two of its values: auto and manipulation.
2457
2458         Tests: css3/touch-action/touch-action-computed-style.html
2459                css3/touch-action/touch-action-manipulation-fast-clicks.html
2460                css3/touch-action/touch-action-parsing.html
2461
2462         * css/CSSComputedStyleDeclaration.cpp:
2463         (WebCore::ComputedStyleExtractor::propertyValue):
2464         * css/CSSParser.cpp:
2465         (WebCore::isValidKeywordPropertyAndValue):
2466         (WebCore::isKeywordPropertyID):
2467         (WebCore::CSSParser::parseValue):
2468         * css/CSSPrimitiveValueMappings.h:
2469         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2470         (WebCore::CSSPrimitiveValue::operator TouchAction):
2471         * css/CSSPropertyNames.in:
2472         * css/CSSValueKeywords.in:
2473         * dom/Element.cpp:
2474         (WebCore::Element::allowsDoubleTapGesture): Here, we determine whether an element that resulted from
2475             hit-testing a touch should allow double-tap gestures. To do this, we walk up the element's parents,
2476             stopping when we detect an element that disallows double tap gestures by having a touch-action other
2477             than auto or by hitting the root node.
2478         * dom/Element.h:
2479         * dom/Node.h:
2480         (WebCore::Node::allowsDoubleTapGesture):
2481         * rendering/style/RenderStyle.h:
2482         * rendering/style/RenderStyleConstants.h:
2483         * rendering/style/StyleRareNonInheritedData.cpp:
2484         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2485         (WebCore::StyleRareNonInheritedData::operator==):
2486         * rendering/style/StyleRareNonInheritedData.h:
2487
2488 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
2489
2490         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
2491         https://bugs.webkit.org/show_bug.cgi?id=150428
2492
2493         Reviewed by Antti Koivisto.
2494
2495         The bug was caused by updateFocusAppearance in WebPage::restoreSelectionInFocusedEditableElement
2496         revealing the focused element which was added in r181972. Fixed the bug by adding an option to
2497         suppress this behavior here.
2498
2499         * dom/Document.cpp:
2500         (WebCore::Document::Document):
2501         (WebCore::Document::updateFocusAppearanceSoon):
2502         * dom/Document.h:
2503         * dom/Element.cpp:
2504         (WebCore::Element::focus):
2505         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
2506         (WebCore::Element::updateFocusAppearance):
2507         * dom/Element.h:
2508         * history/CachedPage.cpp:
2509         (WebCore::CachedPage::restore):
2510         * html/HTMLAreaElement.cpp:
2511         (WebCore::HTMLAreaElement::updateFocusAppearance):
2512         * html/HTMLAreaElement.h:
2513         * html/HTMLInputElement.cpp:
2514         (WebCore::HTMLInputElement::updateFocusAppearance):
2515         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
2516         (WebCore::HTMLInputElement::didAttachRenderers):
2517         * html/HTMLInputElement.h:
2518         * html/HTMLTextAreaElement.cpp:
2519         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
2520         * html/HTMLTextAreaElement.h:
2521
2522 2015-10-22  Joonghun Park  <jh718.park@samsung.com>
2523
2524         [EFL] Fix build break since r191439
2525         https://bugs.webkit.org/show_bug.cgi?id=150441
2526
2527         Reviewed by Csaba Osztrogonác.
2528
2529         No new tests, no new behaviours.
2530
2531         * platform/Logging.cpp:
2532         (WebCore::registerNotifyCallback):
2533
2534 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2535
2536         Unreviewed. Fix GTK+ build after r191423.
2537
2538         Deprecate removed class WebKitDOMHTMLBaseFontElement.
2539
2540         * PlatformGTK.cmake:
2541         * bindings/gobject/WebKitDOMDeprecated.cpp:
2542         (webkit_dom_html_base_font_element_init):
2543         (webkit_dom_html_base_font_element_class_init):
2544         (webkit_dom_html_base_font_element_get_color):
2545         (webkit_dom_html_base_font_element_set_color):
2546         (webkit_dom_html_base_font_element_get_face):
2547         (webkit_dom_html_base_font_element_set_face):
2548         (webkit_dom_html_base_font_element_get_size):
2549         (webkit_dom_html_base_font_element_set_size):
2550         * bindings/gobject/WebKitDOMDeprecated.h:
2551         * bindings/gobject/WebKitDOMDeprecated.symbols:
2552         * bindings/gobject/WebKitDOMHTMLPrivate.cpp:
2553         * html/HTMLBaseFontElement.h:
2554         * html/HTMLBaseFontElement.idl:
2555
2556 2015-10-22  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2557
2558         [Streams API] Add writable stream attributes
2559         https://bugs.webkit.org/show_bug.cgi?id=150389
2560
2561         Reviewed by Darin Adler.
2562
2563         This patch adds the three writable stream attributes, which are closed, ready and state. They are implemented
2564         according to the spec.
2565
2566         Current test set suffices, expectations were adjusted accordingly.
2567
2568         * Modules/streams/WritableStream.js:
2569         (initializeWritableStream): Style fix.
2570         (closed):
2571         (ready):
2572         (state): Implemented according to the spec.
2573         * Modules/streams/WritableStreamInternals.js:
2574         (isWritableStream): Implemented according to the spec.
2575
2576 2015-10-22  Frederic Wang  <fred.wang@free.fr>
2577
2578         Rollout r190440 for the moment. It broke the build.
2579
2580         * platform/graphics/cocoa/FontCocoa.mm:
2581         (WebCore::Font::platformInit): Deleted.
2582
2583 2015-10-22  Frederic Wang  <fred.wang@free.fr>
2584
2585         Unreviewed compilation fix on Mac.
2586
2587         * platform/graphics/cocoa/FontCocoa.mm:
2588         (WebCore::Font::platformInit): Use a pointer for the third argument of CFArrayContainsValue.
2589
2590 2015-10-21  Frederic Wang  <fred.wang@free.fr>
2591
2592         Unreviewed compilation fix on Mac.
2593
2594         * platform/graphics/cocoa/FontCocoa.mm:
2595         (WebCore::Font::platformInit): Add missing font argument.
2596
2597 2015-10-21  Frederic Wang  <fred.wang@free.fr>
2598
2599         [Mac] Add support for the USE_TYPO_METRICS flag
2600         https://bugs.webkit.org/show_bug.cgi?id=150394
2601
2602         Reviewed by Myles C. Maxfield.
2603
2604         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
2605
2606         No new tests because this is already tested by fonts/use-typo-metrics-1.html
2607
2608         * platform/graphics/cocoa/FontCocoa.mm:
2609         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
2610
2611 2015-10-21  Zalan Bujtas  <zalan@apple.com>
2612
2613         Print out the render tree from command line.
2614         https://bugs.webkit.org/show_bug.cgi?id=150416
2615
2616         Use system-wide notification server (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/notify_register_dispatch.3.html)
2617         to print out the render tree for the live documents.
2618
2619         Usage: notifyutil -p com.apple.WebKit.showRenderTree
2620
2621         Reviewed by Simon Fraser.
2622
2623         No change in functionality.
2624
2625         * platform/Logging.cpp:
2626         (WebCore::registerNotifyCallback):
2627         * platform/Logging.h:
2628         * rendering/RenderObject.cpp:
2629         (WebCore::RenderObject::RenderObject):
2630         (WebCore::printRenderTreeForLiveDocuments):
2631
2632 2015-10-21  Alex Christensen  <achristensen@webkit.org>
2633
2634         Fix CMake clean build after r191423.
2635
2636         * CMakeLists.txt:
2637         HTMLBaseFontElement.idl no longer generates any JavaScript bindings.
2638
2639 2015-10-21  Brian Burg  <bburg@apple.com>
2640
2641         Unreviewed, CMake build fix after r191433.
2642
2643         * CMakeLists.txt: add WritableStreamInternals.js to WebCore_BUILTINS_SOURCES.
2644
2645 2015-10-21  Brian Burg  <bburg@apple.com>
2646
2647         Restructure generate-js-bindings script to be modular and testable
2648         https://bugs.webkit.org/show_bug.cgi?id=149929
2649
2650         Reviewed by Alex Christensen.
2651
2652         * CMakeLists.txt:
2653
2654             Define JavaScriptCore_SCRIPTS_DIR explicitly so the add_custom_command and
2655             shared file lists are identical between JavaScriptCore and WebCore.
2656
2657             The output files additionally depend on all builtin generator script files.
2658
2659         * DerivedSources.make:
2660
2661             Use JavaScriptCore_SCRIPTS_DIR so that the rule for code generation and
2662             shared file lists are identical between JavaScriptCore and WebCore.
2663
2664             The output files additionally depend on all builtin generator script files.
2665
2666         * WebCore.xcodeproj/project.pbxproj:
2667
2668             Define JavaScriptCore_SCRIPTS_DIR before calling DerivedSources.make.
2669             This will eventually be merged with the other similar script paths.
2670
2671         * bindings/js/JSDOMWindowBase.cpp:
2672         (WebCore::JSDOMWindowBase::finishCreation):
2673
2674             Update the generated builtin macro names.
2675
2676         * generate-js-builtins: Removed.
2677
2678 2015-10-21  Alex Christensen  <achristensen@webkit.org>
2679
2680         Recommit r191428.
2681
2682         I don't think it was supposed to be reverted in r191429, and it really does fix the build.
2683
2684         * loader/EmptyClients.h:
2685         (WebCore::EmptyContextMenuClient::~EmptyContextMenuClient):
2686         Remove customizeMenu again.
2687
2688 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2689
2690         [EFL][GTK][WK2] Fix build break since r191402, r191401
2691         https://bugs.webkit.org/show_bug.cgi?id=150432
2692
2693         Unreviewed EFL and GTK build fix.
2694
2695         * loader/EmptyClients.h:
2696
2697 2015-10-21  Alex Christensen  <achristensen@webkit.org>
2698
2699         Build fix after r191422.
2700
2701         * page/ContextMenuClient.h:
2702         (WebCore::ContextMenuClient::~ContextMenuClient):
2703         Completely remove customizeMenu.
2704
2705 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2706
2707         Remove unnecessary default quota setting in DatabaseContext::databaseExceededQuota
2708         https://bugs.webkit.org/show_bug.cgi?id=150356
2709
2710         Reviewed by Darin Adler.
2711
2712         All ports have supported DatabaseContext::databaseExceededQuota(). Thus we don't need to
2713         keep a test code to extend database quota anymore.
2714
2715         * Modules/webdatabase/DatabaseContext.cpp:
2716         (WebCore::DatabaseContext::databaseExceededQuota): Deleted.
2717
2718 2015-10-21  Chris Dumez  <cdumez@apple.com>
2719
2720         Un-expose obsolete HTMLBaseFontElement
2721         https://bugs.webkit.org/show_bug.cgi?id=150397
2722
2723         Reviewed by Anders Carlsson.
2724
2725         Un-expose obsolete HTMLBaseFontElement:
2726         - https://html.spec.whatwg.org/multipage/obsolete.html#non-conforming-features
2727
2728         This means that we no longer expose HTMLBaseFontElement on the global
2729         Window object. Firefox and Chrome do not expose it either.
2730
2731         Also, document.createElement("basefont") now returns an HTMLUnknownElement
2732         as per the specification. Firefox and Chrome return a generic HTMLElement
2733         instead but I don't think this is a big compatibility risk.
2734
2735         No new tests, already covered by existing tests.
2736
2737         * html/HTMLBaseFontElement.cpp:
2738         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
2739         * html/HTMLBaseFontElement.h:
2740         * html/HTMLBaseFontElement.idl:
2741         * html/HTMLTagNames.in:
2742
2743 2015-10-21  Anders Carlsson  <andersca@apple.com>
2744
2745         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
2746         https://bugs.webkit.org/show_bug.cgi?id=150427
2747
2748         Reviewed by Tim Horton.
2749         * loader/EmptyClients.cpp:
2750         (WebCore::EmptyContextMenuClient::customizeMenu): Deleted.
2751         * loader/EmptyClients.h:
2752         * page/ContextMenuController.cpp:
2753         (WebCore::ContextMenuController::showContextMenu):
2754
2755 2015-10-21  Anders Carlsson  <andersca@apple.com>
2756
2757         Remove dead MHTML code
2758         https://bugs.webkit.org/show_bug.cgi?id=150426
2759
2760         Reviewed by Tim Horton.
2761
2762         * loader/archive/mhtml/MHTMLArchive.cpp:
2763         (WebCore::MHTMLArchive::generateMHTMLData):
2764         (WebCore::MHTMLArchive::generateMHTMLDataUsingBinaryEncoding): Deleted.
2765         * loader/archive/mhtml/MHTMLArchive.h:
2766
2767 2015-10-21  Dean Jackson  <dino@apple.com>
2768
2769         Null dereference loading Blink layout test svg/filters/display-none-filter-primitive.html
2770         https://bugs.webkit.org/show_bug.cgi?id=150212
2771         <rdar://problem/23137376>
2772
2773         Reviewed by Brent Fulgham.
2774
2775         Handle the case where a filter element doesn't have a renderer. Inspired by the Blink
2776         commit:
2777         https://chromium.googlesource.com/chromium/src.git/+/fb79f7fc46552d45127acd2959a23662ad8f271e
2778
2779         Test: svg/filters/display-none-filter-primitive.html
2780
2781         * rendering/svg/RenderSVGResourceFilter.cpp:
2782         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2783         * svg/graphics/filters/SVGFilterBuilder.cpp:
2784         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
2785
2786 2015-10-21  Brady Eidson  <beidson@apple.com>
2787
2788         Modern IDB: Add basic transaction aborting.
2789         https://bugs.webkit.org/show_bug.cgi?id=150148
2790
2791         Reviewed by Alex Christensen.
2792
2793         Tests: storage/indexeddb/modern/double-abort.html
2794                storage/indexeddb/modern/versionchange-abort-then-reopen.html
2795
2796         * CMakeLists.txt:
2797         * WebCore.xcodeproj/project.pbxproj:
2798         
2799         * Modules/indexeddb/IndexedDB.h:
2800         
2801         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2802         (WebCore::IDBClient::IDBConnectionToServer::abortTransaction):
2803         (WebCore::IDBClient::IDBConnectionToServer::didAbortTransaction):
2804         * Modules/indexeddb/client/IDBConnectionToServer.h:
2805         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2806         
2807         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2808         (WebCore::IDBClient::IDBDatabase::abortTransaction):
2809         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
2810         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2811         
2812         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2813         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
2814         (WebCore::IDBClient::IDBTransaction::abort):
2815         (WebCore::IDBClient::IDBTransaction::isFinishedOrFinishing):
2816         (WebCore::IDBClient::IDBTransaction::activationTimerFired):
2817         (WebCore::IDBClient::IDBTransaction::didAbort):
2818         * Modules/indexeddb/client/IDBTransactionImpl.h:
2819         
2820         * Modules/indexeddb/server/IDBBackingStore.h:
2821         
2822         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2823         (WebCore::IDBServer::IDBConnectionToClient::didAbortTransaction):
2824         * Modules/indexeddb/server/IDBConnectionToClient.h:
2825         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2826         
2827         * Modules/indexeddb/server/IDBServer.cpp:
2828         (WebCore::IDBServer::IDBServer::abortTransaction):
2829         * Modules/indexeddb/server/IDBServer.h:
2830         
2831         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2832         (WebCore::IDBServer::MemoryBackingStoreTransaction::create):
2833         (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction):
2834         (WebCore::IDBServer::MemoryBackingStoreTransaction::~MemoryBackingStoreTransaction):
2835         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2836         (WebCore::IDBServer::MemoryBackingStoreTransaction::commit):
2837         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2838         (WebCore::IDBServer::MemoryBackingStoreTransaction::isVersionChange):
2839         
2840         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2841         (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo):
2842         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
2843         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
2844         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
2845         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2846
2847         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2848         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
2849         (WebCore::IDBServer::UniqueIDBDatabase::beginTransactionInBackingStore):
2850         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2851         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
2852         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
2853         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
2854         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
2855         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
2856         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2857         
2858         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2859         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
2860         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2861         
2862         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2863         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
2864         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::originalDatabaseInfo):
2865         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
2866         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2867         
2868         * Modules/indexeddb/shared/IDBError.cpp:
2869         (WebCore::idbErrorName):
2870         (WebCore::idbErrorDescription):
2871         * Modules/indexeddb/shared/IDBError.h:
2872
2873         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2874         (WebCore::InProcessIDBServer::didAbortTransaction):
2875         (WebCore::InProcessIDBServer::abortTransaction):
2876         * Modules/indexeddb/shared/InProcessIDBServer.h:
2877
2878 2015-10-21  Chris Dumez  <cdumez@apple.com>
2879
2880         bgsound should use HTMLUnknownElement interface
2881         https://bugs.webkit.org/show_bug.cgi?id=148857
2882         <rdar://problem/22589036>
2883
2884         Reviewed by Sam Weinig.
2885
2886         The blink, bgsound, isindex, multicol, nextid, and spacer elements must
2887         use the HTMLUnknownElement interface, as per the HTML specification:
2888         https://html.spec.whatwg.org/multipage/obsolete.html#other-elements,-attributes-and-apis
2889
2890         WebKit was using HTMLUnknownElement for all of them except bgsound.
2891         This patch fixes the issue and aligns our behavior with Chrome and
2892         Firefox.
2893
2894         No new tests, already covered by existing tests.
2895
2896         * html/HTMLTagNames.in:
2897
2898 2015-10-21  Antoine Quint  <graouts@apple.com>
2899
2900         Support for the SVG `onend` attribute
2901         https://bugs.webkit.org/show_bug.cgi?id=150393
2902
2903         Reviewed by Dean Jackson.
2904
2905         Add support for the SVG `onend` attribute to SVG timing and animation elements, which allow the definition
2906         of a JS event listener declaratively for the SVG `endEvent` event.
2907
2908         Tests: svg/animations/end-event-attribute-expected.svg
2909                svg/animations/end-event-attribute.svg
2910                svg/animations/end-event-syncbase-expected.svg
2911                svg/animations/end-event-syncbase.svg
2912
2913         * dom/EventNames.h:
2914         * svg/animation/SVGSMILElement.cpp:
2915         (WebCore::SVGSMILElement::parseAttribute):
2916         * svg/svgattrs.in:
2917
2918 2015-10-21  Nan Wang  <n_wang@apple.com>
2919
2920         AX: Expose table size and cell indexes on iOS
2921         https://bugs.webkit.org/show_bug.cgi?id=150366
2922
2923         Add support to expose table row/column count and cell indexes on iOS.
2924
2925         Reviewed by Chris Fleizach.
2926
2927         Test: accessibility/aria-table-attributes.html
2928
2929         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2930         (-[WebAccessibilityObjectWrapper tableParent]):
2931         (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
2932         (-[WebAccessibilityObjectWrapper accessibilityRowCount]):
2933         (-[WebAccessibilityObjectWrapper accessibilityColumnCount]):
2934         (-[WebAccessibilityObjectWrapper accessibilityARIARowCount]):
2935         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnCount]):
2936         (-[WebAccessibilityObjectWrapper accessibilityARIARowIndex]):
2937         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnIndex]):
2938         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
2939
2940 2015-10-21  Chris Dumez  <cdumez@apple.com>
2941
2942         HTMLIFrameElement.sandbox should be a DOMSettableTokenList
2943         https://bugs.webkit.org/show_bug.cgi?id=150377
2944
2945         Reviewed by Ryosuke Niwa.
2946
2947         HTMLIFrameElement.sandbox should be a DOMSettableTokenList as per the
2948         HTML specification:
2949         - https://html.spec.whatwg.org/multipage/embedded-content.html#htmliframeelement
2950
2951         Chrome and Firefox match the specification but Safari/WebKit was uding
2952         a DOMString.
2953
2954         Test: fast/frames/sandbox-attribute.html
2955
2956         * html/HTMLIFrameElement.cpp:
2957         (WebCore::HTMLIFrameElement::sandbox):
2958         (WebCore::HTMLIFrameElement::parseAttribute):
2959         * html/HTMLIFrameElement.h:
2960         * html/HTMLIFrameElement.idl:
2961
2962 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2963
2964         ASSERTION FAILED: markFontData in FontCascade::emphasisMarkHeight
2965         https://bugs.webkit.org/show_bug.cgi?id=150171
2966
2967         Reviewed by Myles C. Maxfield.
2968
2969         It happens with several tests like fast/ruby/text-emphasis.html in
2970         the GTK Debug bot. The tests seem to pass in Release and the rendering
2971         looks correct as well removing the assert. The thing is that
2972         for some reason we can get an empty GlyphData from
2973         FontCascade::getEmphasisMarkGlyphData() when it ends up falling
2974         back to system (FontCascadeFonts::glyphDataForSystemFallback).
2975
2976         * platform/graphics/FontCascade.cpp:
2977         (WebCore::FontCascade::getEmphasisMarkGlyphData): Return
2978         Optional<GlyphData> instead of returning a boolean and an out
2979         parameter. If we get an invalid GlyphData, Nullopt is
2980         returned. Also use a SurrogatePairAwareTextIterator to handle
2981         surrogate pairs.
2982         (WebCore::FontCascade::emphasisMarkAscent):
2983         (WebCore::FontCascade::emphasisMarkDescent):
2984         (WebCore::FontCascade::emphasisMarkHeight):
2985         (WebCore::FontCascade::drawEmphasisMarks):
2986         * platform/graphics/FontCascade.h:
2987         * platform/graphics/GlyphPage.h:
2988         (WebCore::GlyphData::isValid): Return whether the GlyphData is valid.
2989
2990 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
2991
2992         [css-grid] Fix availableLogicalSpace computation with non-zero baseSize flex tracks
2993         https://bugs.webkit.org/show_bug.cgi?id=150359
2994
2995         Reviewed by Zalan Bujtas.
2996
2997         The availableLogicalSpace computation was incorrect whenever
2998         the flex tracks had a non-zero baseSize before the 1fr unit
2999         size resolution. That happened because when assigning the new
3000         baseSize to the flex track, we were unconditionally
3001         subtracting the whole baseSize to the
3002         availableLogicalSpace. That's correct if the track is a "pure"
3003         flex track, i.e. 2fr, but if the track had a non-zero baseSize
3004         (like minmax(10px, 1fr)) then both the new and the old base
3005         sizes were incorrectly used to compute the
3006         availableLogicalSpace.
3007
3008         We can test the amount of remaining freeSpace by using content
3009         distribution to align and item place on a non-zero baseSize
3010         flex track. The content distribution will be accurate if and
3011         only if the availableLogicalSpace computation is correct.
3012
3013         Test: fast/css-grid-layout/flex-content-distribution.html
3014
3015         * rendering/RenderGrid.cpp:
3016         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3017
3018 2015-10-21  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3019
3020         [Streams API] Construct a writable stream
3021         https://bugs.webkit.org/show_bug.cgi?id=150360
3022
3023         Reviewed by Darin Adler.
3024
3025         This patch initializes a writable stream according to the spec. To do it we need two internal functions, which
3026         are syncWritableStreamStateWithQueue and errorWritableStream, which are also implemented as a quite direct
3027         translation from the spec.
3028
3029         Current test set suffices, expectations are updated accordingly.
3030
3031         * CMakeLists.txt:
3032         * DerivedSources.make:
3033         * WebCore.xcodeproj/project.pbxproj:
3034         * bindings/js/JSDOMWindowBase.cpp:
3035         * bindings/js/WebCoreBuiltinNames.h:
3036         * bindings/js/WebCoreJSBuiltinInternals.h:
3037         * bindings/js/WebCoreJSBuiltins.cpp:
3038         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
3039         * Modules/streams/WritableStream.js:
3040         (initializeWritableStream): Function that acts as constructor of WritableStream.
3041         * Modules/streams/WritableStreamInternals.js:
3042         (syncWritableStreamStateWithQueue):
3043         (errorWritableStream): As per spec.
3044
3045 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3046
3047         NetworkProcess: DNS prefetch happens in the Web Process
3048         https://bugs.webkit.org/show_bug.cgi?id=147824
3049
3050         Reviewed by Chris Dumez.
3051
3052         Use FrameLoaderClient to do the DNS prefetch.
3053
3054         * html/HTMLAnchorElement.cpp:
3055         (WebCore::HTMLAnchorElement::parseAttribute):
3056         * loader/EmptyClients.h:
3057         * loader/FrameLoaderClient.h:
3058         * loader/LinkLoader.cpp:
3059         (WebCore::LinkLoader::loadLink):
3060         * page/Chrome.cpp:
3061         (WebCore::Chrome::mouseDidMoveOverElement):
3062
3063 2015-10-21  Frederic Wang  <fred.wang@free.fr>
3064
3065         [FreeType] Add support for the USE_TYPO_METRICS flag
3066         https://bugs.webkit.org/show_bug.cgi?id=150340
3067
3068         Reviewed by Martin Robinson.
3069
3070         Test: fonts/use-typo-metrics-1.html
3071
3072         Make the FreeType backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
3073         Similar work should be done for other backends, see bug 131839.
3074
3075         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3076         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that's the case.
3077
3078 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
3079
3080         Replace 0 and NULL with nullptr in WebCore/loader.
3081         https://bugs.webkit.org/show_bug.cgi?id=149657
3082
3083         Reviewed by Darin Adler.
3084
3085         No new tests because there is no behavior change.
3086
3087         * loader/CookieJar.cpp:
3088         (WebCore::networkingContext):
3089         * loader/DocumentLoader.cpp:
3090         (WebCore::DocumentLoader::DocumentLoader):
3091         (WebCore::DocumentLoader::frameLoader):
3092         (WebCore::DocumentLoader::popArchiveForSubframe):
3093         (WebCore::DocumentLoader::clearArchiveResources):
3094         (WebCore::DocumentLoader::clearMainResource):
3095         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
3096         * loader/DocumentThreadableLoader.cpp:
3097         (WebCore::DocumentThreadableLoader::cancel):
3098         (WebCore::DocumentThreadableLoader::setDefersLoading):
3099         (WebCore::DocumentThreadableLoader::clearResource):
3100         * loader/EmptyClients.cpp:
3101         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
3102         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
3103         * loader/EmptyClients.h:
3104         * loader/FTPDirectoryParser.cpp:
3105         (WebCore::parseOneFTPLine):
3106         * loader/FTPDirectoryParser.h:
3107         (WebCore::ListResult::clear):
3108         * loader/FormSubmission.cpp:
3109         (WebCore::FormSubmission::create):
3110         * loader/FrameLoader.cpp:
3111         (WebCore::FrameLoader::clear):
3112         (WebCore::FrameLoader::stopAllLoaders):
3113         (WebCore::FrameLoader::clearProvisionalLoad):
3114         (WebCore::FrameLoader::transitionToCommitted):
3115         (WebCore::FrameLoader::closeAndRemoveChild):
3116         (WebCore::FrameLoader::detachFromParent):
3117         (WebCore::FrameLoader::detachViewsAndDocumentLoader):
3118         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
3119         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
3120         * loader/FrameLoader.h:
3121         (WebCore::FrameLoader::stateMachine):
3122         * loader/FrameNetworkingContext.h:
3123         (WebCore::FrameNetworkingContext::invalidate):
3124         * loader/HistoryController.cpp:
3125         (WebCore::HistoryController::replaceState):
3126         * loader/ImageLoader.cpp:
3127         (WebCore::ImageLoader::ImageLoader):
3128         (WebCore::ImageLoader::updateFromElement):
3129         * loader/NetscapePlugInStreamLoader.cpp:
3130         (WebCore::NetscapePlugInStreamLoader::releaseResources):
3131         * loader/ResourceLoadNotifier.h:
3132         * loader/ResourceLoadScheduler.cpp:
3133         (WebCore::resourceLoadScheduler):
3134         * loader/SubresourceLoader.cpp:
3135         (WebCore::SubresourceLoader::releaseResources):
3136         * loader/TextResourceDecoder.cpp:
3137         (WebCore::TextResourceDecoder::TextResourceDecoder):
3138         * loader/ThreadableLoaderClientWrapper.h:
3139         (WebCore::ThreadableLoaderClientWrapper::clearClient):
3140         (WebCore::ThreadableLoaderClientWrapper::done):
3141         * loader/appcache/ApplicationCache.cpp:
3142         (WebCore::fallbackURLLongerThan):
3143         (WebCore::ApplicationCache::ApplicationCache):
3144         (WebCore::ApplicationCache::resourceForRequest):
3145         * loader/appcache/ApplicationCache.h:
3146         (WebCore::ApplicationCache::fallbackURLs):
3147         * loader/appcache/ApplicationCacheGroup.cpp:
3148         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
3149         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
3150         (WebCore::ApplicationCacheGroup::selectCache):
3151         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
3152         (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
3153         (WebCore::ApplicationCacheGroup::manifestNotFound):
3154         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
3155         * loader/appcache/ApplicationCacheHost.cpp:
3156         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
3157         (WebCore::ApplicationCacheHost::setApplicationCache):
3158         * loader/appcache/ApplicationCacheHost.h:
3159         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup):
3160         * loader/appcache/ApplicationCacheStorage.cpp:
3161         (WebCore::StorageIDJournal::Record::Record):
3162         (WebCore::StorageIDJournal::Record::restore):
3163         (WebCore::ApplicationCacheStorage::loadCacheGroup):
3164         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
3165         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
3166         (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
3167         (WebCore::ApplicationCacheStorage::loadCache):
3168         * loader/appcache/DOMApplicationCache.cpp:
3169         (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
3170         (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
3171         (WebCore::DOMApplicationCache::applicationCacheHost):
3172         (WebCore::DOMApplicationCache::scriptExecutionContext):
3173         (WebCore::DOMApplicationCache::toEventType):
3174         * loader/archive/ArchiveFactory.cpp:
3175         (WebCore::ArchiveFactory::create):
3176         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
3177         * loader/archive/ArchiveResourceCollection.cpp:
3178         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
3179         * loader/archive/cf/LegacyWebArchive.cpp:
3180         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
3181         (WebCore::LegacyWebArchive::createResource):
3182         (WebCore::LegacyWebArchive::create):
3183         (WebCore::LegacyWebArchive::rawDataRepresentation):
3184         * loader/archive/cf/LegacyWebArchiveMac.mm:
3185         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
3186         * loader/archive/mhtml/MHTMLArchive.cpp:
3187         (WebCore::MHTMLArchive::create):
3188         (WebCore::MHTMLArchive::generateMHTMLData):
3189         * loader/archive/mhtml/MHTMLParser.cpp:
3190         (WebCore::MHTMLParser::parseArchiveWithHeader):
3191         (WebCore::MHTMLParser::parseNextPart):
3192         * loader/cache/CachedImage.cpp:
3193         (WebCore::CachedImage::CachedImage):
3194         * loader/cache/CachedImageClient.h:
3195         (WebCore::CachedImageClient::imageChanged):
3196         (WebCore::CachedImageClient::newImageAnimationFrameAvailable):
3197         * loader/cache/CachedRawResource.cpp:
3198         (WebCore::CachedRawResource::calculateIncrementalDataChunk):
3199         * loader/cache/CachedRawResourceClient.h:
3200         (WebCore::CachedRawResourceClient::dataReceived):
3201         (WebCore::CachedRawResourceClient::redirectReceived):
3202         (WebCore::CachedRawResourceClient::getOrCreateReadBuffer):
3203         * loader/cache/CachedResource.cpp:
3204         (WebCore::CachedResource::CachedResource):
3205         (WebCore::CachedResource::clearResourceToRevalidate):
3206         * loader/cache/CachedResourceClientWalker.h:
3207         (WebCore::CachedResourceClientWalker::next):
3208         * loader/cache/CachedResourceHandle.cpp:
3209         (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
3210         * loader/cache/CachedResourceLoader.cpp:
3211         (WebCore::createResource):
3212         (WebCore::CachedResourceLoader::CachedResourceLoader):
3213         (WebCore::CachedResourceLoader::~CachedResourceLoader):
3214         (WebCore::CachedResourceLoader::canRequest): Return value is bool.
3215         (WebCore::CachedResourceLoader::requestResource):
3216         * loader/cache/CachedResourceLoader.h:
3217         (WebCore::CachedResourceLoader::document):
3218         (WebCore::CachedResourceLoader::setDocument):
3219         (WebCore::CachedResourceLoader::clearDocumentLoader):
3220         * loader/cache/CachedSVGDocumentReference.cpp:
3221         (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
3222         * loader/cf/ResourceLoaderCFNet.cpp:
3223         (WebCore::ResourceLoader::shouldCacheResponse): Return value is bool.
3224         * loader/icon/IconDatabase.cpp:
3225         (WebCore::IconDatabase::synchronousIconForPageURL):
3226         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
3227         (WebCore::IconDatabase::setIconDataForIconURL):
3228         (WebCore::IconDatabase::getOrCreatePageURLRecord):
3229         (WebCore::IconDatabase::cleanupSyncThread):
3230         * loader/icon/IconDatabaseBase.cpp:
3231         (WebCore::IconDatabaseBase::open):
3232         (WebCore::iconDatabase):
3233         * loader/icon/IconDatabaseBase.h:
3234         (WebCore::EnumCallback::performCallback):
3235         (WebCore::EnumCallback::invalidate):
3236         (WebCore::ObjectCallback::performCallback):
3237         (WebCore::ObjectCallback::invalidate):
3238         * loader/icon/PageURLRecord.cpp:
3239         (WebCore::PageURLRecord::~PageURLRecord):
3240         (WebCore::PageURLRecord::setIconRecord):
3241         * loader/mac/ResourceLoaderMac.mm:
3242         (WebCore::ResourceLoader::willCacheResponse):
3243         * loader/soup/CachedRawResourceSoup.cpp:
3244         (WebCore::CachedRawResource::getOrCreateReadBuffer):
3245
3246 2015-10-20  Chris Dumez  <cdumez@apple.com>
3247
3248         Unreviewed, GTK API test fix after r191351.
3249
3250         Reverted API change for GTK bindings.
3251
3252         * html/HTMLOptionsCollection.idl:
3253         * html/HTMLSelectElement.idl:
3254
3255 2015-10-20  Chris Dumez  <cdumez@apple.com>
3256
3257         Unreviewed, Another GTK build fix after r191351.
3258
3259         * html/HTMLCollection.idl:
3260
3261 2015-10-20  Chris Dumez  <cdumez@apple.com>
3262
3263         Unreviewed, Another GTK build fix after r191351.
3264
3265         * html/HTMLFieldSetElement.cpp:
3266         (WebCore::HTMLFieldSetElement::elementsForNativeBindings):
3267         (WebCore::HTMLFieldSetElement::elementsForObjC): Deleted.
3268         * html/HTMLFieldSetElement.h:
3269         * html/HTMLFieldSetElement.idl:
3270
3271 2015-10-20  Chris Fleizach  <cfleizach@apple.com>
3272
3273         AX: CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AccessibilityTable::tableElement const + 116
3274         https://bugs.webkit.org/show_bug.cgi?id=150349
3275
3276         Reviewed by Brent Fulgham.
3277
3278         The crash point for this bug says that the parentElement of the firstBody is garbage when it's accessed. 
3279         Unfortunately, I could not reproduce this in-situ or with a test. 
3280         So my speculative solution is to recalculate those body elements to ensure that they're valid before we access.
3281
3282         * accessibility/AccessibilityTable.cpp:
3283         (WebCore::AccessibilityTable::tableElement):
3284         (WebCore::AccessibilityTable::isDataTable):
3285
3286 2015-10-20  Chris Dumez  <cdumez@apple.com>
3287
3288         Unreviewed, GTK build fix after r191351.
3289
3290         * html/HTMLFormElement.cpp:
3291         (WebCore::HTMLFormElement::elementsForNativeBindings):
3292         (WebCore::HTMLFormElement::elementsForObjC): Deleted.
3293         * html/HTMLFormElement.h:
3294         * html/HTMLFormElement.idl:
3295
3296 2015-10-20  Simon Fraser  <simon.fraser@apple.com>
3297
3298         Add basic TextStream output for Images
3299         https://bugs.webkit.org/show_bug.cgi?id=150350
3300
3301         Reviewed by Darin Adler.
3302
3303         Add a TextStream output operator for Image, and virtual dump() member functions
3304         that the various image types override to dump their own data.
3305         
3306         Add isFoo() functions for each image type (surprising that these didn't already
3307         exist) so we can print the image type.
3308         
3309         Make isAnimated() const, and isBitmapImage() private.
3310
3311         * platform/graphics/BitmapImage.cpp:
3312         (WebCore::BitmapImage::dump):
3313         * platform/graphics/BitmapImage.h:
3314         * platform/graphics/CrossfadeGeneratedImage.cpp:
3315         (WebCore::CrossfadeGeneratedImage::dump):
3316         * platform/graphics/CrossfadeGeneratedImage.h:
3317         * platform/graphics/GeneratedImage.cpp:
3318         * platform/graphics/GeneratedImage.h:
3319         * platform/graphics/GradientImage.cpp:
3320         (WebCore::GradientImage::dump):
3321         * platform/graphics/GradientImage.h:
3322         * platform/graphics/Image.cpp:
3323         (WebCore::Image::dump):
3324         (WebCore::operator<<):
3325         * platform/graphics/Image.h:
3326         (WebCore::Image::isGeneratedImage):
3327         (WebCore::Image::isCrossfadeGeneratedImage):
3328         (WebCore::Image::isNamedImageGeneratedImage):
3329         (WebCore::Image::isGradientImage):
3330         (WebCore::Image::isSVGImage):
3331         (WebCore::Image::isAnimated):
3332         * platform/graphics/NamedImageGeneratedImage.cpp:
3333         (WebCore::NamedImageGeneratedImage::dump):
3334         * platform/graphics/NamedImageGeneratedImage.h:
3335         * platform/graphics/cg/PDFDocumentImage.cpp:
3336         (WebCore::PDFDocumentImage::dump):
3337         * platform/graphics/cg/PDFDocumentImage.h:
3338         * svg/graphics/SVGImage.cpp:
3339         (WebCore::SVGImage::dump):
3340         * svg/graphics/SVGImage.h:
3341
3342 2015-10-20  Chris Dumez  <cdumez@apple.com>
3343
3344         Use tighter typing for collections / node lists' item() / namedItem() methods
3345         https://bugs.webkit.org/show_bug.cgi?id=150347
3346
3347         Reviewed by Darin Adler.
3348
3349         Use tighter typing for collections / node lists' item() / namedItem() methods.
3350
3351         * accessibility/AccessibilityRenderObject.cpp:
3352         (WebCore::AccessibilityRenderObject::getDocumentLinks):
3353         * dom/LiveNodeList.h:
3354         * dom/StaticNodeList.cpp:
3355         (WebCore::StaticElementList::item):
3356         * dom/StaticNodeList.h:
3357         * html/CachedHTMLCollection.h:
3358         * html/HTMLAllCollection.idl:
3359         * html/HTMLCollection.idl:
3360         * html/HTMLFieldSetElement.cpp:
3361         (WebCore::HTMLFieldSetElement::elements):
3362         (WebCore::HTMLFieldSetElement::elementsForObjC):
3363         * html/HTMLFieldSetElement.h:
3364         * html/HTMLFieldSetElement.idl:
3365         * html/HTMLFormControlsCollection.cpp:
3366         (WebCore::HTMLFormControlsCollection::customElementAfter):
3367         * html/HTMLFormControlsCollection.h:
3368         * html/HTMLFormControlsCollection.idl:
3369         * html/HTMLFormElement.cpp:
3370         (WebCore::HTMLFormElement::item):
3371         (WebCore::HTMLFormElement::elements):
3372         (WebCore::HTMLFormElement::elementsForObjC):
3373         * html/HTMLFormElement.h:
3374         * html/HTMLFormElement.idl:
3375         * html/HTMLOptionsCollection.cpp:
3376         (WebCore::HTMLOptionsCollection::add):
3377         * html/HTMLOptionsCollection.h:
3378         * html/HTMLOptionsCollection.idl:
3379         * html/HTMLSelectElement.cpp:
3380         (WebCore::HTMLSelectElement::namedItem):
3381         (WebCore::HTMLSelectElement::item):
3382         (WebCore::HTMLSelectElement::setOption):
3383         * html/HTMLSelectElement.idl:
3384         * html/HTMLTableRowElement.cpp:
3385         (WebCore::HTMLTableRowElement::deleteCell):
3386         * html/HTMLTableSectionElement.cpp:
3387         (WebCore::HTMLTableSectionElement::deleteRow):
3388         * html/RadioNodeList.cpp:
3389         (WebCore::toRadioButtonInputElement):
3390         (WebCore::RadioNodeList::value):
3391         (WebCore::RadioNodeList::setValue):
3392         * html/RadioNodeList.h:
3393         * html/RadioNodeList.idl:
3394
3395 2015-10-20  Chris Dumez  <cdumez@apple.com>
3396
3397         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes
3398         https://bugs.webkit.org/show_bug.cgi?id=150335
3399
3400         Reviewed by Darin Adler.
3401
3402         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes:
3403         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12.3)
3404         https://html.spec.whatwg.org/multipage/infrastructure.html#space-character
3405
3406         Previously, we were uding the wrong stripping function and we were stripping
3407         some non-HTML spaces.
3408
3409         Test: fast/dom/script-for-event-spaces.html
3410
3411         * dom/ScriptElement.cpp:
3412         (WebCore::ScriptElement::isScriptForEventSupported):
3413
3414 2015-10-20  Csaba Osztrogonác  <ossy@webkit.org>
3415
3416         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r191128
3417         https://bugs.webkit.org/show_bug.cgi?id=150321
3418
3419         Reviewed by Darin Adler.
3420
3421         * css/CSSGrammar.y.in: Typo fix.
3422
3423 2015-10-20  Tim Horton  <timothy_horton@apple.com>
3424
3425         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
3426
3427         * Configurations/FeatureDefines.xcconfig:
3428
3429 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
3430
3431         ASSERTION FAILED: computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize) in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
3432         https://bugs.webkit.org/show_bug.cgi?id=149459
3433
3434         Reviewed by Darin Adler.
3435
3436         This was regressed after 189567 where min-height|width:auto
3437         support was added to flex items. The merge from Blink changes
3438         was not correctly done for assertions. In particular we were
3439         asserting if the resolved main size was not strictly greater
3440         than 0, but 0 is actually a valid value.
3441
3442         Test: fast/flexbox/crash-resolved-main-size-zero.html
3443
3444         * rendering/RenderFlexibleBox.cpp:
3445         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
3446
3447 2015-10-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3448
3449         [Streams API] Rework some readable stream internals that can be common to writable streams
3450         https://bugs.webkit.org/show_bug.cgi?id=150133
3451
3452         Reviewed by Darin Adler.
3453
3454         There are some things in ReadableStream internals that be be used also for Writable Streams so it was necessary
3455         to move some functions and refactor some code that can be shared by both implementations.
3456
3457         Queue was written with the functions declared at the implementation and keeping the improvement of having the
3458         total size calculated instead of having to transverse the whole array.
3459
3460         The strategy is kept as an object and a common method is used to validate it as per spec.
3461
3462         Promises are reworked to keep in an internal slot inside the promise object the resolve and reject
3463         functions. For convinience three functions were written, one to create the promise (and keep internally the
3464         resolve and reject functions), one to resolve and another to reject. Promises can still be created with
3465         Promise.resolve or reject as the resolve and rejectStreamsPromise functions operate under the assumption that
3466         the internal slots might not exist.
3467
3468         invokeOrNoop and promiseInvokeOrNoop were moved to the common code as they will be also used by WritableStream.
3469
3470         Current test set suffices.
3471
3472         * CMakeLists.txt:
3473         * DerivedSources.make:
3474         * WebCore.xcodeproj/project.pbxproj:
3475         * bindings/js/JSDOMWindowBase.cpp:
3476         * bindings/js/WebCoreJSBuiltinInternals.h:
3477         * bindings/js/WebCoreJSBuiltins.cpp:
3478         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
3479         * Modules/streams/ReadableStream.js:
3480         (initializeReadableStream): Reworked queue and strategy.
3481         * Modules/streams/ReadableStreamInternals.js:
3482         (privateInitializeReadableStreamReader):
3483         (errorReadableStream):
3484         (getReadableStreamDesiredSize):
3485         (cancelReadableStream):
3486         (closeReadableStream):
3487         (closeReadableStreamReader):
3488         (enqueueInReadableStream):
3489         (readFromReadableStreamReader): Reworked queue, strategy and promises.
3490         (invokeOrNoop): Deleted.
3491         (promiseInvokeOrNoop): Deleted.
3492         * Modules/streams/StreamInternals.js: Added.
3493         (invokeOrNoop):
3494         (promiseInvokeOrNoop): Moved from ReadableStreamInternals.js.
3495         (validateAndNormalizeQueuingStrategy):
3496         (createNewStreamsPromise):
3497         (resolveStreamsPromise):
3498         (rejectStreamsPromise):
3499         (newQueue):
3500         (dequeueValue):
3501         (enqueueValueWithSize): Added according to the spec.
3502         * bindings/js/WebCoreBuiltinNames.h: Updated private names according to the new slots.
3503
3504 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
3505
3506         Rename the PICTURE_SIZES flag to CURRENTSRC
3507         https://bugs.webkit.org/show_bug.cgi?id=150275
3508
3509         Reviewed by Dean Jackson.
3510
3511         No new tests, since there is no functional change.
3512
3513         * Configurations/FeatureDefines.xcconfig:
3514         * html/HTMLImageElement.cpp:
3515         * html/HTMLImageElement.h:
3516         * html/HTMLImageElement.idl:
3517
3518 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3519
3520         ASSERTION FAILED: m_state == Initialized in SubresourceLoader::didReceiveResponse()
3521         https://bugs.webkit.org/show_bug.cgi?id=150327
3522
3523         Reviewed by Antti Koivisto.
3524
3525         This is how it happens:
3526
3527         1. print() is called while the document is still loading, so
3528            m_shouldPrintWhenFinishedLoading is set to true
3529         2. DataURLDecoder::decode() finishes in the work queue thread,
3530            the completion handler is scheduled in the main thread
3531         3. The load is cancelled
3532           3.1. SubresourceLoader::willCancel sets m_state = Finishing
3533           3.2. DOMWindow::finishedLoading() is called, and since
3534                m_shouldPrintWhenFinishedLoading is true, it does the print.
3535           3.3. Cancellation finishes and ResourceLoader::releaseResources()
3536                is called that sets m_reachedTerminalState = true
3537
3538         So, between 3.1 and 3.3, the state is Finishing, but
3539         m_reachedTerminalState is false. What happens, in the GTK+ port at
3540         least, is that the nested main loop used to make print()
3541         synchronous, processes the DataURLDecoder::decode() completion
3542         handler that was pending. The completion handler returns early if
3543         m_reachedTerminalState is true, but it's not yet in this
3544         particular case. So, it ends up calling didReceiveResponse,
3545         because the decode didn't fail, when the subresource loader state
3546         is Finishing.
3547
3548         I think there are two things here. One is that we shouldn't start
3549         a print that was waiting for the load to finish when it
3550         failed. That would fix the problem. But it's probably a good idea
3551         to also check for cancellation in the DataURLDecoder::decode()
3552         completion handler.
3553
3554         Fixes printing/print-close-crash.html in GTK+ Debug.
3555
3556         * loader/ResourceLoader.cpp:
3557         (WebCore::ResourceLoader::loadDataURL): Return early from
3558         DataURLDecoder::decode() completion handler if the load was cancelled.
3559         * page/DOMWindow.cpp:
3560         (WebCore::DOMWindow::finishedLoading): Do not start a print that
3561         was witing for the load to finish when it failed.
3562
3563 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3564
3565         FontCascade::typesettingFeatures() is not privy to font-variant-* nor font-feature-settings
3566         https://bugs.webkit.org/show_bug.cgi?id=149775
3567
3568         Reviewed by Darin Adler.
3569
3570         This patch has two pieces:
3571
3572         We used to have a boolean, enableLigatures, which affected how we perform shaping in both our
3573         simple and complex text codepaths. However, in this brave new world of font-feature-settings
3574         and font-variant-*, there are many properties which may affect shaping (and multiple kinds
3575         of ligatures). This patch renames this boolean to requiresShaping, and teaches it about all
3576         the various properties which affect text shaping.
3577
3578         Similarly, one of the places which used this enableLigatures boolean was to tell CoreText
3579         if it should disable ligatures. However, we now have much finer-grained control over
3580         ligatures during font creation. This patch moves the responsibility of dictating which
3581         font features should be enabled entirely to the Font. Therefore, getCFStringAttributes()
3582         doesn't know anything about ligatures anymore; the logic inside font creation is used
3583         instead.
3584
3585         An added benefit of moving all the font feature logic to one place is that we can implement
3586         the feature resolution algorithm described in the CSS3 fonts spec. This patch adds a test to
3587         makes sure that text-rendering, font-feature-settings, and font-variant-* play together
3588         nicely.
3589
3590         Test: fast/text/multiple-feature-properties.html
3591
3592         * platform/graphics/Font.cpp:
3593         (WebCore::Font::applyTransforms):
3594         * platform/graphics/Font.h:
3595         * platform/graphics/FontCascade.cpp:
3596         (WebCore::FontCascade::FontCascade):
3597         (WebCore::FontCascade::operator=):
3598         (WebCore::FontCascade::update):
3599         (WebCore::FontCascade::drawText):
3600         (WebCore::FontCascade::drawEmphasisMarks):
3601         (WebCore::FontCascade::width):
3602         (WebCore::FontCascade::adjustSelectionRectForText):
3603         (WebCore::FontCascade::offsetForPosition):
3604         (WebCore::FontCascade::codePath):
3605         (WebCore::FontCascade::floatWidthForSimpleText):
3606         * platform/graphics/FontCascade.h:
3607         (WebCore::FontCascade::requiresShaping):
3608         (WebCore::FontCascade::computeRequiresShaping):
3609         (WebCore::FontCascade::enableLigatures): Deleted.
3610         (WebCore::FontCascade::computeEnableLigatures): Deleted.
3611         * platform/graphics/WidthIterator.cpp:
3612         (WebCore::WidthIterator::WidthIterator):
3613         (WebCore::WidthIterator::applyFontTransforms):
3614         * platform/graphics/WidthIterator.h:
3615         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3616         (WebCore::preparePlatformFont):
3617         * platform/graphics/cocoa/FontCocoa.mm:
3618         (WebCore::Font::canRenderCombiningCharacterSequence):
3619         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3620         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3621         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
3622         (WebCore::Font::getCFStringAttributes):
3623         * svg/SVGFontData.h:
3624
3625 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3626
3627         Shadow GraphicsContext's ImageInterpolationQuality inside GraphicsContextState
3628         https://bugs.webkit.org/show_bug.cgi?id=150306
3629
3630         Reviewed by Simon Fraser.
3631
3632         When getting the ImageInterpolationQuality, there is no need to round-trip through
3633         the platform's graphics context. This patch migrates this piece of state to the
3634         existing idiom of having a setter in GraphicsContext.cpp which sets the relevent
3635         state in GraphicsContextState and then calls into a platform-specific setter.
3636
3637         No new tests because there is no behavior change.
3638
3639         * platform/graphics/GraphicsContext.cpp:
3640         (WebCore::GraphicsContext::setImageInterpolationQuality):
3641         * platform/graphics/GraphicsContext.h:
3642         (WebCore::GraphicsContext::imageInterpolationQuality):
3643         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3644         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
3645         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
3646         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
3647         * platform/graphics/cg/GraphicsContextCG.cpp:
3648         (WebCore::convertInterpolationQuality):
3649         (WebCore::GraphicsContext::platformInit):
3650         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
3651         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
3652         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
3653
3654 2015-10-19  Chris Dumez  <cdumez@apple.com>
3655
3656         Drop unnecessary Node::toInputElement() virtual function
3657         https://bugs.webkit.org/show_bug.cgi?id=150341
3658
3659         Reviewed by Darin Adler.
3660
3661         Drop unnecessary Node::toInputElement() virtual function and use the
3662         usual is<HTMLInputElement>() / downcast< HTMLInputElement >() instead.
3663
3664 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3665
3666         Unreviewed, rolling out r191324.
3667         https://bugs.webkit.org/show_bug.cgi?id=150352
3668
3669         Shadowing CTM's state is not necessary (Requested by litherum
3670         on #webkit).
3671
3672         Reverted changeset:
3673
3674         "Host GraphicsContext's CTM inside GraphicsContextState"
3675         https://bugs.webkit.org/show_bug.cgi?id=150146
3676         http://trac.webkit.org/changeset/191324
3677
3678 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3679
3680         Host GraphicsContext's CTM inside GraphicsContextState
3681         https://bugs.webkit.org/show_bug.cgi?id=150146
3682
3683         There are 6 operations which interact with CTMs:
3684         - Get
3685         - Set
3686         - Concatenate
3687         - Scale
3688         - Rotate
3689         - Translate
3690
3691         This patch modifies all these operations so that these operations shadow the
3692         platform's CTM inside GraphicsContextState. This way, we don't have to consult
3693         with the underlying graphics context in order to know the current CTM.
3694
3695         There are currently many places in the Core Graphics ports where we will change
3696         the platform's CTM out from under the GraphicsContext. This patch migrates
3697         those users to going through GraphicsContext, thereby preserving the integrity
3698         of the shadowed state.
3699
3700         No new tests because there is no behavior change.
3701
3702         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
3703         The getter can just consult with the shadowed state.
3704         (WebCore::GraphicsContext::concatCTM):
3705         (WebCore::GraphicsContext::scale):
3706         (WebCore::GraphicsContext::rotate):
3707         (WebCore::GraphicsContext::translate):
3708         (WebCore::GraphicsContext::setCTM):
3709         (WebCore::GraphicsContext::getCTM):
3710         (WebCore::GraphicsContext::beginTransparencyLayer):
3711         (WebCore::GraphicsContext::applyDeviceScaleFactor):
3712         * platform/graphics/GraphicsContext.h:
3713         (WebCore::GraphicsContext::scale):
3714         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
3715         matches the platform graphics context's state.
3716         * platform/graphics/Image.h:
3717         (WebCore::Image::nativeImageForCurrentFrame):
3718         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
3719         (WebCore::GraphicsContext::resetPlatformCTM):
3720         (WebCore::GraphicsContext::getPlatformCTM):
3721         (WebCore::GraphicsContext::translatePlatformCTM):
3722         (WebCore::GraphicsContext::concatPlatformCTM):
3723         (WebCore::GraphicsContext::setPlatformCTM):
3724         (WebCore::GraphicsContext::rotatePlatformCTM):
3725         (WebCore::GraphicsContext::scalePlatformCTM):
3726         (WebCore::GraphicsContext::getCTM): Deleted.
3727         (WebCore::GraphicsContext::translate): Deleted.
3728         (WebCore::GraphicsContext::concatCTM): Deleted.
3729         (WebCore::GraphicsContext::setCTM): Deleted.
3730         (WebCore::GraphicsContext::rotate): Deleted.
3731         (WebCore::GraphicsContext::scale): Deleted.
3732         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3733         Renaming functions.
3734         (WebCore::GraphicsContextPlatformPrivate::save):
3735         (WebCore::GraphicsContextPlatformPrivate::restore):
3736         (WebCore::GraphicsContextPlatformPrivate::flush):
3737         (WebCore::GraphicsContextPlatformPrivate::clip):
3738         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3739         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3740         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3741         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3742         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3743         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3744         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3745         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3746         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3747         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3748         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
3749         migrate CTM setters to go through GraphicsContext.
3750         (WebCore::GraphicsContext::resetPlatformCTM):
3751         (WebCore::GraphicsContext::platformInit):
3752         (WebCore::GraphicsContext::drawNativeImage):
3753         (WebCore::GraphicsContext::drawPattern):
3754         (WebCore::GraphicsContext::fillPath):
3755         (WebCore::GraphicsContext::scalePlatformCTM):
3756         (WebCore::GraphicsContext::rotatePlatformCTM):
3757         (WebCore::GraphicsContext::translatePlatformCTM):
3758         (WebCore::GraphicsContext::concatPlatformCTM):
3759         (WebCore::GraphicsContext::setPlatformCTM):
3760         (WebCore::GraphicsContext::getPlatformCTM):
3761         (WebCore::GraphicsContext::scale): Deleted.
3762         (WebCore::GraphicsContext::rotate): Deleted.
3763         (WebCore::GraphicsContext::translate): Deleted.
3764         (WebCore::GraphicsContext::concatCTM): Deleted.
3765         (WebCore::GraphicsContext::setCTM): Deleted.
3766         (WebCore::GraphicsContext::getCTM): Deleted.
3767         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
3768         (WebCore::GraphicsContextPlatformPrivate::save):
3769         (WebCore::GraphicsContextPlatformPrivate::restore):
3770         (WebCore::GraphicsContextPlatformPrivate::flush):
3771         (WebCore::GraphicsContextPlatformPrivate::clip):
3772         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3773         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3774         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3775         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3776         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3777         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3778         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3779         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3780         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3781         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3782         * platform/graphics/transforms/AffineTransform.h:
3783         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
3784         is not a good idea. Instead, this function is more valuable. (However, note that
3785         it is expected for values in a CTM to hold values close to 0, which means that
3786         this function might erroneously return false (similar to operator=()).
3787         * platform/graphics/win/GraphicsContextWin.cpp:
3788         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3789         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3790         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3791         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3792         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3793         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3794         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3795         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3796         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3797         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3798         * platform/mac/DragImageMac.mm:
3799         (WebCore::drawAtPoint):
3800         * platform/spi/cg/CoreGraphicsSPI.h:
3801
3802 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3803
3804         Remove unused support for long presses from WebKit
3805         https://bugs.webkit.org/show_bug.cgi?id=150345
3806
3807         Reviewed by Beth Dakin.
3808
3809         * page/Chrome.cpp:
3810         (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Deleted.
3811         (WebCore::Chrome::didRecognizeLongMousePress): Deleted.
3812         (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Deleted.
3813         * page/Chrome.h:
3814         * page/ChromeClient.h:
3815         * page/EventHandler.cpp:
3816         (WebCore::EventHandler::EventHandler): Deleted.
3817         (WebCore::EventHandler::clear): Deleted.
3818         (WebCore::EventHandler::handleMousePressEvent): Deleted.
3819         (WebCore::EventHandler::eventMayStartDrag): Deleted.
3820         (WebCore::EventHandler::handleMouseReleaseEvent): Deleted.
3821         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Deleted.
3822         (WebCore::EventHandler::recognizeLongMousePress): Deleted.
3823         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Deleted.
3824         (WebCore::EventHandler::clearLongMousePressState): Deleted.
3825         (WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Deleted.
3826         (WebCore::EventHandler::handleMouseMoveEvent): Deleted.
3827         (WebCore::EventHandler::handleDrag): Deleted.
3828         * page/EventHandler.h:
3829         * page/Settings.in:
3830
3831 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3832
3833         WKView being inside WKWebView leads to weird API issues
3834         https://bugs.webkit.org/show_bug.cgi?id=150174
3835
3836         Reviewed by Darin Adler.
3837
3838         No new tests, just moving code around.
3839
3840         * WebCore.xcodeproj/project.pbxproj:
3841         * platform/spi/mac/NSWindowSPI.h: Added.
3842
3843 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
3844
3845         Restore an assertion to the way it was before r191310, which was correct.
3846
3847         * platform/graphics/GraphicsTypes.cpp:
3848         (WebCore::compositeOperatorName):
3849
3850 2015-10-19  Beth Dakin  <bdakin@apple.com>
3851
3852         Build fix.
3853
3854         * dom/EventNames.in:
3855         * dom/make_event_factory.pl:
3856         (generateImplementation):
3857
3858 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
3859
3860         Fix the binding generator after r191176
3861         https://bugs.webkit.org/show_bug.cgi?id=150320
3862
3863         Reviewed by Darin Adler.
3864
3865         * bindings/scripts/CodeGeneratorJS.pm:
3866         (GenerateConstructorHelperMethods):
3867         * bindings/scripts/test/JS/JSTestInterface.cpp:
3868         (WebCore::JSTestInterfaceConstructor::getConstructData):
3869
3870 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3871
3872         Unreviewed, rolling out r191307.
3873         https://bugs.webkit.org/show_bug.cgi?id=150338
3874
3875         broke lots of API tests, need time to figure out whats up
3876         (Requested by thorton on #webkit).
3877
3878         Reverted changeset:
3879
3880         "WKView being inside WKWebView leads to weird API issues"
3881         https://bugs.webkit.org/show_bug.cgi?id=150174
3882         http://trac.webkit.org/changeset/191307
3883
3884 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3885
3886         Unreviewed, rolling out r191295, r191297, and r191301.
3887         https://bugs.webkit.org/show_bug.cgi?id=150337
3888
3889         ASSERTs in 5 tests (Requested by litherum on #webkit).
3890
3891         Reverted changesets:
3892
3893         "Host GraphicsContext's CTM inside GraphicsContextState"
3894         https://bugs.webkit.org/show_bug.cgi?id=150146
3895         http://trac.webkit.org/changeset/191295
3896
3897         "[iOS] Build fix after r191295"
3898         http://trac.webkit.org/changeset/191297
3899
3900         "Unreviewed build fix after r191295."
3901         http://trac.webkit.org/changeset/191301
3902
3903 2015-10-16  Brian Burg  <bburg@apple.com>
3904
3905         Unify handling of JavaScriptCore scripts that are used in WebCore
3906         https://bugs.webkit.org/show_bug.cgi?id=150245
3907
3908         Reviewed by Alex Christensen.
3909
3910         Use the new JavaScriptCore_SCRIPTS_DIR variable.
3911
3912         * CMakeLists.txt:
3913         * DerivedSources.make:
3914         * WebCore.xcodeproj/project.pbxproj:
3915
3916             No need to export other variables like InspectorScripts anymore.
3917
3918 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
3919
3920         Add TextStream formatters for FillLayer and all it entails
3921         https://bugs.webkit.org/show_bug.cgi?id=150312
3922
3923         Reviewed by Tim Horton.
3924
3925         Add TextStream output formatters for FillLayer, and all the enum
3926         types used by it.
3927         
3928         Drive-by fixes for CompositeOperator and BlendMode string conversions.
3929         compositeOperatorNames was missing the "difference" string, and compositeOperatorName()
3930         would do an OOB memory access if blendOp was zero.
3931
3932         * CMakeLists.txt:
3933         * WebCore.xcodeproj/project.pbxproj:
3934         * platform/Length.cpp:
3935         (WebCore::operator<<):
3936         * platform/Length.h:
3937         * platform/LengthSize.cpp: Added.
3938         (WebCore::operator<<):
3939         * platform/LengthSize.h:
3940         * platform/text/TextStream.h:
3941         * rendering/style/FillLayer.cpp:
3942         (WebCore::operator<<):
3943         * rendering/style/FillLayer.h:
3944         * rendering/style/RenderStyleConstants.cpp: Added.
3945         (WebCore::operator<<):
3946         * rendering/style/RenderStyleConstants.h:
3947
3948 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3949
3950         WKView being inside WKWebView leads to weird API issues
3951         https://bugs.webkit.org/show_bug.cgi?id=150174
3952
3953         Reviewed by Darin Adler.
3954
3955         No new tests, just moving code around.
3956
3957         * WebCore.xcodeproj/project.pbxproj:
3958         * platform/spi/mac/NSWindowSPI.h: Added.
3959
3960 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3961
3962         Try to fix the iOS build
3963
3964         * Configurations/FeatureDefines.xcconfig:
3965
3966 2015-10-19  Alex Christensen  <achristensen@webkit.org>
3967
3968         Unreviewed build fix after r191295.
3969
3970         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3971         (WebCore::GraphicsContext::translatePlatformCTM):
3972         (WebCore::GraphicsContext::setPlatformFillColor):
3973         (WebCore::GraphicsContext::concatPlatformCTM):
3974         (WebCore::GraphicsContext::setPlatformCTM):
3975         (WebCore::GraphicsContext::setPlatformShadow):
3976         (WebCore::GraphicsContext::rotatePlatformCTM):
3977         (WebCore::GraphicsContext::scalePlatformCTM):
3978         (WebCore::GraphicsContext::clipOut):
3979         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3980         (WebCore::GraphicsContextPlatformPrivate::save):
3981         (WebCore::GraphicsContextPlatformPrivate::restore):
3982         (WebCore::GraphicsContextPlatformPrivate::flush):
3983         (WebCore::GraphicsContextPlatformPrivate::clip):
3984         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3985         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3986         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3987         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3988         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3989         (WebCore::GraphicsContextPlatformPrivate::syncContext):
3990         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3991         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3992         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3993         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3994         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3995
3996 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3997
3998         Add magnify and rotate gesture event support for Mac
3999         https://bugs.webkit.org/show_bug.cgi?id=150179
4000         <rdar://problem/8036240>
4001
4002         Reviewed by Darin Adler.
4003
4004         No new tests.
4005
4006         * Configurations/FeatureDefines.xcconfig:
4007         New feature flag.
4008
4009         * Configurations/WebCore.xcconfig:
4010         Don't exclude generated gesture sources; they are already #ifdef-guarded.
4011
4012         * DerivedSources.make:
4013         Add GestureEvent.idl for ENABLE_MAC_GESTURE_EVENTS too.
4014
4015         * WebCore.xcodeproj/project.pbxproj:
4016         Add GestureEvents.cpp.
4017
4018         * bindings/objc/DOMEvents.mm:
4019         (kitClass):
4020         Support DOMGestureEvent on Mac if the new flag is enabled.
4021
4022         * dom/mac/GestureEvents.cpp: Added.
4023         * page/mac/EventHandlerMac.mm:
4024
4025         * page/EventHandler.cpp:
4026         (WebCore::EventHandler::clear):
4027         * page/EventHandler.h:
4028         Enable some gesture-related code on Mac if the new flag is enabled.
4029
4030         * platform/PlatformEvent.h:
4031
4032 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
4033
4034         [iOS] Build fix after r191295
4035
4036         Unreviewed.
4037
4038         * platform/graphics/cg/GraphicsContextCG.cpp:
4039         (WebCore::GraphicsContext::resetPlatformCTM):
4040
4041 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
4042
4043         Host GraphicsContext's CTM inside GraphicsContextState
4044         https://bugs.webkit.org/show_bug.cgi?id=150146
4045
4046         Reviewed by Simon Fraser.
4047
4048         There are 6 operations which interact with CTMs:
4049         - Get
4050         - Set
4051         - Concatenate
4052         - Scale
4053         - Rotate
4054         - Translate
4055
4056         This patch modifies all these operations so that these operations shadow the
4057         platform's CTM inside GraphicsContextState. This way, we don't have to consult
4058         with the underlying graphics context in order to know the current CTM.
4059
4060         There are currently many places in the Core Graphics ports where we will change