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