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