d8c4f83117d8fb6a9d3e722239cc39f3c56b1bad
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-11-18  Aaron Chu  <arona.chu@gmail.com>
2
3         AX: Shadow DOM video player controls menus need aria-owns on the trigger buttons
4         https://bugs.webkit.org/show_bug.cgi?id=127065
5
6         Reviewed by Darin Adler.
7
8         Test: media/accessibility-closed-captions-has-aria-owns.html
9
10         * Modules/mediacontrols/mediaControlsApple.js:
11         (Controller.prototype.createControls):
12         (Controller.prototype.buildCaptionMenu):
13         * Modules/mediacontrols/mediaControlsBase.js:
14         (Controller.prototype.createControls):
15         (Controller.prototype.buildCaptionMenu):
16
17 2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
18
19         Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
20         https://bugs.webkit.org/show_bug.cgi?id=151187
21
22         Reviewed by Darin Adler.
23
24         This is a merge of Blink r174671:
25         https://codereview.chromium.org/291143002
26
27         Fixes imported/blink/editing/execCommand/indent-button-crash.html.
28
29         * editing/ApplyBlockElementCommand.cpp:
30         (WebCore::ApplyBlockElementCommand::doApply):
31
32 2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
33
34         REGRESSION(r192459): [GTK] User agent string is broken after r192459
35         https://bugs.webkit.org/show_bug.cgi?id=151347
36
37         Reviewed by Žan Doberšek.
38
39         Remove the incorrect macro and simply use the given values
40         USER_AGENT_GTK_MAJOR_VERSION and USER_AGENT_GTK_MINOR_VERSION that
41         are now strings.
42
43         * platform/gtk/UserAgentGtk.cpp:
44         (WebCore::versionForUAString):
45         (WebCore::buildUserAgentString):
46
47 2015-11-17  Zalan Bujtas  <zalan@apple.com>
48
49         Simple line layout: Add letter-spacing support.
50         https://bugs.webkit.org/show_bug.cgi?id=151362
51
52         Reviewed by Antti Koivisto.
53
54         This enables us to use simple line layout on letter-spacing content.
55         (fixme: webkit.org/b/151368 -> Repaint rect is not computed correctly when negative letter-spacing applied)
56
57         Test: fast/text/simple-line-letterspacing.html
58
59         * rendering/SimpleLineLayout.cpp:
60         (WebCore::SimpleLineLayout::canUseForStyle):
61         * rendering/SimpleLineLayoutFunctions.cpp:
62         (WebCore::SimpleLineLayout::paintFlow): RenderLineBoxList tests vertical intersection only. 
63         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
64         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
65
66 2015-11-17  Per Arne Vollan  <peavo@outlook.com>
67
68         [WinCairo][MediaFoundation] Current playback time is not shown.
69         https://bugs.webkit.org/show_bug.cgi?id=151357
70
71         Reviewed by Alex Christensen.
72
73         We need to implement the currentTime() method.
74
75         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
76         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
77         (WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
78         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
79         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::paintCurrentFrame):
80         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::currentTime):
81         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
82         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
83
84 2015-11-17  Zalan Bujtas  <zalan@apple.com>
85
86         Split SimpleLineLayout::canUseFor into canUseForStyle and canUseForFontAndText.
87         https://bugs.webkit.org/show_bug.cgi?id=151338
88
89         Reviewed by Myles C. Maxfield.
90
91         No change in functionality.
92
93         * rendering/SimpleLineLayout.cpp:
94         (WebCore::SimpleLineLayout::canUseForFontAndText):
95         (WebCore::SimpleLineLayout::canUseForStyle):
96         (WebCore::SimpleLineLayout::canUseFor):
97
98 2015-11-17  Brady Eidson  <beidson@apple.com>
99
100         Modern IDB: Support IDBObjectStore.indexNames.
101         https://bugs.webkit.org/show_bug.cgi?id=151341
102
103         Reviewed by Alex Christensen.
104
105         No new tests (Covered by existing storage/indexeddb/modern/objectstore-attributes.html).
106
107         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
108         (WebCore::IDBClient::IDBObjectStore::indexNames):
109         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
110         (WebCore::IDBObjectStoreInfo::indexNames):
111         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
112
113 2015-11-17  Sergio Villar Senin  <svillar@igalia.com>
114
115         ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
116         https://bugs.webkit.org/show_bug.cgi?id=151025
117
118         Reviewed by Darin Adler.
119
120         Negative margins could make RenderFlexibleBox compute negative
121         intrinsic sizes. Clamp intrinsic sizes to 0.
122
123         Test: css3/flexbox/negative-margins-assert.html
124
125         * rendering/RenderFlexibleBox.cpp:
126         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
127
128 2015-11-17  Sergio Villar Senin  <svillar@igalia.com>
129
130         [css-grid] Fix alignment with gutters and negative free spaces
131         https://bugs.webkit.org/show_bug.cgi?id=151307
132
133         Reviewed by Zalan Bujtas.
134
135         This is a regression caused by r192154. The problem was that
136         the free space was not properly computed when the grid
137         container was narrower than the track sizes + gutters size for
138         a given axis. The culprit was an unneeded clamp to 0 which was
139         polluting the freeSpace computation as the track sizing
140         algorithm works perfectly OK with negative freeSpace values.
141
142         * rendering/RenderGrid.cpp:
143         (WebCore::RenderGrid::computeTrackSizesForDirection):
144
145 2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
146
147         [GStreamer] Use RunLoop instead of GMainLoop in AudioFileReaderGStreamer
148         https://bugs.webkit.org/show_bug.cgi?id=151256
149
150         Reviewed by Žan Doberšek.
151
152         Use RunLoop instead of the platform specific code. The AudioBus
153         can be created from any thread, so we create a helper thread to
154         ensure we don't use the main RunLoop.
155
156         This patch also includes some code cleanups:
157           - Uses smart pointers when possible.
158           - Fixes uninitialized members in constructors.
159           - Makes private members private.
160           - Uses lambdas instead of static non-members functions.
161           - nullptr instead of 0 in some places.
162
163         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
164         (WebCore::AudioFileReader::createWeakPtr):
165         (WebCore::AudioFileReader::deinterleavePadAddedCallback):
166         (WebCore::AudioFileReader::deinterleaveReadyCallback):
167         (WebCore::AudioFileReader::decodebinPadAddedCallback):
168         (WebCore::AudioFileReader::AudioFileReader):
169         (WebCore::AudioFileReader::~AudioFileReader):
170         (WebCore::AudioFileReader::handleSample):
171         (WebCore::AudioFileReader::handleMessage):
172         (WebCore::AudioFileReader::handleNewDeinterleavePad):
173         (WebCore::AudioFileReader::deinterleavePadsConfigured):
174         (WebCore::AudioFileReader::plugDeinterleave):
175         (WebCore::AudioFileReader::decodeAudioForBusCreation):
176         (WebCore::AudioFileReader::createBus):
177         (WebCore::createBusFromAudioFile):
178         (WebCore::createBusFromInMemoryAudioFile):
179         (WebCore::onAppsinkPullRequiredCallback): Deleted.
180         (WebCore::messageCallback): Deleted.
181         (WebCore::onGStreamerDeinterleavePadAddedCallback): Deleted.
182         (WebCore::onGStreamerDeinterleaveReadyCallback): Deleted.
183         (WebCore::onGStreamerDecodebinPadAddedCallback): Deleted.
184         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
185         (WTF::adoptGRef):
186         (WTF::refGPtr<GstBufferList>):
187         (WTF::derefGPtr<GstBufferList>):
188         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
189
190 2015-11-16  Eric Carlson  <eric.carlson@apple.com>
191
192         [MediaStream] VideoTrack should respond to MediaStreamTrack state changes
193         https://bugs.webkit.org/show_bug.cgi?id=151299
194
195         Reviewed by Jer Noble.
196
197         Test: fast/mediastream/MediaStream-video-element-track-stop.html
198
199         * Modules/mediastream/MediaStreamTrack.cpp:
200         (WebCore::MediaStreamTrack::ended): Check m_ended.
201         (WebCore::MediaStreamTrack::stopProducingData): Set m_ended before telling private track to 
202           stop so we won't fire an 'ended' event.
203         (WebCore::MediaStreamTrack::trackEnded): Set m_ended, add comments from spec.
204         * Modules/mediastream/MediaStreamTrack.h:
205
206         * html/HTMLMediaElement.cpp:
207         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Live streams have infinite duration,
208           not indefinite.
209
210         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
211         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
212         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Return NULL when displayMode
213           is None.
214         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Calculate current 
215           displayMode based on MediaStream state.
216         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Renamed from 
217           setPausedImageVisible, use m_displayMode. Don't start/stop clock, it makes more sense
218           to do that in play and pause.
219         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Start clock. 
220         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Stop clock.
221         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Call updateDisplayMode.
222         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Ditto.
223         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize):
224         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Always try to create
225           both layers if necessary.
226         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::renderingModeChanged): New, update displayMode
227           and call back to the media element.
228         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
229         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): Get rid of some unused locals.
230           React to a change in the enabled video track.
231         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Paint black when
232           the active video track is disabled.
233         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPausedImageVisible): Deleted.
234
235         * platform/mediastream/MediaStreamPrivate.cpp:
236         (WebCore::MediaStreamPrivate::updateActiveState): Split the logic of updating the active video
237           track out into updateActiveVideoTrack.
238         (WebCore::MediaStreamPrivate::hasVideo): Check for track.ended.
239         (WebCore::MediaStreamPrivate::hasAudio): Ditto.
240         (WebCore::MediaStreamPrivate::paintCurrentFrameInContext): Don't call the source directly.
241         (WebCore::MediaStreamPrivate::updateActiveVideoTrack): New.
242         (WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveVideoTrack.
243         (WebCore::MediaStreamPrivate::trackEnded): new.
244         * platform/mediastream/MediaStreamPrivate.h:
245
246         * platform/mediastream/MediaStreamTrackPrivate.cpp:
247         (WebCore::MediaStreamTrackPrivate::setEnabled): Call observers if enabled state changes.
248         (WebCore::MediaStreamTrackPrivate::endTrack): Call observers.
249         (WebCore::MediaStreamTrackPrivate::paintCurrentFrameInContext): New.
250         (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping): Add comments.
251         * platform/mediastream/MediaStreamTrackPrivate.h:
252
253         * platform/mock/MockRealtimeVideoSource.cpp:
254         (WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext): Remove a commented-out line.
255
256 2015-11-16  Pranjal Jumde  <pjumde@apple.com>
257
258         Fixes the buffer-overflow when reading characters from textRun
259         https://bugs.webkit.org/attachment.cgi?bugid=151055
260         <rdar://problem/23251789>
261
262         Reviewed by Brent Fulgham.
263
264         * platform/graphics/FontCascade.cpp
265
266 2015-11-16  Brady Eidson  <beidson@apple.com>
267
268         Modern IDB:Make in-memory ObjectStore cursors work.
269         https://bugs.webkit.org/show_bug.cgi?id=151196
270
271         Reviewed by Darin Adler.
272
273         Tests: storage/indexeddb/modern/cursor-2.html
274                storage/indexeddb/modern/cursor-3.html
275                storage/indexeddb/modern/cursor-4.html
276                storage/indexeddb/modern/cursor-5.html
277                storage/indexeddb/modern/cursor-6.html
278                storage/indexeddb/modern/cursor-7.html
279                storage/indexeddb/modern/cursor-8.html
280                storage/indexeddb/modern/objectstore-cursor-advance-failures.html
281                storage/indexeddb/modern/objectstore-cursor-continue-failures.html
282
283         Object store cursors directly hold on to a std::set<>::iterator to act as the cursor.
284         
285         The object store tells all of its cursors when it is cleared or records are deleted
286         so the cursors can invalidate their iterators as needed.
287         
288         In case of such invalidation, the cursor hangs on to the current key value so it can 
289         pick up where it left off in case it is iterated.
290
291         * CMakeLists.txt:
292         * WebCore.xcodeproj/project.pbxproj:
293
294         * Modules/indexeddb/IDBGetResult.h:
295         (WebCore::IDBGetResult::isolatedCopy):
296         
297         * Modules/indexeddb/IDBKeyRangeData.cpp:
298         (WebCore::IDBKeyRangeData::containsKey):
299         (WebCore::IDBKeyRangeData::loggingString):
300         * Modules/indexeddb/IDBKeyRangeData.h:
301         
302         * Modules/indexeddb/client/IDBAnyImpl.cpp:
303         (WebCore::IDBClient::IDBAny::modernIDBCursor):
304         
305         * Modules/indexeddb/client/IDBCursorImpl.cpp:
306         (WebCore::IDBClient::IDBCursor::update):
307         (WebCore::IDBClient::IDBCursor::advance):
308         (WebCore::IDBClient::IDBCursor::continueFunction):
309         (WebCore::IDBClient::IDBCursor::setGetResult):
310         * Modules/indexeddb/client/IDBCursorImpl.h:
311         
312         * Modules/indexeddb/client/IDBRequestImpl.cpp:
313         (WebCore::IDBClient::IDBRequest::dispatchEvent):
314         (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor):
315         * Modules/indexeddb/client/IDBRequestImpl.h:
316         (WebCore::IDBClient::IDBRequest::pendingCursor):
317         
318         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
319         (WebCore::IDBClient::IDBTransaction::addRequest): Deleted.
320         
321         * Modules/indexeddb/client/TransactionOperation.cpp:
322         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
323         * Modules/indexeddb/client/TransactionOperation.h:
324         (WebCore::IDBClient::TransactionOperation::cursorIdentifier):
325         
326         * Modules/indexeddb/server/IDBBackingStore.h:
327         
328         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
329         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
330         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
331         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
332         
333         * Modules/indexeddb/server/MemoryCursor.cpp: Added.
334         (WebCore::IDBServer::cursorMap):
335         (WebCore::IDBServer::MemoryCursor::MemoryCursor):
336         (WebCore::IDBServer::MemoryCursor::~MemoryCursor):
337         (WebCore::IDBServer::MemoryCursor::cursorForIdentifier):
338         * Modules/indexeddb/server/MemoryCursor.h: Added.
339         
340         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
341         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
342         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
343         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
344         
345         * Modules/indexeddb/server/MemoryObjectStore.cpp:
346         (WebCore::IDBServer::MemoryObjectStore::clear):
347         (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
348         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
349         (WebCore::IDBServer::MemoryObjectStore::addRecord):
350         (WebCore::IDBServer::MemoryObjectStore::updateCursorsForPutRecord):
351         (WebCore::IDBServer::MemoryObjectStore::updateCursorsForDeleteRecord):
352         (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor):
353         * Modules/indexeddb/server/MemoryObjectStore.h:
354         (WebCore::IDBServer::MemoryObjectStore::orderedKeys):
355         
356         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp: Added.
357         (WebCore::IDBServer::MemoryObjectStoreCursor::create):
358         (WebCore::IDBServer::MemoryObjectStoreCursor::MemoryObjectStoreCursor):
359         (WebCore::IDBServer::MemoryObjectStoreCursor::objectStoreCleared):
360         (WebCore::IDBServer::MemoryObjectStoreCursor::keyDeleted):
361         (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded):
362         (WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
363         (WebCore::IDBServer::MemoryObjectStoreCursor::firstForwardIteratorInRemainingRange):
364         (WebCore::IDBServer::MemoryObjectStoreCursor::firstReverseIteratorInRemainingRange):
365         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
366         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
367         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
368         (WebCore::IDBServer::MemoryObjectStoreCursor::hasValidPosition):
369         (WebCore::IDBServer::MemoryObjectStoreCursor::iterate):
370         * Modules/indexeddb/server/MemoryObjectStoreCursor.h: Added.
371
372         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
373         (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
374         (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
375         * Modules/indexeddb/server/UniqueIDBDatabase.h:
376
377         * Modules/indexeddb/shared/IDBCursorInfo.h:
378         (WebCore::IDBCursorInfo::range):
379
380         * Modules/indexeddb/shared/IDBRequestData.cpp:
381         (WebCore::IDBRequestData::IDBRequestData):
382         (WebCore::IDBRequestData::cursorIdentifier):
383         * Modules/indexeddb/shared/IDBRequestData.h:
384
385 2015-11-16  Anders Carlsson  <andersca@apple.com>
386
387         Add identifier strings for a bunch of context menu items
388         https://bugs.webkit.org/show_bug.cgi?id=151272
389
390         Reviewed by Dan Bernstein.
391
392         Have NSMenuItem conform to NSUserInterfaceItemIdentification.
393
394         * platform/spi/mac/NSMenuSPI.h:
395
396 2015-11-16  Jiewen Tan  <jiewen_tan@apple.com>
397
398         Null-pointer dereference in WebCore::firstEditablePositionAfterPositionInRoot
399         https://bugs.webkit.org/show_bug.cgi?id=151288
400         <rdar://problem/23450367>
401
402         Reviewed by Darin Adler.
403
404         Some problematic organization of body element could cause problems to JustifyRight
405         and Indent commnads.
406
407         Tests: editing/execCommand/justify-right-then-indent-with-problematic-body.html
408                editing/execCommand/justify-right-with-problematic-body.html
409
410         * editing/CompositeEditCommand.cpp:
411         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
412         Assertion at l1017 is not held anymore with the testcase:
413         editing/execCommand/justify-right-with-problematic-body.html.
414         Therefore, change it to an if statement.
415         Also, add a guardance before calling insertNewDefaultParagraphElementAt()
416         as insertNodeAt() requires an editable position.
417         (WebCore::CompositeEditCommand::moveParagraphWithClones):
418         Add a guardance before calling insertNodeAt() as it requires an editable position.
419         * editing/htmlediting.cpp:
420         (WebCore::firstEditablePositionAfterPositionInRoot):
421         (WebCore::lastEditablePositionBeforePositionInRoot):
422
423 2015-11-16  Simon Fraser  <simon.fraser@apple.com>
424
425         Sort the Xcode project files.
426
427         * WebCore.xcodeproj/project.pbxproj:
428
429 2015-11-16  Sebastian Dröge  <sebastian@centricular.com>
430
431         WebRTC: Expose RTCPeerConnectionInternals functions to JS builtins.
432         https://bugs.webkit.org/show_bug.cgi?id=151302
433
434         Reviewed by Youenn Fablet.
435
436         * bindings/js/JSDOMWindowBase.cpp:
437         (WebCore::JSDOMWindowBase::finishCreation):
438         Expose RTCPeerConnectionInternals functions to JS builtins.
439
440 2015-11-16  Xabier Rodriguez Calvar  <calvaris@igalia.com>
441
442         [Streams API] Update the implementation up to spec of Nov 11 2015
443         https://bugs.webkit.org/show_bug.cgi?id=151195
444
445         Reviewed by Youenn Fablet.
446
447         Updated the implementation of Readable and Writable Streams to the latest changes in the spec. Main changes are
448         the removal of the error and the state from the reader, readers are not automatically released and then minor or
449         style changes.
450
451         Implementation is up to date with version
452         https://github.com/whatwg/streams/commit/48c8a3c30ea7e76c5e4eb9f157a438dd755bcc8e.
453
454         Tests: streams/reference-implementation/readable-stream-templated.html
455                streams/reference-implementation/readable-stream-reader.html
456
457         * Modules/streams/ReadableStream.js:
458         (getReader): Removed check for locked stream.
459         * Modules/streams/ReadableStreamInternals.js:
460         (privateInitializeReadableStreamReader): Removed setting @error and @state and initialized owner and owner's
461         reader as per spec.
462         (teeReadableStreamPullFunction): Added assertions.
463         (isReadableStreamReader): Added comment about resetting the reader owner to null instead of undefined as a means
464         to distinguish between not having the slot and having it unset.
465         (finishClosingReadableStream): Inline @closeReadableStreamReader as it is used only here now.
466         (readFromReadableStreamReader): Reworked the state and error to use the stream one and changed the conditions to
467         pull again as per spec.
468         (errorReadableStream): Not releasing the reader and removed the reader error and state management.
469         (releaseReadableStreamReader): Deleted.
470         (closeReadableStreamReader): Deleted.
471         * Modules/streams/ReadableStreamReader.js:
472         (cancel): Removed some checks and assertions as per spec.
473         (read): Added check for owner.
474         (releaseLock): No closing the reader and rejecting close promise and unlinking reader and owner instead.
475         * Modules/streams/WritableStream.js:
476         (abort): Style change.
477         * Modules/streams/WritableStreamInternals.js:
478         (writableStreamAdvanceQueue):
479         (closeWritableStream): Used @call instead of @apply.
480
481 2015-11-15  Adam Bergkvist  <adam.bergkvist@ericsson.com>
482
483         WebRTC: Update RTCPeerConnection API and introduce PeerConnectionBackend
484         https://bugs.webkit.org/show_bug.cgi?id=150166
485
486         Reviewed by Eric Carlson and Youenn Fablet
487
488         This change introduces PeerConnectionBackend which is a WebCore interface
489         that allows RTCPeerConnection to have platform abstractions at different
490         levels. For example, the MediaEndpoint interface [1] is a lower level
491         WebRTC backend abstraction where a big part of the WebRTC specification
492         is implemented in WebCore to be reusable. RTCPeerConnectionHandler (in
493         the repo today) is on the other hand a higher level WebRTC backend
494         abstraction where the calls are mostly forwarded directly to the
495         backend. The PeerConnectionBackend interface facilitates both approaches.
496
497         RTCPeerConnection
498          | (has)
499          |
500         PeerConnectionBackend
501          |   |
502          |   | (realizes)
503          |  MediaEndpointPeerConnection
504          |   | (has)
505          |   |
506          |  MediaEndpoint (platform interface)
507          |
508          | (realizes)
509         RTCPeerHandlerPeerConnection
510          | (has)
511          |
512         RCPeerConnectionHandler (existing platform interface)
513
514         Notable changes:
515
516         # Overloaded methods on RTCPeerConnection (Promise + legacy callback
517         signatures) are implemented with JSBuiltins.
518
519         # "Queued operations" ([1] Section 4.3.1) is implemented in JS bindings
520         with Promises.
521
522         # New RTCPeerConnection features
523          - add/removeTrack()
524          - pending/currentLocal/RemoteDescription attributes
525          - RTCRtpSender/Receiver
526
527         # Information carrying objects like RTCSessionDescription and
528         RTCCandidate don't encapsulate a "mirrored" platform object anymore.
529
530         # Remove RTCPeerConnection specific callback implementations (not used
531         with JS bindings)
532
533         [1] http://webkit.org/b/150165
534         [2] https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html
535
536         Tests: Mock should be added to test future WebRTC backend abstractions.
537
538         * CMakeLists.txt:
539         * DerivedSources.make:
540         * Modules/mediastream/PeerConnectionBackend.cpp: Added.
541         (WebCore::createPeerConnectionBackend):
542         * Modules/mediastream/PeerConnectionBackend.h: Added.
543         (WebCore::PeerConnectionBackendClient::~PeerConnectionBackendClient):
544         (WebCore::PeerConnectionBackend::~PeerConnectionBackend):
545         * Modules/mediastream/PeerConnectionStates.h: Added.
546         * Modules/mediastream/RTCConfiguration.cpp: Added.
547         (WebCore::validateIceServerURL):
548         (WebCore::parseIceServer):
549         (WebCore::RTCConfiguration::create):
550         (WebCore::RTCConfiguration::RTCConfiguration):
551         (WebCore::RTCConfiguration::initialize):
552         * Modules/mediastream/RTCConfiguration.h:
553         (WebCore::RTCConfiguration::iceTransportPolicy):
554         (WebCore::RTCConfiguration::bundlePolicy):
555         (WebCore::RTCConfiguration::iceServers):
556         (WebCore::RTCConfiguration::create): Deleted.
557         (WebCore::RTCConfiguration::appendServer): Deleted.
558         (WebCore::RTCConfiguration::numberOfServers): Deleted.
559         (WebCore::RTCConfiguration::server): Deleted.
560         (WebCore::RTCConfiguration::iceTransports): Deleted.
561         (WebCore::RTCConfiguration::setIceTransports): Deleted.
562         (WebCore::RTCConfiguration::requestIdentity): Deleted.
563         (WebCore::RTCConfiguration::setRequestIdentity): Deleted.
564         (WebCore::RTCConfiguration::privateConfiguration): Deleted.
565         (WebCore::RTCConfiguration::RTCConfiguration): Deleted.
566         * Modules/mediastream/RTCConfiguration.idl:
567         * Modules/mediastream/RTCIceCandidate.cpp:
568         (WebCore::RTCIceCandidate::create):
569         (WebCore::RTCIceCandidate::RTCIceCandidate):
570         (WebCore::RTCIceCandidate::~RTCIceCandidate): Deleted.
571         (WebCore::RTCIceCandidate::candidate): Deleted.
572         (WebCore::RTCIceCandidate::sdpMid): Deleted.
573         (WebCore::RTCIceCandidate::sdpMLineIndex): Deleted.
574         (WebCore::RTCIceCandidate::descriptor): Deleted.
575         * Modules/mediastream/RTCIceCandidate.h:
576         (WebCore::RTCIceCandidate::~RTCIceCandidate):
577         (WebCore::RTCIceCandidate::candidate):
578         (WebCore::RTCIceCandidate::setCandidate):
579         (WebCore::RTCIceCandidate::sdpMid):
580         (WebCore::RTCIceCandidate::setSdpMid):
581         (WebCore::RTCIceCandidate::sdpMLineIndex):
582         (WebCore::RTCIceCandidate::setSdpMLineIndex):
583         * Modules/mediastream/RTCIceCandidate.idl:
584         * Modules/mediastream/RTCIceCandidateEvent.cpp:
585         (WebCore::RTCIceCandidateEvent::create):
586         (WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
587         * Modules/mediastream/RTCIceCandidateEvent.h:
588         * Modules/mediastream/RTCIceServer.h:
589         (WebCore::RTCIceServer::urls):
590         (WebCore::RTCIceServer::credential):
591         (WebCore::RTCIceServer::username):
592         (WebCore::RTCIceServer::RTCIceServer):
593         (WebCore::RTCIceServer::create): Deleted.
594         (WebCore::RTCIceServer::privateServer): Deleted.
595         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
596         (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
597         (WebCore::RTCOfferAnswerOptions::initialize):
598         (WebCore::RTCOfferOptions::RTCOfferOptions):
599         (WebCore::RTCOfferOptions::initialize):
600         (WebCore::RTCAnswerOptions::create):
601         (WebCore::RTCAnswerOptions::initialize):
602         (WebCore::RTCOfferAnswerOptions::create): Deleted.
603         * Modules/mediastream/RTCOfferAnswerOptions.h:
604         (WebCore::RTCOfferAnswerOptions::voiceActivityDetection):
605         (WebCore::RTCOfferOptions::offerToReceiveVideo):
606         (WebCore::RTCOfferOptions::offerToReceiveAudio):
607         (WebCore::RTCOfferOptions::iceRestart):
608         (WebCore::RTCAnswerOptions::RTCAnswerOptions):
609         (WebCore::RTCOfferAnswerOptions::requestIdentity): Deleted.
610         (WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions): Deleted.
611         (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions): Deleted.
612         (WebCore::RTCOfferOptions::voiceActivityDetection): Deleted.
613         (WebCore::RTCOfferOptions::privateOfferOptions): Deleted.
614         (WebCore::RTCOfferOptions::~RTCOfferOptions): Deleted.
615         (WebCore::RTCOfferOptions::RTCOfferOptions): Deleted.
616         * Modules/mediastream/RTCPeerConnection.cpp:
617         (WebCore::RTCPeerConnection::create):
618         (WebCore::RTCPeerConnection::RTCPeerConnection):
619         (WebCore::RTCPeerConnection::getSenders):
620         (WebCore::RTCPeerConnection::getReceivers):
621         (WebCore::RTCPeerConnection::addTrack):
622         (WebCore::RTCPeerConnection::removeTrack):
623         (WebCore::RTCPeerConnection::queuedCreateOffer):
624         (WebCore::RTCPeerConnection::queuedCreateAnswer):
625         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
626         (WebCore::RTCPeerConnection::localDescription):
627         (WebCore::RTCPeerConnection::currentLocalDescription):
628         (WebCore::RTCPeerConnection::pendingLocalDescription):
629         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
630         (WebCore::RTCPeerConnection::remoteDescription):
631         (WebCore::RTCPeerConnection::currentRemoteDescription):
632         (WebCore::RTCPeerConnection::pendingRemoteDescription):
633         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
634         (WebCore::RTCPeerConnection::signalingState):
635         (WebCore::RTCPeerConnection::iceGatheringState):
636         (WebCore::RTCPeerConnection::iceConnectionState):
637         (WebCore::RTCPeerConnection::setConfiguration):
638         (WebCore::RTCPeerConnection::privateGetStats):
639         (WebCore::RTCPeerConnection::createDataChannel):
640         (WebCore::RTCPeerConnection::close):
641         (WebCore::RTCPeerConnection::stop):
642         (WebCore::RTCPeerConnection::setSignalingState):
643         (WebCore::RTCPeerConnection::updateIceGatheringState):
644         (WebCore::RTCPeerConnection::updateIceConnectionState):
645         (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
646         (WebCore::RTCPeerConnection::fireEvent):
647         (WebCore::validateIceServerURL): Deleted.
648         (WebCore::processIceServer): Deleted.
649         (WebCore::RTCPeerConnection::parseConfiguration): Deleted.
650         (WebCore::RTCPeerConnection::~RTCPeerConnection): Deleted.
651         (WebCore::RTCPeerConnection::createOffer): Deleted.
652         (WebCore::RTCPeerConnection::createAnswer): Deleted.
653         (WebCore::RTCPeerConnection::checkStateForLocalDescription): Deleted.
654         (WebCore::RTCPeerConnection::checkStateForRemoteDescription): Deleted.
655         (WebCore::RTCPeerConnection::setLocalDescription): Deleted.
656         (WebCore::RTCPeerConnection::setRemoteDescription): Deleted.
657         (WebCore::RTCPeerConnection::updateIce): Deleted.
658         (WebCore::RTCPeerConnection::addIceCandidate): Deleted.
659         (WebCore::RTCPeerConnection::addStream): Deleted.
660         (WebCore::RTCPeerConnection::removeStream): Deleted.
661         (WebCore::RTCPeerConnection::getLocalStreams): Deleted.
662         (WebCore::RTCPeerConnection::getRemoteStreams): Deleted.
663         (WebCore::RTCPeerConnection::getStreamById): Deleted.
664         (WebCore::RTCPeerConnection::getStats): Deleted.
665         (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId): Deleted.
666         (WebCore::RTCPeerConnection::createDTMFSender): Deleted.
667         (WebCore::RTCPeerConnection::negotiationNeeded): Deleted.
668         (WebCore::RTCPeerConnection::didGenerateIceCandidate): Deleted.
669         (WebCore::RTCPeerConnection::didChangeSignalingState): Deleted.
670         (WebCore::RTCPeerConnection::didChangeIceGatheringState): Deleted.
671         (WebCore::RTCPeerConnection::didChangeIceConnectionState): Deleted.
672         (WebCore::RTCPeerConnection::didAddRemoteStream): Deleted.
673         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
674         (WebCore::RTCPeerConnection::didAddRemoteDataChannel): Deleted.
675         (WebCore::RTCPeerConnection::didAddOrRemoveTrack): Deleted.
676         (WebCore::RTCPeerConnection::changeSignalingState): Deleted.
677         (WebCore::RTCPeerConnection::changeIceGatheringState): Deleted.
678         (WebCore::RTCPeerConnection::changeIceConnectionState): Deleted.
679         (WebCore::RTCPeerConnection::scheduleDispatchEvent): Deleted.
680         (WebCore::RTCPeerConnection::scheduledEventTimerFired): Deleted.
681         * Modules/mediastream/RTCPeerConnection.h:
682         * Modules/mediastream/RTCPeerConnection.idl:
683         * Modules/mediastream/RTCPeerConnection.js: Added.
684         (createOffer):
685         (createAnswer):
686         (setLocalDescription):
687         (setRemoteDescription):
688         (addIceCandidate):
689         (getStats):
690         * Modules/mediastream/RTCPeerConnectionErrorCallback.h:
691         (WebCore::RTCPeerConnectionErrorCallback::~RTCPeerConnectionErrorCallback): Deleted.
692         * Modules/mediastream/RTCPeerConnectionInternals.js: Added.
693         (runNext):
694         (enqueueOperation):
695         (setLocalOrRemoteDescription):
696         (extractCallbackArg):
697         * Modules/mediastream/RTCRtpReceiver.cpp: Added.
698         (WebCore::RTCRtpReceiver::RTCRtpReceiver):
699         * Modules/mediastream/RTCRtpReceiver.h: Added.
700         (WebCore::RTCRtpReceiver::create):
701         * Modules/mediastream/RTCRtpReceiver.idl: Added.
702         * Modules/mediastream/RTCRtpSender.cpp: Added.
703         (WebCore::RTCRtpSender::RTCRtpSender):
704         * Modules/mediastream/RTCRtpSender.h: Added.
705         (WebCore::RTCRtpSender::create):
706         (WebCore::RTCRtpSender::mediaStreamId):
707         * Modules/mediastream/RTCRtpSender.idl: Added.
708         * Modules/mediastream/RTCRtpSenderReceiverBase.h: Added.
709         (WebCore::RTCRtpSenderReceiverBase::~RTCRtpSenderReceiverBase):
710         (WebCore::RTCRtpSenderReceiverBase::track):
711         (WebCore::RTCRtpSenderReceiverBase::RTCRtpSenderReceiverBase):
712         * Modules/mediastream/RTCSessionDescription.cpp:
713         (WebCore::RTCSessionDescription::create):
714         (WebCore::RTCSessionDescription::RTCSessionDescription):
715         (WebCore::RTCSessionDescription::setType):
716         (WebCore::RTCSessionDescription::~RTCSessionDescription): Deleted.
717         (WebCore::RTCSessionDescription::type): Deleted.
718         (WebCore::RTCSessionDescription::sdp): Deleted.
719         (WebCore::RTCSessionDescription::setSdp): Deleted.
720         (WebCore::RTCSessionDescription::descriptor): Deleted.
721         * Modules/mediastream/RTCSessionDescription.h:
722         (WebCore::RTCSessionDescription::~RTCSessionDescription):
723         (WebCore::RTCSessionDescription::type):
724         (WebCore::RTCSessionDescription::sdp):
725         (WebCore::RTCSessionDescription::setSdp):
726         * Modules/mediastream/RTCSessionDescriptionCallback.h:
727         (WebCore::RTCSessionDescriptionCallback::~RTCSessionDescriptionCallback): Deleted.
728         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: Removed.
729         (WebCore::RTCSessionDescriptionRequestImpl::create): Deleted.
730         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl): Deleted.
731         (WebCore::RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl): Deleted.
732         (WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded): Deleted.
733         (WebCore::RTCSessionDescriptionRequestImpl::requestFailed): Deleted.
734         (WebCore::RTCSessionDescriptionRequestImpl::stop): Deleted.
735         (WebCore::RTCSessionDescriptionRequestImpl::activeDOMObjectName): Deleted.
736         (WebCore::RTCSessionDescriptionRequestImpl::canSuspendForPageCache): Deleted.
737         (WebCore::RTCSessionDescriptionRequestImpl::clear): Deleted.
738         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h: Removed.
739         * Modules/mediastream/RTCStatsCallback.h: Removed.
740         (WebCore::RTCStatsCallback::~RTCStatsCallback): Deleted.
741         * Modules/mediastream/RTCStatsCallback.idl: Removed.
742         * Modules/mediastream/RTCStatsRequestImpl.cpp: Removed.
743         (WebCore::RTCStatsRequestImpl::create): Deleted.
744         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Deleted.
745         (WebCore::RTCStatsRequestImpl::~RTCStatsRequestImpl): Deleted.
746         (WebCore::RTCStatsRequestImpl::createResponse): Deleted.
747         (WebCore::RTCStatsRequestImpl::hasSelector): Deleted.
748         (WebCore::RTCStatsRequestImpl::track): Deleted.
749         (WebCore::RTCStatsRequestImpl::requestSucceeded): Deleted.
750         (WebCore::RTCStatsRequestImpl::requestFailed): Deleted.
751         (WebCore::RTCStatsRequestImpl::stop): Deleted.
752         (WebCore::RTCStatsRequestImpl::activeDOMObjectName): Deleted.
753         (WebCore::RTCStatsRequestImpl::canSuspendForPageCache): Deleted.
754         (WebCore::RTCStatsRequestImpl::clear): Deleted.
755         * Modules/mediastream/RTCStatsRequestImpl.h: Removed.
756         * Modules/mediastream/RTCTrackEvent.cpp: Added.
757         (WebCore::RTCTrackEventInit::RTCTrackEventInit):
758         (WebCore::RTCTrackEvent::create):
759         (WebCore::RTCTrackEvent::RTCTrackEvent):
760         * Modules/mediastream/RTCTrackEvent.h: Added.
761         (WebCore::RTCTrackEvent::receiver):
762         (WebCore::RTCTrackEvent::track):
763         (WebCore::RTCTrackEvent::eventInterface):
764         * Modules/mediastream/RTCTrackEvent.idl: Added.
765         * Modules/mediastream/RTCVoidRequestImpl.cpp: Removed.
766         (WebCore::RTCVoidRequestImpl::create): Deleted.
767         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl): Deleted.
768         (WebCore::RTCVoidRequestImpl::~RTCVoidRequestImpl): Deleted.
769         (WebCore::RTCVoidRequestImpl::requestSucceeded): Deleted.
770         (WebCore::RTCVoidRequestImpl::requestFailed): Deleted.
771         (WebCore::RTCVoidRequestImpl::stop): Deleted.
772         (WebCore::RTCVoidRequestImpl::activeDOMObjectName): Deleted.
773         (WebCore::RTCVoidRequestImpl::canSuspendForPageCache): Deleted.
774         (WebCore::RTCVoidRequestImpl::clear): Deleted.
775         * WebCore.xcodeproj/project.pbxproj:
776         * bindings/js/JSDictionary.cpp:
777         (WebCore::JSDictionary::convertValue):
778         * bindings/js/JSDictionary.h:
779         * bindings/js/WebCoreBuiltinNames.h:
780         * bindings/js/WebCoreJSBuiltinInternals.h:
781         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
782         (WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals):
783         (WebCore::JSBuiltinInternalFunctions::visit):
784         (WebCore::JSBuiltinInternalFunctions::init):
785         * bindings/js/WebCoreJSBuiltins.cpp:
786         * bindings/js/WebCoreJSBuiltins.h:
787         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
788         (WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins):
789         (WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins):
790         * dom/EventNames.in:
791
792 2015-11-15  David Kilzer  <ddkilzer@apple.com>
793
794         REGRESSION (r192404): Fix tvOS and watchOS builds
795
796         * platform/spi/cocoa/QuartzCoreSPI.h: Add more version checks to
797         fix all the builds.
798
799 2015-11-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
800
801         [EFL][GTK] Remove use of String::format() in versionForUAString()
802         https://bugs.webkit.org/show_bug.cgi?id=151250
803
804         Reviewed by Darin Adler.
805
806         As String::format() will be deprecated due to the security problem, reimplement
807         versionForUAString() using a macro.
808
809         * platform/efl/UserAgentEfl.cpp:
810         (WebCore::versionForUAString):
811         * platform/gtk/UserAgentGtk.cpp:
812         (WebCore::platformVersionForUAString):
813         (WebCore::versionForUAString):
814
815 2015-11-14  Antti Koivisto  <antti@apple.com>
816
817         Regression(r188820): Downloads of data URLs is broken
818         https://bugs.webkit.org/show_bug.cgi?id=150900
819         rdar://problem/23399223
820
821         Reviewed by Darin Adler.
822
823         No test, the current test infrastructure only allows testing policy decisions, not the actual download.
824
825         * loader/DocumentLoader.cpp:
826         (WebCore::DocumentLoader::continueAfterContentPolicy):
827
828         Use normal download path for data URLs instead of trying to convert the main resource load.
829         Since we decode data URLs locally there is no associated resource load on WebKit side.
830
831 2015-11-14  Nan Wang  <n_wang@apple.com>
832
833         AX: add a new trait for elements in fieldset on iOS
834         https://bugs.webkit.org/show_bug.cgi?id=151281
835
836         Reviewed by Chris Fleizach.
837
838         Added a new trait for elements in the fieldset, so VoiceOver can speak the legend
839         information for those elements.
840
841         Test: accessibility/ios-simulator/fieldset-traits.html
842
843         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
844         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
845         (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
846         (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
847         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
848
849 2015-11-13  Commit Queue  <commit-queue@webkit.org>
850
851         Unreviewed, rolling out r192445, r192451, and r192452.
852         https://bugs.webkit.org/show_bug.cgi?id=151291
853
854         Broke Mavericks build (and thus EWS) (Requested by ap on
855         #webkit).
856
857         Reverted changesets:
858
859         "Add identifier strings for a bunch of context menu items"
860         https://bugs.webkit.org/show_bug.cgi?id=151272
861         http://trac.webkit.org/changeset/192445
862
863         "Try to fix the 32-bit build"
864         http://trac.webkit.org/changeset/192451
865
866         "Try to fix the 32-bit build"
867         http://trac.webkit.org/changeset/192452
868
869 2015-11-13  Anders Carlsson  <andersca@apple.com>
870
871         Add identifier strings for a bunch of context menu items
872         https://bugs.webkit.org/show_bug.cgi?id=151272
873
874         Reviewed by Dan Bernstein.
875
876         Have NSMenuItem conform to NSUserInterfaceItemIdentification.
877
878         * platform/spi/mac/NSMenuSPI.h:
879
880 2015-11-13  Zalan Bujtas  <zalan@apple.com>
881
882         Always render at least a device pixel line when border/outline width > 0.
883         https://bugs.webkit.org/show_bug.cgi?id=151269
884
885         This matches Firefox behaviour.
886
887         Reviewed by Simon Fraser.
888
889         Existing test is modified to reflect the new behaviour.
890
891         * css/StyleBuilderConverter.h:
892         (WebCore::StyleBuilderConverter::convertLineWidth):
893         * rendering/BorderEdge.cpp:
894         (WebCore::BorderEdge::BorderEdge): Deleted.
895         * rendering/BorderEdge.h:
896
897 2015-11-13  Per Arne Vollan  <peavo@outlook.com>
898
899         [WinCairo][MediaFoundation] Video rendered at wrong position.
900         https://bugs.webkit.org/show_bug.cgi?id=151271
901
902         Reviewed by Alex Christensen.
903
904         The source rectangle used when blitting a frame to the graphics context
905         should have offset (0, 0).
906
907         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
908         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
909
910 2015-11-13  Joseph Pecoraro  <pecoraro@apple.com>
911
912         Web Inspector: Provide a way to override the WKWebView remote inspector name
913         https://bugs.webkit.org/show_bug.cgi?id=151075
914
915         Reviewed by Tim Horton.
916
917         * page/Page.cpp:
918         (WebCore::Page::remoteInspectionNameOverride):
919         (WebCore::Page::setRemoteInspectionNameOverride):
920         * page/Page.h:
921         * page/PageDebuggable.cpp:
922         (WebCore::PageDebuggable::name):
923         (WebCore::PageDebuggable::setNameOverride):
924         * page/PageDebuggable.h:
925
926 2015-11-13  Jiewen Tan  <jiewen_tan@apple.com>
927
928         Element::focus() should acquire the ownership of Frame.
929         https://bugs.webkit.org/show_bug.cgi?id=150204
930         <rdar://problem/23136794>
931
932         Reviewed by Brent Fulgham.
933
934         The FrameSelection::setSelection method sometimes releases the last reference to a frame.
935         When this happens, the Element::updateFocusAppearance would attempt to use dereferenced memory.
936         Instead, we should ensure that the Frame lifetime is guaranteed to extend through the duration
937         of the method call.
938
939         Test: editing/selection/focus-iframe-removal-crash.html
940
941         * dom/Element.cpp:
942         (WebCore::Element::updateFocusAppearance):
943
944 2015-11-13  Sergio Villar Senin  <svillar@igalia.com>
945
946         [css-grid] Remove unused GridResolvedPosition constructor
947         https://bugs.webkit.org/show_bug.cgi?id=151133
948
949         Reviewed by Mario Sanchez Prada.
950
951         No new tests required, just deleting dead code.
952
953         * rendering/style/GridResolvedPosition.cpp:
954         (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
955         * rendering/style/GridResolvedPosition.h:
956
957 2015-11-13  Sergio Villar Senin  <svillar@igalia.com>
958
959         ASSERTION FAILED: m_isEngaged in WTF::Optional::value
960         https://bugs.webkit.org/show_bug.cgi?id=151094
961
962         Reviewed by Darin Adler.
963
964         That ASSERT was hit because the precondition was incorrectly
965         met, i.e., we're considering that the main axis length was
966         definite when it was actually not. The problem is that to
967         determine whether it was indefinite or not we're using
968         RenderBox::hasDefiniteLogicalHeight() which did not perfectly
969         match RenderBox::computePercentageLogicalHeight() for the case
970         of RenderTables. So computePercentageLogicalHeight() was
971         returning Nullopt (i.e. indefinite) while
972         hasDefiniteLogicalHeight() was returning true (so definite).
973
974         Some checks were refactored in a helper function to solve the
975         inconsistency so that both functions behave the same way even
976         in this particular situation.
977
978         Test: css3/flexbox/inline-flex-percentage-height-in-table-crash.html
979
980         * rendering/RenderBox.cpp:
981         (WebCore::tableCellShouldHaveZeroInitialSize):
982         (WebCore::RenderBox::computePercentageLogicalHeight):
983         (WebCore::percentageLogicalHeightIsResolvable):
984         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
985         * rendering/RenderBox.h:
986
987 2015-11-13  Csaba Osztrogonác  <ossy@webkit.org>
988
989         Unreviewed, really fix the Mac CMake build after r192376.
990
991         * PlatformMac.cmake:
992
993 2015-11-13  Csaba Osztrogonác  <ossy@webkit.org>
994
995         Unreviewed, fix the Mac CMake build after r192376.
996
997         * PlatformMac.cmake:
998
999 2015-11-12  Tim Horton  <timothy_horton@apple.com>
1000
1001         Follow up to the previous change
1002
1003         * platform/spi/cocoa/QuartzCoreSPI.h:
1004         Somehow this escaped.
1005
1006 2015-11-12  Tim Horton  <timothy_horton@apple.com>
1007
1008         Try to fix the Watch/TV build
1009
1010         * platform/spi/cocoa/QuartzCoreSPI.h:
1011         Be more accurate about where we need these.
1012
1013 2015-11-12  Brady Eidson  <beidson@apple.com>
1014
1015         Modern IDB: Pipe through cursor functions from client to server.
1016         https://bugs.webkit.org/show_bug.cgi?id=151197
1017
1018         Reviewed by Alex Christensen.
1019
1020         Tests: storage/indexeddb/modern/cursor-1.html
1021                storage/indexeddb/modern/opencursor-failures.html
1022
1023         This patch implements most IDBCursor considerations at the IDL level, as well as pipes the
1024         appropriate messages through from client to server.
1025         
1026         All operations currently end in errors. Bug 151196 will fix that by making cursors functional.
1027         
1028         * CMakeLists.txt:
1029         * WebCore.xcodeproj/project.pbxproj:
1030
1031         * Modules/indexeddb/IDBCursor.h:
1032         (WebCore::IDBCursor::isKeyCursor): Deleted.
1033         * Modules/indexeddb/IDBCursorWithValue.h:
1034
1035         * Modules/indexeddb/IDBGetResult.h:
1036
1037         * Modules/indexeddb/IDBKeyData.h:
1038         (WebCore::IDBKeyData::string):
1039         (WebCore::IDBKeyData::date):
1040         (WebCore::IDBKeyData::number):
1041         (WebCore::IDBKeyData::array):
1042
1043         * Modules/indexeddb/IndexedDB.h:
1044
1045         * Modules/indexeddb/client/IDBAnyImpl.cpp:
1046         (WebCore::IDBClient::IDBAny::IDBAny):
1047         (WebCore::IDBClient::IDBAny::idbCursor):
1048         (WebCore::IDBClient::IDBAny::idbCursorWithValue):
1049         (WebCore::IDBClient::IDBAny::idbIndex):
1050         (WebCore::IDBClient::IDBAny::idbObjectStore):
1051         (WebCore::IDBClient::IDBAny::modernIDBCursor):
1052         * Modules/indexeddb/client/IDBAnyImpl.h:
1053         (WebCore::IDBClient::IDBAny::create):
1054
1055         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1056         (WebCore::IDBClient::IDBConnectionToServer::openCursor):
1057         (WebCore::IDBClient::IDBConnectionToServer::didOpenCursor):
1058         (WebCore::IDBClient::IDBConnectionToServer::iterateCursor):
1059         (WebCore::IDBClient::IDBConnectionToServer::didIterateCursor):
1060         * Modules/indexeddb/client/IDBConnectionToServer.h:
1061         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1062
1063         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1064         (WebCore::IDBClient::IDBCursor::create):
1065         (WebCore::IDBClient::IDBCursor::IDBCursor):
1066         (WebCore::IDBClient::IDBCursor::sourcesDeleted):
1067         (WebCore::IDBClient::IDBCursor::effectiveObjectStore):
1068         (WebCore::IDBClient::IDBCursor::transaction):
1069         (WebCore::IDBClient::IDBCursor::direction):
1070         (WebCore::IDBClient::IDBCursor::key):
1071         (WebCore::IDBClient::IDBCursor::primaryKey):
1072         (WebCore::IDBClient::IDBCursor::value):
1073         (WebCore::IDBClient::IDBCursor::source):
1074         (WebCore::IDBClient::IDBCursor::update):
1075         (WebCore::IDBClient::IDBCursor::advance):
1076         (WebCore::IDBClient::IDBCursor::continueFunction):
1077         (WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor):
1078         (WebCore::IDBClient::IDBCursor::deleteFunction):
1079         (WebCore::IDBClient::IDBCursor::setGetResult):
1080         * Modules/indexeddb/client/IDBCursorImpl.h:
1081         (WebCore::IDBClient::IDBCursor::info):
1082         (WebCore::IDBClient::IDBCursor::setRequest):
1083         (WebCore::IDBClient::IDBCursor::clearRequest):
1084         (WebCore::IDBClient::IDBCursor::request):
1085
1086         * Modules/indexeddb/client/IDBCursorWithValueImpl.cpp:
1087         (WebCore::IDBClient::IDBCursorWithValue::create):
1088         (WebCore::IDBClient::IDBCursorWithValue::IDBCursorWithValue):
1089         (WebCore::IDBClient::IDBCursorWithValue::~IDBCursorWithValue):
1090         * Modules/indexeddb/client/IDBCursorWithValueImpl.h:
1091
1092         * Modules/indexeddb/client/IDBIndexImpl.cpp:
1093         (WebCore::IDBClient::IDBIndex::openCursor):
1094         (WebCore::IDBClient::IDBIndex::openKeyCursor):
1095         * Modules/indexeddb/client/IDBIndexImpl.h:
1096         (WebCore::IDBClient::IDBIndex::modernObjectStore):
1097         (WebCore::IDBClient::IDBIndex::isDeleted):
1098
1099         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1100         (WebCore::IDBClient::IDBObjectStore::openCursor):
1101         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
1102         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1103
1104         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1105         (WebCore::IDBClient::IDBRequest::create):
1106         (WebCore::IDBClient::IDBRequest::IDBRequest):
1107         (WebCore::IDBClient::IDBRequest::~IDBRequest):
1108         (WebCore::IDBClient::IDBRequest::source):
1109         (WebCore::IDBClient::IDBRequest::resultCursor):
1110         (WebCore::IDBClient::IDBRequest::willIterateCursor):
1111         (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor):
1112         (WebCore::IDBClient::IDBRequest::requestCompleted):
1113         * Modules/indexeddb/client/IDBRequestImpl.h:
1114         (WebCore::IDBClient::IDBRequest::modernResult):
1115
1116         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1117         (WebCore::IDBClient::IDBTransaction::requestOpenCursor):
1118         (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
1119         (WebCore::IDBClient::IDBTransaction::openCursorOnServer):
1120         (WebCore::IDBClient::IDBTransaction::didOpenCursorOnServer):
1121         (WebCore::IDBClient::IDBTransaction::iterateCursor):
1122         (WebCore::IDBClient::IDBTransaction::iterateCursorOnServer):
1123         (WebCore::IDBClient::IDBTransaction::didIterateCursorOnServer):
1124         * Modules/indexeddb/client/IDBTransactionImpl.h:
1125
1126         * Modules/indexeddb/client/TransactionOperation.h:
1127         (WebCore::IDBClient::createTransactionOperation):
1128
1129         * Modules/indexeddb/legacy/LegacyCursor.cpp:
1130         (WebCore::LegacyCursor::source):
1131         * Modules/indexeddb/legacy/LegacyCursor.h:
1132         (WebCore::LegacyCursor::continueFunction): Deleted.
1133         (WebCore::LegacyCursor::isKeyCursor): Deleted.
1134         * Modules/indexeddb/legacy/LegacyCursorWithValue.h:
1135
1136         * Modules/indexeddb/server/IDBBackingStore.h:
1137
1138         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1139         (WebCore::IDBServer::IDBConnectionToClient::didOpenCursor):
1140         (WebCore::IDBServer::IDBConnectionToClient::didIterateCursor):
1141         * Modules/indexeddb/server/IDBConnectionToClient.h:
1142         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1143
1144         * Modules/indexeddb/server/IDBServer.cpp:
1145         (WebCore::IDBServer::IDBServer::openCursor):
1146         (WebCore::IDBServer::IDBServer::iterateCursor):
1147         * Modules/indexeddb/server/IDBServer.h:
1148
1149         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1150         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
1151         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
1152         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1153
1154         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1155         (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
1156         (WebCore::IDBServer::UniqueIDBDatabase::performOpenCursor):
1157         (WebCore::IDBServer::UniqueIDBDatabase::didPerformOpenCursor):
1158         (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
1159         (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
1160         (WebCore::IDBServer::UniqueIDBDatabase::didPerformIterateCursor):
1161         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1162
1163         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1164         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
1165         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
1166         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
1167         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1168
1169         * Modules/indexeddb/shared/IDBCursorInfo.cpp: Added.
1170         (WebCore::IDBCursorInfo::objectStoreCursor):
1171         (WebCore::IDBCursorInfo::indexCursor):
1172         (WebCore::IDBCursorInfo::IDBCursorInfo):
1173         (WebCore::IDBCursorInfo::isDirectionForward):
1174         (WebCore::IDBCursorInfo::isolatedCopy):
1175         * Modules/indexeddb/shared/IDBCursorInfo.h: Added.
1176         (WebCore::IDBCursorInfo::identifier):
1177         (WebCore::IDBCursorInfo::sourceIdentifier):
1178         (WebCore::IDBCursorInfo::cursorSource):
1179         (WebCore::IDBCursorInfo::cursorDirection):
1180         (WebCore::IDBCursorInfo::cursorType):
1181
1182         * Modules/indexeddb/shared/IDBResultData.cpp:
1183         (WebCore::IDBResultData::openCursorSuccess):
1184         (WebCore::IDBResultData::iterateCursorSuccess):
1185         * Modules/indexeddb/shared/IDBResultData.h:
1186
1187         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1188         (WebCore::InProcessIDBServer::didOpenCursor):
1189         (WebCore::InProcessIDBServer::didIterateCursor):
1190         (WebCore::InProcessIDBServer::openCursor):
1191         (WebCore::InProcessIDBServer::iterateCursor):
1192         * Modules/indexeddb/shared/InProcessIDBServer.h:
1193
1194         * bindings/js/IDBBindingUtilities.cpp:
1195         (WebCore::idbKeyDataToJSValue):
1196         * bindings/js/IDBBindingUtilities.h:
1197
1198         * platform/CrossThreadCopier.cpp:
1199         (WebCore::IDBCursorInfo>::copy):
1200         * platform/CrossThreadCopier.h:
1201
1202 2015-11-12  Anders Carlsson  <andersca@apple.com>
1203
1204         Delete PlatformMenuDescription.h
1205         https://bugs.webkit.org/show_bug.cgi?id=151229
1206
1207         Reviewed by Beth Dakin.
1208
1209         * WebCore.vcxproj/WebCore.vcxproj:
1210         * WebCore.vcxproj/WebCore.vcxproj.filters:
1211         * WebCore.xcodeproj/project.pbxproj:
1212         * page/ContextMenuClient.h:
1213         * platform/ContextMenu.h:
1214         * platform/ContextMenuItem.h:
1215         * platform/PlatformMenuDescription.h: Removed.
1216
1217 2015-11-12  Anders Carlsson  <andersca@apple.com>
1218
1219         ContextMenuAction and WebMenuItemTag shouldn't have to be in sync
1220         https://bugs.webkit.org/show_bug.cgi?id=151226
1221
1222         Reviewed by Tim Horton.
1223
1224         * page/ContextMenuController.cpp:
1225         * platform/ContextMenuItem.h:
1226         Remove now unneeded comments. Also, remove ContextMenuItemTagOpenLinkInThisWindow since it wasn't used by any of our remaining ports.
1227
1228 2015-11-12  Zalan Bujtas  <zalan@apple.com>
1229
1230         Ignore visited background color when deciding if the input renderer needs to be painted natively.
1231         https://bugs.webkit.org/show_bug.cgi?id=151211
1232         rdar://problem/21449823
1233
1234         Reviewed by Antti Koivisto.
1235
1236         Test: fast/css/pseudo-visited-background-color-on-input.html
1237
1238         * rendering/RenderTheme.cpp:
1239         (WebCore::RenderTheme::isControlStyled):
1240         * rendering/style/RenderStyle.h:
1241
1242 2015-11-12  David Hyatt  <hyatt@apple.com>
1243
1244         Tatechuyoko shrink-to-fit breaks after changing color, background-color or text-decoration
1245         https://bugs.webkit.org/show_bug.cgi?id=151218
1246         <rdar://problem/23521702>
1247
1248         Reviewed by Myles Maxfield.
1249
1250         Added fast/text/text-combine-shrink-on-color-change.html
1251
1252         * rendering/RenderCombineText.cpp:
1253         (WebCore::RenderCombineText::styleDidChange):
1254
1255 2015-11-12  Anders Carlsson  <andersca@apple.com>
1256
1257         Use ContextMenuItemTagNoAction instead of ContextMenuItemCustomTagNoAction
1258         https://bugs.webkit.org/show_bug.cgi?id=151222
1259
1260         Reviewed by Joseph Pecoraro.
1261
1262         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1263         (WebCore::populateContextMenuItems):
1264         * page/ContextMenuController.cpp:
1265         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Deleted.
1266         * platform/ContextMenuItem.h:
1267
1268 2015-11-12  Myles C. Maxfield  <mmaxfield@apple.com>
1269
1270         [Cocoa] Font fallback is not language-sensitive
1271         https://bugs.webkit.org/show_bug.cgi?id=147390
1272
1273         Reviewed by Dean Jackson.
1274
1275         Test: fast/text/fallback-language-han-2.html
1276
1277         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1278         (WebCore::FontCache::systemFallbackForCharacters):
1279
1280 2015-11-12  Anders Carlsson  <andersca@apple.com>
1281
1282         ContextMenuController::contextMenuItemSelected only needs the action and title, not the full item
1283         https://bugs.webkit.org/show_bug.cgi?id=151217
1284
1285         Reviewed by Joseph Pecoraro.
1286
1287         * inspector/InspectorFrontendHost.cpp:
1288         * page/ContextMenuController.cpp:
1289         (WebCore::ContextMenuController::contextMenuItemSelected):
1290         * page/ContextMenuController.h:
1291         * page/ContextMenuProvider.h:
1292
1293 2015-11-12  Anders Carlsson  <andersca@apple.com>
1294
1295         Remove an unused function
1296         https://bugs.webkit.org/show_bug.cgi?id=151215
1297
1298         Reviewed by Joseph Pecoraro.
1299
1300         * loader/EmptyClients.h:
1301         * page/ContextMenuClient.h:
1302         * page/ContextMenuController.cpp:
1303         (WebCore::ContextMenuController::contextMenuItemSelected): Deleted.
1304
1305 2015-11-11  Anders Carlsson  <andersca@apple.com>
1306
1307         Enable cross-platform context menus by default
1308         https://bugs.webkit.org/show_bug.cgi?id=151173
1309
1310         Reviewed by Tim Horton.
1311
1312         * WebCore.xcodeproj/project.pbxproj:
1313         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1314         (WebCore::JSInspectorFrontendHost::showContextMenu):
1315         * page/ContextMenuController.cpp:
1316         (WebCore::ContextMenuController::addInspectElementItem): Deleted.
1317         * platform/ContextMenu.cpp:
1318         * platform/ContextMenu.h:
1319         * platform/ContextMenuItem.cpp:
1320         * platform/ContextMenuItem.h:
1321         (WebCore::ContextMenuItem::isNull): Deleted.
1322         * platform/mac/ContextMenuItemMac.mm: Removed.
1323         (WebCore::menuToArray): Deleted.
1324         (WebCore::ContextMenuItem::ContextMenuItem): Deleted.
1325         (WebCore::createPlatformMenuItemDescription): Deleted.
1326         (WebCore::ContextMenuItem::~ContextMenuItem): Deleted.
1327         (WebCore::ContextMenuItem::platformDescription): Deleted.
1328         (WebCore::ContextMenuItem::type): Deleted.
1329         (WebCore::ContextMenuItem::action): Deleted.
1330         (WebCore::ContextMenuItem::title): Deleted.
1331         (WebCore::ContextMenuItem::platformSubMenu): Deleted.
1332         (WebCore::ContextMenuItem::setType): Deleted.
1333         (WebCore::ContextMenuItem::setAction): Deleted.
1334         (WebCore::ContextMenuItem::setTitle): Deleted.
1335         (WebCore::ContextMenuItem::setSubMenu): Deleted.
1336         (WebCore::ContextMenuItem::setChecked): Deleted.
1337         (WebCore::ContextMenuItem::setEnabled): Deleted.
1338         (WebCore::ContextMenuItem::enabled): Deleted.
1339         (WebCore::ContextMenuItem::checked): Deleted.
1340         * platform/mac/ContextMenuMac.mm: Removed.
1341         (WebCore::ContextMenu::ContextMenu): Deleted.
1342         (WebCore::ContextMenu::~ContextMenu): Deleted.
1343         (WebCore::ContextMenu::appendItem): Deleted.
1344         (WebCore::ContextMenu::insertItem): Deleted.
1345         (WebCore::ContextMenu::itemCount): Deleted.
1346         (WebCore::ContextMenu::setPlatformDescription): Deleted.
1347         (WebCore::ContextMenu::platformDescription): Deleted.
1348         (WebCore::ContextMenu::releasePlatformDescription): Deleted.
1349         (WebCore::contextMenuItemVector): Deleted.
1350         (WebCore::platformMenuDescription): Deleted.
1351
1352 2015-11-12  Myles C. Maxfield  <mmaxfield@apple.com>
1353
1354         [Cocoa] Font fallback is not language-sensitive
1355         https://bugs.webkit.org/show_bug.cgi?id=147390
1356
1357         Reviewed by Dean Jackson.
1358
1359         This re-applies r190754 in a somewhat more performant way.
1360
1361         Test: fast/text/fallback-language-han-2.html
1362
1363         * platform/graphics/Font.cpp:
1364         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
1365         (WebCore::CharacterFallbackMapKey::operator==):
1366         (WebCore::CharacterFallbackMapKeyHash::hash):
1367         (WebCore::Font::systemFallbackFontForCharacter):
1368         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1369         (WebCore::FontCache::systemFallbackForCharacters):
1370
1371 2015-11-11  Jon Honeycutt  <jhoneycutt@apple.com>
1372
1373         popstate event should be dispatched asynchronously
1374         https://bugs.webkit.org/show_bug.cgi?id=36202
1375         <rdar://problem/7761279>
1376
1377         Based on an original patch by Mihai Parparita <mihaip@chromium.org>.
1378
1379         Reviewed by Brent Fulgham.
1380
1381         Tests: fast/loader/remove-iframe-during-history-navigation-different.html
1382                fast/loader/remove-iframe-during-history-navigation-same.html
1383                fast/loader/stateobjects/popstate-is-asynchronous.html
1384
1385         * dom/Document.cpp:
1386         (WebCore::Document::enqueuePopstateEvent):
1387         Use enqueueWindowEvent().
1388
1389 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
1390
1391         Fix build failure due to missing NeverDestroyed.h include after r192169
1392         https://bugs.webkit.org/show_bug.cgi?id=151186
1393
1394         Reviewed by Darin Adler.
1395
1396         * rendering/RenderCombineText.cpp:
1397
1398 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
1399
1400         Fix build failure due to missing forward declaration of FontVariantSettings after r191968
1401         https://bugs.webkit.org/show_bug.cgi?id=151185
1402
1403         Reviewed by Myles C. Maxfield.
1404
1405         * css/CSSFontFaceSource.h:
1406
1407 2015-11-12  Eric Carlson  <eric.carlson@apple.com>
1408
1409         [MediaStream] Reflect media stream tracks as HTMLMediaElement tracks
1410         https://bugs.webkit.org/show_bug.cgi?id=151145
1411
1412         Reviewed by Jer Noble.
1413
1414         Test: fast/mediastream/MediaStream-video-element.html
1415
1416         * WebCore.xcodeproj/project.pbxproj: Add new header files.
1417
1418         * html/track/AudioTrack.h: Add comments to clean things up slightly.
1419         * html/track/VideoTrack.h: Ditto.
1420
1421         Create a AudioTrackPrivateMediaStream or VideoTrackPrivateMediaStream for each track in
1422         the MediaStream.
1423         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1424         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1425         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Call updateTracks.
1426         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didAddTrack): Ditto.
1427         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didRemoveTrack): Ditto.
1428         (WebCore::updateTracksOfType): New, template function to update audio or video tracks.
1429         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): New.
1430
1431         * platform/mediastream/AudioTrackPrivateMediaStream.h: Added.
1432
1433         * platform/mediastream/MediaStreamPrivate.cpp:
1434         (WebCore::MediaStreamPrivate::currentFrameImage): Fix a typo, early return if the track is
1435           not active OR there is no active video track.
1436         * platform/mediastream/MediaStreamPrivate.h:
1437         (WebCore::MediaStreamPrivate::activeVideoTrack): Accessor for active video track, if any.
1438
1439         * platform/mediastream/VideoTrackPrivateMediaStream.h: Added.
1440
1441         * platform/mediastream/mac/AVAudioCaptureSource.mm:
1442         (WebCore::AVAudioCaptureSource::updateStates): Set current states.
1443
1444         * platform/mediastream/mac/AVMediaCaptureSource.mm:
1445         (WebCore::AVMediaCaptureSource::states): Set source ID.
1446         (WebCore::AVMediaCaptureSource::capabilities): Set source ID directly.
1447
1448         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1449         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
1450         (WebCore::AVVideoCaptureSource::updateStates): Set states here instead of in the constructor.
1451
1452         * platform/mock/MockRealtimeMediaSource.cpp:
1453         (WebCore::MockRealtimeMediaSource::capabilities): Set source ID directly.
1454
1455         * platform/mock/MockRealtimeVideoSource.cpp:
1456         (WebCore::MockRealtimeVideoSource::updateStates): Set source type.
1457
1458 2015-11-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1459
1460         XHR abort() event firing does not match spec
1461         https://bugs.webkit.org/show_bug.cgi?id=98404
1462
1463         Reviewed by Darin Adler.
1464
1465         Introducing explicit sendFlag as in the specification.
1466         Previously, sendFlag was computed using !!m_loader.
1467         But this does not work well for loadstart events since sendFlag should be true but m_loader is still null at that time.
1468
1469         Updated abort event firing test according specification.
1470         For instance, compared to previously, the abort event is not fired in DONE state or if sendFlag is not set.
1471
1472         Covered by rebased tests.
1473
1474         * xml/XMLHttpRequest.cpp:
1475         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Compute whether dispatching the load event before calling XHR readystatechange event callback.
1476         (WebCore::XMLHttpRequest::setWithCredentials): Replacing m_loader by m_sendFlag to align with the spec.
1477         (WebCore::XMLHttpRequest::open): Unsetting m_sendFlag..
1478         (WebCore::XMLHttpRequest::initSend): Replacing m_loader by m_sendFlag to align with the spec.
1479         (WebCore::XMLHttpRequest::createRequest): Setting m_sendFlag.
1480         (WebCore::XMLHttpRequest::abort): Checking m_sendFlag and updating code to follow the specification.
1481         (WebCore::XMLHttpRequest::genericError): Unsetting m_sendFlag.
1482         (WebCore::XMLHttpRequest::setRequestHeader): Replacing m_loader by m_sendFlag to align with the spec.
1483         (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
1484         (WebCore::XMLHttpRequest::didReachTimeout): Ditto.
1485         * xml/XMLHttpRequest.h: Added m_sendFlag.
1486
1487 2015-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1488
1489         [GStreamer] Use RunLoop::timer in MediaPlayerPrivateGStreamerBase for GL drawing
1490         https://bugs.webkit.org/show_bug.cgi?id=151099
1491
1492         Reviewed by Philippe Normand.
1493
1494         Instead of the GThreadSafeMainLoopSource.
1495
1496         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1497         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
1498         (WebCore::MediaPlayerPrivateGStreamerBase::repaint):
1499         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1500         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Deleted.
1501         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1502
1503 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
1504
1505         Remove ENABLE(SATURATED_LAYOUT_ARITHMETIC) guards
1506         https://bugs.webkit.org/show_bug.cgi?id=150972
1507
1508         Reviewed by Darin Adler.
1509
1510         * Configurations/FeatureDefines.xcconfig:
1511         * platform/LayoutUnit.h:
1512         (WebCore::operator*):
1513         (WebCore::LayoutUnit::LayoutUnit): Deleted.
1514         (WebCore::LayoutUnit::fromFloatCeil): Deleted.
1515         (WebCore::LayoutUnit::fromFloatFloor): Deleted.
1516         (WebCore::LayoutUnit::fromFloatRound): Deleted.
1517         (WebCore::LayoutUnit::ceil): Deleted.
1518         (WebCore::LayoutUnit::round): Deleted.
1519         (WebCore::LayoutUnit::floor): Deleted.
1520         (WebCore::LayoutUnit::setValue): Deleted.
1521         (WebCore::operator/): Deleted.
1522         (WebCore::operator+): Deleted.
1523         (WebCore::operator-): Deleted.
1524         (WebCore::operator+=): Deleted.
1525         (WebCore::operator-=): Deleted.
1526         * rendering/LayoutState.cpp:
1527         (WebCore::LayoutState::LayoutState):
1528         * rendering/LayoutState.h:
1529         (WebCore::LayoutState::LayoutState):
1530         * rendering/RenderView.h:
1531
1532 2015-11-11  Chris Dumez  <cdumez@apple.com>
1533
1534         Stop passing a PassRefPtr to dispatchEvent()
1535         https://bugs.webkit.org/show_bug.cgi?id=151158
1536
1537         Reviewed by Alex Christensen.
1538
1539         Stop passing a PassRefPtr to dispatchEvent() because:
1540         1. PassRefPtr is legacy and should no longer be used
1541         2. We don't actually transfer ownership of the Event to the callee
1542
1543         Pass a C++ reference instead.
1544
1545 2015-11-11  Chris Dumez  <cdumez@apple.com>
1546
1547         Fix leaks in idbKeyFromInspectorObject()
1548         https://bugs.webkit.org/show_bug.cgi?id=151179
1549
1550         Reviewed by Brian Burg.
1551
1552         Fix leaks in idbKeyFromInspectorObject() that were caused by the
1553         NeverDestroyed<> not being marked as static.
1554
1555         * inspector/InspectorIndexedDBAgent.cpp:
1556
1557 2015-11-11  Geoffrey Garen  <ggaren@apple.com>
1558
1559         Rename handle.*Event to dispatch.*Event
1560         https://bugs.webkit.org/show_bug.cgi?id=151168
1561
1562         Reviewed by Chris Dumez.
1563
1564         * dom/Document.cpp:
1565         (WebCore::Document::implicitClose):
1566         * dom/Document.h:
1567         * loader/DocumentLoader.cpp:
1568         (WebCore::DocumentLoader::DocumentLoader):
1569         (WebCore::DocumentLoader::getIconDataForIconURL):
1570         (WebCore::DocumentLoader::dispatchOnloadEvents):
1571         (WebCore::DocumentLoader::handledOnloadEvents): Deleted.
1572         * loader/DocumentLoader.h:
1573         (WebCore::DocumentLoader::isClientRedirect):
1574         (WebCore::DocumentLoader::setIsClientRedirect):
1575         (WebCore::DocumentLoader::wasOnloadDispatched):
1576         (WebCore::DocumentLoader::overrideEncoding):
1577         (WebCore::DocumentLoader::wasOnloadHandled): Deleted.
1578         * loader/EmptyClients.h:
1579         * loader/FrameLoader.cpp:
1580         (WebCore::FrameLoader::submitForm):
1581         (WebCore::FrameLoader::stopLoading):
1582         (WebCore::FrameLoader::userAgent):
1583         (WebCore::FrameLoader::dispatchOnloadEvents):
1584         (WebCore::FrameLoader::frameDetached):
1585         (WebCore::FrameLoader::shouldClose):
1586         (WebCore::FrameLoader::dispatchUnloadEvents):
1587         (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
1588         (WebCore::FrameLoader::handledOnloadEvents): Deleted.
1589         (WebCore::FrameLoader::handleUnloadEvents): Deleted.
1590         (WebCore::FrameLoader::handleBeforeUnloadEvent): Deleted.
1591         * loader/FrameLoader.h:
1592         * loader/FrameLoaderClient.h:
1593         * loader/NavigationScheduler.cpp:
1594         (WebCore::NavigationScheduler::mustLockBackForwardList):
1595
1596 2015-11-11  Anders Carlsson  <andersca@apple.com>
1597
1598         Remove more dead code
1599         https://bugs.webkit.org/show_bug.cgi?id=151170
1600
1601         Reviewed by Beth Dakin.
1602
1603         * platform/ContextMenu.cpp:
1604         (WebCore::findItemWithAction): Deleted.
1605         (WebCore::ContextMenu::itemWithAction): Deleted.
1606         * platform/ContextMenu.h:
1607         (WebCore::ContextMenu::itemAtIndex): Deleted.
1608         * platform/ContextMenuItem.h:
1609
1610 2015-11-11  Anders Carlsson  <andersca@apple.com>
1611
1612         De-indent ContextMenu.h and ContextMenuItem.h.
1613
1614         Rubber-stamped by Andreas Kling.
1615
1616         * platform/ContextMenu.h:
1617         * platform/ContextMenuItem.h:
1618
1619 2015-11-11  Anders Carlsson  <andersca@apple.com>
1620
1621         Remove ContextMenuWin.cpp and ContextMenuItemWin.cpp
1622         https://bugs.webkit.org/show_bug.cgi?id=150467
1623
1624         Reviewed by Beth Dakin.
1625
1626         These files are not needed anymore.
1627
1628         * PlatformWin.cmake:
1629         * WebCore.vcxproj/WebCore.vcxproj:
1630         * WebCore.vcxproj/WebCore.vcxproj.filters:
1631         * platform/win/ContextMenuItemWin.cpp: Removed.
1632         (WebCore::ContextMenuItem::ContextMenuItem): Deleted.
1633         (WebCore::ContextMenuItem::platformContextMenuItem): Deleted.
1634         * platform/win/ContextMenuWin.cpp: Removed.
1635         (WebCore::ContextMenu::ContextMenu): Deleted.
1636         (WebCore::ContextMenu::getContextMenuItems): Deleted.
1637         (WebCore::ContextMenu::createPlatformContextMenuFromItems): Deleted.
1638         (WebCore::ContextMenu::platformContextMenu): Deleted.
1639
1640 2015-11-11  Anders Carlsson  <andersca@apple.com>
1641
1642         Get rid of ContextMenuNone.cpp and ContextMenuItemNone.cpp
1643         https://bugs.webkit.org/show_bug.cgi?id=151169
1644
1645         Reviewed by Beth Dakin.
1646
1647         * PlatformEfl.cmake:
1648         * platform/ContextMenuItemNone.cpp: Removed.
1649         (WebCore::ContextMenuItem::platformContextMenuItem): Deleted.
1650         * platform/ContextMenuNone.cpp: Removed.
1651         (WebCore::ContextMenu::ContextMenu): Deleted.
1652         (WebCore::ContextMenu::getContextMenuItems): Deleted.
1653         (WebCore::ContextMenu::createPlatformContextMenuFromItems): Deleted.
1654         (WebCore::ContextMenu::platformContextMenu): Deleted.
1655
1656 2015-11-11  Anders Carlsson  <andersca@apple.com>
1657
1658         Remove more dead context menu code
1659         https://bugs.webkit.org/show_bug.cgi?id=151163
1660
1661         Reviewed by Tim Horton.
1662
1663         * loader/EmptyClients.h:
1664         * page/ContextMenuClient.h:
1665         * page/ContextMenuController.cpp:
1666         (WebCore::ContextMenuController::populate):
1667         * platform/ContextMenuItem.h:
1668         * platform/mac/ContextMenuItemMac.mm:
1669         (WebCore::ContextMenuItem::shareMenuItem): Deleted.
1670
1671 2015-11-10  Jon Honeycutt  <jhoneycutt@apple.com>
1672
1673         Crash loading Blink layout test fast/parser/strip-script-attrs-on-input.html
1674         https://bugs.webkit.org/show_bug.cgi?id=150201
1675         <rdar://problem/23136478>
1676
1677         Reviewed by Brent Fulgham.
1678
1679         Test: fast/parser/strip-script-attrs-on-input.html
1680
1681         * html/parser/HTMLTreeBuilder.cpp:
1682         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1683         Get the attribute after calling
1684         HTMLConstructionSite::insertSelfClosingHTMLElement(), as this may
1685         mutate the token's attributes.
1686
1687 2015-11-11  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1688
1689         [Streams API] Remove bind usage
1690         https://bugs.webkit.org/show_bug.cgi?id=151104
1691
1692         Reviewed by Youenn Fablet.
1693
1694         Instead of using bind, an inline error function was created.
1695
1696         Internal rework, no tests needed.
1697
1698         * Modules/streams/WritableStream.js:
1699         (error):
1700         (initializeWritableStream):
1701
1702 2015-11-10  Brady Eidson  <beidson@apple.com>
1703
1704         Modern IDB: Make indexes actually index.
1705         https://bugs.webkit.org/show_bug.cgi?id=150939
1706
1707         Reviewed by Alex Christensen.
1708
1709         Tests: storage/indexeddb/modern/index-1.html
1710                storage/indexeddb/modern/index-2.html
1711                storage/indexeddb/modern/index-3.html
1712
1713         * CMakeLists.txt:
1714         * WebCore.xcodeproj/project.pbxproj:
1715
1716         * Modules/indexeddb/IDBKeyData.h:
1717         (WebCore::IDBKeyData::hash): Deleted.
1718
1719         * Modules/indexeddb/IDBKeyRangeData.cpp:
1720         (WebCore::IDBKeyRangeData::isExactlyOneKey):
1721
1722         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1723         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
1724
1725         * Modules/indexeddb/server/IndexValueEntry.cpp: Copied from Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp.
1726         (WebCore::IDBServer::IndexValueEntry::IndexValueEntry):
1727         (WebCore::IDBServer::IndexValueEntry::~IndexValueEntry):
1728         (WebCore::IDBServer::IndexValueEntry::addKey):
1729         (WebCore::IDBServer::IndexValueEntry::removeKey):
1730         (WebCore::IDBServer::IndexValueEntry::getLowest):
1731         (WebCore::IDBServer::IndexValueEntry::getCount):
1732         * Modules/indexeddb/server/IndexValueEntry.h: Copied from Source/WebCore/Modules/indexeddb/server/MemoryIndex.h.
1733
1734         * Modules/indexeddb/server/IndexValueStore.cpp: Added.
1735         (WebCore::IDBServer::IndexValueStore::IndexValueStore):
1736         (WebCore::IDBServer::IndexValueStore::lowestValueForKey):
1737         (WebCore::IDBServer::IndexValueStore::countForKey):
1738         (WebCore::IDBServer::IndexValueStore::contains):
1739         (WebCore::IDBServer::IndexValueStore::addRecord):
1740         (WebCore::IDBServer::IndexValueStore::removeRecord):
1741         (WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey):
1742         (WebCore::IDBServer::IndexValueStore::lowestKeyWithRecordInRange):
1743         * Modules/indexeddb/server/IndexValueStore.h: Copied from Source/WebCore/Modules/indexeddb/server/MemoryIndex.h.
1744
1745         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1746         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
1747         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexCleared):
1748         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
1749         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1750
1751         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1752         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
1753
1754         * Modules/indexeddb/server/MemoryIndex.cpp:
1755         (WebCore::IDBServer::MemoryIndex::create):
1756         (WebCore::IDBServer::MemoryIndex::MemoryIndex):
1757         (WebCore::IDBServer::MemoryIndex::objectStoreCleared):
1758         (WebCore::IDBServer::MemoryIndex::replaceIndexValueStore):
1759         (WebCore::IDBServer::MemoryIndex::getResultForKeyRange):
1760         (WebCore::IDBServer::MemoryIndex::countForKeyRange):
1761         (WebCore::IDBServer::MemoryIndex::putIndexKey):
1762         (WebCore::IDBServer::MemoryIndex::removeRecord):
1763         (WebCore::IDBServer::MemoryIndex::removeEntriesWithValueKey):
1764         (WebCore::IDBServer::MemoryIndex::valueForKeyRange): Deleted.
1765         * Modules/indexeddb/server/MemoryIndex.h:
1766
1767         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1768         (WebCore::IDBServer::MemoryObjectStore::createIndex):
1769         (WebCore::IDBServer::MemoryObjectStore::clear):
1770         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
1771         (WebCore::IDBServer::MemoryObjectStore::addRecord):
1772         (WebCore::IDBServer::indexVM):
1773         (WebCore::IDBServer::indexGlobalExec):
1774         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForDeleteRecord):
1775         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
1776         (WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
1777         * Modules/indexeddb/server/MemoryObjectStore.h:
1778         (WebCore::IDBServer::MemoryObjectStore::writeTransaction):
1779
1780         * Modules/indexeddb/shared/IndexKey.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp.
1781         (WebCore::IndexKey::IndexKey):
1782         (WebCore::IndexKey::isolatedCopy):
1783         (WebCore::IndexKey::asOneKey):
1784         (WebCore::IndexKey::multiEntry):
1785         * Modules/indexeddb/shared/IndexKey.h: Added.
1786         (WebCore::IndexKey::isNull):
1787
1788         * bindings/js/IDBBindingUtilities.cpp:
1789         (WebCore::idbValueDataToJSValue):
1790         (WebCore::deserializeIDBValueBuffer):
1791         (WebCore::idbKeyDataToScriptValue):
1792         (WebCore::createKeyPathArray):
1793         (WebCore::generateIndexKeyForValue):
1794         * bindings/js/IDBBindingUtilities.h:
1795
1796 2015-11-10  Myles C. Maxfield  <mmaxfield@apple.com>
1797
1798         Move locale information into FontDescription
1799         https://bugs.webkit.org/show_bug.cgi?id=147457
1800
1801         Reviewed by Andreas Kling.
1802
1803         Currently, the "lang" attribute on a node sets locale information in RenderStyle.
1804         Font selection is sensitive to this locale information, and occurs deep within
1805         platform/ code, far away from RenderStyle. Because every RenderStyle owns a
1806         FontDescription, and font selection can consult with FontDescriptions, it makes
1807         sense to move the variable from RenderStyle to FontDescription, and provide
1808         convenience methods on RenderStyle which inspect its FontDescription for locale
1809         information.
1810
1811         This patch is in preparation for correctly obeying locale information when
1812         performing font fallback.
1813
1814         No new tests because there is no behavior change.
1815
1816         * css/CSSPropertyNames.in:
1817         * css/StyleBuilderCustom.h:
1818         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
1819         * platform/graphics/FontCache.h:
1820         * platform/graphics/FontDescription.cpp:
1821         (WebCore::FontDescription::setLocale):
1822         * platform/graphics/FontDescription.h:
1823         (WebCore::FontDescription::locale):
1824         (WebCore::FontDescription::operator==):
1825         (WebCore::FontCascadeDescription::initialLocale):
1826         (WebCore::FontDescription::setScript): Deleted.
1827         * rendering/style/RenderStyle.cpp:
1828         (WebCore::RenderStyle::changeRequiresLayout): Deleted.
1829         * rendering/style/RenderStyle.h:
1830         * rendering/style/StyleRareInheritedData.cpp:
1831         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted.
1832         (WebCore::StyleRareInheritedData::operator==): Deleted.
1833         * rendering/style/StyleRareInheritedData.h:
1834         * style/StyleResolveForDocument.cpp:
1835         (WebCore::Style::resolveForDocument):
1836
1837 2015-11-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1838
1839         [EFL] Support an applicationVersion argument to UserAgentEfl::standardUserAgent() 
1840         https://bugs.webkit.org/show_bug.cgi?id=151060
1841
1842         Reviewed by Darin Adler.
1843
1844         *applicationVersion* was missed to support by r192148. This patch adds it as well as
1845         missed Darin comments are fixed.
1846
1847         * platform/efl/UserAgentEfl.cpp:
1848         (WebCore::platformVersionForUAString):
1849         (WebCore::versionForUAString):
1850         (WebCore::standardUserAgent):
1851
1852 2015-11-10  Simon Fraser  <simon.fraser@apple.com>
1853
1854         Use different pixel formats for displays that support them
1855         https://bugs.webkit.org/show_bug.cgi?id=151122
1856         rdar://problem/22846841
1857
1858         Reviewed by Tim Horton.
1859
1860         Add new IOSurface format enum values, and set up the appropriate IOSurfaceCreate()
1861         property dictionaries for them.
1862
1863         * platform/graphics/cocoa/IOSurface.h:
1864         * platform/graphics/cocoa/IOSurface.mm:
1865         (IOSurface::IOSurface):
1866         * platform/spi/cocoa/IOSurfaceSPI.h:
1867
1868 2015-11-10  Brent Fulgham  <bfulgham@apple.com>
1869
1870         Crash running webaudio/panner-loop.html
1871         https://bugs.webkit.org/show_bug.cgi?id=150200
1872         <rdar://problem/23136282>
1873
1874         Reviewed by Jer Noble.
1875
1876         Test: webaudio/panner-loop.html
1877
1878         This is based on the changes in Blink r164822:
1879         https://codereview.chromium.org/130003002
1880
1881         Avoid infinitely recursing on audio nodes by keeping track of which nodes we've already
1882         visited.
1883
1884         * Modules/webaudio/PannerNode.cpp:
1885         (WebCore::PannerNode::pullInputs): Pass set of visited nodes so we don't revisit
1886         nodes we've already serviced.
1887         (WebCore::PannerNode::notifyAudioSourcesConnectedToNode): Accept visitedNodes argument
1888         so we can avoid revisiting nodes. Check if the current node has already been visited
1889         before processing it.
1890         * Modules/webaudio/PannerNode.h:
1891
1892 2015-11-10  Tim Horton  <timothy_horton@apple.com>
1893
1894         Adopt formal protocols for CA delegates
1895         https://bugs.webkit.org/show_bug.cgi?id=151121
1896         <rdar://problem/6739193>
1897
1898         Reviewed by Anders Carlsson.
1899
1900         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
1901         Note that our WebActionDisablingCALayerDelegate is, in fact, a CALayerDelegate.
1902
1903         * platform/spi/cocoa/QuartzCoreSPI.h:
1904         Add empty protocol definitions where necessary.
1905
1906         * WebCore.xcodeproj/project.pbxproj:
1907         * platform/spi/mac/NSAccessibilitySPI.h: Added.
1908         * platform/spi/mac/NSApplicationSPI.h: Added.
1909         * platform/spi/mac/NSTextFinderSPI.h: Added.
1910         * platform/spi/mac/NSViewSPI.h: Added.
1911         Split out SPI headers from WebKit2's AppKitSPI.h.
1912         Add NSViewSPI to note that NSView is (internally) a CALayerDelegate,
1913         which WebHTMLView depends on.
1914
1915 2015-11-10  Zalan Bujtas  <zalan@apple.com>
1916
1917         Continuations with anonymous wrappers inside misplaces child renderers.
1918         https://bugs.webkit.org/show_bug.cgi?id=150908
1919
1920         When a child is appended to an inline container and the beforeChild is not a direct child, but 
1921         it is inside a generated subtree, we need to special case the inline split to form continuation.
1922
1923         RenderInline::splitInlines() assumes that beforeChild is always a direct child of the current
1924         inline container. However when beforeChild type requires wrapper content (such as table cells), the DOM and the
1925         render tree get out of sync. In such cases, we need to ensure that both the beforeChild and its siblings end up
1926         in the correct generated block.
1927
1928         Reviewed by Darin Adler and David Hyatt.
1929
1930         Test: fast/inline/continuation-with-anon-wrappers.html
1931
1932         * rendering/RenderInline.cpp:
1933         (WebCore::RenderInline::splitInlines):
1934         (WebCore::RenderInline::addChildToContinuation):
1935
1936 2015-11-10  Geoffrey Garen  <ggaren@apple.com>
1937
1938         alert, confirm, prompt, showModalDialog should be forbidden during page close and navigation
1939         https://bugs.webkit.org/show_bug.cgi?id=150980
1940
1941         Reviewed by Chris Dumez.
1942
1943         Tests: fast/events/beforeunload-alert.html
1944                fast/events/beforeunload-confirm.html
1945                fast/events/beforeunload-prompt.html
1946                fast/events/beforeunload-showModalDialog.html
1947                fast/events/pagehide-alert.html
1948                fast/events/pagehide-confirm.html
1949                fast/events/pagehide-prompt.html
1950                fast/events/pagehide-showModalDialog.html
1951                fast/events/unload-alert.html
1952                fast/events/unload-confirm.html
1953                fast/events/unload-prompt.html
1954                fast/events/unload-showModalDialog.html
1955
1956         * loader/FrameLoader.cpp:
1957         (WebCore::FrameLoader::stopLoading): Factored out a helper function for
1958         unload event processing.
1959         (WebCore::FrameLoader::handleUnloadEvents): Forbid prompts in unload
1960         events just like we do in beforeunload events, and for the same reasons.
1961
1962         (WebCore::FrameLoader::handleBeforeUnloadEvent): Updated for renames.
1963
1964         * loader/FrameLoader.h:
1965
1966         * page/DOMWindow.cpp:
1967         (WebCore::DOMWindow::print):
1968         (WebCore::DOMWindow::alert):
1969         (WebCore::DOMWindow::confirm):
1970         (WebCore::DOMWindow::prompt):
1971         (WebCore::DOMWindow::showModalDialog): Updated for renames. Refactored
1972         some of this code to handle null pages more cleanly. In particular, we
1973         sometimes used to treat null page as "everything is permitted" -- but it
1974         is best practice in a permissions context to treat lack of information
1975         as no permission granted rather than all permissions granted. (I don't
1976         know of a way to trigger this condition in practice.)
1977
1978         * page/Page.cpp:
1979         (WebCore::Page::Page):
1980         (WebCore::Page::forbidPrompts):
1981         (WebCore::Page::allowPrompts):
1982         (WebCore::Page::arePromptsAllowed): Renamed to make these functions
1983         reflect their new, broader context.
1984
1985         (WebCore::Page::incrementFrameHandlingBeforeUnloadEventCount): Deleted.
1986         (WebCore::Page::decrementFrameHandlingBeforeUnloadEventCount): Deleted.
1987         (WebCore::Page::isAnyFrameHandlingBeforeUnloadEvent): Deleted.
1988
1989         * page/Page.h:
1990
1991 2015-11-09  David Hyatt  <hyatt@apple.com>
1992
1993         tate-chu-yoko should shrink to fit when it exceeds the available width.
1994         <rdar://problem/12130468>
1995         https://bugs.webkit.org/show_bug.cgi?id=151051
1996
1997         Reviewed by Myles Maxfield.
1998
1999         Covered by existing tests
2000
2001         * rendering/RenderCombineText.cpp:
2002         (WebCore::RenderCombineText::combineText):
2003
2004         When testing for text-combine, find the font variant that is the best fit, i.e.,
2005         that exceeds the available width by the smallest amount. Scale that best fit down
2006         repeatedly until it fits within the available space. We set a pixel size of 6 as
2007         the threshold at which we give up.
2008
2009         Also make sure to reset glyphOverflow on each measurement, as this was creating
2010         a potential bug both with variant checking and then with scaling, since glyphOverflow
2011         isn't reset when width() is invoked.
2012
2013 2015-11-10  Myles C. Maxfield  <mmaxfield@apple.com>
2014
2015         Tatechuyoko text is not vertically centered in its vertical advance
2016         https://bugs.webkit.org/show_bug.cgi?id=151074
2017         <rdar://problem/20074305>
2018
2019         Reviewed by David Hyatt.
2020
2021         During paint time, the run origin of tatechuyoko needs to be adjusted to compensate for the
2022         rotation of the writing mode. The calculation which performed this adjustment was incorrect.
2023
2024         It is incorrect for two reasons:
2025         1. It used the existing text origin, which had the font's ascent incorporated in it, but did
2026         not compensate by either inspecting the overflow bounds' ascent nor the font's ascent proper.
2027         2. It did not distinguish between the overflow bounds' ascent vs. descent. Instead, it added
2028         them together and treated both values together.
2029
2030         No new tests yet. I need to make a font to test this.
2031
2032         * rendering/InlineTextBox.cpp:
2033         (WebCore::InlineTextBox::paint):
2034         * rendering/RenderCombineText.cpp:
2035         (WebCore::RenderCombineText::computeTextOrigin):
2036         (WebCore::RenderCombineText::combineText):
2037         (WebCore::RenderCombineText::adjustTextOrigin): Deleted.
2038         * rendering/RenderCombineText.h:
2039
2040 2015-11-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2041
2042         XMLHttpRequestUpload should support ontimeout event handler
2043         https://bugs.webkit.org/show_bug.cgi?id=128531
2044
2045         Reviewed by Darin Adler.
2046
2047         Covered by rebased tests.
2048
2049         * xml/XMLHttpRequestUpload.idl: Adding ontimeout event handler.
2050
2051 2015-11-10  Zalan Bujtas  <zalan@apple.com>
2052
2053         Force display: block on ::-webkit-media-controls.
2054         https://bugs.webkit.org/show_bug.cgi?id=149178
2055         <rdar://problem/23448397>
2056
2057         Reviewed by Simon Fraser.
2058
2059         This patch ensures that we always have a block level container for media controls
2060         so that continuation never needs to split RenderMedia into multiple subtrees.
2061
2062         Current inline continuation logic assumes that only inline elements with RenderInline
2063         type of renderers participate in continuation. This is mostly the case since other inline renderers
2064         such as RenderReplaced, RenderImage, RenderEmbeddedObject etc can't have (accessible) children.
2065         (Unlike video::-webkit-media-controls)
2066
2067         Test: media/webkit-media-controls-display.html
2068
2069         * Modules/mediacontrols/mediaControlsApple.css:
2070         (::-webkit-media-controls):
2071         * Modules/mediacontrols/mediaControlsiOS.css:
2072         (::-webkit-media-controls):
2073         * css/mediaControls.css:
2074         (::-webkit-media-controls):
2075
2076 2015-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2077
2078         [GTK] Use CROSS_PLATFORM_CONTEXT_MENUS
2079         https://bugs.webkit.org/show_bug.cgi?id=150642
2080
2081         Reviewed by Martin Robinson.
2082
2083         Remove GTK+ implementations of old context menu classes.
2084
2085         * PlatformGTK.cmake:
2086         * platform/ContextMenuItem.h:
2087         * platform/gtk/ContextMenuGtk.cpp: Removed.
2088         * platform/gtk/ContextMenuItemGtk.cpp: Removed.
2089
2090 2015-11-10  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2091
2092         [Streams API] Fix style issues
2093         https://bugs.webkit.org/show_bug.cgi?id=151089
2094
2095         Reviewed by Youenn Fablet.
2096
2097         Inlined some things, converted var into let and const, removed some undefined parameters and returns, added
2098         missing "use strict" clauses and other minor style changes.
2099
2100         Internal rework, no new tests needed.
2101
2102         * Modules/streams/ReadableStream.js:
2103         (initializeReadableStream):
2104         * Modules/streams/ReadableStreamController.js:
2105         (enqueue):
2106         (error):
2107         (close):
2108         * Modules/streams/ReadableStreamInternals.js:
2109         (teeReadableStream):
2110         (teeReadableStreamPullFunction):
2111         (teeReadableStreamBranch2CancelFunction):
2112         (errorReadableStream):
2113         (finishClosingReadableStream):
2114         (closeReadableStreamReader):
2115         (enqueueInReadableStream):
2116         (readFromReadableStreamReader):
2117         * Modules/streams/ReadableStreamReader.js:
2118         (releaseLock):
2119         * Modules/streams/StreamInternals.js:
2120         (invokeOrNoop):
2121         (promiseInvokeOrNoop):
2122         (promiseInvokeOrFallbackOrNoop):
2123         (validateAndNormalizeQueuingStrategy):
2124         (newQueue):
2125         (dequeueValue):
2126         (enqueueValueWithSize):
2127         (peekQueueValue):
2128         * Modules/streams/WritableStream.js:
2129         (initializeWritableStream):
2130         (abort):
2131         (close):
2132         * Modules/streams/WritableStreamInternals.js:
2133         (syncWritableStreamStateWithQueue):
2134         (errorWritableStream):
2135         (callOrScheduleWritableStreamAdvanceQueue):
2136         (writableStreamAdvanceQueue):
2137         (closeWritableStream): Deleted.
2138
2139 2015-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2140
2141         Unreviewed. Fix scrollbars/custom-scrollbar-appearance-property.html after r191991.
2142
2143         Use a similar fix to the mac one.
2144
2145         * rendering/RenderThemeGtk.cpp:
2146         (WebCore::centerRectVerticallyInParentInputElement):
2147
2148 2015-11-10  Csaba Osztrogonác  <ossy@webkit.org>
2149
2150         Unreviewed speculative buildfix after r192200.
2151
2152         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
2153         (WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):
2154
2155 2015-11-10  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2156
2157         [Streams API] Shield promises when prototype is replaced from a promise
2158         https://bugs.webkit.org/show_bug.cgi?id=151033
2159
2160         Reviewed by Darin Adler.
2161
2162         Instead of calling @then or @catch, that could have disappeared if the user successfully replaces a promise
2163         constructor, we call the methods stored at @Promise.prototype, which are safe as @Promise.prototype.@then.@call
2164         and @Promise.prototype.@catch.@call.
2165
2166         Test: streams/streams-promises.html, expectations updated.
2167
2168         * Modules/streams/ReadableStream.js:
2169         (initializeReadableStream):
2170         * Modules/streams/ReadableStreamInternals.js:
2171         (teeReadableStream):
2172         (teeReadableStreamPullFunction):
2173         (teeReadableStreamBranch2CancelFunction):
2174         (cancelReadableStream):
2175         * Modules/streams/WritableStream.js:
2176         (initializeWritableStream):
2177         (abort):
2178         * Modules/streams/WritableStreamInternals.js:
2179         (callOrScheduleWritableStreamAdvanceQueue):
2180
2181 2015-11-10  Jon Lee  <jonlee@apple.com>
2182
2183         REGRESSION (r189567): Inline controls on Mac are misplaced
2184         https://bugs.webkit.org/show_bug.cgi?id=151072
2185
2186         Reviewed by Eric Carlson.
2187
2188         Test: media/controls/fullscreen-button-inline-layout.html
2189
2190         For a certain range of video widths, r189567 caused the timeline track to be
2191         too large, pushing the buttons on the right side of the inline controls out of
2192         the rect bounds.
2193
2194         The fix is to set min-width to 0. The test added checks to see that the right
2195         edge of the fullscreen button is within the rect bounds.
2196
2197         * Modules/mediacontrols/mediaControlsApple.css:
2198         (audio::-webkit-media-controls-timeline-container): Add min-width.
2199         (audio::-webkit-media-controls-panel .thumbnail-track): Ditto. Fly-by fix of height rule.
2200
2201 2015-11-09  Eric Carlson  <eric.carlson@apple.com>
2202
2203         [Mac] Add a mock AppleTV device for testing
2204         https://bugs.webkit.org/show_bug.cgi?id=148912
2205         <rdar://problem/22596272>
2206
2207         Reviewed by Tim Horton.
2208
2209         No new tests, updated media/controls/airplay-picker.html.
2210
2211         * Modules/mediasession/WebMediaSessionManager.cpp:
2212         (WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerEnabled): New, enable or disable
2213           the mock picker.
2214         (WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState): New, set mock picker state.
2215         (WebCore::WebMediaSessionManager::mockPicker): New.
2216         (WebCore::WebMediaSessionManager::targetPicker): Return the platform or mock picker, as per settings.
2217         (WebCore::webMediaSessionManagerOverride): Deleted.
2218         (WebCore::WebMediaSessionManager::shared): Deleted.
2219         (WebCore::WebMediaSessionManager::setWebMediaSessionManagerOverride): Deleted.
2220         * Modules/mediasession/WebMediaSessionManager.h:
2221
2222         * WebCore.xcodeproj/project.pbxproj: Add MediaPlaybackTargetPickerMock.* and MediaPlaybackTargetMock.*.
2223
2224         * page/ChromeClient.h: add setMockMediaPlaybackTargetPickerEnabled and setMockMediaPlaybackTargetPickerState.
2225
2226         * page/Page.cpp:
2227         (WebCore::Page::playbackTargetPickerClientStateDidChange):
2228         (WebCore::Page::setMockMediaPlaybackTargetPickerEnabled): New.
2229         (WebCore::Page::setMockMediaPlaybackTargetPickerState): New.
2230         (WebCore::Page::setPlaybackTarget):
2231         * page/Page.h:
2232
2233         * platform/graphics/MediaPlaybackTarget.h:
2234         (WebCore::noMediaPlaybackTargetContext):
2235         (WebCore::MediaPlaybackTarget::~MediaPlaybackTarget):
2236         (WebCore::MediaPlaybackTarget::deviceName):
2237         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget):
2238
2239         * platform/graphics/MediaPlaybackTargetContext.h: Make a class instead of a struct.
2240         (WebCore::MediaPlaybackTargetContext::MediaPlaybackTargetContext):
2241         (WebCore::MediaPlaybackTargetContext::type):
2242         (WebCore::MediaPlaybackTargetContext::mockDeviceName):
2243         (WebCore::MediaPlaybackTargetContext::mockState):
2244         (WebCore::MediaPlaybackTargetContext::avOutputContext):
2245         (WebCore::MediaPlaybackTargetContext::encodingRequiresPlatformData):
2246
2247         * platform/graphics/MediaPlaybackTargetPicker.cpp: Move much of the code from MediaPlaybackTargetMac.mm
2248           here so it can be the base class.
2249         (WebCore::MediaPlaybackTargetPicker::MediaPlaybackTargetPicker):
2250         (WebCore::MediaPlaybackTargetPicker::~MediaPlaybackTargetPicker):
2251         (WebCore::MediaPlaybackTargetPicker::pendingActionTimerFired):
2252         (WebCore::MediaPlaybackTargetPicker::addPendingAction):
2253         (WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
2254         * platform/graphics/MediaPlaybackTargetPicker.h:
2255         (WebCore::MediaPlaybackTargetPicker::availableDevicesDidChange):
2256         (WebCore::MediaPlaybackTargetPicker::currentDeviceDidChange):
2257         (WebCore::MediaPlaybackTargetPicker::client):
2258         (WebCore::MediaPlaybackTargetPicker::setClient):
2259
2260         * platform/graphics/avfoundation/MediaPlaybackTargetMac.h:
2261         (WebCore::MediaPlaybackTargetMac::outputContext):
2262         (WebCore::MediaPlaybackTargetMac::targetType): Deleted.
2263         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2264         (WebCore::MediaPlaybackTargetMac::targetContext):
2265         (WebCore::MediaPlaybackTargetMac::hasActiveRoute):
2266         (WebCore::MediaPlaybackTargetMac::deviceName):
2267
2268         * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
2269         (WebCore::WebMediaSessionManager::shared): Renamed from platformManager.
2270         (WebCore::WebMediaSessionManagerMac::platformPicker): Renamed from targetPicker.
2271         (WebCore::WebMediaSessionManager::platformManager): Deleted.
2272         (WebCore::WebMediaSessionManagerMac::targetPicker): Deleted.
2273         * platform/graphics/avfoundation/WebMediaSessionManagerMac.h:
2274
2275         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
2276         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2277         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
2278         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
2279         (WebCore::MediaPlaybackTargetPickerMac::externalOutputDeviceAvailable):
2280         (WebCore::MediaPlaybackTargetPickerMac::playbackTarget):
2281         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
2282         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
2283         (WebCore::MediaPlaybackTargetPickerMac::startingMonitoringPlaybackTargets):
2284         (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Deleted.
2285         (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Deleted.
2286         (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): Deleted.
2287         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Deleted.
2288
2289         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2290         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2291         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): Add support for
2292           mock target.
2293         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName): Ditto.
2294         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Ditto.
2295         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Ditto.
2296
2297         * platform/mock/MediaPlaybackTargetMock.cpp: Added.
2298         (WebCore::MediaPlaybackTargetMock::create): 
2299         (WebCore::MediaPlaybackTargetMock::MediaPlaybackTargetMock):
2300         (WebCore::MediaPlaybackTargetMock::~MediaPlaybackTargetMock):
2301         (WebCore::MediaPlaybackTargetMock::targetContext):
2302         (WebCore::toMediaPlaybackTargetMock):
2303         * platform/mock/MediaPlaybackTargetMock.h: Added.
2304
2305         * platform/mock/MediaPlaybackTargetPickerMock.cpp: Added.
2306         (WebCore::MediaPlaybackTargetPickerMock::create):
2307         (WebCore::MediaPlaybackTargetPickerMock::MediaPlaybackTargetPickerMock):
2308         (WebCore::MediaPlaybackTargetPickerMock::~MediaPlaybackTargetPickerMock):
2309         (WebCore::MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable):
2310         (WebCore::MediaPlaybackTargetPickerMock::playbackTarget):
2311         (WebCore::MediaPlaybackTargetPickerMock::timerFired):
2312         (WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):
2313         (WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets):
2314         (WebCore::MediaPlaybackTargetPickerMock::stopMonitoringPlaybackTargets):
2315         (WebCore::MediaPlaybackTargetPickerMock::invalidatePlaybackTargets):
2316         (WebCore::MediaPlaybackTargetPickerMock::setState):
2317         * platform/mock/MediaPlaybackTargetPickerMock.h: Added.
2318
2319         * testing/Internals.cpp:
2320         (WebCore::Internals::Internals):
2321         (WebCore::Internals::setMockMediaPlaybackTargetPickerEnabled):
2322         (WebCore::Internals::setMockMediaPlaybackTargetPickerState):
2323         * testing/Internals.h:
2324         * testing/Internals.idl:
2325
2326 2015-11-09  Wenson Hsieh  <wenson_hsieh@apple.com>
2327
2328         Unreviewed, fix the windows build
2329
2330         Update the signature of scrollableAreaBoundingBox, changed by r192193.
2331
2332         * platform/win/PopupMenuWin.cpp:
2333         (WebCore::PopupMenuWin::scrollableAreaBoundingBox):
2334         * platform/win/PopupMenuWin.h:
2335
2336 2015-11-09  Simon Fraser  <simon.fraser@apple.com>
2337
2338         Allow iOS to create linearRGB colorspaces
2339         https://bugs.webkit.org/show_bug.cgi?id=151059
2340
2341         Reviewed by Tim Horton.
2342
2343         Remove iOS #ifdefs around code that creates linearized RGB colorspaces, as used
2344         by SVG filters. Blending doesn't actually work correctly, but there's no reason
2345         to #ifdef differently here.
2346
2347         * platform/graphics/cg/GraphicsContextCG.cpp:
2348         * platform/graphics/mac/GraphicsContextMac.mm:
2349         (WebCore::linearRGBColorSpaceRef):
2350
2351 2015-11-09  Wenson Hsieh  <wenson_hsieh@apple.com>
2352
2353         Sometimes unable to scroll fixed div when the body is scrollable
2354         https://bugs.webkit.org/show_bug.cgi?id=151015
2355         <rdar://problem/23445723>
2356
2357         Reviewed by Simon Fraser.
2358
2359         Currently, if we scroll a page containing a fixed scrollable area, the non-fast-scrollable region corresponding to a fixed
2360         area will not move down to reflect its new bounds in absolute coordinates, making it impossible to scroll position: fixed
2361         overflow elements when the body's scroll position changes. To fix this, we inflate the non-fast-scrollable region
2362         corresponding to scrollable position: fixed elements such that their regions encompass the area, relative to the page,
2363         wherein the fixed element may lie when the page is scrolled by any amount within its scroll limits.
2364
2365         We also optimize the non-fast-scrollable regions emitted by elements that handle wheel events. Currently, if a fixed element
2366         also has a wheel event handler, we take the entire document's rect to be non-fast-scrollable. This patch changes this region
2367         to behave the same way as fixed scrollable elements above.
2368
2369         This patch also folds some common logic used to accomplish this into FrameView for use by RenderLayerCompositor and RenderView.
2370
2371         Test: tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page.html
2372
2373         * page/FrameView.cpp:
2374         (WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling):
2375         (WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition):
2376         * page/FrameView.h:
2377         * page/scrolling/ScrollingCoordinator.cpp:
2378         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
2379         * platform/ScrollableArea.h:
2380         (WebCore::ScrollableArea::scrollableAreaBoundingBox):
2381         * rendering/RenderLayer.cpp:
2382         (WebCore::RenderLayer::scrollableAreaBoundingBox):
2383         * rendering/RenderLayer.h:
2384         * rendering/RenderLayerCompositor.cpp:
2385         (WebCore::RenderLayerCompositor::computeExtent):
2386         (WebCore::fixedPositionOffset): Deleted.
2387         * rendering/RenderView.cpp:
2388         (WebCore::RenderView::mapLocalToContainer):
2389         (WebCore::RenderView::pushMappingToContainer):
2390         (WebCore::RenderView::mapAbsoluteToLocalPoint):
2391         (WebCore::RenderView::computeRectForRepaint):
2392         (WebCore::fixedPositionOffset): Deleted.
2393
2394 2015-11-09  Ryan Haddad  <ryanhaddad@apple.com>
2395
2396         Unreviewed, rolling out r192181.
2397
2398         This change causes asserts on mac-wk1 debug testers
2399
2400         Reverted changeset:
2401
2402         "Fixed crash loading Mozilla layout test
2403         editor/libeditor/crashtests/431086-1.xhtml."
2404         https://bugs.webkit.org/show_bug.cgi?id=150252
2405         http://trac.webkit.org/changeset/192181
2406
2407 2015-11-09  Jiewen Tan  <jiewen_tan@apple.com>
2408
2409         Crash when right clicking in input box with -webkit-user-select: none
2410         https://bugs.webkit.org/show_bug.cgi?id=145981
2411         <rdar://problem/22441925>
2412
2413         Reviewed by Enrica Casucci.
2414
2415         Test: editing/selection/minimal-user-select-crash.html
2416
2417         * editing/Editor.cpp:
2418         (WebCore::Editor::hasBidiSelection):
2419         Visible position cannot be created because of the style that doesn't allow the selection.
2420
2421 2015-11-09  Joseph Pecoraro  <pecoraro@apple.com>
2422
2423         Web Inspector: $0 stops working after navigating to a different domain
2424         https://bugs.webkit.org/show_bug.cgi?id=147962
2425
2426         Reviewed by Brian Burg.
2427
2428         Test: http/tests/inspector/console/cross-domain-inspected-node-access.html
2429
2430         The inspector backend injects the CommandLineAPI Source with a
2431         corresponding CommandLineAPIHost into each execution context
2432         created by the page (main frame, sub frames, etc).
2433
2434         When creating the JSValue wrapper for the CommandLineAPIHost using
2435         the generated toJS(...) DOM bindings, we were using the cached
2436         CommandLineAPIHost wrapper values in the single DOMWrapperWorld shared
2437         across all frames. This meant that the first time the wrapper was
2438         needed it was created in context A. But when needed for context B
2439         it was using the wrapper created in context A. Using this wrapper
2440         in context B was producing unexpected cross-origin warnings.
2441
2442         The solution taken here, is to create a new JSValue wrapper for
2443         the CommandLineAPIHost per execution context. This way each time
2444         the CommandLineAPIHost wrapper is used in a frame, it is using
2445         the one created for that frame.
2446
2447         The C++ host object being wrapped has a lifetime equivalent to
2448         the Page. It does not change in this patch. The wrapper values
2449         are cleared on page navigation or when the page is closed, and
2450         will be garbage collected.
2451
2452         * WebCore.vcxproj/WebCore.vcxproj:
2453         * WebCore.vcxproj/WebCore.vcxproj.filters:
2454         * ForwardingHeaders/inspector/PerGlobalObjectWrapperWorld.h: Added.
2455         New forwarding header.
2456
2457         * inspector/CommandLineAPIHost.h:
2458         * inspector/CommandLineAPIHost.cpp:
2459         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2460         (WebCore::CommandLineAPIHost::wrapper):
2461         Cached JSValue wrappers per GlobalObject.
2462
2463         (WebCore::CommandLineAPIHost::clearAllWrappers):
2464         Clear any wrappers we have, including the $0 value itself
2465         which we weren't explicitly clearing previously.
2466
2467         * inspector/CommandLineAPIModule.cpp:
2468         (WebCore::CommandLineAPIModule::host):
2469         Simplify creating the wrapper.
2470
2471         * inspector/WebInjectedScriptManager.h:
2472         * inspector/WebInjectedScriptManager.cpp:
2473         (WebCore::WebInjectedScriptManager::discardInjectedScripts):
2474         When the main frame window object clears, also clear the
2475         CommandLineAPI wrappers we may have created. Also take this
2476         opportunity to clear any $0 value that may have pointed
2477         to a value in the previous page.
2478
2479 2015-11-09  Per Arne Vollan  <peavo@outlook.com>
2480
2481         [WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics context.
2482         https://bugs.webkit.org/show_bug.cgi?id=150941
2483
2484         Reviewed by Brent Fulgham.
2485
2486         On WinCairo, we currently render video in a child window of the main browser window.
2487         This makes it difficult to render things on top of the video, like video controls and
2488         context menus. We should render the video in the graphics context provided by the paint
2489         method. This is done by implementing a custom EVR (Enhanced Video Renderer) presenter
2490         for Media Foundation.
2491
2492         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2493         (MFCreateMediaType):
2494         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
2495         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
2496         (WebCore::MediaPlayerPrivateMediaFoundation::isAvailable):
2497         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
2498         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
2499         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
2500         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
2501         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
2502         (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
2503         (WebCore::MediaPlayerPrivateMediaFoundation::invalidateFrameView):
2504         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
2505         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
2506         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
2507         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
2508         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CustomVideoPresenter):
2509         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::~CustomVideoPresenter):
2510         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::QueryInterface):
2511         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::AddRef):
2512         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::Release):
2513         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockStart):
2514         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockStop):
2515         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockPause):
2516         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockRestart):
2517         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockSetRate):
2518         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ProcessMessage):
2519         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetCurrentMediaType):
2520         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetDeviceID):
2521         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::InitServicePointers):
2522         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ReleaseServicePointers):
2523         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetService):
2524         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ActivateObject):
2525         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::DetachObject):
2526         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ShutdownObject):
2527         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetVideoWindow):
2528         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetVideoWindow):
2529         (WebCore::setMixerSourceRect):
2530         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetVideoPosition):
2531         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetVideoPosition):
2532         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::RepaintVideo):
2533         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::Invoke):
2534         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::onMediaPlayerDeleted):
2535         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::paintCurrentFrame):
2536         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
2537         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::configureMixer):
2538         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::flush):
2539         (WebCore::areMediaTypesEqual):
2540         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::setMediaType):
2541         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::checkShutdown):
2542         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::renegotiateMediaType):
2543         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processInputNotify):
2544         (WebCore::MFOffsetToFloat):
2545         (WebCore::MakeOffset):
2546         (WebCore::MakeArea):
2547         (WebCore::validateVideoArea):
2548         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::beginStreaming):
2549         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::endStreaming):
2550         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::checkEndOfStream):
2551         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isMediaTypeSupported):
2552         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
2553         (WebCore::correctAspectRatio):
2554         (WebCore::GetVideoDisplayArea):
2555         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::calculateOutputRectangle):
2556         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processOutputLoop):
2557         (WebCore::setDesiredSampleTime):
2558         (WebCore::clearDesiredSampleTime):
2559         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processOutput):
2560         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::deliverSample):
2561         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::trackSample):
2562         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::releaseResources):
2563         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::onSampleFree):
2564         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::notifyEvent):
2565         (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::getSample):
2566         (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::returnSample):
2567         (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::areSamplesPending):
2568         (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::initialize):
2569         (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::clear):
2570         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setFrameRate):
2571         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::startScheduler):
2572         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler):
2573         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::flush):
2574         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::scheduleSample):
2575         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSamplesInQueue):
2576         (WebCore::MFTimeToMilliseconds):
2577         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSample):
2578         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::schedulerThreadProc):
2579         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::schedulerThreadProcPrivate):
2580         (WebCore::findAdapter):
2581         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::Direct3DPresenter):
2582         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::~Direct3DPresenter):
2583         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getService):
2584         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::checkFormat):
2585         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setVideoWindow):
2586         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setDestinationRect):
2587         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):
2588         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::releaseResources):
2589         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::checkDeviceState):
2590         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
2591         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
2592         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::initializeD3D):
2593         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createD3DDevice):
2594         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createD3DSample):
2595         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSwapChain):
2596         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getSwapChainPresentParameters):
2597         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::updateDestRect):
2598         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2599         (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::VideoSamplePool):
2600         (WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::~VideoSamplePool):
2601         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::VideoScheduler):
2602         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::~VideoScheduler):
2603         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setPresenter):
2604         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setClockRate):
2605         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::lastSampleTime):
2606         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::frameDuration):
2607         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getVideoWindow):
2608         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getDestinationRect):
2609         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::refreshRate):
2610         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetItem):
2611         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetItemType):
2612         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CompareItem):
2613         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::Compare):
2614         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetUINT32):
2615         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetUINT64):
2616         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetDouble):
2617         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetGUID):
2618         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetStringLength):
2619         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetString):
2620         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetAllocatedString):
2621         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetBlobSize):
2622         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetBlob):
2623         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetAllocatedBlob):
2624         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetUnknown):
2625         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetItem):
2626         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::DeleteItem):
2627         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::DeleteAllItems):
2628         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetUINT32):
2629         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetUINT64):
2630         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetDouble):
2631         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetGUID):
2632         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetString):
2633         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetBlob):
2634         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetUnknown):
2635         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::LockStore):
2636         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::UnlockStore):
2637         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetCount):
2638         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetItemByIndex):
2639         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CopyAllItems):
2640         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetNativeVideoSize):
2641         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetIdealVideoSize):
2642         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetAspectRatioMode):
2643         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetAspectRatioMode):
2644         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetCurrentImage):
2645         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetBorderColor):
2646         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetBorderColor):
2647         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetRenderingPrefs):
2648         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetRenderingPrefs):
2649         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetFullscreen):
2650         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetFullscreen):
2651         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetParameters):
2652         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isScrubbing):
2653
2654 2015-11-09  Alex Christensen  <achristensen@webkit.org>
2655
2656         XHR timeouts should not fire if there is an immediate network error.
2657         https://bugs.webkit.org/show_bug.cgi?id=150577
2658
2659         Reviewed by Darin Adler.
2660
2661         This fixes flakiness of http/tests/contentextensions/async-xhr-onerror.html since r191077.
2662
2663         * xml/XMLHttpRequest.cpp:
2664         (WebCore::XMLHttpRequest::createRequest):
2665         (WebCore::XMLHttpRequest::internalAbort):
2666         (WebCore::XMLHttpRequest::didFinishLoading):
2667         If the timeout timer has been started and we are going to immediately report a network error, then stop the timeout timer.
2668         The timeout timer sometimes fired before the network error timer if it was a very short timeout (such as 1ms).
2669         Also checks to isActive before calling stop on a timer are not necessary.
2670
2671 2015-11-09  Eric Carlson  <eric.carlson@apple.com>
2672
2673         [MediaStream] Add mock audio and video sources
2674         https://bugs.webkit.org/show_bug.cgi?id=150997
2675         <rdar://problem/23453358>
2676
2677         Reviewed by Jer Noble.
2678
2679         Create basic mock audio and video realtime media source classes so we can test MediaStream
2680         API without requiring test machines to have audio/video input hardware. No new tests added
2681         yet, thoe will follow.
2682
2683         No new tests, these changes will allow us to write MediaStream tests.
2684
2685         * CMakeLists.txt: Add MockRealtimeAudioSource.cpp, MockRealtimeMediaSource.cpp, and 
2686           MockRealtimeVideoSource.cpp
2687
2688         * PlatformMac.cmake: Add MockRealtimeVideoSourceMac.mm
2689
2690         * WebCore.xcodeproj/project.pbxproj: Add new files.
2691
2692         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2693         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Don't set autoresizingMask,
2694           it isn't necessary.
2695
2696         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2697         (WebCore::refreshCaptureDeviceList): AVCaptureDevice -> getAVCaptureDeviceClass()
2698         (WebCore::AVCaptureDeviceManager::bestDeviceForFacingMode): Ditto.
2699         (WebCore::AVCaptureDeviceManager::sourceWithUID): Ditto.
2700
2701         Mac class implements RealtimeVideoSource::platformLayer, returns a CALayer which uses the
2702         GraphicsContext as contents.
2703         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h: Added.
2704         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: Added.
2705         (WebCore::MockRealtimeVideoSource::create):
2706         (WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac):
2707         (WebCore::MockRealtimeVideoSourceMac::platformLayer):
2708         (WebCore::MockRealtimeVideoSourceMac::updatePlatformLayer):
2709
2710         Mock audio source. Doesn't provide data yet, only provides states and capabilities.
2711         * platform/mock/MockRealtimeAudioSource.cpp: Added.
2712         (WebCore::MockRealtimeAudioSource::create):
2713         (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
2714         (WebCore::MockRealtimeAudioSource::updateStates):
2715         (WebCore::MockRealtimeAudioSource::initializeCapabilities):
2716         * platform/mock/MockRealtimeAudioSource.h: Added.
2717         (WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):
2718
2719         Mock source base class, sets persistent ID and updates states and capabilities.
2720         * platform/mock/MockRealtimeMediaSource.cpp: Added.
2721         (WebCore::MockRealtimeMediaSource::mockAudioPersistentID):
2722         (WebCore::MockRealtimeMediaSource::mockVideoPersistentID):
2723         (WebCore::MockRealtimeMediaSource::MockRealtimeMediaSource):
2724         (WebCore::MockRealtimeMediaSource::capabilities):
2725         (WebCore::MockRealtimeMediaSource::states):
2726         * platform/mock/MockRealtimeMediaSource.h: Added.
2727         (WebCore::MockRealtimeMediaSource::mockAudioSourcePersistentID):
2728         (WebCore::MockRealtimeMediaSource::mockAudioSourceName):
2729         (WebCore::MockRealtimeMediaSource::mockVideoSourcePersistentID):
2730         (WebCore::MockRealtimeMediaSource::mockVideoSourceName):
2731         (WebCore::MockRealtimeMediaSource::trackSourceWithUID):
2732         (WebCore::MockRealtimeMediaSource::~MockRealtimeMediaSource):
2733         (WebCore::MockRealtimeMediaSource::currentStates):
2734         (WebCore::MockRealtimeMediaSource::constraints):
2735
2736         Use new mock source classes. Create a new source instance for each request instead of reusing the
2737         same sources each time.
2738         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2739         (WebCore::mockSourceMap):
2740         (WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter):
2741         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
2742         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
2743         (WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources):
2744         (WebCore::MockSource::MockSource): Deleted.
2745         (WebCore::MockSource::~MockSource): Deleted.
2746         (WebCore::MockSource::capabilities): Deleted.
2747         (WebCore::MockSource::states): Deleted.
2748         (WebCore::mockAudioSourceID): Deleted.
2749         (WebCore::mockVideoSourceID): Deleted.
2750         (WebCore::initializeMockSources): Deleted.
2751
2752         Mock video source. Generate bip-bop inspired frames with burned in state information.
2753         * platform/mock/MockRealtimeVideoSource.cpp: Added.
2754         (WebCore::MockRealtimeVideoSource::create):
2755         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
2756         (WebCore::MockRealtimeVideoSource::startProducingData):
2757         (WebCore::MockRealtimeVideoSource::stopProducingData):
2758         (WebCore::MockRealtimeVideoSource::elapsedTime):
2759         (WebCore::MockRealtimeVideoSource::updateStates):
2760         (WebCore::MockRealtimeVideoSource::initializeCapabilities):
2761         (WebCore::MockRealtimeVideoSource::setFacingMode):
2762         (WebCore::MockRealtimeVideoSource::setFrameRate):
2763         (WebCore::MockRealtimeVideoSource::setSize):
2764         (WebCore::MockRealtimeVideoSource::drawAnimation):
2765         (WebCore::MockRealtimeVideoSource::drawBoxes):
2766         (WebCore::MockRealtimeVideoSource::drawText):
2767         (WebCore::MockRealtimeVideoSource::generateFrame):
2768         (WebCore::MockRealtimeVideoSource::imageBuffer):
2769         (WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext):
2770         (WebCore::MockRealtimeVideoSource::currentFrameImage):
2771         * platform/mock/MockRealtimeVideoSource.h: Added.
2772         (WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSource):
2773         (WebCore::MockRealtimeVideoSource::size):
2774         (WebCore::MockRealtimeVideoSource::updatePlatformLayer):
2775
2776 2015-11-09  Nan Wang  <n_wang@apple.com>
2777
2778         AX: Input type: time is not accessible on iOS
2779         https://bugs.webkit.org/show_bug.cgi?id=150984
2780
2781         Reviewed by Chris Fleizach.
2782
2783         Exposed input type: time as popup button on iOS.
2784
2785         Test: accessibility/ios-simulator/input-type-time.html
2786
2787         * accessibility/AccessibilityRenderObject.cpp:
2788         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2789
2790 2015-11-09  Jiewen Tan  <jiewen_tan@apple.com>
2791
2792         Null dereference loading Blink layout test editing/inserting/insert-html-crash-01.html
2793         https://bugs.webkit.org/show_bug.cgi?id=149298
2794         <rdar://problem/22746918>
2795
2796         Reviewed by Ryosuke Niwa.
2797
2798         The test crashes in the method WebCore::CompositeEditCommand::moveParagraphs() because
2799         the other method WebCore::CompositeEditCommand::cleanupAfterDeletion() accidentally
2800         deletes the destination node. In WebCore::CompositeEditCommand::cleanupAfterDeletion(),
2801         it fails to determine that caretAfterDelete equals to destination as Position::operator==,
2802         which is called in VisiblePosition::operator==, only checks the equality of tuple
2803         <Anchor Node, Anchor Type, Offset>. It is insufficient as a single position can be
2804         represented by multiple tuples. Therefore, this change adds Position::equals() to fortify
2805         the equal checking of two positions by considering combinations of different tuple
2806         representations.
2807
2808         Furthermore, it adds VisiblePosition::equals() which considers affinity and call
2809         Position::equals() while comparing two visible positions.
2810
2811         Test: editing/inserting/insert-html-crash-01.html
2812
2813         * dom/Position.cpp:
2814         (WebCore::Position::equals):
2815         * dom/Position.h:
2816         * editing/CompositeEditCommand.cpp:
2817         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
2818         Replace operator== with VisiblePosition::equals() to tackle the test case.
2819         * editing/VisiblePosition.cpp:
2820         (WebCore::VisiblePosition::equals):
2821         * editing/VisiblePosition.h:
2822
2823 2015-11-09  Myles C. Maxfield  <mmaxfield@apple.com>
2824
2825         Some style changes cause tatechuyoko to be drawn off center
2826         https://bugs.webkit.org/show_bug.cgi?id=150986
2827         <rdar://problem/20748013>
2828
2829         Reviewed by Darin Adler.
2830
2831         Layouts should be idempotent. In particular, during layout, an element should not
2832         rely on a previous call to styleDidChange() with a sufficiently high StyleDifference.
2833         RenderCombineText was assuming that, if a layout occurs, a previous call to
2834         styleDidChange() would have reset the renderedText. However, an ancestor element might
2835         cause the RenderCombineText to re-combine when it is already combined. Therefore, the
2836         recombination should fully uncombine before recombining.
2837
2838         Test: fast/text/text-combine-style-change-extra-layout.html
2839
2840         * rendering/RenderCombineText.cpp:
2841         (WebCore::RenderCombineText::combineText): Fully uncombine before recombining.
2842
2843 2015-11-09  Brent Fulgham  <bfulgham@apple.com>
2844
2845         [Win] Recognize context flush as an event that requires an update
2846         https://bugs.webkit.org/show_bug.cgi?id=151001
2847         <rdar://problem/22956040>
2848
2849         Reviewed by Simon Fraser.
2850
2851         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
2852         (WebCore::WKCACFViewLayerTreeHost::flushContext): Mark view as needing an update
2853         when flushing so internal drawing code will do the paint.
2854         * rendering/RenderLayerBacking.cpp:
2855         (WebCore::RenderLayerBacking::paintIntoLayer): Skip WK2 assert that does
2856         not apply to Windows drawing path.
2857
2858 2015-11-09  Brady Eidson  <beidson@apple.com>
2859
2860         Modern IDB: Refactor memory objectstore/transaction interation.
2861         https://bugs.webkit.org/show_bug.cgi?id=151014
2862
2863         Reviewed by Darin Adler.
2864
2865         No new tests (Refactor, no change in behavior).
2866
2867         * Modules/indexeddb/server/IDBBackingStore.h:
2868         
2869         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2870         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
2871         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2872         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2873         
2874         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2875         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
2876         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord): Deleted. Renamed to addRecord.
2877         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2878         
2879         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2880         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
2881         (WebCore::IDBServer::MemoryObjectStore::addRecord):
2882         (WebCore::IDBServer::MemoryObjectStore::putRecord): Deleted. Renamed to addRecord.
2883         (WebCore::IDBServer::MemoryObjectStore::setKeyValue): Deleted. Folded into addRecord.
2884         * Modules/indexeddb/server/MemoryObjectStore.h:
2885         
2886         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2887         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2888
2889 2015-11-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
2890
2891         REGRESSION (r190883): Error calculating the tile size for an SVG with no intrinsic size but with large floating intrinsic ratio
2892         https://bugs.webkit.org/show_bug.cgi?id=150904
2893
2894         Reviewed by Darin Adler.
2895         
2896         This patch addresses two issues. The first one is a regression from r190883
2897         which was rolling out r184895. There was a missing if-statement in 
2898         RenderBoxModelObject::calculateImageIntrinsicDimension(). We should return
2899         it back. But this if-statement is an optimization; if we hit it we should
2900         return the image resolvedSize. But we should also return the same result
2901         if we call resolveAgainstIntrinsicWidthOrHeightAndRatio().
2902         
2903         We had a bug in resolving the intrinsic size of an image using a large
2904         intrinsic ratio. We need to do the calculation in LayoutUnits always.
2905         Using float calculations and then casting the output to an integer results
2906         in significant truncation if the intrinsic ratio is large.
2907
2908         Test: fast/backgrounds/background-image-large-float-intrinsic-ratio.html
2909
2910         * rendering/RenderBoxModelObject.cpp:
2911         (WebCore::resolveWidthForRatio):
2912         (WebCore::resolveHeightForRatio):
2913         (WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio):
2914         (WebCore::resolveAgainstIntrinsicRatio):
2915         Resolve the image size using its intrinsic ratio in LayoutUnits.
2916         
2917         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
2918         Put back an if-statement which was missing from rolling out r184895
2919
2920 2015-11-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2921
2922         [Streams API] Activate assertions
2923         https://bugs.webkit.org/show_bug.cgi?id=151021
2924
2925         Reviewed by Darin Adler.
2926
2927         Activating assertions in streams API.
2928         Fixing a bug in ReadableStream implementation: when pull promise is rejected,
2929         the readable stream may already be errored by some other means.
2930
2931         Covered by existing test sets in Debug builds.
2932
2933         * Modules/streams/ReadableStreamInternals.js:
2934         (teeReadableStream):
2935         (teeReadableStreamPullFunction):
2936         (errorReadableStream):
2937         (requestReadableStreamPull):
2938         (finishClosingReadableStream):
2939         (closeReadableStream):
2940         (enqueueInReadableStream):
2941         (readFromReadableStreamReader):
2942         * Modules/streams/ReadableStreamReader.js:
2943         (cancel):
2944         * Modules/streams/StreamInternals.js:
2945         (peekQueueValue):
2946         * Modules/streams/WritableStream.js:
2947         (write):
2948         (state):
2949         * Modules/streams/WritableStreamInternals.js:
2950         (syncWritableStreamStateWithQueue):
2951         (closeWritableStream): Deleted.
2952
2953 2015-11-09  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2954
2955         [Streams API] Shield implementation from mangling then and catch promise methods
2956         https://bugs.webkit.org/show_bug.cgi?id=150934
2957
2958         Reviewed by Youenn Fablet.
2959
2960         This is a first step to get streams code shielded from user replacing the then and catch methods in our
2961         promises. We use newly introduced @then and @catch prototype internal slots and that should solve a lot of use
2962         cases.
2963
2964         Test: streams/streams-promises.html.
2965
2966         * Modules/streams/ReadableStream.js:
2967         (initializeReadableStream):
2968         * Modules/streams/ReadableStreamInternals.js:
2969         (teeReadableStream):
2970         (teeReadableStreamPullFunction):
2971         (cancelReadableStream):
2972         * Modules/streams/WritableStream.js:
2973         (initializeWritableStream):
2974         (abort):
2975         * Modules/streams/WritableStreamInternals.js:
2976         (callOrScheduleWritableStreamAdvanceQueue):
2977
2978 2015-11-09  Manuel Rego Casasnovas  <rego@igalia.com>
2979
2980         [css-grid] Refactor cachedGridCoordinate() to cachedGridSpan()
2981         https://bugs.webkit.org/show_bug.cgi?id=151017
2982
2983         Reviewed by Sergio Villar Senin.
2984
2985         We were using cachedGridCoordinate() in lots of places and checking the
2986         direction just in the next line. Creating a generic function to do this.
2987
2988         No new tests, no behavior change.
2989
2990         * rendering/RenderGrid.cpp:
2991         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2992         (WebCore::GridItemWithSpan::GridItemWithSpan):
2993         (WebCore::GridItemWithSpan::span):
2994         (WebCore::GridItemWithSpan::operator<):
2995         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
2996         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2997         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
2998         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2999         (WebCore::RenderGrid::cachedGridSpan):
3000         (WebCore::RenderGrid::gridAreaBreadthForChild):
3001         (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
3002         (WebCore::RenderGrid::columnAxisOffsetForChild):
3003         (WebCore::RenderGrid::rowAxisOffsetForChild):
3004         (WebCore::GridItemWithSpan::gridItem): Deleted.
3005         (WebCore::RenderGrid::populateGridPositions): Deleted.
3006         * rendering/RenderGrid.h:
3007
3008 2015-11-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3009
3010         JS Built-ins functions should be able to assert
3011         https://bugs.webkit.org/show_bug.cgi?id=150333
3012
3013         Reviewed by Yusuke Suzuki.
3014
3015         * Modules/streams/ReadableStreamInternals.js:
3016         (privateInitializeReadableStreamReader): Activating an @assert.
3017
3018 2015-11-02  Sergio Villar Senin  <svillar@igalia.com>
3019
3020         [css-grid] Improve grid container sizing with size constraints and intrinsic sizes
3021         https://bugs.webkit.org/show_bug.cgi?id=150679
3022
3023         Reviewed by Darin Adler.
3024
3025         The grid container stores from now on its min-content and
3026         max-content block sizes in order to be able to properly
3027         compute its intrinsic size. It has to redefine
3028         computeIntrinsicLogicalContentHeightUsing() because the
3029         behavior of grid is different to "normal" blocks:
3030
3031         - the min-content size is the sum of the grid container's
3032         track sizes in the appropiate axis when the grid is sized
3033         under a min-content constraint.
3034         - the max-content size is the sum of the grid container's
3035         track sizes in the appropiate axis when the grid is sized
3036         under a max-content constraint.
3037         - the auto block size is the max-content size.
3038
3039         A nice side effect is that we can now properly detect whether
3040         the grid has a definite size on a given axis or not.
3041
3042         Tests: fast/css-grid-layout/absolute-positioning-definite-sizes.html
3043                fast/css-grid-layout/flex-and-intrinsic-sizes.html
3044                fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html
3045                fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html
3046
3047         * rendering/RenderBox.h: made
3048         computeIntrinsicLogicalContentHeightUsing() virtual.
3049         * rendering/RenderGrid.cpp:
3050         (WebCore::RenderGrid::GridSizingData::GridSizingData):
3051         (WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
3052         (WebCore::RenderGrid::GridSizingData::setFreeSpaceForDirection):
3053         (WebCore::RenderGrid::computeTrackBasedLogicalHeight):
3054         (WebCore::RenderGrid::computeTrackSizesForDirection):
3055         (WebCore::RenderGrid::layoutBlock):
3056         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
3057         (WebCore::RenderGrid::computeIntrinsicLogicalHeight):
3058         (WebCore::RenderGrid::computeIntrinsicLogicalContentHeightUsing):
3059         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3060         (WebCore::RenderGrid::distributeSpaceToTracks):
3061         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
3062         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
3063         (WebCore::RenderGrid::layoutGridItems):
3064         (WebCore::RenderGrid::populateGridPositions):
3065         (WebCore::RenderGrid::gridElementIsShrinkToFit): Deleted.
3066         * rendering/RenderGrid.h:
3067
3068 2015-11-05  Sergio Villar Senin  <svillar@igalia.com>
3069
3070         [css-grid] Grid placement conflict handling
3071         https://bugs.webkit.org/show_bug.cgi?id=150891
3072
3073         Reviewed by Darin Adler.
3074
3075         If the placement for a grid item contains two lines, and the
3076         start line is further end-ward than the end line, swap the two
3077         lines. If the start line is equal to the end line, remove the
3078         end line.
3079
3080         Test: fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line.html
3081
3082         * rendering/style/GridResolvedPosition.cpp:
3083         (WebCore::resolveNamedGridLinePositionFromStyle):
3084         (WebCore::resolveGridPositionFromStyle):
3085         (WebCore::GridResolvedPosition::GridResolvedPosition):
3086         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
3087         (WebCore::adjustGridPositionForSide): Deleted.
3088         * rendering/style/GridResolvedPosition.h:
3089         (WebCore::GridResolvedPosition::prev):
3090
3091 2015-11-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3092
3093         [EFL] Add UserAgentEFl.cpp|h
3094         https://bugs.webkit.org/show_bug.cgi?id=151007
3095
3096         Reviewed by Darin Adler.
3097
3098         As other ports EFL port starts to have UserAgentEfl class in order to support more detailed
3099         UA.
3100
3101         No new tests, no behavior change.
3102
3103         * PlatformEfl.cmake:
3104         * platform/efl/UserAgentEfl.cpp: Added.
3105         (WebCore::platformForUAString):
3106         (WebCore::platformVersionForUAString):
3107         (WebCore::versionForUAString):
3108         (WebCore::standardUserAgent):
3109         * platform/efl/UserAgentEfl.h: Added.
3110
3111 2015-11-08  David Kilzer  <ddkilzer@apple.com>
3112
3113         REGRESSION (r192140): Windows build broke after removing ColorSpace argument to all drawing calls
3114         <http://webkit.org/b/150967>
3115
3116         Unreviewed attempt to fix the Windows build.
3117
3118         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3119         (PlatformCALayerWin::drawTextAtPoint):
3120         * platform/graphics/win/ImageCGWin.cpp:
3121         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3122         * rendering/RenderThemeWin.cpp:
3123         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
3124         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
3125         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
3126
3127 2015-11-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3128
3129         generate-js-builtins.js should support @internal annotation
3130         https://bugs.webkit.org/show_bug.cgi?id=150929
3131
3132         Reviewed by Darin Adler.
3133
3134         No change in behavior.
3135
3136         * Modules/streams/ReadableStreamInternals.js: Renamed @internals to @internal.
3137         * Modules/streams/StreamInternals.js: Ditto.
3138         * Modules/streams/WritableStreamInternals.js: Ditto.
3139
3140 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
3141
3142         Remove ColorSpace argument to all the drawing calls
3143         https://bugs.webkit.org/show_bug.cgi?id=150967
3144
3145         Reviewed by Darin Adler.
3146
3147         Since the -webkit-color-correction CSS property was removed in r188202, and ColorSpaceDeviceRGB
3148         and ColorSpaceSRGB are functionally equivalent, we can remove all the ColorSpace arguments passed
3149         to drawing functions, and remove RenderStyle::colorSpace(), which was hardcoded to return ColorSpaceSRGB.
3150         
3151         Fill and stroke ColorSpaces are also remove from graphics state, simplifying color save/restore.
3152         
3153         * bindings/scripts/CodeGeneratorObjC.pm:
3154         (GenerateImplementation):
3155         * css/CSSFilterImageValue.cpp:
3156         (WebCore::CSSFilterImageValue::image):
3157         * editing/FrameSelection.cpp:
3158         (WebCore::CaretBase::paintCaret):
3159         * editing/cocoa/HTMLConverter.mm:
3160         (_platformColor):
3161         * html/HTMLCanvasElement.cpp:
3162         (WebCore::HTMLCanvasElement::paint):
3163         * html/canvas/CanvasRenderingContext2D.cpp:
3164         (WebCore::CanvasRenderingContext2D::clearRect):
3165         (WebCore::CanvasRenderingContext2D::applyShadow):
3166         (WebCore::CanvasRenderingContext2D::drawImage):
3167         (WebCore::CanvasRenderingContext2D::compositeBuffer):
3168         (WebCore::drawImageToContext):
3169         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
3170         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3171         * html/canvas/CanvasRenderingContext2D.h:
3172         * html/canvas/CanvasStyle.cpp:
3173         (WebCore::CanvasStyle::applyStrokeColor):
3174         (WebCore::CanvasStyle::applyFillColor):
3175         * html/canvas/WebGLRenderingContextBase.cpp:
3176         (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
3177         * page/DebugPageOverlays.cpp:
3178         (WebCore::RegionOverlay::drawRect):
3179         * page/FrameView.cpp:
3180         (WebCore::FrameView::paintScrollCorner):
3181         (WebCore::FrameView::paintScrollbar):
3182         (WebCore::FrameView::paintContents):
3183         * page/PrintContext.cpp:
3184         (WebCore::PrintContext::spoolAllPagesWithBoundaries):
3185         * platform/ScrollView.cpp:
3186         (WebCore::ScrollView::paintPanScrollIcon):
3187         * platform/ScrollbarTheme.h:
3188         (WebCore::ScrollbarTheme::defaultPaintScrollCorner):
3189         * platform/ScrollbarThemeComposite.cpp:
3190         (WebCore::ScrollbarThemeComposite::paintScrollCorner):
3191         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
3192         * platform/Theme.cpp:
3193         (WebCore::Theme::drawNamedImage):
3194         * platform/cocoa/ThemeCocoa.cpp:
3195         (WebCore::ThemeCocoa::drawNamedImage):
3196         * platform/graphics/BitmapImage.cpp:
3197         (WebCore::BitmapImage::drawPattern):
3198         * platform/graphics/BitmapImage.h:
3199         * platform/graphics/Color.h:
3200         * platform/graphics/CrossfadeGeneratedImage.cpp:
3201         (WebCore::drawCrossfadeSubimage):
3202         (WebCore::CrossfadeGeneratedImage::draw):
3203         (WebCore::CrossfadeGeneratedImage::drawPattern):
3204         * platform/graphics/CrossfadeGeneratedImage.h:
3205         * platform/graphics/GeneratedImage.h:
3206         * platform/graphics/GradientImage.cpp:
3207         (WebCore::GradientImage::draw):
3208         (WebCore::GradientImage::drawPattern):
3209         * platform/graphics/GradientImage.h:
3210         * platform/graphics/GraphicsContext.cpp:
3211         (WebCore::GraphicsContext::drawRaisedEllipse):
3212         (WebCore::GraphicsContext::setStrokeColor):
3213         (WebCore::GraphicsContext::setShadow):
3214         (WebCore::GraphicsContext::setLegacyShadow):
3215         (WebCore::GraphicsContext::getShadow):
3216         (WebCore::GraphicsContext::setFillColor):
3217         (WebCore::GraphicsContext::drawImage):
3218         (WebCore::GraphicsContext::drawTiledImage):
3219         (WebCore::GraphicsContext::drawImageBuffer):
3220         (WebCore::GraphicsContext::fillRect):
3221         (WebCore::GraphicsContext::fillRoundedRect):
3222         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3223         (WebCore::GraphicsContext::clearShadow): Deleted.
3224         * platform/graphics/GraphicsContext.h:
3225         (WebCore::GraphicsContext::strokeColorSpace): Deleted.
3226         (WebCore::GraphicsContext::fillColorSpace): Deleted.
3227         * platform/graphics/Image.cpp:
3228         (WebCore::Image::fillWithSolidColor):
3229         (WebCore::Image::drawTiled):
3230         * platform/graphics/Image.h:
3231         (WebCore::Image::drawFrameMatchingSourceSize):
3232         * platform/graphics/ImageBuffer.h:
3233         (WebCore::ImageBuffer::create):
3234         * platform/graphics/NamedImageGeneratedImage.cpp:
3235         (WebCore::NamedImageGeneratedImage::draw):
3236         (WebCore::NamedImageGeneratedImage::drawPattern):
3237         * platform/graphics/NamedImageGeneratedImage.h:
3238         * platform/graphics/ShadowBlur.cpp:
3239         (WebCore::ScratchBuffer::setCachedShadowValues):
3240         (WebCore::ScratchBuffer::setCachedInsetShadowValues):
3241         (WebCore::ShadowBlur::ShadowBlur):
3242         (WebCore::ShadowBlur::setShadowValues):
3243         (WebCore::ShadowBlur::drawShadowBuffer):
3244         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
3245         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
3246         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
3247         (WebCore::ShadowBlur::drawRectShadowWithTiling):
3248         (WebCore::ShadowBlur::drawLayerPieces):
3249         (WebCore::ShadowBlur::blurAndColorShadowBuffer):
3250         (WebCore::ShadowBlur::beginShadowLayer):
3251         (WebCore::ShadowBlur::endShadowLayer):
3252         * platform/graphics/ShadowBlur.h:
3253         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3254         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3255         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3256         * platform/graphics/ca/GraphicsLayerCA.cpp:
3257         (WebCore::GraphicsLayerCA::setContentsToImage): Deleted.
3258         * platform/graphics/ca/TileGrid.cpp:
3259         (WebCore::TileGrid::platformCALayerPaintContents):
3260         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3261         (PlatformCALayerWinInternal::drawRepaintCounters):
3262         * platform/graphics/cairo/BitmapImageCairo.cpp:
3263         (WebCore::BitmapImage::draw):
3264         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3265         (WebCore::GraphicsContext::fillRect):
3266         (WebCore::GraphicsContext::setPlatformFillColor):
3267         (WebCore::GraphicsContext::setPlatformStrokeColor):
3268         (WebCore::GraphicsContext::setPlatformShadow):
3269         (WebCore::GraphicsContext::platformFillRoundedRect):
3270         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3271         (WebCore::GraphicsContext::drawPattern):
3272         * platform/graphics/cairo/ImageBufferCairo.cpp:
3273         (WebCore::ImageBuffer::draw):
3274         (WebCore::ImageBuffer::drawPattern):
3275         * platform/graphics/cairo/ImageCairo.cpp:
3276         (WebCore::Image::drawPattern):
3277         * platform/graphics/cg/BitmapImageCG.cpp:
3278         (WebCore::BitmapImage::draw):
3279         * platform/graphics/cg/ColorCG.cpp:
3280         (WebCore::leakCGColor):
3281         (WebCore::cachedCGColor):
3282         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3283         (WebCore::GraphicsContext3D::paintToCanvas):
3284         * platform/graphics/cg/GraphicsContextCG.cpp:
3285         (WebCore::setCGFillColor):
3286         (WebCore::setCGStrokeColor):
3287         (WebCore::GraphicsContext::platformInit):
3288         (WebCore::GraphicsContext::drawNativeImage):
3289         (WebCore::GraphicsContext::drawPattern):
3290         (WebCore::GraphicsContext::drawRect):
3291         (WebCore::GraphicsContext::drawLine):
3292         (WebCore::GraphicsContext::applyFillPattern):
3293         (WebCore::GraphicsContext::fillRect):
3294         (WebCore::GraphicsContext::platformFillRoundedRect):
3295         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3296         (WebCore::GraphicsContext::setPlatformShadow):
3297         (WebCore::GraphicsContext::drawLinesForText):
3298         (WebCore::GraphicsContext::setPlatformStrokeColor):
3299         (WebCore::GraphicsContext::setPlatformFillColor):
3300         (WebCore::sRGBColorSpaceRef): Deleted.
3301         * platform/graphics/cg/ImageBufferCG.cpp:
3302         (WebCore::ImageBuffer::copyImage):
3303         (WebCore::ImageBuffer::draw):
3304         (WebCore::ImageBuffer::drawPattern):
3305         * platform/graphics/cg/ImageCG.cpp:
3306         (WebCore::Image::drawPattern):
3307         (WebCore::Image::imageWithColorSpace): Deleted.
3308         * platform/graphics/cg/PDFDocumentImage.cpp:
3309         (WebCore::PDFDocumentImage::draw):
3310         * platform/graphics/cg/PDFDocumentImage.h:
3311         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3312         (WebCore::FontCascade::drawGlyphs):
3313         * platform/graphics/filters/FEBlend.cpp:
3314         (WebCore::FEBlend::platformApplySoftware):
3315         * platform/graphics/filters/FEColorMatrix.cpp:
3316         (WebCore::FEColorMatrix::platformApplySoftware):
3317         * platform/graphics/filters/FEComposite.cpp:
3318         (WebCore::FEComposite::platformApplySoftware):
3319         * platform/graphics/filters/FEDropShadow.cpp:
3320         (WebCore::FEDropShadow::platformApplySoftware):
3321         * platform/graphics/filters/FEFlood.cpp:
3322         (WebCore::FEFlood::platformApplySoftware):
3323         * platform/graphics/filters/FEMerge.cpp:
3324         (WebCore::FEMerge::platformApplySoftware):
3325         * platform/graphics/filters/FEOffset.cpp:
3326         (WebCore::FEOffset::platformApplySoftware):
3327         * platform/graphics/filters/FETile.cpp:
3328         (WebCore::FETile::platformApplySoftware):
3329         * platform/graphics/filters/SourceAlpha.cpp:
3330         (WebCore::SourceAlpha::platformApplySoftware):
3331         * platform/graphics/filters/SourceGraphic.cpp:
3332         (WebCore::SourceGraphic::platformApplySoftware):
3333         * platform/graphics/ios/IconIOS.mm:
3334         (WebCore::Icon::paint):
3335         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
3336         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
3337         * platform/graphics/win/FontCGWin.cpp:
3338         (WebCore::FontCascade::drawGlyphs):
3339         * platform/graphics/win/GraphicsContextCGWin.cpp:
3340         (WebCore::GraphicsContext::drawFocusRing):
3341         * platform/graphics/win/ImageCGWin.cpp:
3342         (WebCore::BitmapImage::getHBITMAPOfSize):
3343         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3344         * platform/graphics/win/ImageCairoWin.cpp:
3345         (WebCore::BitmapImage::getHBITMAPOfSize):
3346         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3347         * platform/ios/LegacyTileCache.mm:
3348         (WebCore::LegacyTileCache::drawLayer):
3349         * platform/ios/LegacyTileGridTile.mm:
3350         (WebCore::LegacyTileGridTile::showBorder):
3351         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3352         (WebVideoFullscreenControllerContext::didSetupFullscreen):
3353         * platform/mac/DragImageMac.mm:
3354         (WebCore::drawAtPoint):
3355         * platform/mac/ScrollbarThemeMac.mm:
3356         (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
3357         * platform/mac/ThemeMac.mm:
3358         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
3359         * platform/mediastream/MediaStreamPrivate.cpp:
3360         (WebCore::MediaStreamPrivate::paintCurrentFrameInContext):
3361         * platform/mock/ScrollbarThemeMock.cpp:
3362         (WebCore::ScrollbarThemeMock::paintTrackBackground):
3363         (WebCore::ScrollbarThemeMock::paintThumb):
3364         * platform/win/DragImageWin.cpp:
3365         (WebCore::createDragImageForLink):
3366         * platform/win/PopupMenuWin.cpp:
3367         (WebCore::PopupMenuWin::paint):
3368         * platform/win/WebCoreTextRenderer.cpp:
3369         (WebCore::doDrawTextAtPoint):
3370         * rendering/EllipsisBox.cpp:
3371         (WebCore::EllipsisBox::paint):
3372         (WebCore::EllipsisBox::paintSelection):
3373         * rendering/FilterEffectRenderer.cpp:
3374         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
3375         * rendering/InlineTextBox.cpp:
3376         (WebCore::InlineTextBox::paintSelection):
3377         (WebCore::InlineTextBox::paintCompositionBackground):
3378         (WebCore::InlineTextBox::paintDecoration):
3379         (WebCore::InlineTextBox::paintTextMatchMarker):
3380         (WebCore::InlineTextBox::paintCompositionUnderline):
3381         * rendering/RenderBlock.cpp:
3382         (WebCore::RenderBlock::blockSelectionGap):
3383         (WebCore::RenderBlock::logicalLeftSelectionGap):
3384         (WebCore::RenderBlock::logicalRightSelectionGap):
3385         * rendering/RenderBox.cpp:
3386         (WebCore::RenderBox::paintClippingMask):
3387         * rendering/RenderBoxModelObject.cpp:
3388         (WebCore::applyBoxShadowForBackground):
3389         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3390         (WebCore::RenderBoxModelObject::paintBorder):
3391         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
3392         (WebCore::RenderBoxModelObject::paintBoxShadow):
3393         * rendering/RenderDetailsMarker.cpp:
3394         (WebCore::RenderDetailsMarker::paint):
3395         * rendering/RenderElement.cpp:
3396         (WebCore::RenderElement::drawLineForBoxSide):
3397         (WebCore::RenderElement::paintOutline):
3398         * rendering/RenderEmbeddedObject.cpp:
3399         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
3400         (WebCore::RenderEmbeddedObject::paintReplaced):
3401         * rendering/RenderFileUploadControl.cpp:
3402         (WebCore::RenderFileUploadControl::paintObject):
3403         * rendering/RenderFrameSet.cpp:
3404         (WebCore::RenderFrameSet::paintColumnBorder):
3405         (WebCore::RenderFrameSet::paintRowBorder):
3406         * rendering/RenderImage.cpp:
3407         (WebCore::RenderImage::paintReplaced):
3408         (WebCore::RenderImage::paintIntoRect):
3409         * rendering/RenderLayer.cpp:
3410         (WebCore::RenderLayer::beginTransparencyLayers):
3411         (WebCore::RenderLayer::paintScrollCorner):
3412         (WebCore::RenderLayer::drawPlatformResizerImage):
3413         (WebCore::RenderLayer::paintResizer):
3414         * rendering/RenderListBox.cpp:
3415         (WebCore::RenderListBox::paintItemForeground):
3416         (WebCore::RenderListBox::paintItemBackground):
3417         * rendering/RenderListMarker.cpp:
3418         (WebCore::RenderListMarker::paint):
3419         * rendering/RenderReplaced.cpp:
3420         (WebCore::RenderReplaced::paint):
3421         * rendering/RenderScrollbarTheme.cpp:
3422         (WebCore::RenderScrollbarTheme::paintScrollCorner):
3423         * rendering/RenderSnapshottedPlugIn.cpp:
3424         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
3425         * rendering/RenderTheme.cpp:
3426         (WebCore::RenderTheme::paintSliderTicks):
3427         * rendering/RenderThemeIOS.mm:
3428         (WebCore::drawAxialGradient):
3429         (WebCore::drawRadialGradient):
3430         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
3431         (WebCore::RenderThemeIOS::paintRadioDecorations):
3432         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
3433         (WebCore::RenderThemeIOS::paintSliderTrack):
3434         (WebCore::RenderThemeIOS::paintProgressBar):
3435         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
3436         * rendering/RenderThemeMac.mm:
3437         (WebCore::RenderThemeMac::paintProgressBar):
3438         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
3439         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3440         (WebCore::titleTextColorForAttachment):
3441         (WebCore::AttachmentLayout::layOutSubtitle):
3442         (WebCore::paintAttachmentIconBackground):
3443         (WebCore::paintAttachmentTitleBackground):
3444         (WebCore::paintAttachmentProgress):
3445         * rendering/RenderView.cpp:
3446         (WebCore::RenderView::paint):
3447         (WebCore::RenderView::paintBoxDecorations):
3448         * rendering/RenderWidget.cpp:
3449         (WebCore::RenderWidget::paint):
3450         * rendering/RootInlineBox.cpp:
3451         (WebCore::RootInlineBox::lineSelectionGap):
3452         * rendering/SimpleLineLayoutFunctions.cpp:
3453         (WebCore::SimpleLineLayout::paintDebugBorders):
3454         * rendering/TextPaintStyle.cpp:
3455         (WebCore::TextPaintStyle::TextPaintStyle):
3456         (WebCore::adjustColorForVisibilityOnBackground):
3457         (WebCore::computeTextPaintStyle):
3458         (WebCore::updateGraphicsContext):
3459         * rendering/TextPaintStyle.h:
3460         (WebCore::TextPaintStyle::TextPaintStyle):
3461         * rendering/TextPainter.cpp:
3462         (WebCore::ShadowApplier::ShadowApplier):
3463         (WebCore::paintTextWithShadows):
3464         * rendering/mathml/RenderMathMLBlock.cpp:
3465         (WebCore::RenderMathMLBlock::paint):
3466         * rendering/mathml/RenderMathMLFraction.cpp:
3467         (WebCore::RenderMathMLFraction::paint):
3468         * rendering/mathml/RenderMathMLMenclose.cpp:
3469         (WebCore::RenderMathMLMenclose::paint):
3470         * rendering/mathml/RenderMathMLOperator.cpp:
3471         (WebCore::RenderMathMLOperator::paint):
3472         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
3473         (WebCore::RenderMathMLRadicalOperator::paint):
3474         * rendering/mathml/RenderMathMLRoot.cpp:
3475         (WebCore::RenderMathMLRoot::paint):
3476         * rendering/shapes/Shape.cpp:
3477         (WebCore::Shape::createRasterShape):
3478         * rendering/style/NinePieceImage.cpp:
3479         (WebCore::NinePieceImage::paint):
3480         * rendering/style/RenderStyle.h:
3481         * rendering/svg/RenderSVGImage.cpp:
3482         (WebCore::RenderSVGImage::paintForeground):
3483         * rendering/svg/RenderSVGPath.cpp:
3484         (WebCore::useStrokeStyleToFill):
3485         * rendering/svg/RenderSVGResourceFilter.cpp:
3486         (WebCore::RenderSVGResourceFilter::postApplyResource):
3487         * rendering/svg/RenderSVGResourceSolidColor.cpp:
3488         (WebCore::RenderSVGResourceSolidColor::applyResource):
3489         * rendering/svg/SVGInlineTextBox.cpp:
3490         (WebCore::SVGInlineTextBox::paintSelectionBackground):
3491         * rendering/svg/SVGRenderingContext.cpp:
3492         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3493         (WebCore::SVGRenderingContext::bufferForeground):
3494         * svg/SVGAnimatedColor.cpp:
3495         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
3496         * svg/graphics/SVGImage.cpp:
3497         (WebCore::SVGImage::drawForContainer):
3498         (WebCore::SVGImage::nativeImageForCurrentFrame):
3499         (WebCore::SVGImage::drawPatternForContainer):
3500         (WebCore::SVGImage::draw):
3501         * svg/graphics/SVGImage.h:
3502         * svg/graphics/SVGImageForContainer.cpp:
3503         (WebCore::SVGImageForContainer::draw):
3504         (WebCore::SVGImageForContainer::drawPattern):
3505         * svg/graphics/SVGImageForContainer.h:
3506         * svg/graphics/filters/SVGFEImage.cpp:
3507         (WebCore::FEImage::platformApplySoftware):
3508         * testing/MockPageOverlayClient.cpp:
3509         (WebCore::MockPageOverlayClient::drawRect):
3510
3511 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
3512
3513         Use ColorSpaceSRGB for image buffers everywhere
3514         https://bugs.webkit.org/show_bug.cgi?id=150990
3515
3516         Reviewed by Zalan Bujtas.
3517
3518         ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
3519         code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
3520
3521         * platform/graphics/GraphicsContext.cpp:
3522         (WebCore::GraphicsContext::createCompatibleBuffer):
3523         * platform/graphics/ImageBuffer.h:
3524         (WebCore::ImageBuffer::create):
3525         * platform/graphics/cg/BitmapImageCG.cpp:
3526         (WebCore::BitmapImage::checkForSolidColor):
3527         * platform/graphics/cg/ColorCG.cpp:
3528         (WebCore::Color::Color):
3529         * platform/graphics/cg/GraphicsContextCG.cpp:
3530         (WebCore::sRGBColorSpaceRef): Deleted.
3531         * platform/graphics/cg/ImageBufferCG.cpp:
3532         (WebCore::ImageBuffer::putByteArray):
3533         * platform/graphics/cocoa/IOSurface.mm:
3534         (IOSurface::createFromImage):
3535         * platform/graphics/filters/FEFlood.h:
3536         * platform/graphics/filters/FETile.cpp:
3537         (WebCore::FETile::platformApplySoftware):
3538         * platform/graphics/filters/FilterEffect.cpp:
3539         (WebCore::FilterEffect::FilterEffect):
3540         * platform/graphics/filters/SourceGraphic.h:
3541         (WebCore::SourceGraphic::SourceGraphic):
3542         * rendering/FilterEffectRenderer.cpp:
3543         (WebCore::FilterEffectRenderer::build):
3544         (WebCore::FilterEffectRenderer::apply):
3545         * rendering/RenderThemeMac.mm:
3546         (WebCore::RenderThemeMac::paintProgressBar):
3547         * rendering/svg/RenderSVGResourceClipper.cpp:
3548         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3549         * rendering/svg/RenderSVGResourceFilter.cpp:
3550         (WebCore::RenderSVGResourceFilter::buildPrimitives):
3551         * rendering/svg/RenderSVGResourceGradient.cpp:
3552         (WebCore::createMaskAndSwapContextForTextGradient):
3553         * rendering/svg/RenderSVGResourceMasker.cpp:
3554         (WebCore::RenderSVGResourceMasker::applyResource):
3555         * rendering/svg/RenderSVGResourcePattern.cpp:
3556         (WebCore::RenderSVGResourcePattern::createTileImage):
3557         * svg/graphics/SVGImage.cpp:
3558         (WebCore::SVGImage::drawPatternForContainer):
3559         * svg/graphics/filters/SVGFEImage.cpp:
3560         (WebCore::FEImage::platformApplySoftware):
3561
3562 2015-11-07  Zalan Bujtas  <zalan@apple.com>
3563
3564         Crash when subtree layout is set on FrameView while auto size mode is enabled.
3565         https://bugs.webkit.org/show_bug.cgi?id=150995
3566         rdar://problem/22785262
3567
3568         Reviewed by Beth Dakin.
3569
3570         Autosizing initiates multiple synchronous layouts to calculate preferred view width for current content.
3571         FrameView::autoSizeIfEnabled() is called from FrameView::layout() while we are in InPreLayout state.
3572         It is safe to do during full layout.
3573         However, since we setup the subtree state just before the autoSizeIfEnabled() call, reentering it with
3574         a newly issued layout confuses SubtreeLayoutStateMaintainer.
3575
3576         This patch reverses the order of autoSizeIfEnabled() call and the subtree layout state setup.
3577         It also ensures that the first layout requested by autoSizeIfEnabled() always runs on the whole tree.  
3578
3579         Test: fast/dynamic/crash-subtree-layout-when-auto-size-enabled.html
3580
3581         * page/FrameView.cpp:
3582         (WebCore::FrameView::layout):
3583         (WebCore::FrameView::convertSubtreeLayoutToFullLayout):
3584         (WebCore::FrameView::scheduleRelayout):
3585         (WebCore::FrameView::scheduleRelayoutOfSubtree):
3586         (WebCore::FrameView::autoSizeIfEnabled):
3587         * page/FrameView.h:
3588         * testing/Internals.cpp:
3589         (WebCore::Internals::enableAutoSizeMode):
3590         * testing/Internals.h:
3591         * testing/Internals.idl:
3592
3593 2015-11-07  Chris Dumez  <cdumez@apple.com>
3594
3595         embed element without src and type attributes should represent nothing
3596         https://bugs.webkit.org/show_bug.cgi?id=148853
3597         <rdar://problem/22588235>
3598
3599         Reviewed by Zalan Bujtas.
3600
3601         As per the HTML specification, an embed element without src and type
3602         attributes should represent nothing:
3603         https://html.spec.whatwg.org/multipage/embedded-content.html#the-embed-element
3604
3605         This patch fixes the issue by making sure we don't construct a
3606         renderer for such embed elements.
3607
3608         The new behavior is consistent with Firefox but differs from Chrome.
3609
3610         No new tests, already covered by existing tests.
3611
3612         * html/HTMLEmbedElement.cpp:
3613         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3614
3615 2015-11-07  Michael Catanzaro  <mcatanzaro@igalia.com>
3616
3617         Node.h:392:12: warning: 'this' pointer cannot be null in well-defined C++ code
3618         https://bugs.webkit.org/show_bug.cgi?id=150996
3619
3620         Reviewed by Andreas Kling.
3621
3622         Remove ASSERT(this) statement that is triggering hundreds of warnings from Clang.
3623
3624         * dom/Node.h:
3625         (WebCore::Node::document):
3626
3627 2015-11-07  Michael Catanzaro  <mcatanzaro@igalia.com>
3628
3629         Unreviewed, fix GTK build after r191981
3630
3631         * html/HTMLFormControlElement.cpp:
3632
3633 2015-11-06  Scott Valentine  <svalentine@ikayzo.com>
3634
3635         Allow an optional hash algorithm to be passed to generateKey for RSA keys.
3636         https://bugs.webkit.org/show_bug.cgi?id=144938
3637
3638         Reviewed by Alexey Proskuryakov.
3639
3640         Test: crypto/subtle/rsa-export-generated-keys.html
3641
3642         This changeset allows an optional hash parameter to be passed to the generate
3643         key function for RSA type keys. Previously, there was no way to export generated
3644         keys, as no hash function could be associated with the key (required for JWK).
3645
3646         The current WebCrypto API draft requires the hash function to be specified in the
3647         algorithm object passed to generateKey (http://www.w3.org/TR/WebCryptoAPI 20.4),
3648         however, they were made optional in this implementation to maintain compatiblity.
3649
3650         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3651         (WebCore::getHashAlgorithm):
3652         (WebCore::createHmacParams):
3653         (WebCore::createHmacKeyParams):
3654         (WebCore::createRsaKeyGenParams):
3655         (WebCore::createRsaOaepParams):
3656         (WebCore::createRsaSsaParams):
3657         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Deleted.
3658         * bindings/js/SerializedScriptValue.cpp:
3659         (WebCore::CloneDeserializer::readRSAKey):
3660         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
3661         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
3662         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
3663         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
3664         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
3665         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
3666         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
3667         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
3668         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
3669         * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
3670         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
3671         (WebCore::CryptoKeyRSA::create):
3672         (WebCore::CryptoKeyRSA::generatePair):
3673         (WebCore::CryptoKeyRSA::restrictToHash): Deleted.
3674         * crypto/keys/CryptoKeyRSA.h:
3675         * crypto/mac/CryptoKeyRSAMac.cpp:
3676         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
3677         (WebCore::CryptoKeyRSA::create):
3678         (WebCore::CryptoKeyRSA::generatePair):
3679         (WebCore::CryptoKeyRSA::restrictToHash): Deleted.
3680         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
3681
3682 2015-11-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3683
3684         Scrolling iframe inside scrollable div does not work with trackpad
3685         https://bugs.webkit.org/show_bug.cgi?id=150168
3686         <rdar://problem/23143931>
3687
3688         Reviewed by Brent Fulgham.
3689
3690         When scrolling in an iframe nested under an overflow scrolling region, EventHandler::platformPrepareForWheelEvents
3691         fails to compute the correct scrollableArea, using the overflow div's scrollable area instead of the iframe's view.
3692         This causes the latching algorithm to bail out of handling the wheel event. To avoid this, we special-case the
3693         decision to compute the scrollableArea from the scrollableContainer if we are attempting to scroll in an iframe.
3694
3695         Test: fast/scrolling/latching/scroll-iframe-in-overflow.html
3696
3697         * page/mac/EventHandlerMac.mm:
3698         (WebCore::EventHandler::platformPrepareForWheelEvents):
3699
3700 2015-11-06  Brady Eidson  <beidson@apple.com>
3701
3702         Modern IDB: Make the result data for a "get" request be an IDBGetResult.
3703         https://bugs.webkit.org/show_bug.cgi?id=150985
3704
3705         Reviewed by Alex Christensen.
3706
3707         No new tests (Refactor, no change in behavior).
3708
3709         * Modules/indexeddb/IDBGetResult.h:
3710         (WebCore::IDBGetResult::IDBGetResult):
3711         (WebCore::IDBGetResult::dataFromBuffer):
3712         (WebCore::IDBGetResult::isolatedCopy):
3713         
3714         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3715         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
3716         
3717         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
3718         (WebCore::GetOperation::perform):
3719         
3720         * Modules/indexeddb/server/IDBBackingStore.h:
3721         
3722         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3723         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
3724         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3725         
3726         * Modules/indexeddb/server/MemoryIndex.cpp:
3727         (WebCore::IDBServer::MemoryIndex::valueForKeyRange):
3728         * Modules/indexeddb/server/MemoryIndex.h:
3729         
3730         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3731         (WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
3732         * Modules/indexeddb/server/MemoryObjectStore.h:
3733         
3734         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3735         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
3736         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
3737         (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
3738         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord):
3739         (WebCore::IDBServer::UniqueIDBDatabase::performGetResultCallback):
3740         (WebCore::IDBServer::UniqueIDBDatabase::performValueDataCallback): Deleted.
3741         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3742         
3743         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3744         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
3745         
3746         * Modules/indexeddb/shared/IDBResultData.cpp:
3747         (WebCore::IDBResultData::IDBResultData):
3748         (WebCore::IDBResultData::getRecordSuccess):
3749         (WebCore::IDBResultData::getResult):
3750         * Modules/indexeddb/shared/IDBResultData.h:
3751         (WebCore::IDBResultData::resultData): Deleted.
3752
3753 2015-11-06  Chris Dumez  <cdumez@apple.com>
3754
3755         Remove unused HTMLFormControlsCollection::namedItem()
3756         https://bugs.webkit.org/show_bug.cgi?id=150975
3757
3758         Reviewed by Andreas Kling.
3759
3760         Remove unused HTMLFormControlsCollection::namedItem().
3761         JSHTMLFormControlsCollection::namedItem() calls namedItems() on the
3762         implementation object, not namedItem() because it returns a
3763         RadioNodeList when there are several matches.
3764
3765         * html/HTMLFormControlsCollection.cpp:
3766         (WebCore::firstNamedItem): Deleted.
3767         (WebCore::HTMLFormControlsCollection::namedItem): Deleted.
3768         * html/HTMLFormControlsCollection.h:
3769
3770 2015-11-06  Myles C. Maxfield  <mmaxfield@apple.com>
3771
3772         REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
3773         https://bugs.webkit.org/show_bug.cgi?id=150923
3774
3775         Reviewed by Zalan Bujtas.
3776
3777         Ever since r182286, expansion opportunities in justified ruby were moved to their neighboring
3778         elements (thereby forbidding trailing nor leading expansions inside ruby). However, when the
3779         neighboring element is tatechuyoko, we will erroneously honor the expansion opportunity inside
3780         the tatechuyoko, thereby moving it horizontally.
3781
3782         Tatechuyoko should never have expansion opportunities inside it.
3783
3784         Test: fast/text/ruby-justify-tatechuyoko.html
3785
3786         * rendering/RenderBlockLineLayout.cpp:
3787         (WebCore::expansionBehaviorForInlineTextBox):
3788
3789 2015-11-06  Mario Sanchez Prada  <mario@endlessm.com>
3790
3791         Layout Test accessibility/win/linked-elements.html is crashing on win debug
3792         https://bugs.webkit.org/show_bug.cgi?id=150944
3793
3794         Reviewed by Chris Fleizach.
3795
3796         Be more precise ASSERTing on textUnderElement, only checking that the render
3797         tree is stable before using TextIteraror when in 'IncludeAllChildren' mode.
3798
3799         * accessibility/AccessibilityRenderObject.cpp:
3800         (WebCore::AccessibilityRenderObject::textUnderElement):
3801
3802 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3803
3804         [GStreamer] Use MainThreadNotifier to send notifications to main thread in WebKitWebSourceGStreamer
3805         https://bugs.webkit.org/show_bug.cgi?id=150890
3806
3807         Reviewed by Žan Doberšek.
3808
3809         Instead of the GThreadSafeMainLoopSources.
3810
3811         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3812         (webKitWebSrcStop):
3813         (webKitWebSrcChangeState):
3814         (webKitWebSrcNeedData):
3815         (webKitWebSrcEnoughData):
3816         (webKitWebSrcSeek):
3817         (StreamingClient::handleResponseReceived):
3818         (StreamingClient::handleDataReceived):
3819         (StreamingClient::handleNotifyFinished):
3820         (webKitWebSrcFinalize): Deleted.
3821         (webKitWebSrcSetProperty): Deleted.
3822         (webKitWebSrcGetProperty): Deleted.
3823         (webKitWebSrcSetExtraHeader): Deleted.
3824         (webKitWebSrcStart): Deleted.
3825         (webKitWebSrcGetProtocols): Deleted.
3826         (webKitWebSrcGetUri): Deleted.
3827         (webKitWebSrcSetUri): Deleted.
3828         (webKitWebSrcUriHandlerInit): Deleted.
3829
3830 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3831
3832         [GStreamer] Use MainThreadNotifier to send notifications to main thread in TrackPrivateGStreamer
3833         https://bugs.webkit.org/show_bug.cgi?id=150889
3834
3835         Reviewed by Žan Doberšek.
3836
3837         Instead of the GThreadSafeMainLoopSources.
3838
3839         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3840         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
3841         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3842         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
3843         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
3844         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3845         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
3846         (WebCore::TrackPrivateBaseGStreamer::disconnect):
3847         (WebCore::TrackPrivateBaseGStreamer::activeChangedCallback):
3848         (WebCore::TrackPrivateBaseGStreamer::tagsChangedCallback):
3849         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3850         (WebCore::TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer): Deleted.
3851         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged): Deleted.
3852         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
3853
3854 2015-11-06  Csaba Osztrogonác  <ossy@webkit.org>
3855
3856         Suppress deprecated-declarations warning in WebCore/platform/URL.cpp
3857         https://bugs.webkit.org/show_bug.cgi?id=150803
3858
3859         Reviewed by Alexey Proskuryakov.
3860
3861         * platform/URL.cpp:
3862         (WebCore::appendEncodedHostname):
3863
3864 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3865
3866         [GStreamer] Do not use GThreadSafeMainLoopSource to send notifications to the main thread in MediaPlayerPrivateGStreamer
3867         https://bugs.webkit.org/show_bug.cgi?id=150888
3868
3869         Reviewed by Žan Doberšek.
3870
3871         Analyzing how the main loop sources were used in GST code I've
3872         noticed that in most of the cases they are used to send
3873         notifications to the main thread. The way it works in those cases
3874         is that some state is updated in whatever thread and we notify the
3875         main thread to use the new state. There's no data passed to the
3876         main thread, they are just notifications. I've also noticed that
3877         we are not doing this exactly as expected in several of those
3878         cases. GThreadSafeMainLoopSource cancels the current source when a
3879         new one is scheduled, and that was done this way because previous
3880         code in GST using GSources directly did it that way. But that's
3881         not what we want, if there's a notification pending, since the
3882         state is updated, we can just wait for it to happen instead of
3883         cancelling and scheduling a new one. I've also noticed that in
3884         most of the cases where we schedule notifications to the main
3885         thread, we can be already in the main thread, so we could avoid
3886         the schedule entirely.
3887         We can use RunLoop::dispatch() to send notifications to the main
3888         thread, but there's no way to cancel those tasks. This patch adds
3889         a new helper class MainThreadNotifier that uses an enum of flags to
3890         handle different kind of notifications. It uses
3891         RunLoop::dispatch() to send notifications to the main thread, but
3892         only if there isn't one pending for the given type.
3893         This patch also makes signal callbacks static members to be able
3894         to make the private methods actually private.
3895
3896         * platform/graphics/gstreamer/MainThreadNotifier.h: Added.
3897         (WebCore::MainThreadNotifier::MainThreadNotifier):
3898         (WebCore::MainThreadNotifier::notify):
3899         (WebCore::MainThreadNotifier::cancelPendingNotifications):
3900         (WebCore::MainThreadNotifier::addPendingNotification):
3901         (WebCore::MainThreadNotifier::removePendingNotification):
3902         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3903         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamPropertiesCallback):
3904         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
3905         (WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
3906         (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
3907         (WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
3908         (WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):
3909         (WebCore::MediaPlayerPrivateGStreamer::newTextSampleCallback):
3910         (WebCore::MediaPlayerPrivateGStreamer::sourceChangedCallback):
3911         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
3912         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
3913         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Deleted.
3914         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): Deleted.
3915         (WebCore::initializeGStreamerAndRegisterWebKitElements): Deleted.
3916         (WebCore::MediaPlayerPrivateGStreamer::load): Deleted.
3917         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Deleted.
3918         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Deleted.
3919         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Deleted.
3920         (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData): Deleted.
3921         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3922         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3923         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
3924         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
3925         (WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
3926         (WebCore::MediaPlayerPrivateGStreamerBase::repaintCallback):
3927         (WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
3928         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
3929         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
3930         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): Deleted.
3931         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Deleted.
3932         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): Deleted.
3933         (WebCore::MediaPlayerPrivateGStreamerBase::muted): Deleted.
3934         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Deleted.
3935         (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount): Deleted.
3936         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3937         (WebCore::MediaPlayerPrivateGStreamerBase::setVisible): Deleted.
3938
3939 2015-11-06  Yoav Weiss  <yoav@yoav.ws>
3940
3941         Expose HTMLImageElement sizes attribute in IDL
3942         https://bugs.webkit.org/show_bug.cgi?id=150230
3943
3944         Reviewed by Darin Adler.
3945
3946         No new tests, but fixed test expectations for exposed interfaces.
3947
3948         * html/HTMLImageElement.idl: Make sure that `sizes` is exposed as an IDL attribute, to ensure proper feature detection of sizes support.
3949
3950 2015-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3951
3952         [GStreamer] Use RunLoop::Timer instead of GMainLoopSource in video sink
3953         https://bugs.webkit.org/show_bug.cgi?id=150807
3954
3955         Reviewed by Žan Doberšek.
3956
3957         Since we always wait until the sample is actually rendered we
3958         don't really need either a thread safe main loop source, nor
3959         cancelling if already requested and other things GMainLoopSource does.
3960         This adds a helper class VideoRenderRequestScheduler to use the
3961         RunLoop::Timer. All the logic to syncronize between threads has
3962         been moved to this helper class too.
3963
3964         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3965         (VideoRenderRequestScheduler::VideoRenderRequestScheduler):
3966         (VideoRenderRequestScheduler::start):
3967         (VideoRenderRequestScheduler::stop):
3968         (VideoRenderRequestScheduler::requestRender):
3969         (VideoRenderRequestScheduler::isUnlocked):
3970         (VideoRenderRequestScheduler::render):
3971         (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate):
3972         (webkitVideoSinkRepaintRequested):
3973         (webkitVideoSinkRender):
3974         (webkitVideoSinkUnlock):
3975         (webkitVideoSinkUnlockStop):
3976         (webkitVideoSinkStop):
3977         (webkitVideoSinkStart):
3978         (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Deleted.
3979         (webkitVideoSinkTimeoutCallback): Deleted.
3980         (unlockSampleMutex): Deleted.
3981
3982 2015-11-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
3983
3984         Add runtime and compile time flags for enabling Web Animations API and model.
3985         https://bugs.webkit.org/show_bug.cgi?id=150914
3986
3987         Reviewed by Benjamin Poulain.
3988
3989         Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.
3990
3991         * Configurations/FeatureDefines.xcconfig:
3992         * bindings/generic/RuntimeEnabledFeatures.cpp:
3993         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
3994         * bindings/generic/RuntimeEnabledFeatures.h:
3995         (WebCore::RuntimeEnabledFeatures::setWebAnimationsEnabled):
3996         (WebCore::RuntimeEnabledFeatures::webAnimationsEnabled):
3997
3998 2015-11-05  Commit Queue  <commit-queue@webkit.org>
3999
4000         Unreviewed, rolling out r192089.
4001         https://bugs.webkit.org/show_bug.cgi?id=150966
4002
4003         This change broke an existing layout test on Yosemite and
4004         Mavericks (Requested by ryanhaddad on #webkit).
4005
4006         Reverted changeset:
4007
4008         "Preview on apple.com/contact with all text selected shows a
4009         map"
4010         https://bugs.webkit.org/show_bug.cgi?id=150963
4011         http://trac.webkit.org/changeset/192089
4012
4013 2015-11-05  Tim Horton  <timothy_horton@apple.com>
4014
4015         Preview on apple.com/contact with all text selected shows a map
4016         https://bugs.webkit.org/show_bug.cgi?id=150963
4017         <rdar://problem/23421750>
4018
4019         Reviewed by Beth Dakin.
4020
4021         * editing/mac/DictionaryLookup.h:
4022         * editing/mac/DictionaryLookup.mm:
4023         (WebCore::DictionaryLookup::rangeForSelection):
4024         If the range that Lookup decides to use doesn't intersect the hit point,
4025         just ignore Lookup.
4026
4027         (WebCore::DictionaryLookup::rangeAtHitTestResult):
4028         If the selection-based Lookup fails to find a usable result, fall back