Enable Pointer Events on watchOS
[WebKit-https.git] / Source / WebCore / ChangeLog-2015-11-21
1 2015-11-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         [GTK] Off-by-one error in getStyleContext()
4         https://bugs.webkit.org/show_bug.cgi?id=151524
5
6         Reviewed by Carlos Garcia Campos.
7
8         GtkWidgetPath* path = gtk_widget_path_new();
9         gtk_widget_path_append_type(path, widgetType);
10         // ...
11         gtk_widget_path_iter_add_class(path, 0, GTK_STYLE_CLASS_BUTTON);
12         gtk_widget_path_iter_add_class(path, 1, "text-button");
13
14         Only one widget type was appended to the widget path, so the maximum valid index is 0. This
15         code means to add both style classes to the first widget type in the widget path, so the
16         second call should use index 0 rather than index 1.
17
18         This caused no bug in practice, because when the index is invalid,
19         gtk_widget_path_iter_add_class() automatically changes the index to the last valid position
20         in the widget path -- in this case, 0. This is routinely done with -1 as a convention for
21         specifying the last position in the widget path.
22
23         * rendering/RenderThemeGtk.cpp:
24         (WebCore::getStyleContext):
25
26 2015-11-21  Michael Catanzaro  <mcatanzaro@igalia.com>
27
28         [GTK] Warning spam from GtkStyleContext
29         https://bugs.webkit.org/show_bug.cgi?id=151520
30
31         Reviewed by Carlos Garcia Campos.
32
33         Audit every use of gtk_style_context_get_* to fix compatibility with GTK+ 3.19. Some of
34         these were already fine and are only changed for clarity.
35
36         Company:  gtk_style_context_get() (and _get_padding/border/color()) should only ever be
37                   called with the same state as gtk_style_context_get_state()
38         Company:  usually that's a simple replacing of the old state (like in the trace you posted)
39         Company:  sometimes it requires calling gtk_style_context_set_sate() with the right state
40                   first
41         Company:  and in very rare cases it needs a gtk_style_context_save() before the set_state(),
42                   too
43
44         * platform/gtk/ScrollbarThemeGtk.cpp:
45         (WebCore::adjustRectAccordingToMargin):
46         * rendering/RenderThemeGtk.cpp:
47         (gtk_css_section_print):
48         (WebCore::getStyleContext):
49         (WebCore::RenderThemeGtk::initMediaColors):
50         (WebCore::renderButton):
51         (WebCore::getComboBoxMetrics):
52         (WebCore::RenderThemeGtk::paintMenuList):
53         (WebCore::RenderThemeGtk::paintTextField):
54         (WebCore::RenderThemeGtk::paintProgressBar):
55         (WebCore::spinButtonArrowSize):
56         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
57         (WebCore::styleColor):
58
59 2015-11-20  Brady Eidson  <beidson@apple.com>
60
61         Modern IDB: After versionchange transactions complete, fire onsuccess on the original IDBOpenDBRequest
62         https://bugs.webkit.org/show_bug.cgi?id=151522
63
64         Reviewed by Alex Christensen.
65
66         Test: storage/indexeddb/modern/opendatabase-success-after-versionchange.html (And changes to other existing tests)
67
68         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
69         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
70         * Modules/indexeddb/client/IDBDatabaseImpl.h:
71         
72         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
73         (WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
74         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
75         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
76         
77         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
78         (WebCore::IDBClient::IDBTransaction::create):
79         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
80         (WebCore::IDBClient::IDBTransaction::dispatchEvent):
81         * Modules/indexeddb/client/IDBTransactionImpl.h:
82
83 2015-11-20  Simon Fraser  <simon.fraser@apple.com>
84
85         More deviceRGB color cleanup
86         https://bugs.webkit.org/show_bug.cgi?id=151523
87         <rdar://problem/23638597>
88
89         Reviewed by Tim Horton.
90
91         Replace calls to deviceRGBColorSpaceRef() with sRGBColorSpaceRef(), and use
92         sRGBColorSpaceRef() in a few places that were manually creating the colorspace.
93
94         Also use cachedCGColor() in a more places that were manually constructing CGColorRefs
95         from Colors.
96
97         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
98         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
99         (WebCore::createImageFromPixelBuffer):
100         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
101         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
102         (PlatformCALayerCocoa::setBackgroundColor):
103         (PlatformCALayerCocoa::setBorderColor):
104         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm:
105         (-[WebLightSystemBackdropLayer init]):
106         (-[WebDarkSystemBackdropLayer init]):
107         * platform/graphics/cg/GradientCG.cpp:
108         (WebCore::Gradient::platformGradient):
109         * platform/graphics/cg/GraphicsContext3DCG.cpp:
110         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
111         (WebCore::GraphicsContext3D::paintToCanvas):
112         * platform/graphics/cg/ImageBufferCG.cpp:
113         (WebCore::ImageBuffer::copyImage):
114         (WebCore::ImageBuffer::toDataURL):
115         (WebCore::ImageDataToDataURL):
116         * platform/graphics/mac/GraphicsContextMac.mm:
117         (WebCore::linearRGBColorSpaceRef):
118         * platform/graphics/mac/WebGLLayer.mm:
119         (-[WebGLLayer copyImageSnapshotWithColorSpace:]):
120         * platform/mediastream/mac/AVVideoCaptureSource.mm:
121         (WebCore::AVVideoCaptureSource::currentFrameCGImage):
122         * rendering/RenderThemeIOS.mm:
123         (WebCore::drawRadialGradient):
124         * rendering/RenderThemeMac.mm:
125         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
126         (WebCore::RenderThemeMac::paintSliderTrack):
127
128 2015-11-20  Katlyn Graff  <kgraff@apple.com>
129
130         Renaming PageCache suspension code to support more reasons for suspension.
131         https://bugs.webkit.org/show_bug.cgi?id=151527
132
133         Reviewed by Ryosuke Niwa.
134
135         No new tests because this is simply a refactor.
136
137         Renamed Element:: and Document:: documentWillSuspendForPageCache(),
138         documentDidResumeFromPageCache(),
139         registerForPageCacheSuspensionCallbacks(),
140         unregisterForPageCacheSuspensionCallbacks() to prepare to support
141         alternate reasons for document-level suspension.
142
143         * dom/Document.cpp:
144         (WebCore::Document::suspend):
145         (WebCore::Document::resume):
146         (WebCore::Document::registerForDocumentSuspensionCallbacks):
147         (WebCore::Document::unregisterForDocumentSuspensionCallbacks):
148         (WebCore::Document::documentWillSuspendForPageCache): Deleted.
149         (WebCore::Document::documentDidResumeFromPageCache): Deleted.
150         (WebCore::Document::registerForPageCacheSuspensionCallbacks): Deleted.
151         (WebCore::Document::unregisterForPageCacheSuspensionCallbacks): Deleted.
152         * dom/Document.h:
153         * dom/Element.h:
154         (WebCore::Element::prepareForDocumentSuspension):
155         (WebCore::Element::resumeFromDocumentSuspension):
156         (WebCore::Element::documentWillSuspendForPageCache): Deleted.
157         (WebCore::Element::documentDidResumeFromPageCache): Deleted.
158         * history/CachedFrame.cpp:
159         (WebCore::CachedFrameBase::restore):
160         (WebCore::CachedFrame::CachedFrame):
161         * html/HTMLFormElement.cpp:
162         (WebCore::HTMLFormElement::~HTMLFormElement):
163         (WebCore::HTMLFormElement::parseAttribute):
164         (WebCore::HTMLFormElement::resumeFromDocumentSuspension):
165         (WebCore::HTMLFormElement::didMoveToNewDocument):
166         (WebCore::HTMLFormElement::documentDidResumeFromPageCache): Deleted.
167         * html/HTMLFormElement.h:
168         * html/HTMLInputElement.cpp:
169         (WebCore::HTMLInputElement::~HTMLInputElement):
170         (WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded):
171         (WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded):
172         (WebCore::HTMLInputElement::resumeFromDocumentSuspension):
173         (WebCore::HTMLInputElement::prepareForDocumentSuspension):
174         (WebCore::HTMLInputElement::didMoveToNewDocument):
175         (WebCore::HTMLInputElement::documentDidResumeFromPageCache): Deleted.
176         (WebCore::HTMLInputElement::documentWillSuspendForPageCache): Deleted.
177         * html/HTMLInputElement.h:
178         * html/HTMLMediaElement.cpp:
179         (WebCore::HTMLMediaElement::registerWithDocument):
180         (WebCore::HTMLMediaElement::unregisterWithDocument):
181         (WebCore::HTMLMediaElement::prepareForDocumentSuspension):
182         (WebCore::HTMLMediaElement::resumeFromDocumentSuspension):
183         (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Deleted.
184         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Deleted.
185         * html/HTMLMediaElement.h:
186         * html/HTMLPlugInImageElement.cpp:
187         (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement):
188         (WebCore::HTMLPlugInImageElement::createElementRenderer):
189         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
190         (WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension):
191         (WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
192         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): Deleted.
193         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Deleted.
194         * html/HTMLPlugInImageElement.h:
195         * loader/FrameLoader.cpp:
196         (WebCore::FrameLoader::commitProvisionalLoad):
197         * svg/SVGSVGElement.cpp:
198         (WebCore::SVGSVGElement::SVGSVGElement):
199         (WebCore::SVGSVGElement::~SVGSVGElement):
200         (WebCore::SVGSVGElement::didMoveToNewDocument):
201         (WebCore::SVGSVGElement::prepareForDocumentSuspension):
202         (WebCore::SVGSVGElement::resumeFromDocumentSuspension):
203         (WebCore::SVGSVGElement::documentWillSuspendForPageCache): Deleted.
204         (WebCore::SVGSVGElement::documentDidResumeFromPageCache): Deleted.
205         * svg/SVGSVGElement.h:
206
207 2015-11-20  Simon Fraser  <simon.fraser@apple.com>
208
209         Fix the Windows build.
210
211         * platform/graphics/cg/IOSurfacePool.h:
212
213 2015-11-20  Simon Fraser  <simon.fraser@apple.com>
214
215         Allow more buffer formats in the IOSurface pool
216         https://bugs.webkit.org/show_bug.cgi?id=151516
217
218         Reviewed by Tim Horton.
219
220         Previously IOSurface::create was only looking in the pool for RGBA-format surfaces. Change that to
221         always look in the pool, and to cache all format types. We include format in the criteria used
222         to pick a surface from the pool.
223         
224         * platform/graphics/cg/IOSurfacePool.cpp:
225         (WebCore::surfaceMatchesParameters):
226         (WebCore::IOSurfacePool::takeSurface):
227         (WebCore::IOSurfacePool::shouldCacheFormat):
228         (WebCore::IOSurfacePool::shouldCacheSurface):
229         (WebCore::IOSurfacePool::addSurface):
230         * platform/graphics/cg/IOSurfacePool.h:
231         * platform/graphics/cocoa/IOSurface.h:
232         * platform/graphics/cocoa/IOSurface.mm:
233         (IOSurface::surfaceFromPool):
234         (IOSurface::create):
235         (IOSurface::IOSurface):
236
237 2015-11-20  Brent Fulgham  <bfulgham@apple.com>
238
239         [Win] Support High DPI drawing with CACFLayers
240         https://bugs.webkit.org/show_bug.cgi?id=147242
241         <rdar://problem/19861992>
242
243         Reviewed by Simon Fraser.
244
245         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
246         (WebCore::WKCACFViewLayerTreeHost::initializeContext): Set correct content scale factor
247         for current screen, and apply an appropriate base transform to the CACFLayer so drawing
248         operations are done properly.
249
250 2015-11-20  Brady Eidson  <beidson@apple.com>
251
252         Modern IDB: In the VersionChangeEvent for delete database calls, oldVersion should be null instead of 0.
253         https://bugs.webkit.org/show_bug.cgi?id=151481
254
255         Reviewed by Sam Weinig.
256
257         No new tests, covered by changes to:
258             storage/indexeddb/modern/deletedatabase-1.html
259             storage/indexeddb/modern/deletedatabase-2.html
260
261         * Modules/indexeddb/IDBVersionChangeEvent.h:
262         * Modules/indexeddb/IDBVersionChangeEvent.idl:
263         
264         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
265         (WebCore::IDBClient::IDBVersionChangeEvent::newVersion):
266         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
267         
268         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
269         (WebCore::LegacyVersionChangeEvent::newVersion):
270         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h:
271
272 2015-11-20  Brady Eidson  <beidson@apple.com>
273
274         Addressing missed review feedback for:
275         Modern IDB: Make in-memory ObjectStore cursors work.
276         https://bugs.webkit.org/show_bug.cgi?id=151196
277
278         Reviewed by Darin Adler.
279
280         * Modules/indexeddb/server/MemoryObjectStore.cpp:
281         (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor):
282         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
283         (WebCore::IDBServer::MemoryObjectStoreCursor::create): Deleted.
284         * Modules/indexeddb/server/MemoryObjectStoreCursor.h:
285
286 2015-11-20  Chris Dumez  <cdumez@apple.com>
287
288         Caching of properties on objects that have named property getters is sometimes incorrect
289         https://bugs.webkit.org/show_bug.cgi?id=151453
290         <rdar://problem/23049343>
291
292         Reviewed by Gavin Barraclough.
293
294         In r188590, we dropped the JSC::GetOwnPropertySlotIsImpure TypeInfo flag for
295         interfaces that have a non-'OverrideBuiltins' named property getter in order
296         to allow caching of properties returns by GetOwnPropertySlot(). We assumed
297         this was safe as it was no longer possible for named properties to override
298         own properties (or properties on the prototype).
299
300         However, there is an issue when we cache the non-existence of a property.
301         Even though at one point the property did not exist, a named property with
302         this name may later become available. In such case, caching would cause us
303         to wrongly report a property as missing.
304
305         To address the problem, this patch introduces a new
306         GetOwnPropertySlotIsImpureForPropertyAbsence TypeInfo flag and uses it for
307         interfaces that have a non-'OverrideBuiltins' named property getter. This
308         will cause us to not cache the fact that a property is missing on such
309         objects, while maintaining the performance win from r188590 in the common
310         case.
311
312         Test: fast/dom/NamedNodeMap-named-getter-caching.html
313
314         * bindings/scripts/CodeGeneratorJS.pm:
315         (GenerateHeader):
316         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
317         * bindings/scripts/test/JS/JSTestEventTarget.h:
318         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
319
320 2015-11-19  Simon Fraser  <simon.fraser@apple.com>
321
322         Back-buffer to front-buffer copy fails for some buffer formats
323         https://bugs.webkit.org/show_bug.cgi?id=151475
324         rdar://problem/23617899
325
326         Reviewed by Tim Horton.
327         
328         Fix some fo the bitsPerComponent/bitsPerPixel options in IOSurface::ensurePlatformContext()
329         for RGB10 buffers. Fix IOSurface::format() to return the new formats.
330         
331         Implement IOSurface::copyToSurface(), which does a synchronous copy between
332         surfaces.
333
334         * platform/graphics/cocoa/IOSurface.h:
335         * platform/graphics/cocoa/IOSurface.mm:
336         (IOSurface::create):
337         (IOSurface::ensurePlatformContext):
338         (IOSurface::format):
339         (IOSurface::copyToSurface):
340
341 2015-11-20  Zalan Bujtas  <zalan@apple.com>
342
343         Simple line layout: Add text-indent support.
344         https://bugs.webkit.org/show_bug.cgi?id=151472
345
346         Reviewed by Simon Fraser.
347
348         This enables us to use simple line layout on text-indent content.
349
350         Test: fast/text/simple-line-text-indent.html
351
352         * rendering/SimpleLineLayout.cpp:
353         (WebCore::SimpleLineLayout::updateLineConstrains):
354         (WebCore::SimpleLineLayout::createTextRuns):
355         (WebCore::SimpleLineLayout::canUseForStyle): Deleted.
356
357 2015-11-20  Brady Eidson  <beidson@apple.com>
358
359         Modern IDB: IDBFactory.deleteDatabase() support.
360         https://bugs.webkit.org/show_bug.cgi?id=151456
361
362         Reviewed by Alex Christensen.
363
364         Tests: storage/indexeddb/modern/deletedatabase-1.html
365                storage/indexeddb/modern/deletedatabase-2.html
366
367         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
368         (WebCore::IDBClient::IDBDatabase::hasPendingActivity):
369         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
370         * Modules/indexeddb/client/IDBDatabaseImpl.h:
371         
372         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
373         (WebCore::IDBClient::IDBOpenDBRequest::onDeleteDatabaseSuccess):
374         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
375         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
376         
377         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
378         (WebCore::IDBClient::IDBTransaction::hasPendingActivity): Deleted.
379         
380         * Modules/indexeddb/server/IDBServer.cpp:
381         (WebCore::IDBServer::IDBServer::deleteDatabase):
382         (WebCore::IDBServer::IDBServer::deleteUniqueIDBDatabase):
383         * Modules/indexeddb/server/IDBServer.h:
384         
385         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
386         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
387         (WebCore::IDBServer::UniqueIDBDatabase::hasAnyPendingCallbacks):
388         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
389         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
390         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
391         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
392         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
393         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
394         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
395         (WebCore::IDBServer::UniqueIDBDatabase::invokeDeleteOrRunTransactionTimer):
396         (WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
397         (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
398         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
399         (WebCore::IDBServer::UniqueIDBDatabase::invokeTransactionScheduler): Deleted.
400         (WebCore::IDBServer::UniqueIDBDatabase::transactionSchedulingTimerFired): Deleted.
401         * Modules/indexeddb/server/UniqueIDBDatabase.h:
402         (WebCore::IDBServer::UniqueIDBDatabase::identifier):
403         (WebCore::IDBServer::UniqueIDBDatabase::deletePending):
404         
405         * Modules/indexeddb/shared/IDBResultData.cpp:
406         (WebCore::IDBResultData::deleteDatabaseSuccess):
407         * Modules/indexeddb/shared/IDBResultData.h:
408
409 2015-11-20  Brady Eidson  <beidson@apple.com>
410
411         Modern IDB: Get IDBRequest.readyState right.
412         https://bugs.webkit.org/show_bug.cgi?id=151484
413
414         Reviewed by Alex Christensen.
415
416         Test: storage/indexeddb/modern/request-readystate.html
417
418         * Modules/indexeddb/client/IDBRequestImpl.cpp:
419         (WebCore::IDBClient::IDBRequest::readyState):
420
421 2015-11-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
422
423         Use HTTPHeaderName as much as possible in XMLHttpRequest
424         https://bugs.webkit.org/show_bug.cgi?id=151438
425
426         Reviewed by Darin Adler.
427
428         Removing XMLHttpRequest::setRequestHeaderInternal and XMLHttpRequest::getRequestHeader.
429         Using directly HTTPHeaderMap.add, HTTPHeaderMap.set and HTTPHeaderMap.get.
430
431         No change in behavior.
432
433         * xml/XMLHttpRequest.cpp:
434         (WebCore::XMLHttpRequest::send):
435         (WebCore::XMLHttpRequest::setRequestHeader):
436         (WebCore::XMLHttpRequest::getAllResponseHeaders):
437         * xml/XMLHttpRequest.h:
438
439 2015-11-20  Eric Carlson  <eric.carlson@apple.com>
440
441         MediaStream: Fix mock video source crash
442         https://bugs.webkit.org/show_bug.cgi?id=151462
443
444         Reviewed by Alexey Proskuryakov.
445
446         No new tests, this fixes existing tests.
447
448         * platform/mock/MockRealtimeVideoSource.cpp:
449         (WebCore::MockRealtimeVideoSource::drawText): Declare the String used to intialize a 
450           StringView explicitly so it outlives the StringView.
451
452 2015-11-20  David Kilzer  <ddkilzer@apple.com>
453
454         REGRESSION (r192460,r192677): Fix all the builds
455
456         * platform/spi/cocoa/QuartzCoreSPI.h: Check different.
457
458 2015-11-19  David Kilzer  <ddkilzer@apple.com>
459
460         REGRESSION (r192460): Fix tvOS build again
461
462         * platform/spi/cocoa/QuartzCoreSPI.h: Update version check.
463         This will probably need to be backed out in the future.
464
465 2015-11-19  Adam Bergkvist  <adam.bergkvist@ericsson.com>
466
467         WebRTC: Initial testing of updated RTCPeerConnection API
468         https://bugs.webkit.org/show_bug.cgi?id=151304
469
470         Reviewed by Eric Carlson.
471
472         Remove faulty ASSERT since the selector argument to
473         RTCPeerConnection.getStats() is nullable. Also use
474         pointers instead of a ref (for the same reason).
475
476         Tests: Unskip two crashing tests.
477
478         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
479         (WebCore::MediaEndpointPeerConnection::getStats):
480         * Modules/mediastream/MediaEndpointPeerConnection.h:
481         * Modules/mediastream/PeerConnectionBackend.h:
482         * Modules/mediastream/RTCPeerConnection.cpp:
483         (WebCore::RTCPeerConnection::privateGetStats):
484
485 2015-11-19  Hunseop Jeong  <hs85.jeong@samsung.com>
486
487         [EFL][GTK] context_menu API test failed after r192333
488         https://bugs.webkit.org/show_bug.cgi?id=151437
489
490         Reviewed by Carlos Garcia Campos.
491
492         EFL,GTK port didn't use the share Menu.
493
494         * page/ContextMenuController.cpp:
495         (WebCore::ContextMenuController::populate):
496
497 2015-11-19  Brian Burg  <bburg@apple.com>
498
499         Web Inspector: yank/kill shortcuts (CTRL+Y, K) don't work in Console / QuickConsole
500         https://bugs.webkit.org/show_bug.cgi?id=151157
501
502         Reviewed by Joseph Pecoraro.
503
504         CodeMirror maintains its own editor buffer and implements its own
505         `killLine` command but doesn't implement the yank command. So, text
506         that is "killed" with CTRL-k inside a CodeMirror instance isn't
507         added to Editor's kill ring. Subsequent yank commands won't match
508         up with the killed text, instead returning text from a prior kill
509         that was handled by Editor (i.e., in a contenteditable or form input).
510
511         This patch adds a host function so that the Inspector frontend can
512         append "missed" killed text to Editor's kill ring. Subsequent
513         yanks handled by Editor will then match the text killed by CodeMirror.
514
515         No new tests, because we need to use both InspectorFrontendHost
516         and TestRunner.execCommand, but the latter is not available in
517         the inspector context where we would need to simulate a kill.
518
519         * inspector/InspectorFrontendHost.cpp:
520         (WebCore::InspectorFrontendHost::killText):
521
522             Added. This appends the killed text to the kill ring, starting
523             a new sequence if necessary. Unlike Editor, Inspector waits
524             until the next kill command to clear the existing sequence.
525
526         * inspector/InspectorFrontendHost.h:
527         * inspector/InspectorFrontendHost.idl:
528
529 2015-11-19  Zalan Bujtas  <zalan@apple.com>
530
531         Simple line layout: Add word-spacing support.
532         https://bugs.webkit.org/show_bug.cgi?id=151420
533
534         Reviewed by Antti Koivisto.
535
536         This enables us to use simple line layout on word-spacing content.
537
538         Test: fast/text/simple-line-wordspacing.html
539
540         * rendering/SimpleLineLayout.cpp:
541         (WebCore::SimpleLineLayout::createLineRuns):
542         (WebCore::SimpleLineLayout::canUseForStyle): Deleted.
543         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
544         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
545         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
546         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
547         * rendering/SimpleLineLayoutTextFragmentIterator.h:
548
549 2015-11-19  Brady Eidson  <beidson@apple.com>
550
551         Modern IDB: IDBObjectStore.deleteIndex() support.
552         https://bugs.webkit.org/show_bug.cgi?id=150911
553
554         Reviewed by Alex Christensen.
555
556         Tests: storage/indexeddb/modern/deleteindex-1.html
557                storage/indexeddb/modern/deleteindex-2.html
558
559         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
560         (WebCore::IDBClient::IDBConnectionToServer::deleteIndex):
561         (WebCore::IDBClient::IDBConnectionToServer::didDeleteIndex):
562         * Modules/indexeddb/client/IDBConnectionToServer.h:
563         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
564
565         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
566         (WebCore::IDBClient::IDBDatabase::didDeleteIndexInfo):
567         * Modules/indexeddb/client/IDBDatabaseImpl.h:
568
569         * Modules/indexeddb/client/IDBIndexImpl.cpp:
570         (WebCore::IDBClient::IDBIndex::markAsDeleted):
571         * Modules/indexeddb/client/IDBIndexImpl.h:
572
573         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
574         (WebCore::IDBClient::IDBObjectStore::index):
575         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
576
577         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
578         (WebCore::IDBClient::IDBTransaction::deleteIndex):
579         (WebCore::IDBClient::IDBTransaction::deleteIndexOnServer):
580         (WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
581         * Modules/indexeddb/client/IDBTransactionImpl.h:
582
583         * Modules/indexeddb/client/TransactionOperation.h:
584         (WebCore::IDBClient::createTransactionOperation):
585
586         * Modules/indexeddb/server/IDBBackingStore.h:
587
588         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
589         (WebCore::IDBServer::IDBConnectionToClient::didDeleteIndex):
590         * Modules/indexeddb/server/IDBConnectionToClient.h:
591         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
592
593         * Modules/indexeddb/server/IDBServer.cpp:
594         (WebCore::IDBServer::IDBServer::deleteIndex):
595         * Modules/indexeddb/server/IDBServer.h:
596
597         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
598         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
599         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
600         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
601
602         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
603         (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
604         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
605
606         * Modules/indexeddb/server/MemoryIndex.cpp:
607         (WebCore::IDBServer::MemoryIndex::clearIndexValueStore):
608         * Modules/indexeddb/server/MemoryIndex.h:
609
610         * Modules/indexeddb/server/MemoryObjectStore.cpp:
611         (WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
612         (WebCore::IDBServer::MemoryObjectStore::takeIndexByName):
613         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
614         * Modules/indexeddb/server/MemoryObjectStore.h:
615
616         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
617         (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
618         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
619         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex):
620         * Modules/indexeddb/server/UniqueIDBDatabase.h:
621
622         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
623         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteIndex):
624         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
625
626         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
627         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex):
628         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
629
630         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
631         (WebCore::IDBDatabaseInfo::loggingString):
632         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
633
634         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
635         (WebCore::IDBIndexInfo::loggingString):
636         * Modules/indexeddb/shared/IDBIndexInfo.h:
637
638         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
639         (WebCore::IDBObjectStoreInfo::hasIndex):
640         (WebCore::IDBObjectStoreInfo::deleteIndex):
641         (WebCore::IDBObjectStoreInfo::loggingString):
642         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
643
644         * Modules/indexeddb/shared/IDBResultData.cpp:
645         (WebCore::IDBResultData::deleteIndexSuccess):
646         * Modules/indexeddb/shared/IDBResultData.h:
647
648         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
649         (WebCore::InProcessIDBServer::didDeleteIndex):
650         (WebCore::InProcessIDBServer::createIndex):
651         (WebCore::InProcessIDBServer::deleteIndex):
652         * Modules/indexeddb/shared/InProcessIDBServer.h:
653
654 2015-11-19  Brian Burg  <bburg@apple.com>
655
656         REGRESSION(r8780): Backwards delete by word incorrectly appends deleted text to kill ring, should be prepend
657         https://bugs.webkit.org/show_bug.cgi?id=151300
658
659         Reviewed by Darin Adler.
660
661         Over 11 years ago, someone was in a big hurry to fix a bunch
662         of emacs keybindings bugs, and accidentally regressed the kill ring
663         behavior for backwards-delete-word. It should prepend to the beginning.
664
665         This patch fixes the regression and cleans up the kill ring-related
666         code in Editor and commands. It also adds some tests to cover the
667         regressed code a bit better.
668
669         Tests: editing/pasteboard/emacs-killring-alternating-append-prepend.html
670                editing/pasteboard/emacs-killring-backward-delete-prepend.html
671
672         * editing/Editor.cpp:
673
674             Use more explicit names for insertion mode parameters and member variables.
675
676         (WebCore::Editor::deleteWithDirection):
677         (WebCore::Editor::performDelete):
678         (WebCore::Editor::addRangeToKillRing):
679         (WebCore::Editor::addTextToKillRing):
680
681             Only one call site for now, but another will be added in a dependent fix.
682
683         (WebCore::Editor::addToKillRing): Deleted.
684         * editing/Editor.h:
685         * editing/TypingCommand.cpp:
686         (WebCore::TypingCommand::TypingCommand):
687         (WebCore::TypingCommand::deleteKeyPressed):
688         (WebCore::TypingCommand::forwardDeleteKeyPressed):
689         (WebCore::TypingCommand::doApply):
690         * editing/TypingCommand.h:
691         * platform/mac/KillRingMac.mm:
692         (WebCore::KillRing::append):
693         (WebCore::KillRing::prepend):
694
695             It turns out that the native API implicitly clears the kill sequence when
696             alternating between prepend and append operations. Its behavior does not match
697             what Sublime Text or Emacs do in this case. Clear the previous operation flag
698             to prevent this behavior from happening.
699
700 2015-11-19  Myles C. Maxfield  <mmaxfield@apple.com>
701
702         Tatechuyoko in ruby sits too high
703         https://bugs.webkit.org/show_bug.cgi?id=151309
704         <rdar://problem/23536621>
705
706         Reviewed by Darin Adler.
707
708         When combining text, we ask what the text's width is in order to determine if it fits in the
709         column. However, when we do that, we were not setting the font's orientation to horizontal.
710         This means that, for CJK text, the "width" which was returned was actually the height of the
711         glyph, and the GlyphOverflow data was similarly garbled.
712
713         We actually already were creating a corrected FontDescription, and using it in two places.
714         However, we weren't using it in the last place, which was causing this bug.
715
716         Test: fast/text/text-combine-placement.html
717
718         * platform/graphics/FontCascade.cpp:
719         (WebCore::FontCascade::width):
720         * rendering/RenderCombineText.cpp:
721         (WebCore::RenderCombineText::combineText):
722
723 2015-11-19  Hunseop Jeong  <hs85.jeong@samsung.com>
724
725         [EFL] http/tests/navigation/useragent test failed after r192459.
726         https://bugs.webkit.org/show_bug.cgi?id=151340
727
728         Reviewed by Gyuyoung Kim.
729
730         We need the convert process the predifined value to string. 
731
732         * platform/efl/UserAgentEfl.cpp:
733         (WebCore::versionForUAString):
734
735 2015-11-19  Commit Queue  <commit-queue@webkit.org>
736
737         Unreviewed, rolling out r192622.
738         https://bugs.webkit.org/show_bug.cgi?id=151446
739
740         This test is failing on multiple mac testers (Requested by
741         ryanhaddad on #webkit).
742
743         Reverted changeset:
744
745         "Add a test for media control dropoff"
746         https://bugs.webkit.org/show_bug.cgi?id=151287
747         http://trac.webkit.org/changeset/192622
748
749 2015-11-19  Csaba Osztrogonác  <ossy@webkit.org>
750
751         [EFL] Fix -Winconsistent-missing-override clang warnings
752         https://bugs.webkit.org/show_bug.cgi?id=151443
753
754         Reviewed by Darin Adler.
755
756         * loader/EmptyClients.h:
757         (WebCore::EmptyChromeClient::delegatedScrollRequested):
758         (WebCore::EmptyChromeClient::scheduleAnimation):
759
760 2015-11-19  Jon Lee  <jonlee@apple.com>
761
762         Add a test for media control dropoff
763         https://bugs.webkit.org/show_bug.cgi?id=151287
764         rdar://problem/23544666
765
766         Reviewed by Dean Jackson.
767
768         Test: media/controls/inline-elements-dropoff-order.html
769
770         * Modules/mediacontrols/mediaControlsApple.css:
771         (audio::-webkit-media-controls-timeline-container.dropped): Override the
772         display:none since we want the container to remain visible but acting
773         as a flexible width space to push the other elements to the ends of the
774         inline flexbox. We will want to refactor the CSS rules so that all of the
775         components in the timeline are keyed off of the container's dropped class
776         rather than having each individual component have that class attached.
777         (audio::-webkit-media-controls-panel.hidden): Deleted. Consolidate a
778         couple rules.
779         * Modules/mediacontrols/mediaControlsApple.js:
780         (Controller.prototype.updateLayoutForDisplayedWidth): Also attach the
781         "dropped" class on the timeline box. Add the captions button for reporting
782         media control state.
783         * testing/Internals.cpp:
784         (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Extend this to
785         also take "DeviceNotAvailable" to update the mock device's availability.
786
787         * testing/Internals.cpp: Update to use a reference to Page.
788         (WebCore::Internals::resetToConsistentState): Reset mock enabled setting for
789         each test.
790         * testing/Internals.h:
791         * testing/js/WebCoreTestSupport.cpp:
792         (WebCoreTestSupport::resetInternalsObject): Update to use a reference to Page.
793
794 2015-11-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
795
796         [Streams API] Implement IsReadableStreamDisturbed according to spec
797         https://bugs.webkit.org/show_bug.cgi?id=151356
798
799         Reviewed by Darin Adler.
800
801         Implemente IsReadableStreamDisturbed according to the spec. This is an internal function to be used by other
802         internal implementations.
803
804         The function is exported as internals to be tested.
805
806         Test: streams/reference-implementation/abstract-ops.html.
807
808         * Modules/streams/ReadableStream.js:
809         (initializeReadableStream):
810         * Modules/streams/ReadableStreamInternals.js:
811         (cancelReadableStream):
812         (readFromReadableStreamReader):
813         (isReadableStreamDisturbed):
814         * bindings/js/WebCoreBuiltinNames.h:
815         * testing/Internals.cpp:
816         (WebCore::Internals::isReadableStreamDisturbed):
817         * testing/Internals.h:
818         * testing/Internals.idl:
819
820 2015-11-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
821
822         XHR should not combine empty content-type value with default one
823         https://bugs.webkit.org/show_bug.cgi?id=147784
824
825         Reviewed by Darin Adler.
826
827         Previously, XHR was testing whether a "Content-Type" was set using setRequestHeader by checking whether a "Content-Type" header value was empty.
828         This now tests whether "Content-Type" request header is set using either HTTPHeaderMap::contains or checking whether a "Content-Type" header value is null.
829
830         Test: http/tests/xmlhttprequest/post-empty-content-type.html
831
832         * xml/XMLHttpRequest.cpp:
833         (WebCore::XMLHttpRequest::send):
834
835 2015-11-19  Brady Eidson  <beidson@apple.com>
836
837         Modern IDB: Populate indexes created in object stores that already have records.
838         https://bugs.webkit.org/show_bug.cgi?id=151421
839
840         Reviewed by Alex Christensen.
841
842         Test: storage/indexeddb/modern/index-4.html
843               storage/indexeddb/modern/index-5.html
844
845         * Modules/indexeddb/server/MemoryObjectStore.cpp:
846         (WebCore::IDBServer::MemoryObjectStore::createIndex):
847         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
848         * Modules/indexeddb/server/MemoryObjectStore.h:
849
850 2015-11-18  Brady Eidson  <beidson@apple.com>
851
852         Modern IDB:Make in-memory Index cursors work.
853         https://bugs.webkit.org/show_bug.cgi?id=151278
854
855         Reviewed by Alex Christensen.
856
857         Tests: storage/indexeddb/modern/index-cursor-1.html
858                storage/indexeddb/modern/index-cursor-2.html
859                storage/indexeddb/modern/index-cursor-3.html
860
861         * CMakeLists.txt:
862         * WebCore.xcodeproj/project.pbxproj:
863
864         * Modules/indexeddb/client/IDBIndexImpl.cpp:
865         (WebCore::IDBClient::IDBIndex::openCursor):
866         (WebCore::IDBClient::IDBIndex::openKeyCursor):
867         
868         * Modules/indexeddb/server/IndexValueEntry.cpp:
869         (WebCore::IDBServer::IndexValueEntry::removeKey):
870         (WebCore::IDBServer::IndexValueEntry::Iterator::Iterator):
871         (WebCore::IDBServer::IndexValueEntry::Iterator::key):
872         (WebCore::IDBServer::IndexValueEntry::Iterator::isValid):
873         (WebCore::IDBServer::IndexValueEntry::Iterator::invalidate):
874         (WebCore::IDBServer::IndexValueEntry::Iterator::operator++):
875         (WebCore::IDBServer::IndexValueEntry::begin):
876         (WebCore::IDBServer::IndexValueEntry::reverseBegin):
877         (WebCore::IDBServer::IndexValueEntry::find):
878         (WebCore::IDBServer::IndexValueEntry::reverseFind):
879         * Modules/indexeddb/server/IndexValueEntry.h:
880         (WebCore::IDBServer::IndexValueEntry::Iterator::Iterator):
881         (WebCore::IDBServer::IndexValueEntry::unique):
882         
883         * Modules/indexeddb/server/IndexValueStore.cpp:
884         (WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey):
885         (WebCore::IDBServer::IndexValueStore::lowestKeyWithRecordInRange):
886         (WebCore::IDBServer::IndexValueStore::lowestIteratorInRange):
887         (WebCore::IDBServer::IndexValueStore::highestReverseIteratorInRange):
888         (WebCore::IDBServer::IndexValueStore::find):
889         (WebCore::IDBServer::IndexValueStore::reverseFind):
890         (WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
891         (WebCore::IDBServer::IndexValueStore::Iterator::nextIndexEntry):
892         (WebCore::IDBServer::IndexValueStore::Iterator::operator++):
893         (WebCore::IDBServer::IndexValueStore::Iterator::invalidate):
894         (WebCore::IDBServer::IndexValueStore::Iterator::isValid):
895         (WebCore::IDBServer::IndexValueStore::Iterator::key):
896         (WebCore::IDBServer::IndexValueStore::Iterator::primaryKey):
897         * Modules/indexeddb/server/IndexValueStore.h:
898         (WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
899         
900         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
901         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
902         
903         * Modules/indexeddb/server/MemoryIndex.cpp:
904         (WebCore::IDBServer::MemoryIndex::cursorDidBecomeClean):
905         (WebCore::IDBServer::MemoryIndex::cursorDidBecomeDirty):
906         (WebCore::IDBServer::MemoryIndex::objectStoreCleared):
907         (WebCore::IDBServer::MemoryIndex::notifyCursorsOfValueChange):
908         (WebCore::IDBServer::MemoryIndex::notifyCursorsOfAllRecordsChanged):
909         (WebCore::IDBServer::MemoryIndex::putIndexKey):
910         (WebCore::IDBServer::MemoryIndex::removeRecord):
911         (WebCore::IDBServer::MemoryIndex::removeEntriesWithValueKey):
912         (WebCore::IDBServer::MemoryIndex::maybeOpenCursor):
913         * Modules/indexeddb/server/MemoryIndex.h:
914         (WebCore::IDBServer::MemoryIndex::valueStore):
915         (WebCore::IDBServer::MemoryIndex::objectStore):
916         
917         * Modules/indexeddb/server/MemoryIndexCursor.cpp: Added.
918         (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor):
919         (WebCore::IDBServer::MemoryIndexCursor::~MemoryIndexCursor):
920         (WebCore::IDBServer::MemoryIndexCursor::currentData):
921         (WebCore::IDBServer::MemoryIndexCursor::iterate):
922         (WebCore::IDBServer::MemoryIndexCursor::indexRecordsAllChanged):
923         (WebCore::IDBServer::MemoryIndexCursor::indexValueChanged):
924         * Modules/indexeddb/server/MemoryIndexCursor.h:
925         
926         * Modules/indexeddb/server/MemoryObjectStore.cpp:
927         (WebCore::IDBServer::MemoryObjectStore::indexForIdentifier):
928         (WebCore::IDBServer::MemoryObjectStore::valueForKey):
929         * Modules/indexeddb/server/MemoryObjectStore.h:
930         
931         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
932         (WebCore::IDBCursorInfo::objectStoreCursor):
933         (WebCore::IDBCursorInfo::indexCursor):
934         (WebCore::IDBCursorInfo::IDBCursorInfo):
935         (WebCore::IDBCursorInfo::isDirectionNoDuplicate):
936         (WebCore::IDBCursorInfo::isolatedCopy):
937         * Modules/indexeddb/shared/IDBCursorInfo.h:
938         (WebCore::IDBCursorInfo::objectStoreIdentifier):
939
940 2015-11-18  Antti Koivisto  <antti@apple.com>
941
942         Assertion failure in RenderTreePosition::computeNextSibling
943         https://bugs.webkit.org/show_bug.cgi?id=151337
944         rdar://problem/23250075
945
946         Reviewed by Zalan Bujtas.
947
948         Test: fast/html/details-mathml-crash.html
949
950         * html/ads: Added.
951         * style/StyleResolveTree.cpp:
952         (WebCore::Style::resolveChildAtShadowBoundary):
953
954             Factor common code for resolving child here from resolveShadowTree.
955
956         (WebCore::Style::resolveShadowTree):
957
958             We don't need StyleResolverParentPusher because shadow tree uses different style resolver anyway.
959
960         (WebCore::Style::resolveSlotAssignees):
961
962             This needs to call renderTreePosition.invalidateNextSibling() if there is a renderer already.
963             Achieve this by calling the new common function resolveChildAtShadowBoundary.
964
965 2015-11-18  Jer Noble  <jer.noble@apple.com>
966
967         WebGL slow video to texture
968         https://bugs.webkit.org/show_bug.cgi?id=129626
969
970         Reviewed by Dean Jackson.
971
972         Support a direct GPU-to-GPU copy of video textures. Add a new AVPlayerItemVideoOutput which,
973         when lazily-created, will emit CVPixelBuffers which are guaranteed to be compatible with
974         OpenGL framebuffers. Then, use a CVOpenGLTextureCache object to convert those CVPixelBuffers
975         to OpenGL textures. Once the video frame is in an OpenGL texture, use an OpenGL framebuffer
976         to copy the underlying video texture memory to the destination texture.
977
978         The copy step uses glTexImage2D, which requires format and type parameters, so change the
979         signature of copyVideoTextureToPlatformTexture() to pass those parameters in.
980
981         * html/HTMLVideoElement.cpp:
982         (WebCore::HTMLVideoElement::copyVideoTextureToPlatformTexture): Changed signature.
983         * html/HTMLVideoElement.h:
984         * html/canvas/WebGLRenderingContextBase.cpp:
985         (WebCore::WebGLRenderingContextBase::texImage2D): Changed signature.
986         * platform/graphics/MediaPlayer.cpp:
987         (WebCore::MediaPlayer::copyVideoTextureToPlatformTexture): Changed signature.
988         * platform/graphics/MediaPlayer.h:
989         * platform/graphics/MediaPlayerPrivate.h:
990         (WebCore::MediaPlayerPrivateInterface::copyVideoTextureToPlatformTexture): Changed signature.
991         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
992         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
993         (WebCore::MediaPlayerPrivateAVFoundationObjC::createOpenGLVideoOutput): Create an OpenGL-compatible
994             AVPlayerItemVideoOutput.
995         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyOpenGLVideoOutput): Destroy same.
996         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastOpenGLImage): Cache the current frame, if available.
997         (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): Convert the
998             current frame to a texture, and use that texture to render into the destination texture.
999
1000 2015-11-18  Jiewen Tan  <jiewen_tan@apple.com>
1001
1002         [WK1] Crash loading Blink layout test fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
1003         https://bugs.webkit.org/show_bug.cgi?id=150198
1004         <rdar://problem/23136026>
1005
1006         Reviewed by Brent Fulgham.
1007
1008         Test: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
1009
1010         Properties of a contentWindow could be accessed even if the frame who owns the window is
1011         detached. Therefore, check whether the document loader is still alive before using it.
1012
1013         * page/PerformanceTiming.cpp:
1014         (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
1015
1016 2015-11-18  Eric Carlson  <eric.carlson@apple.com>
1017
1018         MediaStream: Implement MediaDevices.getSupportedConstraints
1019         https://bugs.webkit.org/show_bug.cgi?id=151394
1020
1021         Reviewed by Brent Fulgham.
1022
1023         Test: fast/mediastream/MediaDevices-getSupportedConstraints.html
1024
1025         * CMakeLists.txt: Add MediaTrackSupportedConstraints and JSMediaTrackSupportedConstraintsCustom.
1026
1027         * DerivedSources.make: Ditto.
1028
1029         * Modules/mediastream/MediaDevices.cpp:
1030         (WebCore::MediaDevices::getSupportedConstraints): New.
1031         * Modules/mediastream/MediaDevices.h:
1032         * Modules/mediastream/MediaDevices.idl:
1033
1034         * Modules/mediastream/MediaTrackSupportedConstraints.h: Added. Wrapper around a 
1035           RealtimeMediaSourceSupportedConstraints.
1036         (WebCore::MediaTrackSupportedConstraints::create):
1037         (WebCore::MediaTrackSupportedConstraints::supportsWidth):
1038         (WebCore::MediaTrackSupportedConstraints::supportsHeight):
1039         (WebCore::MediaTrackSupportedConstraints::supportsAspectRatio):
1040         (WebCore::MediaTrackSupportedConstraints::supportsFrameRate):
1041         (WebCore::MediaTrackSupportedConstraints::supportsFacingMode):
1042         (WebCore::MediaTrackSupportedConstraints::supportsVolume):
1043         (WebCore::MediaTrackSupportedConstraints::supportsSampleRate):
1044         (WebCore::MediaTrackSupportedConstraints::supportsSampleSize):
1045         (WebCore::MediaTrackSupportedConstraints::supportsEchoCancellation):
1046         (WebCore::MediaTrackSupportedConstraints::supportsDeviceId):
1047         (WebCore::MediaTrackSupportedConstraints::supportsGroupId):
1048         (WebCore::MediaTrackSupportedConstraints::MediaTrackSupportedConstraints):
1049         * Modules/mediastream/MediaTrackSupportedConstraints.idl: Added.
1050
1051         * WebCore.xcodeproj/project.pbxproj: Add JSMediaTrackSupportedConstraintsCustom.cpp, 
1052           RealtimeMediaSourceSupportedConstraints.h, and MediaTrackSupportedConstraints.*.
1053
1054         A MediaTrackSupportedConstraints only contains the properties supported by the currently
1055         available capture devices, so implement getOwnPropertySlot and getOwnPropertyNames so
1056         we don't have to declare any attributes in the idl file.
1057         * bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp: Added.
1058         (WebCore::JSMediaTrackSupportedConstraints::getOwnPropertySlotDelegate):
1059         (WebCore::JSMediaTrackSupportedConstraints::getOwnPropertyNames):
1060
1061         * platform/mediastream/RealtimeMediaSourceCenter.h:
1062         * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h: Added.
1063         (WebCore::RealtimeMediaSourceSupportedConstraints::RealtimeMediaSourceSupportedConstraints):
1064         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsWidth):
1065         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsWidth):
1066         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsHeight):
1067         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsHeight):
1068         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsAspectRatio):
1069         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsAspectRatio):
1070         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsFrameRate):
1071         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsFrameRate):
1072         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsFacingMode):
1073         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsFacingMode):
1074         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsVolume):
1075         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsVolume):
1076         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsSampleRate):
1077         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsSampleRate):
1078         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsSampleSize):
1079         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsSampleSize):
1080         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsEchoCancellation):
1081         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsEchoCancellation):
1082         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsDeviceId):
1083         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsDeviceId):
1084         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsGroupId):
1085         (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsGroupId):
1086
1087         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1088         (WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac): Initialize supported constraints.
1089         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
1090
1091         * platform/mock/MockRealtimeMediaSource.cpp: Delete some dead code.
1092
1093         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1094         (WebCore::MockRealtimeMediaSourceCenter::MockRealtimeMediaSourceCenter): Initialize supported constraints.
1095         * platform/mock/MockRealtimeMediaSourceCenter.h:
1096
1097 2015-11-18  Alex Christensen  <achristensen@webkit.org>
1098
1099         Progress towards implementing Downloads with NETWORK_SESSION
1100         https://bugs.webkit.org/show_bug.cgi?id=151414
1101
1102         Reviewed begrudgingly by Brady Eidson.
1103
1104         There is no change in behavior except that SessionIDs are sent across IPC and passed as parameters,
1105         and they are not used yet.
1106
1107         * loader/DocumentLoader.cpp:
1108         (WebCore::DocumentLoader::continueAfterContentPolicy):
1109         Removed an unused default. Compiler warnings will let us know if we add an unhandled case to this switch.
1110         * loader/EmptyClients.h:
1111         * loader/FrameLoaderClient.h:
1112         Pass SessionIDs around.
1113
1114 2015-11-18  Andreas Kling  <akling@apple.com>
1115
1116         ResourceUsageOverlay should have better accounting for reclaimable memory.
1117         <https://webkit.org/b/151407>
1118
1119         Reviewed by Anders Carlsson.
1120
1121         Add code to inspect the purgeable state of VM regions when traversing the
1122         web process VM map, and track reclaimable regions of memory separately.
1123
1124         Memory categories that have some amount of reclaimable memory are now
1125         displayed with the reclaimable amount in brackets, e.g "123.45 MB [56.78MB]"
1126
1127         * page/ResourceUsageOverlay.h:
1128         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1129         (WebCore::ResourceUsageOverlay::platformDraw):
1130         (WebCore::TagInfo::TagInfo):
1131         (WebCore::pagesPerVMTag):
1132         (WebCore::runSamplerThread):
1133         (WebCore::dirtyPagesPerVMTag): Deleted.
1134
1135 2015-11-18  Joseph Pecoraro  <pecoraro@apple.com>
1136
1137         Web Inspector: Client Blocked Resource Requests causes Crash under InspectorPageAgent::cachedResource
1138         https://bugs.webkit.org/show_bug.cgi?id=151398
1139
1140         Reviewed by Brian Burg.
1141
1142         Test: inspector/network/client-blocked-load.html
1143
1144         * inspector/InspectorPageAgent.cpp:
1145         (WebCore::InspectorPageAgent::cachedResource):
1146         Gracefully handle null request.
1147
1148         * loader/cache/CachedResourceLoader.cpp:
1149         (WebCore::CachedResourceLoader::cachedResource):
1150         ASSERT if someone tried to pass a null URL.
1151
1152 2015-11-18  Joseph Pecoraro  <pecoraro@apple.com>
1153
1154         Web Inspector: Timeline Recording across page navigations behaves poorly
1155         https://bugs.webkit.org/show_bug.cgi?id=151112
1156
1157         Reviewed by Timothy Hatcher.
1158
1159         * inspector/InspectorPageAgent.cpp:
1160         (WebCore::InspectorPageAgent::frameStartedLoading): Deleted.
1161         Don't reset the execution stopwatch on page navigation.
1162         If a timeline is actively being recorded on the frontend
1163         then all new timestamps suddenly downshifted towards zero
1164         introduces bad data.
1165
1166 2015-11-18  Daniel Bates  <dabates@apple.com>
1167
1168         [iOS] ASSERTION FAILED: temporaryFilePath.last() == '/' in WebCore::openTemporaryFile()
1169         https://bugs.webkit.org/show_bug.cgi?id=151392
1170         <rdar://problem/23595341>
1171
1172         Reviewed by Alexey Proskuryakov.
1173
1174         Workaround <rdar://problem/23579077> where confstr(_CS_DARWIN_USER_TEMP_DIR, ..., ...) retrieves
1175         the path to the user temporary directory without a trailing slash in the iOS simulator.
1176
1177         * platform/mac/FileSystemMac.mm:
1178         (WebCore::openTemporaryFile): Add a path separator (/) between the directory path and filename.
1179
1180 2015-11-18  Chris Dumez  <cdumez@apple.com>
1181
1182         Null dereference in Performance::Performance(WebCore::Frame*)
1183         https://bugs.webkit.org/show_bug.cgi?id=151390
1184
1185         Reviewed by Brady Eidson.
1186
1187         Based on the stack trace, it appears the DocumentLoader can be null
1188         when constructing the Performance object. This patch thus adds a null
1189         check before trying to dereference it.
1190
1191         No new tests, was not able to reproduce.
1192
1193         * page/DOMWindow.cpp:
1194         (WebCore::DOMWindow::navigator):
1195         (WebCore::DOMWindow::performance):
1196         * page/Performance.cpp:
1197         (WebCore::Performance::Performance):
1198         (WebCore::Performance::scriptExecutionContext):
1199         * page/Performance.h:
1200
1201 2015-11-18  Per Arne Vollan  <peavo@outlook.com>
1202
1203         [WinCairo][MediaFoundation] The main thread can sometimes be blocked forever when ending a media session.
1204         https://bugs.webkit.org/show_bug.cgi?id=151387
1205
1206         Reviewed by Alex Christensen.
1207
1208         This happens because the main thread is waiting for the sample scheduler thread to finish,
1209         but sometimes it never does. This can be resolved by emptying the scheduler's sample queue
1210         before requesting the scheduler thread to finish. This will make sure the scheduler thread
1211         returns to its main loop quickly, and can handle the termination request.
1212
1213         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1214         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler):
1215
1216 2015-11-18  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1217
1218         WebRTC: Initial testing of updated RTCPeerConnection API
1219         https://bugs.webkit.org/show_bug.cgi?id=151304
1220
1221         Reviewed by Eric Carlson.
1222
1223         Add an empty implementation of MediaEndpointPeerConnection which
1224         realizes the PeerConnectionBackend interface. This makes it possible
1225         to construct an RTCPeerConnection and do initial testing.
1226
1227         Tests: fast/mediastream/RTCPeerConnection-overloaded-operations-params.html
1228                fast/mediastream/RTCPeerConnection-overloaded-operations.html
1229
1230         Also unskip three existing RTCPeerConnection tests on GTK.
1231
1232         * CMakeLists.txt:
1233         * Modules/mediastream/MediaEndpointPeerConnection.cpp: Added.
1234         (WebCore::createMediaEndpointPeerConnection):
1235         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
1236         (WebCore::MediaEndpointPeerConnection::createOffer):
1237         (WebCore::MediaEndpointPeerConnection::createAnswer):
1238         (WebCore::MediaEndpointPeerConnection::setLocalDescription):
1239         (WebCore::MediaEndpointPeerConnection::localDescription):
1240         (WebCore::MediaEndpointPeerConnection::currentLocalDescription):
1241         (WebCore::MediaEndpointPeerConnection::pendingLocalDescription):
1242         (WebCore::MediaEndpointPeerConnection::setRemoteDescription):
1243         (WebCore::MediaEndpointPeerConnection::remoteDescription):
1244         (WebCore::MediaEndpointPeerConnection::currentRemoteDescription):
1245         (WebCore::MediaEndpointPeerConnection::pendingRemoteDescription):
1246         (WebCore::MediaEndpointPeerConnection::setConfiguration):
1247         (WebCore::MediaEndpointPeerConnection::addIceCandidate):
1248         (WebCore::MediaEndpointPeerConnection::getStats):
1249         (WebCore::MediaEndpointPeerConnection::stop):
1250         (WebCore::MediaEndpointPeerConnection::markAsNeedingNegotiation):
1251         * Modules/mediastream/MediaEndpointPeerConnection.h: Added.
1252         * WebCore.xcodeproj/project.pbxproj:
1253
1254 2015-11-18  Alejandro G. Castro  <alex@igalia.com>
1255
1256         [Cairo] SolidStroke broken in drawLine after r191658
1257         https://bugs.webkit.org/show_bug.cgi?id=151385
1258
1259         Reviewed by Carlos Garcia Campos.
1260
1261         Fix the drawLine function after r191658, we have to make sure the
1262         color is set when line is SolidStroke.
1263
1264         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1265         (WebCore::GraphicsContext::drawLine):
1266
1267 2015-11-18  Javier Fernandez  <jfernandez@igalia.com>
1268
1269         [CSS Grid Layout] inline margins not honored when not using stretch in row-axis alignment
1270         https://bugs.webkit.org/show_bug.cgi?id=151323
1271
1272         Reviewed by Sergio Villar Senin.
1273
1274         There are some situations where we avoid to compute the inline-axis
1275         margins when computing the logical width of a box. One of those situations
1276         is when we have set an override width; this only affects for now to flex
1277         and grid items. We also follow this approach when setting the logical
1278         width based on the restrictions of 'auto' value in the 'min-width'
1279         property.
1280
1281         This behavior is not correct, since there is no reason to avoid
1282         computing this margins, in the general case. I think this logic was
1283         designed as an optimization for flexbox, which was already computing
1284         the margins by its own, but it's not applicable in the general case, so
1285         grid needs these margins to be computed properly.
1286
1287         For the shrink-to-fit behavior we can add some grid related logic to the
1288         already defined RenderBox function "sizesLogicalWidthToFitContent",
1289         so we avoid the override width.
1290
1291         Tests: fast/css-grid-layout/grid-item-auto-sized-align-justify-margin-border-padding.html
1292                fast/css-grid-layout/min-width-height-auto-and-margins.html
1293
1294         * rendering/RenderBox.cpp:
1295         (WebCore::RenderBox::computeLogicalWidthInRegion):
1296         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
1297         * rendering/RenderGrid.cpp:
1298         (WebCore::defaultAlignmentChangedFromStretchInRowAxis):
1299         (WebCore::selfAlignmentChangedFromStretchInRowAxis):
1300         (WebCore::RenderGrid::styleDidChange):
1301         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1302         (WebCore::selfAlignmentChangedFromStretchInColumnAxis): Deleted.
1303         (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted.
1304         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
1305
1306 2015-11-18  Aaron Chu  <arona.chu@gmail.com>
1307
1308         AX: Shadow DOM video player controls menus need aria-owns on the trigger buttons
1309         https://bugs.webkit.org/show_bug.cgi?id=127065
1310
1311         Reviewed by Darin Adler.
1312
1313         Test: media/accessibility-closed-captions-has-aria-owns.html
1314
1315         * Modules/mediacontrols/mediaControlsApple.js:
1316         (Controller.prototype.createControls):
1317         (Controller.prototype.buildCaptionMenu):
1318         * Modules/mediacontrols/mediaControlsBase.js:
1319         (Controller.prototype.createControls):
1320         (Controller.prototype.buildCaptionMenu):
1321
1322 2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1323
1324         Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
1325         https://bugs.webkit.org/show_bug.cgi?id=151187
1326
1327         Reviewed by Darin Adler.
1328
1329         This is a merge of Blink r174671:
1330         https://codereview.chromium.org/291143002
1331
1332         Fixes imported/blink/editing/execCommand/indent-button-crash.html.
1333
1334         * editing/ApplyBlockElementCommand.cpp:
1335         (WebCore::ApplyBlockElementCommand::doApply):
1336
1337 2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1338
1339         REGRESSION(r192459): [GTK] User agent string is broken after r192459
1340         https://bugs.webkit.org/show_bug.cgi?id=151347
1341
1342         Reviewed by Žan Doberšek.
1343
1344         Remove the incorrect macro and simply use the given values
1345         USER_AGENT_GTK_MAJOR_VERSION and USER_AGENT_GTK_MINOR_VERSION that
1346         are now strings.
1347
1348         * platform/gtk/UserAgentGtk.cpp:
1349         (WebCore::versionForUAString):
1350         (WebCore::buildUserAgentString):
1351
1352 2015-11-17  Zalan Bujtas  <zalan@apple.com>
1353
1354         Simple line layout: Add letter-spacing support.
1355         https://bugs.webkit.org/show_bug.cgi?id=151362
1356
1357         Reviewed by Antti Koivisto.
1358
1359         This enables us to use simple line layout on letter-spacing content.
1360         (fixme: webkit.org/b/151368 -> Repaint rect is not computed correctly when negative letter-spacing applied)
1361
1362         Test: fast/text/simple-line-letterspacing.html
1363
1364         * rendering/SimpleLineLayout.cpp:
1365         (WebCore::SimpleLineLayout::canUseForStyle):
1366         * rendering/SimpleLineLayoutFunctions.cpp:
1367         (WebCore::SimpleLineLayout::paintFlow): RenderLineBoxList tests vertical intersection only. 
1368         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1369         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
1370
1371 2015-11-17  Per Arne Vollan  <peavo@outlook.com>
1372
1373         [WinCairo][MediaFoundation] Current playback time is not shown.
1374         https://bugs.webkit.org/show_bug.cgi?id=151357
1375
1376         Reviewed by Alex Christensen.
1377
1378         We need to implement the currentTime() method.
1379
1380         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1381         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
1382         (WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
1383         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
1384         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::paintCurrentFrame):
1385         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::currentTime):
1386         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
1387         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1388
1389 2015-11-17  Zalan Bujtas  <zalan@apple.com>
1390
1391         Split SimpleLineLayout::canUseFor into canUseForStyle and canUseForFontAndText.
1392         https://bugs.webkit.org/show_bug.cgi?id=151338
1393
1394         Reviewed by Myles C. Maxfield.
1395
1396         No change in functionality.
1397
1398         * rendering/SimpleLineLayout.cpp:
1399         (WebCore::SimpleLineLayout::canUseForFontAndText):
1400         (WebCore::SimpleLineLayout::canUseForStyle):
1401         (WebCore::SimpleLineLayout::canUseFor):
1402
1403 2015-11-17  Brady Eidson  <beidson@apple.com>
1404
1405         Modern IDB: Support IDBObjectStore.indexNames.
1406         https://bugs.webkit.org/show_bug.cgi?id=151341
1407
1408         Reviewed by Alex Christensen.
1409
1410         No new tests (Covered by existing storage/indexeddb/modern/objectstore-attributes.html).
1411
1412         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1413         (WebCore::IDBClient::IDBObjectStore::indexNames):
1414         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
1415         (WebCore::IDBObjectStoreInfo::indexNames):
1416         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
1417
1418 2015-11-17  Sergio Villar Senin  <svillar@igalia.com>
1419
1420         ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
1421         https://bugs.webkit.org/show_bug.cgi?id=151025
1422
1423         Reviewed by Darin Adler.
1424
1425         Negative margins could make RenderFlexibleBox compute negative
1426         intrinsic sizes. Clamp intrinsic sizes to 0.
1427
1428         Test: css3/flexbox/negative-margins-assert.html
1429
1430         * rendering/RenderFlexibleBox.cpp:
1431         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
1432
1433 2015-11-17  Sergio Villar Senin  <svillar@igalia.com>
1434
1435         [css-grid] Fix alignment with gutters and negative free spaces
1436         https://bugs.webkit.org/show_bug.cgi?id=151307
1437
1438         Reviewed by Zalan Bujtas.
1439
1440         This is a regression caused by r192154. The problem was that
1441         the free space was not properly computed when the grid
1442         container was narrower than the track sizes + gutters size for
1443         a given axis. The culprit was an unneeded clamp to 0 which was
1444         polluting the freeSpace computation as the track sizing
1445         algorithm works perfectly OK with negative freeSpace values.
1446
1447         * rendering/RenderGrid.cpp:
1448         (WebCore::RenderGrid::computeTrackSizesForDirection):
1449
1450 2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1451
1452         [GStreamer] Use RunLoop instead of GMainLoop in AudioFileReaderGStreamer
1453         https://bugs.webkit.org/show_bug.cgi?id=151256
1454
1455         Reviewed by Žan Doberšek.
1456
1457         Use RunLoop instead of the platform specific code. The AudioBus
1458         can be created from any thread, so we create a helper thread to
1459         ensure we don't use the main RunLoop.
1460
1461         This patch also includes some code cleanups:
1462           - Uses smart pointers when possible.
1463           - Fixes uninitialized members in constructors.
1464           - Makes private members private.
1465           - Uses lambdas instead of static non-members functions.
1466           - nullptr instead of 0 in some places.
1467
1468         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1469         (WebCore::AudioFileReader::createWeakPtr):
1470         (WebCore::AudioFileReader::deinterleavePadAddedCallback):
1471         (WebCore::AudioFileReader::deinterleaveReadyCallback):
1472         (WebCore::AudioFileReader::decodebinPadAddedCallback):
1473         (WebCore::AudioFileReader::AudioFileReader):
1474         (WebCore::AudioFileReader::~AudioFileReader):
1475         (WebCore::AudioFileReader::handleSample):
1476         (WebCore::AudioFileReader::handleMessage):
1477         (WebCore::AudioFileReader::handleNewDeinterleavePad):
1478         (WebCore::AudioFileReader::deinterleavePadsConfigured):
1479         (WebCore::AudioFileReader::plugDeinterleave):
1480         (WebCore::AudioFileReader::decodeAudioForBusCreation):
1481         (WebCore::AudioFileReader::createBus):
1482         (WebCore::createBusFromAudioFile):
1483         (WebCore::createBusFromInMemoryAudioFile):
1484         (WebCore::onAppsinkPullRequiredCallback): Deleted.
1485         (WebCore::messageCallback): Deleted.
1486         (WebCore::onGStreamerDeinterleavePadAddedCallback): Deleted.
1487         (WebCore::onGStreamerDeinterleaveReadyCallback): Deleted.
1488         (WebCore::onGStreamerDecodebinPadAddedCallback): Deleted.
1489         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1490         (WTF::adoptGRef):
1491         (WTF::refGPtr<GstBufferList>):
1492         (WTF::derefGPtr<GstBufferList>):
1493         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
1494
1495 2015-11-16  Eric Carlson  <eric.carlson@apple.com>
1496
1497         [MediaStream] VideoTrack should respond to MediaStreamTrack state changes
1498         https://bugs.webkit.org/show_bug.cgi?id=151299
1499
1500         Reviewed by Jer Noble.
1501
1502         Test: fast/mediastream/MediaStream-video-element-track-stop.html
1503
1504         * Modules/mediastream/MediaStreamTrack.cpp:
1505         (WebCore::MediaStreamTrack::ended): Check m_ended.
1506         (WebCore::MediaStreamTrack::stopProducingData): Set m_ended before telling private track to 
1507           stop so we won't fire an 'ended' event.
1508         (WebCore::MediaStreamTrack::trackEnded): Set m_ended, add comments from spec.
1509         * Modules/mediastream/MediaStreamTrack.h:
1510
1511         * html/HTMLMediaElement.cpp:
1512         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Live streams have infinite duration,
1513           not indefinite.
1514
1515         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1516         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1517         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Return NULL when displayMode
1518           is None.
1519         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Calculate current 
1520           displayMode based on MediaStream state.
1521         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Renamed from 
1522           setPausedImageVisible, use m_displayMode. Don't start/stop clock, it makes more sense
1523           to do that in play and pause.
1524         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Start clock. 
1525         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Stop clock.
1526         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Call updateDisplayMode.
1527         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Ditto.
1528         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize):
1529         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Always try to create
1530           both layers if necessary.
1531         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::renderingModeChanged): New, update displayMode
1532           and call back to the media element.
1533         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
1534         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): Get rid of some unused locals.
1535           React to a change in the enabled video track.
1536         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Paint black when
1537           the active video track is disabled.
1538         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPausedImageVisible): Deleted.
1539
1540         * platform/mediastream/MediaStreamPrivate.cpp:
1541         (WebCore::MediaStreamPrivate::updateActiveState): Split the logic of updating the active video
1542           track out into updateActiveVideoTrack.
1543         (WebCore::MediaStreamPrivate::hasVideo): Check for track.ended.
1544         (WebCore::MediaStreamPrivate::hasAudio): Ditto.
1545         (WebCore::MediaStreamPrivate::paintCurrentFrameInContext): Don't call the source directly.
1546         (WebCore::MediaStreamPrivate::updateActiveVideoTrack): New.
1547         (WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveVideoTrack.
1548         (WebCore::MediaStreamPrivate::trackEnded): new.
1549         * platform/mediastream/MediaStreamPrivate.h:
1550
1551         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1552         (WebCore::MediaStreamTrackPrivate::setEnabled): Call observers if enabled state changes.
1553         (WebCore::MediaStreamTrackPrivate::endTrack): Call observers.
1554         (WebCore::MediaStreamTrackPrivate::paintCurrentFrameInContext): New.
1555         (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping): Add comments.
1556         * platform/mediastream/MediaStreamTrackPrivate.h:
1557
1558         * platform/mock/MockRealtimeVideoSource.cpp:
1559         (WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext): Remove a commented-out line.
1560
1561 2015-11-16  Pranjal Jumde  <pjumde@apple.com>
1562
1563         Fixes the buffer-overflow when reading characters from textRun
1564         https://bugs.webkit.org/attachment.cgi?bugid=151055
1565         <rdar://problem/23251789>
1566
1567         Reviewed by Brent Fulgham.
1568
1569         * platform/graphics/FontCascade.cpp
1570
1571 2015-11-16  Brady Eidson  <beidson@apple.com>
1572
1573         Modern IDB:Make in-memory ObjectStore cursors work.
1574         https://bugs.webkit.org/show_bug.cgi?id=151196
1575
1576         Reviewed by Darin Adler.
1577
1578         Tests: storage/indexeddb/modern/cursor-2.html
1579                storage/indexeddb/modern/cursor-3.html
1580                storage/indexeddb/modern/cursor-4.html
1581                storage/indexeddb/modern/cursor-5.html
1582                storage/indexeddb/modern/cursor-6.html
1583                storage/indexeddb/modern/cursor-7.html
1584                storage/indexeddb/modern/cursor-8.html
1585                storage/indexeddb/modern/objectstore-cursor-advance-failures.html
1586                storage/indexeddb/modern/objectstore-cursor-continue-failures.html
1587
1588         Object store cursors directly hold on to a std::set<>::iterator to act as the cursor.
1589         
1590         The object store tells all of its cursors when it is cleared or records are deleted
1591         so the cursors can invalidate their iterators as needed.
1592         
1593         In case of such invalidation, the cursor hangs on to the current key value so it can 
1594         pick up where it left off in case it is iterated.
1595
1596         * CMakeLists.txt:
1597         * WebCore.xcodeproj/project.pbxproj:
1598
1599         * Modules/indexeddb/IDBGetResult.h:
1600         (WebCore::IDBGetResult::isolatedCopy):
1601         
1602         * Modules/indexeddb/IDBKeyRangeData.cpp:
1603         (WebCore::IDBKeyRangeData::containsKey):
1604         (WebCore::IDBKeyRangeData::loggingString):
1605         * Modules/indexeddb/IDBKeyRangeData.h:
1606         
1607         * Modules/indexeddb/client/IDBAnyImpl.cpp:
1608         (WebCore::IDBClient::IDBAny::modernIDBCursor):
1609         
1610         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1611         (WebCore::IDBClient::IDBCursor::update):
1612         (WebCore::IDBClient::IDBCursor::advance):
1613         (WebCore::IDBClient::IDBCursor::continueFunction):
1614         (WebCore::IDBClient::IDBCursor::setGetResult):
1615         * Modules/indexeddb/client/IDBCursorImpl.h:
1616         
1617         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1618         (WebCore::IDBClient::IDBRequest::dispatchEvent):
1619         (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor):
1620         * Modules/indexeddb/client/IDBRequestImpl.h:
1621         (WebCore::IDBClient::IDBRequest::pendingCursor):
1622         
1623         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1624         (WebCore::IDBClient::IDBTransaction::addRequest): Deleted.
1625         
1626         * Modules/indexeddb/client/TransactionOperation.cpp:
1627         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
1628         * Modules/indexeddb/client/TransactionOperation.h:
1629         (WebCore::IDBClient::TransactionOperation::cursorIdentifier):
1630         
1631         * Modules/indexeddb/server/IDBBackingStore.h:
1632         
1633         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1634         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
1635         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
1636         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1637         
1638         * Modules/indexeddb/server/MemoryCursor.cpp: Added.
1639         (WebCore::IDBServer::cursorMap):
1640         (WebCore::IDBServer::MemoryCursor::MemoryCursor):
1641         (WebCore::IDBServer::MemoryCursor::~MemoryCursor):
1642         (WebCore::IDBServer::MemoryCursor::cursorForIdentifier):
1643         * Modules/indexeddb/server/MemoryCursor.h: Added.
1644         
1645         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1646         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
1647         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
1648         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1649         
1650         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1651         (WebCore::IDBServer::MemoryObjectStore::clear):
1652         (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
1653         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
1654         (WebCore::IDBServer::MemoryObjectStore::addRecord):
1655         (WebCore::IDBServer::MemoryObjectStore::updateCursorsForPutRecord):
1656         (WebCore::IDBServer::MemoryObjectStore::updateCursorsForDeleteRecord):
1657         (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor):
1658         * Modules/indexeddb/server/MemoryObjectStore.h:
1659         (WebCore::IDBServer::MemoryObjectStore::orderedKeys):
1660         
1661         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp: Added.
1662         (WebCore::IDBServer::MemoryObjectStoreCursor::create):
1663         (WebCore::IDBServer::MemoryObjectStoreCursor::MemoryObjectStoreCursor):
1664         (WebCore::IDBServer::MemoryObjectStoreCursor::objectStoreCleared):
1665         (WebCore::IDBServer::MemoryObjectStoreCursor::keyDeleted):
1666         (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded):
1667         (WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
1668         (WebCore::IDBServer::MemoryObjectStoreCursor::firstForwardIteratorInRemainingRange):
1669         (WebCore::IDBServer::MemoryObjectStoreCursor::firstReverseIteratorInRemainingRange):
1670         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
1671         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
1672         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
1673         (WebCore::IDBServer::MemoryObjectStoreCursor::hasValidPosition):
1674         (WebCore::IDBServer::MemoryObjectStoreCursor::iterate):
1675         * Modules/indexeddb/server/MemoryObjectStoreCursor.h: Added.
1676
1677         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1678         (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
1679         (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
1680         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1681
1682         * Modules/indexeddb/shared/IDBCursorInfo.h:
1683         (WebCore::IDBCursorInfo::range):
1684
1685         * Modules/indexeddb/shared/IDBRequestData.cpp:
1686         (WebCore::IDBRequestData::IDBRequestData):
1687         (WebCore::IDBRequestData::cursorIdentifier):
1688         * Modules/indexeddb/shared/IDBRequestData.h:
1689
1690 2015-11-16  Anders Carlsson  <andersca@apple.com>
1691
1692         Add identifier strings for a bunch of context menu items
1693         https://bugs.webkit.org/show_bug.cgi?id=151272
1694
1695         Reviewed by Dan Bernstein.
1696
1697         Have NSMenuItem conform to NSUserInterfaceItemIdentification.
1698
1699         * platform/spi/mac/NSMenuSPI.h:
1700
1701 2015-11-16  Jiewen Tan  <jiewen_tan@apple.com>
1702
1703         Null-pointer dereference in WebCore::firstEditablePositionAfterPositionInRoot
1704         https://bugs.webkit.org/show_bug.cgi?id=151288
1705         <rdar://problem/23450367>
1706
1707         Reviewed by Darin Adler.
1708
1709         Some problematic organization of body element could cause problems to JustifyRight
1710         and Indent commnads.
1711
1712         Tests: editing/execCommand/justify-right-then-indent-with-problematic-body.html
1713                editing/execCommand/justify-right-with-problematic-body.html
1714
1715         * editing/CompositeEditCommand.cpp:
1716         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1717         Assertion at l1017 is not held anymore with the testcase:
1718         editing/execCommand/justify-right-with-problematic-body.html.
1719         Therefore, change it to an if statement.
1720         Also, add a guardance before calling insertNewDefaultParagraphElementAt()
1721         as insertNodeAt() requires an editable position.
1722         (WebCore::CompositeEditCommand::moveParagraphWithClones):
1723         Add a guardance before calling insertNodeAt() as it requires an editable position.
1724         * editing/htmlediting.cpp:
1725         (WebCore::firstEditablePositionAfterPositionInRoot):
1726         (WebCore::lastEditablePositionBeforePositionInRoot):
1727
1728 2015-11-16  Simon Fraser  <simon.fraser@apple.com>
1729
1730         Sort the Xcode project files.
1731
1732         * WebCore.xcodeproj/project.pbxproj:
1733
1734 2015-11-16  Sebastian Dröge  <sebastian@centricular.com>
1735
1736         WebRTC: Expose RTCPeerConnectionInternals functions to JS builtins.
1737         https://bugs.webkit.org/show_bug.cgi?id=151302
1738
1739         Reviewed by Youenn Fablet.
1740
1741         * bindings/js/JSDOMWindowBase.cpp:
1742         (WebCore::JSDOMWindowBase::finishCreation):
1743         Expose RTCPeerConnectionInternals functions to JS builtins.
1744
1745 2015-11-16  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1746
1747         [Streams API] Update the implementation up to spec of Nov 11 2015
1748         https://bugs.webkit.org/show_bug.cgi?id=151195
1749
1750         Reviewed by Youenn Fablet.
1751
1752         Updated the implementation of Readable and Writable Streams to the latest changes in the spec. Main changes are
1753         the removal of the error and the state from the reader, readers are not automatically released and then minor or
1754         style changes.
1755
1756         Implementation is up to date with version
1757         https://github.com/whatwg/streams/commit/48c8a3c30ea7e76c5e4eb9f157a438dd755bcc8e.
1758
1759         Tests: streams/reference-implementation/readable-stream-templated.html
1760                streams/reference-implementation/readable-stream-reader.html
1761
1762         * Modules/streams/ReadableStream.js:
1763         (getReader): Removed check for locked stream.
1764         * Modules/streams/ReadableStreamInternals.js:
1765         (privateInitializeReadableStreamReader): Removed setting @error and @state and initialized owner and owner's
1766         reader as per spec.
1767         (teeReadableStreamPullFunction): Added assertions.
1768         (isReadableStreamReader): Added comment about resetting the reader owner to null instead of undefined as a means
1769         to distinguish between not having the slot and having it unset.
1770         (finishClosingReadableStream): Inline @closeReadableStreamReader as it is used only here now.
1771         (readFromReadableStreamReader): Reworked the state and error to use the stream one and changed the conditions to
1772         pull again as per spec.
1773         (errorReadableStream): Not releasing the reader and removed the reader error and state management.
1774         (releaseReadableStreamReader): Deleted.
1775         (closeReadableStreamReader): Deleted.
1776         * Modules/streams/ReadableStreamReader.js:
1777         (cancel): Removed some checks and assertions as per spec.
1778         (read): Added check for owner.
1779         (releaseLock): No closing the reader and rejecting close promise and unlinking reader and owner instead.
1780         * Modules/streams/WritableStream.js:
1781         (abort): Style change.
1782         * Modules/streams/WritableStreamInternals.js:
1783         (writableStreamAdvanceQueue):
1784         (closeWritableStream): Used @call instead of @apply.
1785
1786 2015-11-15  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1787
1788         WebRTC: Update RTCPeerConnection API and introduce PeerConnectionBackend
1789         https://bugs.webkit.org/show_bug.cgi?id=150166
1790
1791         Reviewed by Eric Carlson and Youenn Fablet
1792
1793         This change introduces PeerConnectionBackend which is a WebCore interface
1794         that allows RTCPeerConnection to have platform abstractions at different
1795         levels. For example, the MediaEndpoint interface [1] is a lower level
1796         WebRTC backend abstraction where a big part of the WebRTC specification
1797         is implemented in WebCore to be reusable. RTCPeerConnectionHandler (in
1798         the repo today) is on the other hand a higher level WebRTC backend
1799         abstraction where the calls are mostly forwarded directly to the
1800         backend. The PeerConnectionBackend interface facilitates both approaches.
1801
1802         RTCPeerConnection
1803          | (has)
1804          |
1805         PeerConnectionBackend
1806          |   |
1807          |   | (realizes)
1808          |  MediaEndpointPeerConnection
1809          |   | (has)
1810          |   |
1811          |  MediaEndpoint (platform interface)
1812          |
1813          | (realizes)
1814         RTCPeerHandlerPeerConnection
1815          | (has)
1816          |
1817         RCPeerConnectionHandler (existing platform interface)
1818
1819         Notable changes:
1820
1821         # Overloaded methods on RTCPeerConnection (Promise + legacy callback
1822         signatures) are implemented with JSBuiltins.
1823
1824         # "Queued operations" ([1] Section 4.3.1) is implemented in JS bindings
1825         with Promises.
1826
1827         # New RTCPeerConnection features
1828          - add/removeTrack()
1829          - pending/currentLocal/RemoteDescription attributes
1830          - RTCRtpSender/Receiver
1831
1832         # Information carrying objects like RTCSessionDescription and
1833         RTCCandidate don't encapsulate a "mirrored" platform object anymore.
1834
1835         # Remove RTCPeerConnection specific callback implementations (not used
1836         with JS bindings)
1837
1838         [1] http://webkit.org/b/150165
1839         [2] https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html
1840
1841         Tests: Mock should be added to test future WebRTC backend abstractions.
1842
1843         * CMakeLists.txt:
1844         * DerivedSources.make:
1845         * Modules/mediastream/PeerConnectionBackend.cpp: Added.
1846         (WebCore::createPeerConnectionBackend):
1847         * Modules/mediastream/PeerConnectionBackend.h: Added.
1848         (WebCore::PeerConnectionBackendClient::~PeerConnectionBackendClient):
1849         (WebCore::PeerConnectionBackend::~PeerConnectionBackend):
1850         * Modules/mediastream/PeerConnectionStates.h: Added.
1851         * Modules/mediastream/RTCConfiguration.cpp: Added.
1852         (WebCore::validateIceServerURL):
1853         (WebCore::parseIceServer):
1854         (WebCore::RTCConfiguration::create):
1855         (WebCore::RTCConfiguration::RTCConfiguration):
1856         (WebCore::RTCConfiguration::initialize):
1857         * Modules/mediastream/RTCConfiguration.h:
1858         (WebCore::RTCConfiguration::iceTransportPolicy):
1859         (WebCore::RTCConfiguration::bundlePolicy):
1860         (WebCore::RTCConfiguration::iceServers):
1861         (WebCore::RTCConfiguration::create): Deleted.
1862         (WebCore::RTCConfiguration::appendServer): Deleted.
1863         (WebCore::RTCConfiguration::numberOfServers): Deleted.
1864         (WebCore::RTCConfiguration::server): Deleted.
1865         (WebCore::RTCConfiguration::iceTransports): Deleted.
1866         (WebCore::RTCConfiguration::setIceTransports): Deleted.
1867         (WebCore::RTCConfiguration::requestIdentity): Deleted.
1868         (WebCore::RTCConfiguration::setRequestIdentity): Deleted.
1869         (WebCore::RTCConfiguration::privateConfiguration): Deleted.
1870         (WebCore::RTCConfiguration::RTCConfiguration): Deleted.
1871         * Modules/mediastream/RTCConfiguration.idl:
1872         * Modules/mediastream/RTCIceCandidate.cpp:
1873         (WebCore::RTCIceCandidate::create):
1874         (WebCore::RTCIceCandidate::RTCIceCandidate):
1875         (WebCore::RTCIceCandidate::~RTCIceCandidate): Deleted.
1876         (WebCore::RTCIceCandidate::candidate): Deleted.
1877         (WebCore::RTCIceCandidate::sdpMid): Deleted.
1878         (WebCore::RTCIceCandidate::sdpMLineIndex): Deleted.
1879         (WebCore::RTCIceCandidate::descriptor): Deleted.
1880         * Modules/mediastream/RTCIceCandidate.h:
1881         (WebCore::RTCIceCandidate::~RTCIceCandidate):
1882         (WebCore::RTCIceCandidate::candidate):
1883         (WebCore::RTCIceCandidate::setCandidate):
1884         (WebCore::RTCIceCandidate::sdpMid):
1885         (WebCore::RTCIceCandidate::setSdpMid):
1886         (WebCore::RTCIceCandidate::sdpMLineIndex):
1887         (WebCore::RTCIceCandidate::setSdpMLineIndex):
1888         * Modules/mediastream/RTCIceCandidate.idl:
1889         * Modules/mediastream/RTCIceCandidateEvent.cpp:
1890         (WebCore::RTCIceCandidateEvent::create):
1891         (WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
1892         * Modules/mediastream/RTCIceCandidateEvent.h:
1893         * Modules/mediastream/RTCIceServer.h:
1894         (WebCore::RTCIceServer::urls):
1895         (WebCore::RTCIceServer::credential):
1896         (WebCore::RTCIceServer::username):
1897         (WebCore::RTCIceServer::RTCIceServer):
1898         (WebCore::RTCIceServer::create): Deleted.
1899         (WebCore::RTCIceServer::privateServer): Deleted.
1900         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
1901         (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
1902         (WebCore::RTCOfferAnswerOptions::initialize):
1903         (WebCore::RTCOfferOptions::RTCOfferOptions):
1904         (WebCore::RTCOfferOptions::initialize):
1905         (WebCore::RTCAnswerOptions::create):
1906         (WebCore::RTCAnswerOptions::initialize):
1907         (WebCore::RTCOfferAnswerOptions::create): Deleted.
1908         * Modules/mediastream/RTCOfferAnswerOptions.h:
1909         (WebCore::RTCOfferAnswerOptions::voiceActivityDetection):
1910         (WebCore::RTCOfferOptions::offerToReceiveVideo):
1911         (WebCore::RTCOfferOptions::offerToReceiveAudio):
1912         (WebCore::RTCOfferOptions::iceRestart):
1913         (WebCore::RTCAnswerOptions::RTCAnswerOptions):
1914         (WebCore::RTCOfferAnswerOptions::requestIdentity): Deleted.
1915         (WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions): Deleted.
1916         (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions): Deleted.
1917         (WebCore::RTCOfferOptions::voiceActivityDetection): Deleted.
1918         (WebCore::RTCOfferOptions::privateOfferOptions): Deleted.
1919         (WebCore::RTCOfferOptions::~RTCOfferOptions): Deleted.
1920         (WebCore::RTCOfferOptions::RTCOfferOptions): Deleted.
1921         * Modules/mediastream/RTCPeerConnection.cpp:
1922         (WebCore::RTCPeerConnection::create):
1923         (WebCore::RTCPeerConnection::RTCPeerConnection):
1924         (WebCore::RTCPeerConnection::getSenders):
1925         (WebCore::RTCPeerConnection::getReceivers):
1926         (WebCore::RTCPeerConnection::addTrack):
1927         (WebCore::RTCPeerConnection::removeTrack):
1928         (WebCore::RTCPeerConnection::queuedCreateOffer):
1929         (WebCore::RTCPeerConnection::queuedCreateAnswer):
1930         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
1931         (WebCore::RTCPeerConnection::localDescription):
1932         (WebCore::RTCPeerConnection::currentLocalDescription):
1933         (WebCore::RTCPeerConnection::pendingLocalDescription):
1934         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
1935         (WebCore::RTCPeerConnection::remoteDescription):
1936         (WebCore::RTCPeerConnection::currentRemoteDescription):
1937         (WebCore::RTCPeerConnection::pendingRemoteDescription):
1938         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
1939         (WebCore::RTCPeerConnection::signalingState):
1940         (WebCore::RTCPeerConnection::iceGatheringState):
1941         (WebCore::RTCPeerConnection::iceConnectionState):
1942         (WebCore::RTCPeerConnection::setConfiguration):
1943         (WebCore::RTCPeerConnection::privateGetStats):
1944         (WebCore::RTCPeerConnection::createDataChannel):
1945         (WebCore::RTCPeerConnection::close):
1946         (WebCore::RTCPeerConnection::stop):
1947         (WebCore::RTCPeerConnection::setSignalingState):
1948         (WebCore::RTCPeerConnection::updateIceGatheringState):
1949         (WebCore::RTCPeerConnection::updateIceConnectionState):
1950         (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
1951         (WebCore::RTCPeerConnection::fireEvent):
1952         (WebCore::validateIceServerURL): Deleted.
1953         (WebCore::processIceServer): Deleted.
1954         (WebCore::RTCPeerConnection::parseConfiguration): Deleted.
1955         (WebCore::RTCPeerConnection::~RTCPeerConnection): Deleted.
1956         (WebCore::RTCPeerConnection::createOffer): Deleted.
1957         (WebCore::RTCPeerConnection::createAnswer): Deleted.
1958         (WebCore::RTCPeerConnection::checkStateForLocalDescription): Deleted.
1959         (WebCore::RTCPeerConnection::checkStateForRemoteDescription): Deleted.
1960         (WebCore::RTCPeerConnection::setLocalDescription): Deleted.
1961         (WebCore::RTCPeerConnection::setRemoteDescription): Deleted.
1962         (WebCore::RTCPeerConnection::updateIce): Deleted.
1963         (WebCore::RTCPeerConnection::addIceCandidate): Deleted.
1964         (WebCore::RTCPeerConnection::addStream): Deleted.
1965         (WebCore::RTCPeerConnection::removeStream): Deleted.
1966         (WebCore::RTCPeerConnection::getLocalStreams): Deleted.
1967         (WebCore::RTCPeerConnection::getRemoteStreams): Deleted.
1968         (WebCore::RTCPeerConnection::getStreamById): Deleted.
1969         (WebCore::RTCPeerConnection::getStats): Deleted.
1970         (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId): Deleted.
1971         (WebCore::RTCPeerConnection::createDTMFSender): Deleted.
1972         (WebCore::RTCPeerConnection::negotiationNeeded): Deleted.
1973         (WebCore::RTCPeerConnection::didGenerateIceCandidate): Deleted.
1974         (WebCore::RTCPeerConnection::didChangeSignalingState): Deleted.
1975         (WebCore::RTCPeerConnection::didChangeIceGatheringState): Deleted.
1976         (WebCore::RTCPeerConnection::didChangeIceConnectionState): Deleted.
1977         (WebCore::RTCPeerConnection::didAddRemoteStream): Deleted.
1978         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
1979         (WebCore::RTCPeerConnection::didAddRemoteDataChannel): Deleted.
1980         (WebCore::RTCPeerConnection::didAddOrRemoveTrack): Deleted.
1981         (WebCore::RTCPeerConnection::changeSignalingState): Deleted.
1982         (WebCore::RTCPeerConnection::changeIceGatheringState): Deleted.
1983         (WebCore::RTCPeerConnection::changeIceConnectionState): Deleted.
1984         (WebCore::RTCPeerConnection::scheduleDispatchEvent): Deleted.
1985         (WebCore::RTCPeerConnection::scheduledEventTimerFired): Deleted.
1986         * Modules/mediastream/RTCPeerConnection.h:
1987         * Modules/mediastream/RTCPeerConnection.idl:
1988         * Modules/mediastream/RTCPeerConnection.js: Added.
1989         (createOffer):
1990         (createAnswer):
1991         (setLocalDescription):
1992         (setRemoteDescription):
1993         (addIceCandidate):
1994         (getStats):
1995         * Modules/mediastream/RTCPeerConnectionErrorCallback.h:
1996         (WebCore::RTCPeerConnectionErrorCallback::~RTCPeerConnectionErrorCallback): Deleted.
1997         * Modules/mediastream/RTCPeerConnectionInternals.js: Added.
1998         (runNext):
1999         (enqueueOperation):
2000         (setLocalOrRemoteDescription):
2001         (extractCallbackArg):
2002         * Modules/mediastream/RTCRtpReceiver.cpp: Added.
2003         (WebCore::RTCRtpReceiver::RTCRtpReceiver):
2004         * Modules/mediastream/RTCRtpReceiver.h: Added.
2005         (WebCore::RTCRtpReceiver::create):
2006         * Modules/mediastream/RTCRtpReceiver.idl: Added.
2007         * Modules/mediastream/RTCRtpSender.cpp: Added.
2008         (WebCore::RTCRtpSender::RTCRtpSender):
2009         * Modules/mediastream/RTCRtpSender.h: Added.
2010         (WebCore::RTCRtpSender::create):
2011         (WebCore::RTCRtpSender::mediaStreamId):
2012         * Modules/mediastream/RTCRtpSender.idl: Added.
2013         * Modules/mediastream/RTCRtpSenderReceiverBase.h: Added.
2014         (WebCore::RTCRtpSenderReceiverBase::~RTCRtpSenderReceiverBase):
2015         (WebCore::RTCRtpSenderReceiverBase::track):
2016         (WebCore::RTCRtpSenderReceiverBase::RTCRtpSenderReceiverBase):
2017         * Modules/mediastream/RTCSessionDescription.cpp:
2018         (WebCore::RTCSessionDescription::create):
2019         (WebCore::RTCSessionDescription::RTCSessionDescription):
2020         (WebCore::RTCSessionDescription::setType):
2021         (WebCore::RTCSessionDescription::~RTCSessionDescription): Deleted.
2022         (WebCore::RTCSessionDescription::type): Deleted.
2023         (WebCore::RTCSessionDescription::sdp): Deleted.
2024         (WebCore::RTCSessionDescription::setSdp): Deleted.
2025         (WebCore::RTCSessionDescription::descriptor): Deleted.
2026         * Modules/mediastream/RTCSessionDescription.h:
2027         (WebCore::RTCSessionDescription::~RTCSessionDescription):
2028         (WebCore::RTCSessionDescription::type):
2029         (WebCore::RTCSessionDescription::sdp):
2030         (WebCore::RTCSessionDescription::setSdp):
2031         * Modules/mediastream/RTCSessionDescriptionCallback.h:
2032         (WebCore::RTCSessionDescriptionCallback::~RTCSessionDescriptionCallback): Deleted.
2033         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: Removed.
2034         (WebCore::RTCSessionDescriptionRequestImpl::create): Deleted.
2035         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl): Deleted.
2036         (WebCore::RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl): Deleted.
2037         (WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded): Deleted.
2038         (WebCore::RTCSessionDescriptionRequestImpl::requestFailed): Deleted.
2039         (WebCore::RTCSessionDescriptionRequestImpl::stop): Deleted.
2040         (WebCore::RTCSessionDescriptionRequestImpl::activeDOMObjectName): Deleted.
2041         (WebCore::RTCSessionDescriptionRequestImpl::canSuspendForPageCache): Deleted.
2042         (WebCore::RTCSessionDescriptionRequestImpl::clear): Deleted.
2043         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h: Removed.
2044         * Modules/mediastream/RTCStatsCallback.h: Removed.
2045         (WebCore::RTCStatsCallback::~RTCStatsCallback): Deleted.
2046         * Modules/mediastream/RTCStatsCallback.idl: Removed.
2047         * Modules/mediastream/RTCStatsRequestImpl.cpp: Removed.
2048         (WebCore::RTCStatsRequestImpl::create): Deleted.
2049         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Deleted.
2050         (WebCore::RTCStatsRequestImpl::~RTCStatsRequestImpl): Deleted.
2051         (WebCore::RTCStatsRequestImpl::createResponse): Deleted.
2052         (WebCore::RTCStatsRequestImpl::hasSelector): Deleted.
2053         (WebCore::RTCStatsRequestImpl::track): Deleted.
2054         (WebCore::RTCStatsRequestImpl::requestSucceeded): Deleted.
2055         (WebCore::RTCStatsRequestImpl::requestFailed): Deleted.
2056         (WebCore::RTCStatsRequestImpl::stop): Deleted.
2057         (WebCore::RTCStatsRequestImpl::activeDOMObjectName): Deleted.
2058         (WebCore::RTCStatsRequestImpl::canSuspendForPageCache): Deleted.
2059         (WebCore::RTCStatsRequestImpl::clear): Deleted.
2060         * Modules/mediastream/RTCStatsRequestImpl.h: Removed.
2061         * Modules/mediastream/RTCTrackEvent.cpp: Added.
2062         (WebCore::RTCTrackEventInit::RTCTrackEventInit):
2063         (WebCore::RTCTrackEvent::create):
2064         (WebCore::RTCTrackEvent::RTCTrackEvent):
2065         * Modules/mediastream/RTCTrackEvent.h: Added.
2066         (WebCore::RTCTrackEvent::receiver):
2067         (WebCore::RTCTrackEvent::track):
2068         (WebCore::RTCTrackEvent::eventInterface):
2069         * Modules/mediastream/RTCTrackEvent.idl: Added.
2070         * Modules/mediastream/RTCVoidRequestImpl.cpp: Removed.
2071         (WebCore::RTCVoidRequestImpl::create): Deleted.
2072         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl): Deleted.
2073         (WebCore::RTCVoidRequestImpl::~RTCVoidRequestImpl): Deleted.
2074         (WebCore::RTCVoidRequestImpl::requestSucceeded): Deleted.
2075         (WebCore::RTCVoidRequestImpl::requestFailed): Deleted.
2076         (WebCore::RTCVoidRequestImpl::stop): Deleted.
2077         (WebCore::RTCVoidRequestImpl::activeDOMObjectName): Deleted.
2078         (WebCore::RTCVoidRequestImpl::canSuspendForPageCache): Deleted.
2079         (WebCore::RTCVoidRequestImpl::clear): Deleted.
2080         * WebCore.xcodeproj/project.pbxproj:
2081         * bindings/js/JSDictionary.cpp:
2082         (WebCore::JSDictionary::convertValue):
2083         * bindings/js/JSDictionary.h:
2084         * bindings/js/WebCoreBuiltinNames.h:
2085         * bindings/js/WebCoreJSBuiltinInternals.h:
2086         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
2087         (WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals):
2088         (WebCore::JSBuiltinInternalFunctions::visit):
2089         (WebCore::JSBuiltinInternalFunctions::init):
2090         * bindings/js/WebCoreJSBuiltins.cpp:
2091         * bindings/js/WebCoreJSBuiltins.h:
2092         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
2093         (WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins):
2094         (WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins):
2095         * dom/EventNames.in:
2096
2097 2015-11-15  David Kilzer  <ddkilzer@apple.com>
2098
2099         REGRESSION (r192404): Fix tvOS and watchOS builds
2100
2101         * platform/spi/cocoa/QuartzCoreSPI.h: Add more version checks to
2102         fix all the builds.
2103
2104 2015-11-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2105
2106         [EFL][GTK] Remove use of String::format() in versionForUAString()
2107         https://bugs.webkit.org/show_bug.cgi?id=151250
2108
2109         Reviewed by Darin Adler.
2110
2111         As String::format() will be deprecated due to the security problem, reimplement
2112         versionForUAString() using a macro.
2113
2114         * platform/efl/UserAgentEfl.cpp:
2115         (WebCore::versionForUAString):
2116         * platform/gtk/UserAgentGtk.cpp:
2117         (WebCore::platformVersionForUAString):
2118         (WebCore::versionForUAString):
2119
2120 2015-11-14  Antti Koivisto  <antti@apple.com>
2121
2122         Regression(r188820): Downloads of data URLs is broken
2123         https://bugs.webkit.org/show_bug.cgi?id=150900
2124         rdar://problem/23399223
2125
2126         Reviewed by Darin Adler.
2127
2128         No test, the current test infrastructure only allows testing policy decisions, not the actual download.
2129
2130         * loader/DocumentLoader.cpp:
2131         (WebCore::DocumentLoader::continueAfterContentPolicy):
2132
2133         Use normal download path for data URLs instead of trying to convert the main resource load.
2134         Since we decode data URLs locally there is no associated resource load on WebKit side.
2135
2136 2015-11-14  Nan Wang  <n_wang@apple.com>
2137
2138         AX: add a new trait for elements in fieldset on iOS
2139         https://bugs.webkit.org/show_bug.cgi?id=151281
2140
2141         Reviewed by Chris Fleizach.
2142
2143         Added a new trait for elements in the fieldset, so VoiceOver can speak the legend
2144         information for those elements.
2145
2146         Test: accessibility/ios-simulator/fieldset-traits.html
2147
2148         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2149         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2150         (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
2151         (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
2152         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
2153
2154 2015-11-13  Commit Queue  <commit-queue@webkit.org>
2155
2156         Unreviewed, rolling out r192445, r192451, and r192452.
2157         https://bugs.webkit.org/show_bug.cgi?id=151291
2158
2159         Broke Mavericks build (and thus EWS) (Requested by ap on
2160         #webkit).
2161
2162         Reverted changesets:
2163
2164         "Add identifier strings for a bunch of context menu items"
2165         https://bugs.webkit.org/show_bug.cgi?id=151272
2166         http://trac.webkit.org/changeset/192445
2167
2168         "Try to fix the 32-bit build"
2169         http://trac.webkit.org/changeset/192451
2170
2171         "Try to fix the 32-bit build"
2172         http://trac.webkit.org/changeset/192452
2173
2174 2015-11-13  Anders Carlsson  <andersca@apple.com>
2175
2176         Add identifier strings for a bunch of context menu items
2177         https://bugs.webkit.org/show_bug.cgi?id=151272
2178
2179         Reviewed by Dan Bernstein.
2180
2181         Have NSMenuItem conform to NSUserInterfaceItemIdentification.
2182
2183         * platform/spi/mac/NSMenuSPI.h:
2184
2185 2015-11-13  Zalan Bujtas  <zalan@apple.com>
2186
2187         Always render at least a device pixel line when border/outline width > 0.
2188         https://bugs.webkit.org/show_bug.cgi?id=151269
2189
2190         This matches Firefox behaviour.
2191
2192         Reviewed by Simon Fraser.
2193
2194         Existing test is modified to reflect the new behaviour.
2195
2196         * css/StyleBuilderConverter.h:
2197         (WebCore::StyleBuilderConverter::convertLineWidth):
2198         * rendering/BorderEdge.cpp:
2199         (WebCore::BorderEdge::BorderEdge): Deleted.
2200         * rendering/BorderEdge.h:
2201
2202 2015-11-13  Per Arne Vollan  <peavo@outlook.com>
2203
2204         [WinCairo][MediaFoundation] Video rendered at wrong position.
2205         https://bugs.webkit.org/show_bug.cgi?id=151271
2206
2207         Reviewed by Alex Christensen.
2208
2209         The source rectangle used when blitting a frame to the graphics context
2210         should have offset (0, 0).
2211
2212         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2213         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
2214
2215 2015-11-13  Joseph Pecoraro  <pecoraro@apple.com>
2216
2217         Web Inspector: Provide a way to override the WKWebView remote inspector name
2218         https://bugs.webkit.org/show_bug.cgi?id=151075
2219
2220         Reviewed by Tim Horton.
2221
2222         * page/Page.cpp:
2223         (WebCore::Page::remoteInspectionNameOverride):
2224         (WebCore::Page::setRemoteInspectionNameOverride):
2225         * page/Page.h:
2226         * page/PageDebuggable.cpp:
2227         (WebCore::PageDebuggable::name):
2228         (WebCore::PageDebuggable::setNameOverride):
2229         * page/PageDebuggable.h:
2230
2231 2015-11-13  Jiewen Tan  <jiewen_tan@apple.com>
2232
2233         Element::focus() should acquire the ownership of Frame.
2234         https://bugs.webkit.org/show_bug.cgi?id=150204
2235         <rdar://problem/23136794>
2236
2237         Reviewed by Brent Fulgham.
2238
2239         The FrameSelection::setSelection method sometimes releases the last reference to a frame.
2240         When this happens, the Element::updateFocusAppearance would attempt to use dereferenced memory.
2241         Instead, we should ensure that the Frame lifetime is guaranteed to extend through the duration
2242         of the method call.
2243
2244         Test: editing/selection/focus-iframe-removal-crash.html
2245
2246         * dom/Element.cpp:
2247         (WebCore::Element::updateFocusAppearance):
2248
2249 2015-11-13  Sergio Villar Senin  <svillar@igalia.com>
2250
2251         [css-grid] Remove unused GridResolvedPosition constructor
2252         https://bugs.webkit.org/show_bug.cgi?id=151133
2253
2254         Reviewed by Mario Sanchez Prada.
2255
2256         No new tests required, just deleting dead code.
2257
2258         * rendering/style/GridResolvedPosition.cpp:
2259         (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
2260         * rendering/style/GridResolvedPosition.h:
2261
2262 2015-11-13  Sergio Villar Senin  <svillar@igalia.com>
2263
2264         ASSERTION FAILED: m_isEngaged in WTF::Optional::value
2265         https://bugs.webkit.org/show_bug.cgi?id=151094
2266
2267         Reviewed by Darin Adler.
2268
2269         That ASSERT was hit because the precondition was incorrectly
2270         met, i.e., we're considering that the main axis length was
2271         definite when it was actually not. The problem is that to
2272         determine whether it was indefinite or not we're using
2273         RenderBox::hasDefiniteLogicalHeight() which did not perfectly
2274         match RenderBox::computePercentageLogicalHeight() for the case
2275         of RenderTables. So computePercentageLogicalHeight() was
2276         returning Nullopt (i.e. indefinite) while
2277         hasDefiniteLogicalHeight() was returning true (so definite).
2278
2279         Some checks were refactored in a helper function to solve the
2280         inconsistency so that both functions behave the same way even
2281         in this particular situation.
2282
2283         Test: css3/flexbox/inline-flex-percentage-height-in-table-crash.html
2284
2285         * rendering/RenderBox.cpp:
2286         (WebCore::tableCellShouldHaveZeroInitialSize):
2287         (WebCore::RenderBox::computePercentageLogicalHeight):
2288         (WebCore::percentageLogicalHeightIsResolvable):
2289         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
2290         * rendering/RenderBox.h:
2291
2292 2015-11-13  Csaba Osztrogonác  <ossy@webkit.org>
2293
2294         Unreviewed, really fix the Mac CMake build after r192376.
2295
2296         * PlatformMac.cmake:
2297
2298 2015-11-13  Csaba Osztrogonác  <ossy@webkit.org>
2299
2300         Unreviewed, fix the Mac CMake build after r192376.
2301
2302         * PlatformMac.cmake:
2303
2304 2015-11-12  Tim Horton  <timothy_horton@apple.com>
2305
2306         Follow up to the previous change
2307
2308         * platform/spi/cocoa/QuartzCoreSPI.h:
2309         Somehow this escaped.
2310
2311 2015-11-12  Tim Horton  <timothy_horton@apple.com>
2312
2313         Try to fix the Watch/TV build
2314
2315         * platform/spi/cocoa/QuartzCoreSPI.h:
2316         Be more accurate about where we need these.
2317
2318 2015-11-12  Brady Eidson  <beidson@apple.com>
2319
2320         Modern IDB: Pipe through cursor functions from client to server.
2321         https://bugs.webkit.org/show_bug.cgi?id=151197
2322
2323         Reviewed by Alex Christensen.
2324
2325         Tests: storage/indexeddb/modern/cursor-1.html
2326                storage/indexeddb/modern/opencursor-failures.html
2327
2328         This patch implements most IDBCursor considerations at the IDL level, as well as pipes the
2329         appropriate messages through from client to server.
2330         
2331         All operations currently end in errors. Bug 151196 will fix that by making cursors functional.
2332         
2333         * CMakeLists.txt:
2334         * WebCore.xcodeproj/project.pbxproj:
2335
2336         * Modules/indexeddb/IDBCursor.h:
2337         (WebCore::IDBCursor::isKeyCursor): Deleted.
2338         * Modules/indexeddb/IDBCursorWithValue.h:
2339
2340         * Modules/indexeddb/IDBGetResult.h:
2341
2342         * Modules/indexeddb/IDBKeyData.h:
2343         (WebCore::IDBKeyData::string):
2344         (WebCore::IDBKeyData::date):
2345         (WebCore::IDBKeyData::number):
2346         (WebCore::IDBKeyData::array):
2347
2348         * Modules/indexeddb/IndexedDB.h:
2349
2350         * Modules/indexeddb/client/IDBAnyImpl.cpp:
2351         (WebCore::IDBClient::IDBAny::IDBAny):
2352         (WebCore::IDBClient::IDBAny::idbCursor):
2353         (WebCore::IDBClient::IDBAny::idbCursorWithValue):
2354         (WebCore::IDBClient::IDBAny::idbIndex):
2355         (WebCore::IDBClient::IDBAny::idbObjectStore):
2356         (WebCore::IDBClient::IDBAny::modernIDBCursor):
2357         * Modules/indexeddb/client/IDBAnyImpl.h:
2358         (WebCore::IDBClient::IDBAny::create):
2359
2360         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2361         (WebCore::IDBClient::IDBConnectionToServer::openCursor):
2362         (WebCore::IDBClient::IDBConnectionToServer::didOpenCursor):
2363         (WebCore::IDBClient::IDBConnectionToServer::iterateCursor):
2364         (WebCore::IDBClient::IDBConnectionToServer::didIterateCursor):
2365         * Modules/indexeddb/client/IDBConnectionToServer.h:
2366         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2367
2368         * Modules/indexeddb/client/IDBCursorImpl.cpp:
2369         (WebCore::IDBClient::IDBCursor::create):
2370         (WebCore::IDBClient::IDBCursor::IDBCursor):
2371         (WebCore::IDBClient::IDBCursor::sourcesDeleted):
2372         (WebCore::IDBClient::IDBCursor::effectiveObjectStore):
2373         (WebCore::IDBClient::IDBCursor::transaction):
2374         (WebCore::IDBClient::IDBCursor::direction):
2375         (WebCore::IDBClient::IDBCursor::key):
2376         (WebCore::IDBClient::IDBCursor::primaryKey):
2377         (WebCore::IDBClient::IDBCursor::value):
2378         (WebCore::IDBClient::IDBCursor::source):
2379         (WebCore::IDBClient::IDBCursor::update):
2380         (WebCore::IDBClient::IDBCursor::advance):
2381         (WebCore::IDBClient::IDBCursor::continueFunction):
2382         (WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor):
2383         (WebCore::IDBClient::IDBCursor::deleteFunction):
2384         (WebCore::IDBClient::IDBCursor::setGetResult):
2385         * Modules/indexeddb/client/IDBCursorImpl.h:
2386         (WebCore::IDBClient::IDBCursor::info):
2387         (WebCore::IDBClient::IDBCursor::setRequest):
2388         (WebCore::IDBClient::IDBCursor::clearRequest):
2389         (WebCore::IDBClient::IDBCursor::request):
2390
2391         * Modules/indexeddb/client/IDBCursorWithValueImpl.cpp:
2392         (WebCore::IDBClient::IDBCursorWithValue::create):
2393         (WebCore::IDBClient::IDBCursorWithValue::IDBCursorWithValue):
2394         (WebCore::IDBClient::IDBCursorWithValue::~IDBCursorWithValue):
2395         * Modules/indexeddb/client/IDBCursorWithValueImpl.h:
2396
2397         * Modules/indexeddb/client/IDBIndexImpl.cpp:
2398         (WebCore::IDBClient::IDBIndex::openCursor):
2399         (WebCore::IDBClient::IDBIndex::openKeyCursor):
2400         * Modules/indexeddb/client/IDBIndexImpl.h:
2401         (WebCore::IDBClient::IDBIndex::modernObjectStore):
2402         (WebCore::IDBClient::IDBIndex::isDeleted):
2403
2404         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2405         (WebCore::IDBClient::IDBObjectStore::openCursor):
2406         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
2407         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
2408
2409         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2410         (WebCore::IDBClient::IDBRequest::create):
2411         (WebCore::IDBClient::IDBRequest::IDBRequest):
2412         (WebCore::IDBClient::IDBRequest::~IDBRequest):
2413         (WebCore::IDBClient::IDBRequest::source):
2414         (WebCore::IDBClient::IDBRequest::resultCursor):
2415         (WebCore::IDBClient::IDBRequest::willIterateCursor):
2416         (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor):
2417         (WebCore::IDBClient::IDBRequest::requestCompleted):
2418         * Modules/indexeddb/client/IDBRequestImpl.h:
2419         (WebCore::IDBClient::IDBRequest::modernResult):
2420
2421         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2422         (WebCore::IDBClient::IDBTransaction::requestOpenCursor):
2423         (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
2424         (WebCore::IDBClient::IDBTransaction::openCursorOnServer):
2425         (WebCore::IDBClient::IDBTransaction::didOpenCursorOnServer):
2426         (WebCore::IDBClient::IDBTransaction::iterateCursor):
2427         (WebCore::IDBClient::IDBTransaction::iterateCursorOnServer):
2428         (WebCore::IDBClient::IDBTransaction::didIterateCursorOnServer):
2429         * Modules/indexeddb/client/IDBTransactionImpl.h:
2430
2431         * Modules/indexeddb/client/TransactionOperation.h:
2432         (WebCore::IDBClient::createTransactionOperation):
2433
2434         * Modules/indexeddb/legacy/LegacyCursor.cpp:
2435         (WebCore::LegacyCursor::source):
2436         * Modules/indexeddb/legacy/LegacyCursor.h:
2437         (WebCore::LegacyCursor::continueFunction): Deleted.
2438         (WebCore::LegacyCursor::isKeyCursor): Deleted.
2439         * Modules/indexeddb/legacy/LegacyCursorWithValue.h:
2440
2441         * Modules/indexeddb/server/IDBBackingStore.h:
2442
2443         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2444         (WebCore::IDBServer::IDBConnectionToClient::didOpenCursor):
2445         (WebCore::IDBServer::IDBConnectionToClient::didIterateCursor):
2446         * Modules/indexeddb/server/IDBConnectionToClient.h:
2447         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2448
2449         * Modules/indexeddb/server/IDBServer.cpp:
2450         (WebCore::IDBServer::IDBServer::openCursor):
2451         (WebCore::IDBServer::IDBServer::iterateCursor):
2452         * Modules/indexeddb/server/IDBServer.h:
2453
2454         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2455         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
2456         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
2457         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2458
2459         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2460         (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
2461         (WebCore::IDBServer::UniqueIDBDatabase::performOpenCursor):
2462         (WebCore::IDBServer::UniqueIDBDatabase::didPerformOpenCursor):
2463         (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
2464         (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
2465         (WebCore::IDBServer::UniqueIDBDatabase::didPerformIterateCursor):
2466         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2467
2468         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2469         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
2470         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
2471         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
2472         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2473
2474         * Modules/indexeddb/shared/IDBCursorInfo.cpp: Added.
2475         (WebCore::IDBCursorInfo::objectStoreCursor):
2476         (WebCore::IDBCursorInfo::indexCursor):
2477         (WebCore::IDBCursorInfo::IDBCursorInfo):
2478         (WebCore::IDBCursorInfo::isDirectionForward):
2479         (WebCore::IDBCursorInfo::isolatedCopy):
2480         * Modules/indexeddb/shared/IDBCursorInfo.h: Added.
2481         (WebCore::IDBCursorInfo::identifier):
2482         (WebCore::IDBCursorInfo::sourceIdentifier):
2483         (WebCore::IDBCursorInfo::cursorSource):
2484         (WebCore::IDBCursorInfo::cursorDirection):
2485         (WebCore::IDBCursorInfo::cursorType):
2486
2487         * Modules/indexeddb/shared/IDBResultData.cpp:
2488         (WebCore::IDBResultData::openCursorSuccess):
2489         (WebCore::IDBResultData::iterateCursorSuccess):
2490         * Modules/indexeddb/shared/IDBResultData.h:
2491
2492         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2493         (WebCore::InProcessIDBServer::didOpenCursor):
2494         (WebCore::InProcessIDBServer::didIterateCursor):
2495         (WebCore::InProcessIDBServer::openCursor):
2496         (WebCore::InProcessIDBServer::iterateCursor):
2497         * Modules/indexeddb/shared/InProcessIDBServer.h:
2498
2499         * bindings/js/IDBBindingUtilities.cpp:
2500         (WebCore::idbKeyDataToJSValue):
2501         * bindings/js/IDBBindingUtilities.h:
2502
2503         * platform/CrossThreadCopier.cpp:
2504         (WebCore::IDBCursorInfo>::copy):
2505         * platform/CrossThreadCopier.h:
2506
2507 2015-11-12  Anders Carlsson  <andersca@apple.com>
2508
2509         Delete PlatformMenuDescription.h
2510         https://bugs.webkit.org/show_bug.cgi?id=151229
2511
2512         Reviewed by Beth Dakin.
2513
2514         * WebCore.vcxproj/WebCore.vcxproj:
2515         * WebCore.vcxproj/WebCore.vcxproj.filters:
2516         * WebCore.xcodeproj/project.pbxproj:
2517         * page/ContextMenuClient.h:
2518         * platform/ContextMenu.h:
2519         * platform/ContextMenuItem.h:
2520         * platform/PlatformMenuDescription.h: Removed.
2521
2522 2015-11-12  Anders Carlsson  <andersca@apple.com>
2523
2524         ContextMenuAction and WebMenuItemTag shouldn't have to be in sync
2525         https://bugs.webkit.org/show_bug.cgi?id=151226
2526
2527         Reviewed by Tim Horton.
2528
2529         * page/ContextMenuController.cpp:
2530         * platform/ContextMenuItem.h:
2531         Remove now unneeded comments. Also, remove ContextMenuItemTagOpenLinkInThisWindow since it wasn't used by any of our remaining ports.
2532
2533 2015-11-12  Zalan Bujtas  <zalan@apple.com>
2534
2535         Ignore visited background color when deciding if the input renderer needs to be painted natively.
2536         https://bugs.webkit.org/show_bug.cgi?id=151211
2537         rdar://problem/21449823
2538
2539         Reviewed by Antti Koivisto.
2540
2541         Test: fast/css/pseudo-visited-background-color-on-input.html
2542
2543         * rendering/RenderTheme.cpp:
2544         (WebCore::RenderTheme::isControlStyled):
2545         * rendering/style/RenderStyle.h:
2546
2547 2015-11-12  David Hyatt  <hyatt@apple.com>
2548
2549         Tatechuyoko shrink-to-fit breaks after changing color, background-color or text-decoration
2550         https://bugs.webkit.org/show_bug.cgi?id=151218
2551         <rdar://problem/23521702>
2552
2553         Reviewed by Myles Maxfield.
2554
2555         Added fast/text/text-combine-shrink-on-color-change.html
2556
2557         * rendering/RenderCombineText.cpp:
2558         (WebCore::RenderCombineText::styleDidChange):
2559
2560 2015-11-12  Anders Carlsson  <andersca@apple.com>
2561
2562         Use ContextMenuItemTagNoAction instead of ContextMenuItemCustomTagNoAction
2563         https://bugs.webkit.org/show_bug.cgi?id=151222
2564
2565         Reviewed by Joseph Pecoraro.
2566
2567         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2568         (WebCore::populateContextMenuItems):
2569         * page/ContextMenuController.cpp:
2570         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Deleted.
2571         * platform/ContextMenuItem.h:
2572
2573 2015-11-12  Myles C. Maxfield  <mmaxfield@apple.com>
2574
2575         [Cocoa] Font fallback is not language-sensitive
2576         https://bugs.webkit.org/show_bug.cgi?id=147390
2577
2578         Reviewed by Dean Jackson.
2579
2580         Test: fast/text/fallback-language-han-2.html
2581
2582         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2583         (WebCore::FontCache::systemFallbackForCharacters):
2584
2585 2015-11-12  Anders Carlsson  <andersca@apple.com>
2586
2587         ContextMenuController::contextMenuItemSelected only needs the action and title, not the full item
2588         https://bugs.webkit.org/show_bug.cgi?id=151217
2589
2590         Reviewed by Joseph Pecoraro.
2591
2592         * inspector/InspectorFrontendHost.cpp:
2593         * page/ContextMenuController.cpp:
2594         (WebCore::ContextMenuController::contextMenuItemSelected):
2595         * page/ContextMenuController.h:
2596         * page/ContextMenuProvider.h:
2597
2598 2015-11-12  Anders Carlsson  <andersca@apple.com>
2599
2600         Remove an unused function
2601         https://bugs.webkit.org/show_bug.cgi?id=151215
2602
2603         Reviewed by Joseph Pecoraro.
2604
2605         * loader/EmptyClients.h:
2606         * page/ContextMenuClient.h:
2607         * page/ContextMenuController.cpp:
2608         (WebCore::ContextMenuController::contextMenuItemSelected): Deleted.
2609
2610 2015-11-11  Anders Carlsson  <andersca@apple.com>
2611
2612         Enable cross-platform context menus by default
2613         https://bugs.webkit.org/show_bug.cgi?id=151173
2614
2615         Reviewed by Tim Horton.
2616
2617         * WebCore.xcodeproj/project.pbxproj:
2618         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2619         (WebCore::JSInspectorFrontendHost::showContextMenu):
2620         * page/ContextMenuController.cpp:
2621         (WebCore::ContextMenuController::addInspectElementItem): Deleted.
2622         * platform/ContextMenu.cpp:
2623         * platform/ContextMenu.h:
2624         * platform/ContextMenuItem.cpp:
2625         * platform/ContextMenuItem.h:
2626         (WebCore::ContextMenuItem::isNull): Deleted.
2627         * platform/mac/ContextMenuItemMac.mm: Removed.
2628         (WebCore::menuToArray): Deleted.
2629         (WebCore::ContextMenuItem::ContextMenuItem): Deleted.
2630         (WebCore::createPlatformMenuItemDescription): Deleted.
2631         (WebCore::ContextMenuItem::~ContextMenuItem): Deleted.
2632         (WebCore::ContextMenuItem::platformDescription): Deleted.
2633         (WebCore::ContextMenuItem::type): Deleted.
2634         (WebCore::ContextMenuItem::action): Deleted.
2635         (WebCore::ContextMenuItem::title): Deleted.
2636         (WebCore::ContextMenuItem::platformSubMenu): Deleted.
2637         (WebCore::ContextMenuItem::setType): Deleted.
2638         (WebCore::ContextMenuItem::setAction): Deleted.
2639         (WebCore::ContextMenuItem::setTitle): Deleted.
2640         (WebCore::ContextMenuItem::setSubMenu): Deleted.
2641         (WebCore::ContextMenuItem::setChecked): Deleted.
2642         (WebCore::ContextMenuItem::setEnabled): Deleted.
2643         (WebCore::ContextMenuItem::enabled): Deleted.
2644         (WebCore::ContextMenuItem::checked): Deleted.
2645         * platform/mac/ContextMenuMac.mm: Removed.
2646         (WebCore::ContextMenu::ContextMenu): Deleted.
2647         (WebCore::ContextMenu::~ContextMenu): Deleted.
2648         (WebCore::ContextMenu::appendItem): Deleted.
2649         (WebCore::ContextMenu::insertItem): Deleted.
2650         (WebCore::ContextMenu::itemCount): Deleted.
2651         (WebCore::ContextMenu::setPlatformDescription): Deleted.
2652         (WebCore::ContextMenu::platformDescription): Deleted.
2653         (WebCore::ContextMenu::releasePlatformDescription): Deleted.
2654         (WebCore::contextMenuItemVector): Deleted.
2655         (WebCore::platformMenuDescription): Deleted.
2656
2657 2015-11-12  Myles C. Maxfield  <mmaxfield@apple.com>
2658
2659         [Cocoa] Font fallback is not language-sensitive
2660         https://bugs.webkit.org/show_bug.cgi?id=147390
2661
2662         Reviewed by Dean Jackson.
2663
2664         This re-applies r190754 in a somewhat more performant way.
2665
2666         Test: fast/text/fallback-language-han-2.html
2667
2668         * platform/graphics/Font.cpp:
2669         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2670         (WebCore::CharacterFallbackMapKey::operator==):
2671         (WebCore::CharacterFallbackMapKeyHash::hash):
2672         (WebCore::Font::systemFallbackFontForCharacter):
2673         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2674         (WebCore::FontCache::systemFallbackForCharacters):
2675
2676 2015-11-11  Jon Honeycutt  <jhoneycutt@apple.com>
2677
2678         popstate event should be dispatched asynchronously
2679         https://bugs.webkit.org/show_bug.cgi?id=36202
2680         <rdar://problem/7761279>
2681
2682         Based on an original patch by Mihai Parparita <mihaip@chromium.org>.
2683
2684         Reviewed by Brent Fulgham.
2685
2686         Tests: fast/loader/remove-iframe-during-history-navigation-different.html
2687                fast/loader/remove-iframe-during-history-navigation-same.html
2688                fast/loader/stateobjects/popstate-is-asynchronous.html
2689
2690         * dom/Document.cpp:
2691         (WebCore::Document::enqueuePopstateEvent):
2692         Use enqueueWindowEvent().
2693
2694 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
2695
2696         Fix build failure due to missing NeverDestroyed.h include after r192169
2697         https://bugs.webkit.org/show_bug.cgi?id=151186
2698
2699         Reviewed by Darin Adler.
2700
2701         * rendering/RenderCombineText.cpp:
2702
2703 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
2704
2705         Fix build failure due to missing forward declaration of FontVariantSettings after r191968
2706         https://bugs.webkit.org/show_bug.cgi?id=151185
2707
2708         Reviewed by Myles C. Maxfield.
2709
2710         * css/CSSFontFaceSource.h:
2711
2712 2015-11-12  Eric Carlson  <eric.carlson@apple.com>
2713
2714         [MediaStream] Reflect media stream tracks as HTMLMediaElement tracks
2715         https://bugs.webkit.org/show_bug.cgi?id=151145
2716
2717         Reviewed by Jer Noble.
2718
2719         Test: fast/mediastream/MediaStream-video-element.html
2720
2721         * WebCore.xcodeproj/project.pbxproj: Add new header files.
2722
2723         * html/track/AudioTrack.h: Add comments to clean things up slightly.
2724         * html/track/VideoTrack.h: Ditto.
2725
2726         Create a AudioTrackPrivateMediaStream or VideoTrackPrivateMediaStream for each track in
2727         the MediaStream.
2728         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2729         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2730         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Call updateTracks.
2731         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didAddTrack): Ditto.
2732         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didRemoveTrack): Ditto.
2733         (WebCore::updateTracksOfType): New, template function to update audio or video tracks.
2734         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): New.
2735
2736         * platform/mediastream/AudioTrackPrivateMediaStream.h: Added.
2737
2738         * platform/mediastream/MediaStreamPrivate.cpp:
2739         (WebCore::MediaStreamPrivate::currentFrameImage): Fix a typo, early return if the track is
2740           not active OR there is no active video track.
2741         * platform/mediastream/MediaStreamPrivate.h:
2742         (WebCore::MediaStreamPrivate::activeVideoTrack): Accessor for active video track, if any.
2743
2744         * platform/mediastream/VideoTrackPrivateMediaStream.h: Added.
2745
2746         * platform/mediastream/mac/AVAudioCaptureSource.mm:
2747         (WebCore::AVAudioCaptureSource::updateStates): Set current states.
2748
2749         * platform/mediastream/mac/AVMediaCaptureSource.mm:
2750         (WebCore::AVMediaCaptureSource::states): Set source ID.
2751         (WebCore::AVMediaCaptureSource::capabilities): Set source ID directly.
2752
2753         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2754         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
2755         (WebCore::AVVideoCaptureSource::updateStates): Set states here instead of in the constructor.
2756
2757         * platform/mock/MockRealtimeMediaSource.cpp:
2758         (WebCore::MockRealtimeMediaSource::capabilities): Set source ID directly.
2759
2760         * platform/mock/MockRealtimeVideoSource.cpp:
2761         (WebCore::MockRealtimeVideoSource::updateStates): Set source type.
2762
2763 2015-11-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2764
2765         XHR abort() event firing does not match spec
2766         https://bugs.webkit.org/show_bug.cgi?id=98404
2767
2768         Reviewed by Darin Adler.
2769
2770         Introducing explicit sendFlag as in the specification.
2771         Previously, sendFlag was computed using !!m_loader.
2772         But this does not work well for loadstart events since sendFlag should be true but m_loader is still null at that time.
2773
2774         Updated abort event firing test according specification.
2775         For instance, compared to previously, the abort event is not fired in DONE state or if sendFlag is not set.
2776
2777         Covered by rebased tests.
2778
2779         * xml/XMLHttpRequest.cpp:
2780         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Compute whether dispatching the load event before calling XHR readystatechange event callback.
2781         (WebCore::XMLHttpRequest::setWithCredentials): Replacing m_loader by m_sendFlag to align with the spec.
2782         (WebCore::XMLHttpRequest::open): Unsetting m_sendFlag..
2783         (WebCore::XMLHttpRequest::initSend): Replacing m_loader by m_sendFlag to align with the spec.
2784         (WebCore::XMLHttpRequest::createRequest): Setting m_sendFlag.
2785         (WebCore::XMLHttpRequest::abort): Checking m_sendFlag and updating code to follow the specification.
2786         (WebCore::XMLHttpRequest::genericError): Unsetting m_sendFlag.
2787         (WebCore::XMLHttpRequest::setRequestHeader): Replacing m_loader by m_sendFlag to align with the spec.
2788         (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
2789         (WebCore::XMLHttpRequest::didReachTimeout): Ditto.
2790         * xml/XMLHttpRequest.h: Added m_sendFlag.
2791
2792 2015-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2793
2794         [GStreamer] Use RunLoop::timer in MediaPlayerPrivateGStreamerBase for GL drawing
2795         https://bugs.webkit.org/show_bug.cgi?id=151099
2796
2797         Reviewed by Philippe Normand.
2798
2799         Instead of the GThreadSafeMainLoopSource.
2800
2801         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2802         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2803         (WebCore::MediaPlayerPrivateGStreamerBase::repaint):
2804         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2805         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Deleted.
2806         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2807
2808 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
2809
2810         Remove ENABLE(SATURATED_LAYOUT_ARITHMETIC) guards
2811         https://bugs.webkit.org/show_bug.cgi?id=150972
2812
2813         Reviewed by Darin Adler.
2814
2815         * Configurations/FeatureDefines.xcconfig:
2816         * platform/LayoutUnit.h:
2817         (WebCore::operator*):
2818         (WebCore::LayoutUnit::LayoutUnit): Deleted.
2819         (WebCore::LayoutUnit::fromFloatCeil): Deleted.
2820         (WebCore::LayoutUnit::fromFloatFloor): Deleted.
2821         (WebCore::LayoutUnit::fromFloatRound): Deleted.
2822         (WebCore::LayoutUnit::ceil): Deleted.
2823         (WebCore::LayoutUnit::round): Deleted.
2824         (WebCore::LayoutUnit::floor): Deleted.
2825         (WebCore::LayoutUnit::setValue): Deleted.
2826         (WebCore::operator/): Deleted.
2827         (WebCore::operator+): Deleted.
2828         (WebCore::operator-): Deleted.
2829         (WebCore::operator+=): Deleted.
2830         (WebCore::operator-=): Deleted.
2831         * rendering/LayoutState.cpp:
2832         (WebCore::LayoutState::LayoutState):
2833         * rendering/LayoutState.h:
2834         (WebCore::LayoutState::LayoutState):
2835         * rendering/RenderView.h:
2836
2837 2015-11-11  Chris Dumez  <cdumez@apple.com>
2838
2839         Stop passing a PassRefPtr to dispatchEvent()
2840         https://bugs.webkit.org/show_bug.cgi?id=151158
2841
2842         Reviewed by Alex Christensen.
2843
2844         Stop passing a PassRefPtr to dispatchEvent() because:
2845         1. PassRefPtr is legacy and should no longer be used
2846         2. We don't actually transfer ownership of the Event to the callee
2847
2848         Pass a C++ reference instead.
2849
2850 2015-11-11  Chris Dumez  <cdumez@apple.com>
2851
2852         Fix leaks in idbKeyFromInspectorObject()
2853         https://bugs.webkit.org/show_bug.cgi?id=151179
2854
2855         Reviewed by Brian Burg.
2856
2857         Fix leaks in idbKeyFromInspectorObject() that were caused by the
2858         NeverDestroyed<> not being marked as static.
2859
2860         * inspector/InspectorIndexedDBAgent.cpp:
2861
2862 2015-11-11  Geoffrey Garen  <ggaren@apple.com>
2863
2864         Rename handle.*Event to dispatch.*Event
2865         https://bugs.webkit.org/show_bug.cgi?id=151168
2866
2867         Reviewed by Chris Dumez.
2868
2869         * dom/Document.cpp:
2870         (WebCore::Document::implicitClose):
2871         * dom/Document.h:
2872         * loader/DocumentLoader.cpp:
2873         (WebCore::DocumentLoader::DocumentLoader):
2874         (WebCore::DocumentLoader::getIconDataForIconURL):
2875         (WebCore::DocumentLoader::dispatchOnloadEvents):
2876         (WebCore::DocumentLoader::handledOnloadEvents): Deleted.
2877         * loader/DocumentLoader.h:
2878         (WebCore::DocumentLoader::isClientRedirect):
2879         (WebCore::DocumentLoader::setIsClientRedirect):
2880         (WebCore::DocumentLoader::wasOnloadDispatched):
2881         (WebCore::DocumentLoader::overrideEncoding):
2882         (WebCore::DocumentLoader::wasOnloadHandled): Deleted.
2883         * loader/EmptyClients.h:
2884         * loader/FrameLoader.cpp:
2885         (WebCore::FrameLoader::submitForm):
2886         (WebCore::FrameLoader::stopLoading):
2887         (WebCore::FrameLoader::userAgent):
2888         (WebCore::FrameLoader::dispatchOnloadEvents):
2889         (WebCore::FrameLoader::frameDetached):
2890         (WebCore::FrameLoader::shouldClose):
2891         (WebCore::FrameLoader::dispatchUnloadEvents):
2892         (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
2893         (WebCore::FrameLoader::handledOnloadEvents): Deleted.
2894         (WebCore::FrameLoader::handleUnloadEvents): Deleted.
2895         (WebCore::FrameLoader::handleBeforeUnloadEvent): Deleted.
2896         * loader/FrameLoader.h:
2897         * loader/FrameLoaderClient.h:
2898         * loader/NavigationScheduler.cpp:
2899         (WebCore::NavigationScheduler::mustLockBackForwardList):
2900
2901 2015-11-11  Anders Carlsson  <andersca@apple.com>
2902
2903         Remove more dead code
2904         https://bugs.webkit.org/show_bug.cgi?id=151170
2905
2906         Reviewed by Beth Dakin.
2907
2908         * platform/ContextMenu.cpp:
2909         (WebCore::findItemWithAction): Deleted.
2910         (WebCore::ContextMenu::itemWithAction): Deleted.
2911         * platform/ContextMenu.h:
2912         (WebCore::ContextMenu::itemAtIndex): Deleted.
2913         * platform/ContextMenuItem.h:
2914
2915 2015-11-11  Anders Carlsson  <andersca@apple.com>
2916
2917         De-indent ContextMenu.h and ContextMenuItem.h.
2918
2919         Rubber-stamped by Andreas Kling.
2920
2921         * platform/ContextMenu.h:
2922         * platform/ContextMenuItem.h:
2923
2924 2015-11-11  Anders Carlsson  <andersca@apple.com>
2925
2926         Remove ContextMenuWin.cpp and ContextMenuItemWin.cpp
2927         https://bugs.webkit.org/show_bug.cgi?id=150467
2928
2929         Reviewed by Beth Dakin.
2930
2931         These files are not needed anymore.
2932
2933         * PlatformWin.cmake:
2934         * WebCore.vcxproj/WebCore.vcxproj:
2935         * WebCore.vcxproj/WebCore.vcxproj.filters:
2936         * platform/win/ContextMenuItemWin.cpp: Removed.
2937         (WebCore::ContextMenuItem::ContextMenuItem): Deleted.
2938         (WebCore::ContextMenuItem::platformContextMenuItem): Deleted.
2939         * platform/win/ContextMenuWin.cpp: Removed.
2940         (WebCore::ContextMenu::ContextMenu): Deleted.
2941         (WebCore::ContextMenu::getContextMenuItems): Deleted.
2942         (WebCore::ContextMenu::createPlatformContextMenuFromItems): Deleted.
2943         (WebCore::ContextMenu::platformContextMenu): Deleted.
2944
2945 2015-11-11  Anders Carlsson  <andersca@apple.com>
2946
2947         Get rid of ContextMenuNone.cpp and ContextMenuItemNone.cpp
2948         https://bugs.webkit.org/show_bug.cgi?id=151169
2949
2950         Reviewed by Beth Dakin.
2951
2952         * PlatformEfl.cmake:
2953         * platform/ContextMenuItemNone.cpp: Removed.
2954         (WebCore::ContextMenuItem::platformContextMenuItem): Deleted.
2955         * platform/ContextMenuNone.cpp: Removed.
2956         (WebCore::ContextMenu::ContextMenu): Deleted.
2957         (WebCore::ContextMenu::getContextMenuItems): Deleted.
2958         (WebCore::ContextMenu::createPlatformContextMenuFromItems): Deleted.
2959         (WebCore::ContextMenu::platformContextMenu): Deleted.
2960
2961 2015-11-11  Anders Carlsson  <andersca@apple.com>
2962
2963         Remove more dead context menu code
2964         https://bugs.webkit.org/show_bug.cgi?id=151163
2965
2966         Reviewed by Tim Horton.
2967
2968         * loader/EmptyClients.h:
2969         * page/ContextMenuClient.h:
2970         * page/ContextMenuController.cpp:
2971         (WebCore::ContextMenuController::populate):
2972         * platform/ContextMenuItem.h:
2973         * platform/mac/ContextMenuItemMac.mm:
2974         (WebCore::ContextMenuItem::shareMenuItem): Deleted.
2975
2976 2015-11-10  Jon Honeycutt  <jhoneycutt@apple.com>
2977
2978         Crash loading Blink layout test fast/parser/strip-script-attrs-on-input.html
2979         https://bugs.webkit.org/show_bug.cgi?id=150201
2980         <rdar://problem/23136478>
2981
2982         Reviewed by Brent Fulgham.
2983
2984         Test: fast/parser/strip-script-attrs-on-input.html
2985
2986         * html/parser/HTMLTreeBuilder.cpp:
2987         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2988         Get the attribute after calling
2989         HTMLConstructionSite::insertSelfClosingHTMLElement(), as this may
2990         mutate the token's attributes.
2991
2992 2015-11-11  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2993
2994         [Streams API] Remove bind usage
2995         https://bugs.webkit.org/show_bug.cgi?id=151104
2996
2997         Reviewed by Youenn Fablet.
2998
2999         Instead of using bind, an inline error function was created.
3000
3001         Internal rework, no tests needed.
3002
3003         * Modules/streams/WritableStream.js:
3004         (error):
3005         (initializeWritableStream):
3006
3007 2015-11-10  Brady Eidson  <beidson@apple.com>
3008
3009         Modern IDB: Make indexes actually index.
3010         https://bugs.webkit.org/show_bug.cgi?id=150939
3011
3012         Reviewed by Alex Christensen.
3013
3014         Tests: storage/indexeddb/modern/index-1.html
3015                storage/indexeddb/modern/index-2.html
3016                storage/indexeddb/modern/index-3.html
3017
3018         * CMakeLists.txt:
3019         * WebCore.xcodeproj/project.pbxproj:
3020
3021         * Modules/indexeddb/IDBKeyData.h:
3022         (WebCore::IDBKeyData::hash): Deleted.
3023
3024         * Modules/indexeddb/IDBKeyRangeData.cpp:
3025         (WebCore::IDBKeyRangeData::isExactlyOneKey):
3026
3027         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3028         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
3029
3030         * Modules/indexeddb/server/IndexValueEntry.cpp: Copied from Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp.
3031         (WebCore::IDBServer::IndexValueEntry::IndexValueEntry):
3032         (WebCore::IDBServer::IndexValueEntry::~IndexValueEntry):
3033         (WebCore::IDBServer::IndexValueEntry::addKey):
3034         (WebCore::IDBServer::IndexValueEntry::removeKey):
3035         (WebCore::IDBServer::IndexValueEntry::getLowest):
3036         (WebCore::IDBServer::IndexValueEntry::getCount):
3037         * Modules/indexeddb/server/IndexValueEntry.h: Copied from Source/WebCore/Modules/indexeddb/server/MemoryIndex.h.
3038
3039         * Modules/indexeddb/server/IndexValueStore.cpp: Added.
3040         (WebCore::IDBServer::IndexValueStore::IndexValueStore):
3041         (WebCore::IDBServer::IndexValueStore::lowestValueForKey):
3042         (WebCore::IDBServer::IndexValueStore::countForKey):
3043         (WebCore::IDBServer::IndexValueStore::contains):
3044         (WebCore::IDBServer::IndexValueStore::addRecord):
3045         (WebCore::IDBServer::IndexValueStore::removeRecord):
3046         (WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey):
3047         (WebCore::IDBServer::IndexValueStore::lowestKeyWithRecordInRange):
3048         * Modules/indexeddb/server/IndexValueStore.h: Copied from Source/WebCore/Modules/indexeddb/server/MemoryIndex.h.
3049
3050         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3051         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
3052         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexCleared):
3053         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3054         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
3055
3056         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3057         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
3058
3059         * Modules/indexeddb/server/MemoryIndex.cpp:
3060         (WebCore::IDBServer::MemoryIndex::create):
3061         (WebCore::IDBServer::MemoryIndex::MemoryIndex):
3062         (WebCore::IDBServer::MemoryIndex::objectStoreCleared):
3063         (WebCore::IDBServer::MemoryIndex::replaceIndexValueStore):
3064         (WebCore::IDBServer::MemoryIndex::getResultForKeyRange):
3065         (WebCore::IDBServer::MemoryIndex::countForKeyRange):
3066         (WebCore::IDBServer::MemoryIndex::putIndexKey):
3067         (WebCore::IDBServer::MemoryIndex::removeRecord):
3068         (WebCore::IDBServer::MemoryIndex::removeEntriesWithValueKey):
3069         (WebCore::IDBServer::MemoryIndex::valueForKeyRange): Deleted.
3070         * Modules/indexeddb/server/MemoryIndex.h:
3071
3072         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3073         (WebCore::IDBServer::MemoryObjectStore::createIndex):
3074         (WebCore::IDBServer::MemoryObjectStore::clear):
3075         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
3076         (WebCore::IDBServer::MemoryObjectStore::addRecord):
3077         (WebCore::IDBServer::indexVM):
3078         (WebCore::IDBServer::indexGlobalExec):
3079         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForDeleteRecord):
3080         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
3081         (WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
3082         * Modules/indexeddb/server/MemoryObjectStore.h:
3083         (WebCore::IDBServer::MemoryObjectStore::writeTransaction):
3084
3085         * Modules/indexeddb/shared/IndexKey.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp.
3086         (WebCore::IndexKey::IndexKey):
3087         (WebCore::IndexKey::isolatedCopy):
3088         (WebCore::IndexKey::asOneKey):
3089         (WebCore::IndexKey::multiEntry):
3090         * Modules/indexeddb/shared/IndexKey.h: Added.
3091         (WebCore::IndexKey::isNull):
3092
3093         * bindings/js/IDBBindingUtilities.cpp:
3094         (WebCore::idbValueDataToJSValue):
3095         (WebCore::deserializeIDBValueBuffer):
3096         (WebCore::idbKeyDataToScriptValue):
3097         (WebCore::createKeyPathArray):
3098         (WebCore::generateIndexKeyForValue):
3099         * bindings/js/IDBBindingUtilities.h:
3100
3101 2015-11-10  Myles C. Maxfield  <mmaxfield@apple.com>
3102
3103         Move locale information into FontDescription
3104         https://bugs.webkit.org/show_bug.cgi?id=147457
3105
3106         Reviewed by Andreas Kling.
3107
3108         Currently, the "lang" attribute on a node sets locale information in RenderStyle.
3109         Font selection is sensitive to this locale information, and occurs deep within
3110         platform/ code, far away from RenderStyle. Because every RenderStyle owns a
3111         FontDescription, and font selection can consult with FontDescriptions, it makes
3112         sense to move the variable from RenderStyle to FontDescription, and provide
3113         convenience methods on RenderStyle which inspect its FontDescription for locale
3114         information.
3115
3116         This patch is in preparation for correctly obeying locale information when
3117         performing font fallback.
3118
3119         No new tests because there is no behavior change.
3120
3121         * css/CSSPropertyNames.in:
3122         * css/StyleBuilderCustom.h:
3123         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
3124         * platform/graphics/FontCache.h:
3125         * platform/graphics/FontDescription.cpp:
3126         (WebCore::FontDescription::setLocale):
3127         * platform/graphics/FontDescription.h:
3128         (WebCore::FontDescription::locale):
3129         (WebCore::FontDescription::operator==):
3130         (WebCore::FontCascadeDescription::initialLocale):
3131         (WebCore::FontDescription::setScript): Deleted.
3132         * rendering/style/RenderStyle.cpp:
3133         (WebCore::RenderStyle::changeRequiresLayout): Deleted.
3134         * rendering/style/RenderStyle.h:
3135         * rendering/style/StyleRareInheritedData.cpp:
3136         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted.
3137         (WebCore::StyleRareInheritedData::operator==): Deleted.
3138         * rendering/style/StyleRareInheritedData.h:
3139         * style/StyleResolveForDocument.cpp:
3140         (WebCore::Style::resolveForDocument):
3141
3142 2015-11-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3143
3144         [EFL] Support an applicationVersion argument to UserAgentEfl::standardUserAgent() 
3145         https://bugs.webkit.org/show_bug.cgi?id=151060
3146
3147         Reviewed by Darin Adler.
3148
3149         *applicationVersion* was missed to support by r192148. This patch adds it as well as
3150         missed Darin comments are fixed.
3151
3152         * platform/efl/UserAgentEfl.cpp:
3153         (WebCore::platformVersionForUAString):
3154         (WebCore::versionForUAString):
3155         (WebCore::standardUserAgent):
3156
3157 2015-11-10  Simon Fraser  <simon.fraser@apple.com>
3158
3159         Use different pixel formats for displays that support them
3160         https://bugs.webkit.org/show_bug.cgi?id=151122
3161         rdar://problem/22846841
3162
3163         Reviewed by Tim Horton.
3164
3165         Add new IOSurface format enum values, and set up the appropriate IOSurfaceCreate()
3166         property dictionaries for them.
3167
3168         * platform/graphics/cocoa/IOSurface.h:
3169         * platform/graphics/cocoa/IOSurface.mm:
3170         (IOSurface::IOSurface):
3171         * platform/spi/cocoa/IOSurfaceSPI.h:
3172
3173 2015-11-10  Brent Fulgham  <bfulgham@apple.com>
3174
3175         Crash running webaudio/panner-loop.html
3176         https://bugs.webkit.org/show_bug.cgi?id=150200
3177         <rdar://problem/23136282>
3178
3179         Reviewed by Jer Noble.
3180
3181         Test: webaudio/panner-loop.html
3182
3183         This is based on the changes in Blink r164822:
3184         https://codereview.chromium.org/130003002
3185
3186         Avoid infinitely recursing on audio nodes by keeping track of which nodes we've already
3187         visited.
3188
3189         * Modules/webaudio/PannerNode.cpp:
3190         (WebCore::PannerNode::pullInputs): Pass set of visited nodes so we don't revisit
3191         nodes we've already serviced.
3192         (WebCore::PannerNode::notifyAudioSourcesConnectedToNode): Accept visitedNodes argument
3193         so we can avoid revisiting nodes. Check if the current node has already been visited
3194         before processing it.
3195         * Modules/webaudio/PannerNode.h:
3196
3197 2015-11-10  Tim Horton  <timothy_horton@apple.com>
3198
3199         Adopt formal protocols for CA delegates
3200         https://bugs.webkit.org/show_bug.cgi?id=151121
3201         <rdar://problem/6739193>
3202
3203         Reviewed by Anders Carlsson.
3204
3205         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
3206         Note that our WebActionDisablingCALayerDelegate is, in fact, a CALayerDelegate.
3207
3208         * platform/spi/cocoa/QuartzCoreSPI.h:
3209         Add empty protocol definitions where necessary.
3210
3211         * WebCore.xcodeproj/project.pbxproj:
3212         * platform/spi/mac/NSAccessibilitySPI.h: Added.
3213         * platform/spi/mac/NSApplicationSPI.h: Added.
3214         * platform/spi/mac/NSTextFinderSPI.h: Added.
3215         * platform/spi/mac/NSViewSPI.h: Added.
3216         Split out SPI headers from WebKit2's AppKitSPI.h.
3217         Add NSViewSPI to note that NSView is (internally) a CALayerDelegate,
3218         which WebHTMLView depends on.
3219
3220 2015-11-10  Zalan Bujtas  <zalan@apple.com>
3221
3222         Continuations with anonymous wrappers inside misplaces child renderers.
3223         https://bugs.webkit.org/show_bug.cgi?id=150908
3224
3225         When a child is appended to an inline container and the beforeChild is not a direct child, but 
3226         it is inside a generated subtree, we need to special case the inline split to form continuation.
3227
3228         RenderInline::splitInlines() assumes that beforeChild is always a direct child of the current
3229         inline container. However when beforeChild type requires wrapper content (such as table cells), the DOM and the
3230         render tree get out of sync. In such cases, we need to ensure that both the beforeChild and its siblings end up
3231         in the correct generated block.
3232
3233         Reviewed by Darin Adler and David Hyatt.
3234
3235         Test: fast/inline/continuation-with-anon-wrappers.html
3236
3237         * rendering/RenderInline.cpp:
3238         (WebCore::RenderInline::splitInlines):
3239         (WebCore::RenderInline::addChildToContinuation):
3240
3241 2015-11-10  Geoffrey Garen  <ggaren@apple.com>
3242
3243         alert, confirm, prompt, showModalDialog should be forbidden during page close and navigation
3244         https://bugs.webkit.org/show_bug.cgi?id=150980
3245
3246         Reviewed by Chris Dumez.
3247
3248         Tests: fast/events/beforeunload-alert.html
3249                fast/events/beforeunload-confirm.html
3250                fast/events/beforeunload-prompt.html
3251                fast/events/beforeunload-showModalDialog.html
3252                fast/events/pagehide-alert.html
3253                fast/events/pagehide-confirm.html
3254                fast/events/pagehide-prompt.html
3255                fast/events/pagehide-showModalDialog.html
3256                fast/events/unload-alert.html
3257                fast/events/unload-confirm.html
3258                fast/events/unload-prompt.html
3259                fast/events/unload-showModalDialog.html
3260
3261         * loader/FrameLoader.cpp:
3262         (WebCore::FrameLoader::stopLoading): Factored out a helper function for
3263         unload event processing.
3264         (WebCore::FrameLoader::handleUnloadEvents): Forbid prompts in unload
3265         events just like we do in beforeunload events, and for the same reasons.
3266
3267         (WebCore::FrameLoader::handleBeforeUnloadEvent): Updated for renames.
3268
3269         * loader/FrameLoader.h:
3270
3271         * page/DOMWindow.cpp:
3272         (WebCore::DOMWindow::print):
3273         (WebCore::DOMWindow::alert):
3274         (WebCore::DOMWindow::confirm):
3275         (WebCore::DOMWindow::prompt):
3276         (WebCore::DOMWindow::showModalDialog): Updated for renames. Refactored
3277         some of this code to handle null pages more cleanly. In particular, we
3278         sometimes used to treat null page as "everything is permitted" -- but it
3279         is best practice in a permissions context to treat lack of information
3280         as no permission granted rather than all permissions granted. (I don't
3281         know of a way to trigger this condition in practice.)
3282
3283         * page/Page.cpp:
3284         (WebCore::Page::Page):
3285         (WebCore::Page::forbidPrompts):
3286         (WebCore::Page::allowPrompts):
3287         (WebCore::Page::arePromptsAllowed): Renamed to make these functions
3288         reflect their new, broader context.
3289
3290         (WebCore::Page::incrementFrameHandlingBeforeUnloadEventCount): Deleted.
3291         (WebCore::Page::decrementFrameHandlingBeforeUnloadEventCount): Deleted.
3292         (WebCore::Page::isAnyFrameHandlingBeforeUnloadEvent): Deleted.
3293
3294         * page/Page.h:
3295
3296 2015-11-09  David Hyatt  <hyatt@apple.com>
3297
3298         tate-chu-yoko should shrink to fit when it exceeds the available width.
3299         <rdar://problem/12130468>
3300         https://bugs.webkit.org/show_bug.cgi?id=151051
3301
3302         Reviewed by Myles Maxfield.
3303
3304         Covered by existing tests
3305
3306         * rendering/RenderCombineText.cpp:
3307         (WebCore::RenderCombineText::combineText):
3308
3309         When testing for text-combine, find the font variant that is the best fit, i.e.,
3310         that exceeds the available width by the smallest amount. Scale that best fit down
3311         repeatedly until it fits within the available space. We set a pixel size of 6 as
3312         the threshold at which we give up.
3313
3314         Also make sure to reset glyphOverflow on each measurement, as this was creating
3315         a potential bug both with variant checking and then with scaling, since glyphOverflow
3316         isn't reset when width() is invoked.
3317
3318 2015-11-10  Myles C. Maxfield  <mmaxfield@apple.com>
3319
3320         Tatechuyoko text is not vertically centered in its vertical advance
3321         https://bugs.webkit.org/show_bug.cgi?id=151074
3322         <rdar://problem/20074305>
3323
3324         Reviewed by David Hyatt.
3325
3326         During paint time, the run origin of tatechuyoko needs to be adjusted to compensate for the
3327         rotation of the writing mode. The calculation which performed this adjustment was incorrect.
3328
3329         It is incorrect for two reasons:
3330         1. It used the existing text origin, which had the font's ascent incorporated in it, but did
3331         not compensate by either inspecting the overflow bounds' ascent nor the font's ascent proper.
3332         2. It did not distinguish between the overflow bounds' ascent vs. descent. Instead, it added
3333         them together and treated both values together.
3334
3335         No new tests yet. I need to make a font to test this.
3336
3337         * rendering/InlineTextBox.cpp:
3338         (WebCore::InlineTextBox::paint):
3339         * rendering/RenderCombineText.cpp:
3340         (WebCore::RenderCombineText::computeTextOrigin):
3341         (WebCore::RenderCombineText::combineText):
3342         (WebCore::RenderCombineText::adjustTextOrigin): Deleted.
3343         * rendering/RenderCombineText.h:
3344
3345 2015-11-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3346
3347         XMLHttpRequestUpload should support ontimeout event handler
3348         https://bugs.webkit.org/show_bug.cgi?id=128531
3349
3350         Reviewed by Darin Adler.
3351