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