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