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