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