4b1aef660c9ce15f6b2f30dae2ba26bec8502129
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-11-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2
3         [Streams API] Rework promises to use @newPromiseCapability
4         https://bugs.webkit.org/show_bug.cgi?id=150627
5
6         Reviewed by Youenn Fablet.
7
8         We are removing the stream promises functions in favor of @newPromiseCapabity which basically provides the same
9         functionality (keeping the resolve and reject functions without external slots). Slots and variables were
10         renamed as *PromiseCapability to show that they no longer hold just a promise, but a promise capability.
11
12         Internal rework, no new tests needed.
13
14         * Modules/streams/ReadableStreamInternals.js:
15         (privateInitializeReadableStreamReader.this.closedPromiseCapability.resolve):
16         (privateInitializeReadableStreamReader.this.closedPromiseCapability.reject):
17         (privateInitializeReadableStreamReader):
18         (teeReadableStream):
19         (teeReadableStreamBranch2CancelFunction):
20         (errorReadableStream):
21         (closeReadableStreamReader):
22         (enqueueInReadableStream):
23         (readFromReadableStreamReader):
24         * Modules/streams/ReadableStreamReader.js:
25         (closed):
26         * Modules/streams/StreamInternals.js:
27         (createNewStreamsPromise): Deleted.
28         (resolveStreamsPromise): Deleted.
29         (rejectStreamsPromise): Deleted.
30         * Modules/streams/WritableStream.js:
31         (this.readyPromiseCapability.resolve):
32         (this.readyPromiseCapability.reject):
33         (initializeWritableStream):
34         (close):
35         (write):
36         (closed):
37         (ready):
38         * Modules/streams/WritableStreamInternals.js:
39         (syncWritableStreamStateWithQueue):
40         (errorWritableStream):
41         * bindings/js/WebCoreBuiltinNames.h:
42
43 2015-11-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
44
45         Move webkitGetUserMedia to JS Builtin
46         https://bugs.webkit.org/show_bug.cgi?id=149499
47
48         Reviewed by Darin Adler.
49
50         Implemented webkitGetUserMedia as a JSBuiltin wrapper around navigator.mediaDevices.getUserMedia.
51
52         Removed cpp based version.
53
54         The js builting implementation checks for argument but does not raise exception when the request is not supported.
55         The error callback is called instead, in an asynchronous fashion.
56         The js builtin implementation does not check first that it is called on navigator, contrary to the cpp implementation.
57         This is done afterwards when calling navigator.MediaDevices.@getUserMedia.
58
59         Covered by existing and modified tests.
60
61         * CMakeLists.txt: Adding NavigatorUserMedia.js as built-in JS file.
62         * DerivedSources.make: Ditto.
63         * Modules/mediastream/NavigatorUserMedia.idl: Making webkitGetUserMedia JSBuiltin
64         * Modules/mediastream/NavigatorUserMedia.js:
65         (webkitGetUserMedia):
66         * Modules/mediastream/NavigatorUserMediaErrorCallback.h: Removed.
67         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl: Removed.
68         * Modules/mediastream/NavigatorUserMediaSuccessCallback.h: Removed.
69         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl: Removed.
70         * Modules/mediastream/UserMediaRequest.cpp:
71         * Modules/mediastream/UserMediaRequest.h:
72         * WebCore.xcodeproj/project.pbxproj:
73         * bindings/js/JSDOMWindowBase.cpp:
74         (WebCore::JSDOMWindowBase::finishCreation): Style modifications.
75         * bindings/js/JSNavigatorCustom.cpp: Removed.
76         * bindings/js/WebCoreJSBuiltins.cpp: Adding support for NavigatorUserMedia.js built-in JS file.
77         * bindings/js/WebCoreJSBuiltins.h: Ditto.
78         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
79         (WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):
80
81 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
82
83         [GStreamer] Use GstBus sync message handler and schedule tasks to the main thread with RunLoop::dispatch
84         https://bugs.webkit.org/show_bug.cgi?id=150800
85
86         Reviewed by Philippe Normand.
87
88         This way we would avoid all the GScource + polling mechanism that
89         GST uses internally to handle messages asynchronously in the main thread.
90
91         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
92         (WTF::adoptGRef):
93         (WTF::refGPtr<GstMessage>):
94         (WTF::derefGPtr<GstMessage>):
95         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
96         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
97         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
98         Initialize the WeakPtr factory.
99         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
100         reset the GstBus sync handler.
101         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Make it void.
102         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
103         GstBus sync message handler and schedule the messages to the main
104         thread with RunLoop::main().dispatch().
105         (WebCore::mediaPlayerPrivateMessageCallback): Deleted.
106         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
107         (WebCore::MediaPlayerPrivateGStreamer::createWeakPtr): Create a WeakPtr.
108         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
109         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
110         Handle the need context message that needs to be handled in the
111         caller thread.
112         (WebCore::mediaPlayerPrivateNeedContextMessageCallback): Deleted.
113         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
114         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Do not
115         connect to sync-message signal, handleSyncMessage() will be called
116         to handled messages synchronously.
117         (WebCore::MediaPlayerPrivateGStreamerBase::handleNeedContextMessage): Deleted.
118         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
119
120 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
121
122         [GStreamer] Cleanup the iradio properties
123         https://bugs.webkit.org/show_bug.cgi?id=148522
124
125         Reviewed by Philippe Normand.
126
127         Remove unused icecast code.
128
129         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
130         (StreamingClient::handleResponseReceived):
131         (webKitWebSrcGetProperty): Deleted.
132         (webKitWebSrcStop): Deleted.
133
134 2015-11-02  Keith Rollin  <krollin@apple.com>
135
136         input[type=number] does not increment/decrement integers with trailing decimal characters
137         https://bugs.webkit.org/show_bug.cgi?id=148867
138         rdar://problem/22589693
139
140         Reviewed by Chris Dumez.
141
142         Support input[type=number].value attributes of the form "###." (that
143         is, leading digits with a decimal but no trailing digits). This form
144         was supported in the setting of the attribute, but not when changing
145         it through stepUp/Down.
146
147         Testing turned up similarly incorrect processing of -.###, so
148         addressed that, too.
149
150         Test: fast/forms/range/input-appearance-range-decimals.html
151
152         Updated the following tests:
153         - fast/forms/number/number-stepup-stepdown-from-renderer.html
154         - fast/forms/number/number-stepup-stepdown.html
155         - fast/forms/range/range-stepup-stepdown-from-renderer.html
156         - fast/forms/range/range-stepup-stepdown.html
157
158         * html/InputType.cpp:
159         (WebCore::InputType::stepUpFromRenderer):
160         * platform/Decimal.cpp:
161         (WebCore::Decimal::fromString):
162
163 2015-11-02  Jiewen Tan  <jiewen_tan@apple.com>
164
165         Null dereference loading Blink layout test fast/css/background-repeat-null-y-crash.html
166         https://bugs.webkit.org/show_bug.cgi?id=150211
167         <rdar://problem/23137321>
168
169         Reviewed by Alex Christensen.
170
171         This is a merge of Blink r188842:
172         https://codereview.chromium.org/846933002
173
174         By setting the backgroundRepeatY property to null it can
175         happen that accessing that CSS value returns a null pointer.
176         In that case simply bail out early.
177
178         Test: fast/css/background-repeat-null-y-crash.html
179
180         * css/StyleProperties.cpp:
181         (WebCore::StyleProperties::getLayeredShorthandValue):
182
183 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
184
185         [Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
186         https://bugs.webkit.org/show_bug.cgi?id=150766
187
188         Reviewed by Darin Adler.
189
190         The spec has changed the initial value of text-orientation from "vertical-right"
191         to "mixed." This patch follows this movement, but also keeps the existing
192         property working (the parser will treat both values the same).
193
194         Test: fast/text/vertical-mixed.html
195
196         * css/CSSParser.cpp:
197         (WebCore::CSSParser::parseValue):
198         * css/CSSPrimitiveValueMappings.h:
199         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
200         (WebCore::CSSPrimitiveValue::operator TextOrientation):
201         * css/CSSValueKeywords.in:
202         * css/StyleResolver.cpp:
203         (WebCore::checkForOrientationChange):
204         * platform/graphics/FontCascadeFonts.cpp:
205         (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
206         * platform/graphics/FontDescription.cpp:
207         (WebCore::FontDescription::FontDescription):
208         * platform/graphics/cocoa/FontCascadeCocoa.mm:
209         (WebCore::FontCascade::fontForCombiningCharacterSequence):
210         * platform/text/TextFlags.h:
211         * rendering/style/RenderStyle.cpp:
212         (WebCore::RenderStyle::getFontAndGlyphOrientation):
213         * rendering/style/RenderStyle.h:
214         * rendering/style/RenderStyleConstants.h:
215         * rendering/style/StyleRareInheritedData.cpp:
216         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
217         * style/StyleResolveForDocument.cpp:
218         (WebCore::Style::resolveForDocument):
219
220 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
221
222         [Cocoa] Support WOFF2
223         https://bugs.webkit.org/show_bug.cgi?id=150830
224
225         Reviewed by Zalan Bujtas.
226
227         On platforms which support it, WebKit only needs to recognize WOFF2.
228
229         Test: fast/text/woff2.html
230
231         * platform/graphics/mac/FontCustomPlatformData.cpp:
232         (WebCore::FontCustomPlatformData::supportsFormat):
233
234 2015-11-02  Nan Wang  <n_wang@apple.com>
235
236         AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog
237         https://bugs.webkit.org/show_bug.cgi?id=138566
238
239         Reviewed by Chris Fleizach.
240
241         Added support for aria-modal attribute on dialog/alertdialog roles.
242         When modal dialog is displayed, all other contents will be unaccessible.
243
244         Tests: accessibility/aria-modal-multiple-dialogs.html
245                accessibility/aria-modal.html
246
247         * accessibility/AXObjectCache.cpp:
248         (WebCore::AXObjectCache::AXObjectCache):
249         (WebCore::AXObjectCache::~AXObjectCache):
250         (WebCore::AXObjectCache::findAriaModalNodes):
251         (WebCore::AXObjectCache::updateCurrentAriaModalNode):
252         (WebCore::AXObjectCache::isNodeVisible):
253         (WebCore::AXObjectCache::ariaModalNode):
254         (WebCore::AXObjectCache::focusedImageMapUIElement):
255         (WebCore::AXObjectCache::remove):
256         (WebCore::AXObjectCache::handleAttributeChanged):
257         (WebCore::AXObjectCache::handleAriaModalChange):
258         (WebCore::AXObjectCache::labelChanged):
259         * accessibility/AXObjectCache.h:
260         (WebCore::AXObjectCache::handleActiveDescendantChanged):
261         (WebCore::AXObjectCache::handleAriaExpandedChange):
262         (WebCore::AXObjectCache::handleAriaRoleChanged):
263         (WebCore::AXObjectCache::handleAriaModalChange):
264         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
265         (WebCore::AXObjectCache::handleScrollbarUpdate):
266         (WebCore::AXObjectCache::handleAttributeChanged):
267         * accessibility/AccessibilityObject.cpp:
268         (WebCore::AccessibilityObject::ariaCurrentState):
269         (WebCore::AccessibilityObject::isAriaModalDescendant):
270         (WebCore::AccessibilityObject::ignoredFromARIAModalPresence):
271         (WebCore::AccessibilityObject::hasTagName):
272         (WebCore::AccessibilityObject::defaultObjectInclusion):
273         * accessibility/AccessibilityObject.h:
274         * html/HTMLAttributeNames.in:
275
276 2015-11-02  Brady Eidson  <beidson@apple.com>
277
278         Modern IDB: IBDObjectStore.delete() support.
279         https://bugs.webkit.org/show_bug.cgi?id=150784
280
281         Reviewed by Alex Christensen.
282
283         Tests: storage/indexeddb/modern/idbobjectstore-delete-1.html
284                storage/indexeddb/modern/idbobjectstore-delete-2.html
285                storage/indexeddb/modern/idbobjectstore-delete-failures.html
286
287         * Modules/indexeddb/IDBKeyRangeData.cpp:
288         (WebCore::IDBKeyRangeData::isValid):
289         * Modules/indexeddb/IDBKeyRangeData.h:
290         
291         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
292         (WebCore::IDBClient::IDBConnectionToServer::deleteRecord):
293         (WebCore::IDBClient::IDBConnectionToServer::didDeleteRecord):
294         * Modules/indexeddb/client/IDBConnectionToServer.h:
295         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
296         
297         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
298         (WebCore::IDBClient::IDBObjectStore::get):
299         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
300         
301         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
302         (WebCore::IDBClient::IDBTransaction::requestDeleteRecord):
303         (WebCore::IDBClient::IDBTransaction::deleteRecordOnServer):
304         (WebCore::IDBClient::IDBTransaction::didDeleteRecordOnServer):
305         * Modules/indexeddb/client/IDBTransactionImpl.h:
306         
307         * Modules/indexeddb/server/IDBBackingStore.h:
308         
309         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
310         (WebCore::IDBServer::IDBConnectionToClient::didDeleteRecord):
311         * Modules/indexeddb/server/IDBConnectionToClient.h:
312         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
313         
314         * Modules/indexeddb/server/IDBServer.cpp:
315         (WebCore::IDBServer::IDBServer::deleteRecord):
316         * Modules/indexeddb/server/IDBServer.h:
317         
318         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
319         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
320         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord): Deleted.
321         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
322         
323         * Modules/indexeddb/server/MemoryObjectStore.cpp:
324         (WebCore::IDBServer::MemoryObjectStore::deleteRange):
325         * Modules/indexeddb/server/MemoryObjectStore.h:
326         
327         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
328         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
329         (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
330         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord):
331         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteRecord):
332         * Modules/indexeddb/server/UniqueIDBDatabase.h:
333         
334         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
335         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
336         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
337         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
338         
339         * Modules/indexeddb/shared/IDBResultData.cpp:
340         (WebCore::IDBResultData::deleteRecordSuccess):
341         * Modules/indexeddb/shared/IDBResultData.h:
342         
343         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
344         (WebCore::InProcessIDBServer::didDeleteRecord):
345         (WebCore::InProcessIDBServer::deleteRecord):
346         * Modules/indexeddb/shared/InProcessIDBServer.h:
347
348 2015-11-02  Andy Estes  <aestes@apple.com>
349
350         Fix the iOS build again.
351
352         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: supportsPictureInPicture() needs to be declared even when
353         AVKit is disabled.
354
355 2015-11-02  Tim Horton  <timothy_horton@apple.com>
356
357         PDFPlugin should take advantage of threaded scrolling
358         https://bugs.webkit.org/show_bug.cgi?id=150037
359
360         Reviewed by Anders Carlsson.
361
362         * page/PageOverlay.cpp:
363         (WebCore::PageOverlay::PageOverlay):
364         (WebCore::PageOverlay::setNeedsDisplay):
365         Don't reset the overlay layer's opacity if we're not animating,
366         because it's possible the client wants to manage it.
367
368         * page/PageOverlayController.cpp:
369         (WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
370         Let the overlay itself determine whether it needes synchronous scrolling,
371         and let PageOverlay clients override the default.
372
373         * platform/Widget.h:
374         (WebCore::Widget::boundsRect):
375         Export a few useful things.
376
377 2015-11-02  Chris Dumez  <cdumez@apple.com>
378
379         Regression(r191673): Crash in RunLoopTimer::schedule()
380         https://bugs.webkit.org/show_bug.cgi?id=150816
381         <rdar://problem/23335285>
382
383         Reviewed by Anders Carlsson.
384
385         The crash was happening when the RunLoopTimer would fire during the
386         call to RunLoopTimer::schedule(), which can happen because we are
387         calling schedule() from a background thread. In such case, the
388         timerFired() callback execution would cause |this| to get destroyed.
389
390         To avoid this issue, DecodingResultDispatcher is now ref-counted. The
391         object is ref'd while calling startTimer() so that the object cannot go
392         away during the execution of this method. Also, we explicitly ref the
393         object when starting the timer to keep the object alive until the
394         RunLoopTimer has fired, at which point we explicitely de-ref.
395
396         This should handle correctly the cases where the RunLoopTimer fires
397         during AND after the execution of startTimer().
398
399         * platform/network/DataURLDecoder.cpp:
400         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
401         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
402         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
403
404 2015-11-02  Andy Estes  <aestes@apple.com>
405
406         [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
407         https://bugs.webkit.org/show_bug.cgi?id=150819
408
409         Reviewed by Dan Bernstein.
410
411         This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
412
413         * Configurations/Base.xcconfig:
414
415 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
416
417         [Win] MiniBrowser unable to use WebInspector
418         https://bugs.webkit.org/show_bug.cgi?id=150810
419         <rdar://problem/23358514>
420
421         Reviewed by Timothy Hatcher.
422
423         The CMakeList rule for creating the InjectedScriptSource.min.js was improperly including
424         the quote characters in the text prepended to InjectedScriptSource.min.js. This caused a
425         parsing error in the JS file.
426         
427         The solution was to switch from using "COMMAND echo" to use the more cross-platform
428         compatible command "COMMAND ${CMAKE_COMMAND} -E echo ...", which handles the string
429         escaping properly on all platforms.
430
431         * CMakeLists.txt: Switch the 'echo' command syntax to be more cross-platform.
432
433 2015-11-02  Zalan Bujtas  <zalan@apple.com>
434
435         hasOverflowClip() does not necessarily mean valid layer().
436         https://bugs.webkit.org/show_bug.cgi?id=150814
437
438         Reviewed by Simon Fraser.
439
440         Certain RenderLayerModelObject derived classes simply return false for ::requiresLayer(), which means
441         that we end up not creating a layer for the overflow clipped content.   
442
443         No change in functionality.
444
445         * rendering/RenderBlock.cpp:
446         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
447         (WebCore::RenderBlock::paint):
448         * rendering/RenderBox.cpp:
449         (WebCore::RenderBox::styleDidChange):
450         (WebCore::RenderBox::scrollWidth):
451         (WebCore::RenderBox::scrollHeight):
452         (WebCore::RenderBox::scrollLeft):
453         (WebCore::RenderBox::scrollTop):
454         (WebCore::RenderBox::setScrollLeft):
455         (WebCore::RenderBox::setScrollTop):
456         (WebCore::RenderBox::includeVerticalScrollbarSize):
457         (WebCore::RenderBox::includeHorizontalScrollbarSize):
458         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
459         (WebCore::RenderBox::usesCompositedScrolling):
460
461 2015-11-02  Alex Christensen  <achristensen@webkit.org>
462
463         Fix Mac CMake build after r191904.
464
465         * PlatformMac.cmake:
466         Move SettingsMac.mm to SettingsCocoa.mm.
467
468 2015-11-02  Eric Carlson  <eric.carlson@apple.com>
469
470         Add HTMLMediaElement behavior and attribute value restrictions for MediaStream
471         https://bugs.webkit.org/show_bug.cgi?id=146853
472
473         Reviewed by Jer Noble.
474
475         * Modules/mediastream/MediaStream.cpp:
476         (WebCore::MediaStream::scheduleActiveStateChange): Do nothing if the active state hasn't changed.
477         (WebCore::MediaStream::activityEventTimerFired): Remove FIXME.
478
479         * Modules/mediastream/MediaStreamTrack.cpp:
480         (WebCore::MediaStreamTrack::stopProducingData): Add comments. Notify observers that the track ended.
481         (WebCore::MediaStreamTrack::trackEnded): Don't dispatch events after having been stopped.
482         (WebCore::MediaStreamTrack::trackMutedChanged): Ditto.
483
484         * html/HTMLMediaElement.cpp:
485         (WebCore::HTMLMediaElement::defaultPlaybackRate): Always return 1 when using a MediaStream.
486         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Do nothing when using a MediaStream.
487         (WebCore::HTMLMediaElement::playbackRate): Always return 1 when using a MediaStream.
488         (WebCore::HTMLMediaElement::setPlaybackRate): Do nothing when using a MediaStream.
489         (WebCore::HTMLMediaElement::ended): Ask the media engine when using a MediaStream.
490         (WebCore::HTMLMediaElement::preload): Always return "none" when using a MediaStream.
491         (WebCore::HTMLMediaElement::setPreload): Do nothing when using a MediaStream.
492         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Avoid unnecessary comparisons when the duration
493           is not definite. Send ended event when MediaStream says stream has ended.
494
495         * platform/graphics/MediaPlayer.cpp:
496         (WebCore::MediaPlayer::ended): New, passthrough to engine.
497         * platform/graphics/MediaPlayer.h:
498         * platform/graphics/MediaPlayerPrivate.h:
499
500         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
501         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
502         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Set m_ended from stream.
503         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Pause the stream if necessary.
504         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Return early if ended or already playing.
505         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Return early if ended or already paused.
506         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Cleanup. Try to grab a paused
507           image if the stream isn't active.
508         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateReadyState): New.
509         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Call updateReadyState.
510         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Ditto.
511
512         * platform/mediastream/MediaStreamPrivate.cpp:
513         (WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveState so the state will
514           be updated if necessary.
515
516         * platform/mediastream/RealtimeMediaSource.cpp:
517         (WebCore::RealtimeMediaSource::stop): Don't call reset, there is no need to tear everything down.
518
519 2015-10-31  Andy Estes  <aestes@apple.com>
520
521         Replace iOS-only WebKitSystemInterface calls with SPI
522         https://bugs.webkit.org/show_bug.cgi?id=150763
523
524         Reviewed by Darin Adler.
525
526         * WebCore.xcodeproj/project.pbxproj:
527         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
528         * css/MediaQueryEvaluator.cpp:
529         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
530         * html/HTMLMediaElement.cpp:
531         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
532         * html/HTMLObjectElement.cpp:
533         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
534         * html/HTMLVideoElement.cpp:
535         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
536         * page/NavigatorBase.cpp:
537         * page/Settings.h:
538         * page/ViewportConfiguration.cpp:
539         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
540         * page/ios/UserAgentIOS.mm:
541         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
542         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
543         (WebCore::deviceName): Ditto for wkGetDeviceName().
544         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
545         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
546         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
547         * platform/PlatformScreen.h:
548         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
549         (WebCore::deviceClass):
550         (WebCore::deviceName):
551         (WebCore::deviceHasIPadCapability):
552         * platform/ios/Device.h:
553         * platform/ios/PlatformScreenIOS.mm:
554         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
555         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
556         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
557         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
558         (WebCore::mobileGestaltFloatValue): Deleted.
559         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
560         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
561         (iosDeviceClass): Deleted.
562         * platform/ios/WebCoreSystemInterfaceIOS.mm:
563         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
564         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
565         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
566         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
567         * platform/ios/wak/WAKWindow.mm:
568         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
569         (-[WAKWindow initWithFrame:]): Ditto.
570         * platform/ios/wak/WKGraphics.mm:
571         (WKGraphicsCreateImageFromBundleWithName): Ditto.
572         (WKDrawPatternBitmap): Ditto.
573         * platform/mac/WebCoreSystemInterface.h:
574         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
575         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
576         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
577         * rendering/RenderThemeIOS.mm: Included UIKitSPI.h instead of UIColorSPI.h, and removed unnecessary forward declarations for the iOS public SDK build.
578
579 2015-11-02  Commit Queue  <commit-queue@webkit.org>
580
581         Unreviewed, rolling out r191902.
582         https://bugs.webkit.org/show_bug.cgi?id=150811
583
584         This change broke iOS builders (Requested by ryanhaddad on
585         #webkit).
586
587         Reverted changeset:
588
589         "Replace iOS-only WebKitSystemInterface calls with SPI"
590         https://bugs.webkit.org/show_bug.cgi?id=150763
591         http://trac.webkit.org/changeset/191902
592
593 2015-10-31  Andy Estes  <aestes@apple.com>
594
595         Replace iOS-only WebKitSystemInterface calls with SPI
596         https://bugs.webkit.org/show_bug.cgi?id=150763
597
598         Reviewed by Darin Adler.
599
600         * WebCore.xcodeproj/project.pbxproj:
601         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
602         * css/MediaQueryEvaluator.cpp:
603         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
604         * html/HTMLMediaElement.cpp:
605         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
606         * html/HTMLObjectElement.cpp:
607         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
608         * html/HTMLVideoElement.cpp:
609         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
610         * page/NavigatorBase.cpp:
611         * page/Settings.h:
612         * page/ViewportConfiguration.cpp:
613         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
614         * page/ios/UserAgentIOS.mm:
615         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
616         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
617         (WebCore::deviceName): Ditto for wkGetDeviceName().
618         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
619         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
620         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
621         * platform/PlatformScreen.h:
622         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
623         (WebCore::deviceClass):
624         (WebCore::deviceName):
625         (WebCore::deviceHasIPadCapability):
626         * platform/ios/Device.h:
627         * platform/ios/PlatformScreenIOS.mm:
628         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
629         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
630         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
631         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
632         (WebCore::mobileGestaltFloatValue): Deleted.
633         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
634         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
635         (iosDeviceClass): Deleted.
636         * platform/ios/WebCoreSystemInterfaceIOS.mm:
637         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
638         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
639         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
640         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
641         * platform/ios/wak/WAKWindow.mm:
642         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
643         (-[WAKWindow initWithFrame:]): Ditto.
644         * platform/ios/wak/WKGraphics.mm:
645         (WKGraphicsCreateImageFromBundleWithName): Ditto.
646         (WKDrawPatternBitmap): Ditto.
647         * platform/mac/WebCoreSystemInterface.h:
648         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
649         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
650         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
651         * rendering/RenderThemeIOS.mm:
652
653 2015-11-02  Frederic Wang  <fred.wang@free.fr>
654
655         [Win] Add support for the USE_TYPO_METRICS flag
656         https://bugs.webkit.org/show_bug.cgi?id=150451
657
658         Reviewed by Darin Adler.
659
660         Make the Windows backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
661
662         No new tests because this is already tested by fonts/use-typo-metrics-1.html
663
664         * platform/graphics/win/SimpleFontDataCGWin.cpp:
665         (WebCore::Font::platformInit):
666         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
667         (WebCore::Font::platformInit):
668         * platform/graphics/win/SimpleFontDataWin.cpp:
669         (WebCore::Font::initGDIFont):
670
671 2015-11-02  Hyunduk Kim  <hyunduk.kim@samsung.com>
672
673         Enable MediaSource::isTypeSupported() to handle the upper-cased MIME type & Codec
674         https://bugs.webkit.org/show_bug.cgi?id=150436
675
676         Reviewed by Darin Adler.
677
678         Got the new test case from
679         https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html 
680         Tests: http\tests\media\media-source\mediasource-is-type-supported.html
681
682         * Modules/mediasource/MediaSource.cpp:
683         (WebCore::MediaSource::isTypeSupported):
684
685 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
686
687         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
688         https://bugs.webkit.org/show_bug.cgi?id=150613
689
690         Reviewed by Darin Adler.
691
692         Renaming impl to wrapped in classes and binding generated classes.
693         No change in behavior.
694
695         * Modules/plugins/QuickTimePluginReplacement.mm:
696         (WebCore::JSQuickTimePluginReplacement::timedMetaData):
697         (WebCore::JSQuickTimePluginReplacement::accessLog):
698         (WebCore::JSQuickTimePluginReplacement::errorLog):
699         * bindings/js/JSAttrCustom.cpp:
700         (WebCore::JSAttr::visitAdditionalChildren):
701         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
702         (WebCore::JSAudioBufferSourceNode::setBuffer):
703         * bindings/js/JSAudioTrackCustom.cpp:
704         (WebCore::JSAudioTrack::visitAdditionalChildren):
705         (WebCore::JSAudioTrack::setKind):
706         (WebCore::JSAudioTrack::setLanguage):
707         * bindings/js/JSAudioTrackListCustom.cpp:
708         (WebCore::JSAudioTrackList::visitAdditionalChildren):
709         * bindings/js/JSBiquadFilterNodeCustom.cpp:
710         (WebCore::JSBiquadFilterNode::setType):
711         * bindings/js/JSCSSRuleCustom.cpp:
712         (WebCore::JSCSSRule::visitAdditionalChildren):
713         * bindings/js/JSCSSRuleListCustom.cpp:
714         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
715         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
716         (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren):
717         (WebCore::getPropertyValueFallback):
718         (WebCore::cssPropertyGetterPixelOrPosPrefix):
719         (WebCore::cssPropertyGetter):
720         (WebCore::JSCSSStyleDeclaration::putDelegate):
721         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
722         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
723         * bindings/js/JSCSSValueCustom.cpp:
724         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
725         (WebCore::JSCSSValueOwner::finalize):
726         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
727         (WebCore::toHTMLCanvasStyle):
728         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
729         (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
730         (WebCore::JSCanvasRenderingContext2D::fillStyle):
731         (WebCore::JSCanvasRenderingContext2D::setFillStyle):
732         (WebCore::JSCanvasRenderingContext2D::webkitLineDash):
733         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
734         * bindings/js/JSCanvasRenderingContextCustom.cpp:
735         (WebCore::JSCanvasRenderingContext::visitAdditionalChildren):
736         * bindings/js/JSCharacterDataCustom.cpp:
737         (WebCore::JSCharacterData::before):
738         (WebCore::JSCharacterData::after):
739         (WebCore::JSCharacterData::replaceWith):
740         * bindings/js/JSCommandLineAPIHostCustom.cpp:
741         (WebCore::JSCommandLineAPIHost::inspectedObject):
742         (WebCore::JSCommandLineAPIHost::getEventListeners):
743         (WebCore::JSCommandLineAPIHost::inspect):
744         (WebCore::JSCommandLineAPIHost::databaseId):
745         (WebCore::JSCommandLineAPIHost::storageId):
746         * bindings/js/JSCryptoCustom.cpp:
747         (WebCore::JSCrypto::getRandomValues):
748         * bindings/js/JSCryptoKeyCustom.cpp:
749         (WebCore::JSCryptoKey::algorithm):
750         * bindings/js/JSCryptoKeyPairCustom.cpp:
751         (WebCore::JSCryptoKeyPair::visitAdditionalChildren):
752         * bindings/js/JSCustomEventCustom.cpp:
753         (WebCore::JSCustomEvent::detail):
754         * bindings/js/JSCustomXPathNSResolver.cpp:
755         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
756         * bindings/js/JSDOMBinding.cpp:
757         (WebCore::reportException):
758         (WebCore::activeDOMWindow):
759         (WebCore::firstDOMWindow):
760         * bindings/js/JSDOMFormDataCustom.cpp:
761         (WebCore::toHTMLFormElementOrNull):
762         (WebCore::JSDOMFormData::append):
763         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
764         (WebCore::JSDOMMimeTypeArray::nameGetter):
765         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
766         (WebCore::JSDOMNamedFlowCollection::nameGetter):
767         * bindings/js/JSDOMPluginArrayCustom.cpp:
768         (WebCore::JSDOMPluginArray::nameGetter):
769         * bindings/js/JSDOMPluginCustom.cpp:
770         (WebCore::JSDOMPlugin::nameGetter):
771         * bindings/js/JSDOMStringListCustom.cpp:
772         (WebCore::JSDOMStringList::toWrapped):
773         * bindings/js/JSDOMStringMapCustom.cpp:
774         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
775         (WebCore::JSDOMStringMap::getOwnPropertyNames):
776         (WebCore::JSDOMStringMap::deleteProperty):
777         (WebCore::JSDOMStringMap::putDelegate):
778         * bindings/js/JSDOMTokenListCustom.cpp:
779         (WebCore::JSDOMTokenList::toggle):
780         * bindings/js/JSDOMWindowBase.cpp:
781         (WebCore::shouldAllowAccessFrom):
782         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
783         (WebCore::JSDOMWindowBase::updateDocument):
784         (WebCore::JSDOMWindowBase::scriptExecutionContext):
785         (WebCore::JSDOMWindowBase::printErrorMessage):
786         (WebCore::JSDOMWindowBase::supportsProfiling):
787         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
788         (WebCore::JSDOMWindowBase::shouldInterruptScript):
789         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
790         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
791         (WebCore::JSDOMWindowBase::moduleLoaderResolve):
792         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
793         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
794         * bindings/js/JSDOMWindowBase.h:
795         * bindings/js/JSDOMWindowCustom.cpp:
796         (WebCore::JSDOMWindow::visitAdditionalChildren):
797         (WebCore::childFrameGetter):
798         (WebCore::namedItemGetter):
799         (WebCore::jsDOMWindowWebKit):
800         (WebCore::jsDOMWindowIndexedDB):
801         (WebCore::JSDOMWindow::getOwnPropertySlot):
802         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
803         (WebCore::JSDOMWindow::put):
804         (WebCore::JSDOMWindow::putByIndex):
805         (WebCore::JSDOMWindow::deleteProperty):
806         (WebCore::JSDOMWindow::deletePropertyByIndex):
807         (WebCore::JSDOMWindow::getEnumerableLength):
808         (WebCore::JSDOMWindow::getStructurePropertyNames):
809         (WebCore::JSDOMWindow::getGenericPropertyNames):
810         (WebCore::JSDOMWindow::getPropertyNames):
811         (WebCore::JSDOMWindow::getOwnPropertyNames):
812         (WebCore::JSDOMWindow::defineOwnProperty):
813         (WebCore::JSDOMWindow::setLocation):
814         (WebCore::JSDOMWindow::open):
815         (WebCore::JSDOMWindow::showModalDialog):
816         (WebCore::JSDOMWindow::postMessage):
817         (WebCore::JSDOMWindow::setTimeout):
818         (WebCore::JSDOMWindow::setInterval):
819         (WebCore::JSDOMWindow::addEventListener):
820         (WebCore::JSDOMWindow::removeEventListener):
821         (WebCore::JSDOMWindow::toWrapped):
822         * bindings/js/JSDOMWindowShell.cpp:
823         (WebCore::JSDOMWindowShell::setWindow):
824         (WebCore::JSDOMWindowShell::wrapped):
825         * bindings/js/JSDOMWindowShell.h:
826         * bindings/js/JSDOMWrapper.h:
827         (WebCore::JSDOMWrapper::wrapped):
828         (WebCore::JSDOMWrapper::JSDOMWrapper):
829         * bindings/js/JSDataCueCustom.cpp:
830         (WebCore::JSDataCue::value):
831         (WebCore::JSDataCue::setValue):
832         * bindings/js/JSDataTransferCustom.cpp:
833         (WebCore::JSDataTransfer::types):
834         * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp:
835         (WebCore::JSDedicatedWorkerGlobalScope::postMessage):
836         * bindings/js/JSDeviceMotionEventCustom.cpp:
837         (WebCore::JSDeviceMotionEvent::acceleration):
838         (WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
839         (WebCore::JSDeviceMotionEvent::rotationRate):
840         (WebCore::JSDeviceMotionEvent::interval):
841         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
842         * bindings/js/JSDeviceOrientationEventCustom.cpp:
843         (WebCore::JSDeviceOrientationEvent::alpha):
844         (WebCore::JSDeviceOrientationEvent::beta):
845         (WebCore::JSDeviceOrientationEvent::gamma):
846         (WebCore::JSDeviceOrientationEvent::webkitCompassHeading):
847         (WebCore::JSDeviceOrientationEvent::webkitCompassAccuracy):
848         (WebCore::JSDeviceOrientationEvent::absolute):
849         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
850         * bindings/js/JSDocumentCustom.cpp:
851         (WebCore::JSDocument::prepend):
852         (WebCore::JSDocument::append):
853         * bindings/js/JSDocumentFragmentCustom.cpp:
854         (WebCore::JSDocumentFragment::prepend):
855         (WebCore::JSDocumentFragment::append):
856         * bindings/js/JSDocumentTypeCustom.cpp:
857         (WebCore::JSDocumentType::before):
858         (WebCore::JSDocumentType::after):
859         (WebCore::JSDocumentType::replaceWith):
860         * bindings/js/JSElementCustom.cpp:
861         (WebCore::JSElement::before):
862         (WebCore::JSElement::after):
863         (WebCore::JSElement::replaceWith):
864         (WebCore::JSElement::prepend):
865         (WebCore::JSElement::append):
866         * bindings/js/JSEventCustom.cpp:
867         (WebCore::JSEvent::clipboardData):
868         * bindings/js/JSEventListener.cpp:
869         (WebCore::JSEventListener::handleEvent):
870         * bindings/js/JSEventTargetCustom.cpp:
871         * bindings/js/JSFileReaderCustom.cpp:
872         (WebCore::JSFileReader::result):
873         * bindings/js/JSGeolocationCustom.cpp:
874         (WebCore::JSGeolocation::getCurrentPosition):
875         (WebCore::JSGeolocation::watchPosition):
876         * bindings/js/JSHTMLAllCollectionCustom.cpp:
877         (WebCore::namedItems):
878         (WebCore::callHTMLAllCollection):
879         (WebCore::JSHTMLAllCollection::item):
880         * bindings/js/JSHTMLCanvasElementCustom.cpp:
881         (WebCore::JSHTMLCanvasElement::getContext):
882         (WebCore::JSHTMLCanvasElement::probablySupportsContext):
883         (WebCore::JSHTMLCanvasElement::toDataURL):
884         * bindings/js/JSHTMLCollectionCustom.cpp:
885         (WebCore::JSHTMLCollection::nameGetter):
886         * bindings/js/JSHTMLDocumentCustom.cpp:
887         (WebCore::JSHTMLDocument::nameGetter):
888         (WebCore::JSHTMLDocument::all):
889         (WebCore::findCallingDocument):
890         (WebCore::JSHTMLDocument::open):
891         (WebCore::documentWrite):
892         * bindings/js/JSHTMLElementCustom.cpp:
893         (WebCore::JSHTMLElement::pushEventHandlerScope):
894         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
895         (WebCore::namedItems):
896         * bindings/js/JSHTMLFormElementCustom.cpp:
897         (WebCore::JSHTMLFormElement::nameGetter):
898         * bindings/js/JSHTMLFrameElementCustom.cpp:
899         (WebCore::JSHTMLFrameElement::setLocation):
900         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
901         (WebCore::JSHTMLFrameSetElement::nameGetter):
902         * bindings/js/JSHTMLInputElementCustom.cpp:
903         (WebCore::JSHTMLInputElement::selectionStart):
904         (WebCore::JSHTMLInputElement::setSelectionStart):
905         (WebCore::JSHTMLInputElement::selectionEnd):
906         (WebCore::JSHTMLInputElement::setSelectionEnd):
907         (WebCore::JSHTMLInputElement::selectionDirection):
908         (WebCore::JSHTMLInputElement::setSelectionDirection):
909         (WebCore::JSHTMLInputElement::setSelectionRange):
910         * bindings/js/JSHTMLMediaElementCustom.cpp:
911         (WebCore::JSHTMLMediaElement::setController):
912         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
913         (WebCore::JSHTMLOptionsCollection::nameGetter):
914         (WebCore::JSHTMLOptionsCollection::setLength):
915         (WebCore::JSHTMLOptionsCollection::indexSetter):
916         (WebCore::JSHTMLOptionsCollection::remove):
917         * bindings/js/JSHTMLSelectElementCustom.cpp:
918         (WebCore::JSHTMLSelectElement::remove):
919         (WebCore::JSHTMLSelectElement::indexSetter):
920         * bindings/js/JSHTMLTemplateElementCustom.cpp:
921         (WebCore::JSHTMLTemplateElement::content):
922         * bindings/js/JSHistoryCustom.cpp:
923         (WebCore::JSHistory::getOwnPropertySlotDelegate):
924         (WebCore::JSHistory::putDelegate):
925         (WebCore::JSHistory::deleteProperty):
926         (WebCore::JSHistory::deletePropertyByIndex):
927         (WebCore::JSHistory::getOwnPropertyNames):
928         (WebCore::JSHistory::state):
929         (WebCore::JSHistory::pushState):
930         (WebCore::JSHistory::replaceState):
931         * bindings/js/JSIDBDatabaseCustom.cpp:
932         (WebCore::JSIDBDatabase::createObjectStore):
933         * bindings/js/JSIDBObjectStoreCustom.cpp:
934         (WebCore::JSIDBObjectStore::createIndex):
935         * bindings/js/JSInspectorFrontendHostCustom.cpp:
936         (WebCore::JSInspectorFrontendHost::showContextMenu):
937         * bindings/js/JSLocationCustom.cpp:
938         (WebCore::JSLocation::getOwnPropertySlotDelegate):
939         (WebCore::JSLocation::putDelegate):
940         (WebCore::JSLocation::deleteProperty):
941         (WebCore::JSLocation::deletePropertyByIndex):
942         (WebCore::JSLocation::getOwnPropertyNames):
943         (WebCore::JSLocation::toStringFunction):
944         * bindings/js/JSMediaSourceStatesCustom.cpp:
945         (WebCore::JSMediaSourceStates::width):
946         (WebCore::JSMediaSourceStates::height):
947         (WebCore::JSMediaSourceStates::frameRate):
948         (WebCore::JSMediaSourceStates::aspectRatio):
949         (WebCore::JSMediaSourceStates::facingMode):
950         (WebCore::JSMediaSourceStates::volume):
951         * bindings/js/JSMessageChannelCustom.cpp:
952         (WebCore::JSMessageChannel::visitAdditionalChildren):
953         * bindings/js/JSMessageEventCustom.cpp:
954         (WebCore::JSMessageEvent::data):
955         (WebCore::handleInitMessageEvent):
956         * bindings/js/JSMessagePortCustom.cpp:
957         (WebCore::JSMessagePort::visitAdditionalChildren):
958         (WebCore::JSMessagePort::postMessage):
959         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
960         (WebCore::JSMockContentFilterSettings::decisionPoint):
961         (WebCore::JSMockContentFilterSettings::setDecisionPoint):
962         (WebCore::JSMockContentFilterSettings::decision):
963         (WebCore::JSMockContentFilterSettings::setDecision):
964         (WebCore::JSMockContentFilterSettings::unblockRequestDecision):
965         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision):
966         * bindings/js/JSMutationObserverCustom.cpp:
967         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
968         * bindings/js/JSNamedNodeMapCustom.cpp:
969         (WebCore::JSNamedNodeMap::nameGetter):
970         * bindings/js/JSNavigatorCustom.cpp:
971         (WebCore::JSNavigator::webkitGetUserMedia):
972         * bindings/js/JSNodeCustom.cpp:
973         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
974         (WebCore::JSNode::insertBefore):
975         (WebCore::JSNode::replaceChild):
976         (WebCore::JSNode::removeChild):
977         (WebCore::JSNode::appendChild):
978         (WebCore::JSNode::visitAdditionalChildren):
979         * bindings/js/JSNodeIteratorCustom.cpp:
980         (WebCore::JSNodeIterator::visitAdditionalChildren):
981         * bindings/js/JSNodeListCustom.cpp:
982         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
983         * bindings/js/JSNodeOrString.cpp:
984         (WebCore::toNodeOrStringVector):
985         * bindings/js/JSOscillatorNodeCustom.cpp:
986         (WebCore::JSOscillatorNode::setType):
987         * bindings/js/JSPannerNodeCustom.cpp:
988         (WebCore::JSPannerNode::setPanningModel):
989         (WebCore::JSPannerNode::setDistanceModel):
990         * bindings/js/JSPluginElementFunctions.cpp:
991         (WebCore::pluginScriptObjectFromPluginViewBase):
992         (WebCore::pluginScriptObject):
993         (WebCore::pluginElementGetCallData):
994         * bindings/js/JSPopStateEventCustom.cpp:
995         (WebCore::JSPopStateEvent::state):
996         * bindings/js/JSRTCStatsResponseCustom.cpp:
997         (WebCore::JSRTCStatsResponse::nameGetter):
998         * bindings/js/JSSQLResultSetRowListCustom.cpp:
999         (WebCore::JSSQLResultSetRowList::item):
1000         * bindings/js/JSSQLTransactionCustom.cpp:
1001         (WebCore::JSSQLTransaction::executeSql):
1002         * bindings/js/JSSVGLengthCustom.cpp:
1003         (WebCore::JSSVGLength::value):
1004         (WebCore::JSSVGLength::setValue):
1005         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1006         * bindings/js/JSStorageCustom.cpp:
1007         (WebCore::JSStorage::nameGetter):
1008         (WebCore::JSStorage::deleteProperty):
1009         (WebCore::JSStorage::getOwnPropertyNames):
1010         (WebCore::JSStorage::putDelegate):
1011         * bindings/js/JSStyleSheetCustom.cpp:
1012         (WebCore::JSStyleSheet::visitAdditionalChildren):
1013         * bindings/js/JSStyleSheetListCustom.cpp:
1014         (WebCore::JSStyleSheetList::nameGetter):
1015         * bindings/js/JSSubtleCryptoCustom.cpp:
1016         (WebCore::JSSubtleCrypto::encrypt):
1017         (WebCore::JSSubtleCrypto::decrypt):
1018         (WebCore::JSSubtleCrypto::sign):
1019         (WebCore::JSSubtleCrypto::verify):
1020         (WebCore::JSSubtleCrypto::wrapKey):
1021         (WebCore::JSSubtleCrypto::unwrapKey):
1022         * bindings/js/JSTextTrackCueCustom.cpp:
1023         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
1024         (WebCore::JSTextTrackCue::visitAdditionalChildren):
1025         * bindings/js/JSTextTrackCustom.cpp:
1026         (WebCore::JSTextTrack::visitAdditionalChildren):
1027         (WebCore::JSTextTrack::setKind):
1028         (WebCore::JSTextTrack::setLanguage):
1029         * bindings/js/JSTextTrackListCustom.cpp:
1030         (WebCore::JSTextTrackList::visitAdditionalChildren):
1031         * bindings/js/JSTrackCustom.cpp:
1032         (WebCore::toTrack):
1033         * bindings/js/JSTrackEventCustom.cpp:
1034         (WebCore::JSTrackEvent::track):
1035         * bindings/js/JSTreeWalkerCustom.cpp:
1036         (WebCore::JSTreeWalker::visitAdditionalChildren):
1037         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
1038         (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
1039         * bindings/js/JSVideoTrackCustom.cpp:
1040         (WebCore::JSVideoTrack::visitAdditionalChildren):
1041         (WebCore::JSVideoTrack::setKind):
1042         (WebCore::JSVideoTrack::setLanguage):
1043         * bindings/js/JSVideoTrackListCustom.cpp:
1044         (WebCore::JSVideoTrackList::visitAdditionalChildren):
1045         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1046         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
1047         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
1048         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
1049         (WebCore::getObjectParameter):
1050         (WebCore::JSWebGLRenderingContextBase::visitAdditionalChildren):
1051         (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
1052         (WebCore::JSWebGLRenderingContextBase::getExtension):
1053         (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter):
1054         (WebCore::JSWebGLRenderingContextBase::getParameter):
1055         (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
1056         (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
1057         (WebCore::JSWebGLRenderingContextBase::getSupportedExtensions):
1058         (WebCore::JSWebGLRenderingContextBase::getUniform):
1059         (WebCore::JSWebGLRenderingContextBase::uniform1fv):
1060         (WebCore::JSWebGLRenderingContextBase::uniform1iv):
1061         (WebCore::JSWebGLRenderingContextBase::uniform2fv):
1062         (WebCore::JSWebGLRenderingContextBase::uniform2iv):
1063         (WebCore::JSWebGLRenderingContextBase::uniform3fv):
1064         (WebCore::JSWebGLRenderingContextBase::uniform3iv):
1065         (WebCore::JSWebGLRenderingContextBase::uniform4fv):
1066         (WebCore::JSWebGLRenderingContextBase::uniform4iv):
1067         (WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv):
1068         (WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv):
1069         (WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv):
1070         (WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv):
1071         (WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv):
1072         (WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv):
1073         (WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv):
1074         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1075         (WebCore::JSWebGLRenderingContext::visitAdditionalChildren):
1076         * bindings/js/JSWorkerCustom.cpp:
1077         (WebCore::JSWorker::postMessage):
1078         (WebCore::constructJSWorker):
1079         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1080         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
1081         (WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
1082         * bindings/js/JSWorkerGlobalScopeBase.h:
1083         (WebCore::JSWorkerGlobalScopeBase::wrapped):
1084         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1085         (WebCore::JSWorkerGlobalScope::visitAdditionalChildren):
1086         (WebCore::JSWorkerGlobalScope::importScripts):
1087         (WebCore::JSWorkerGlobalScope::setTimeout):
1088         (WebCore::JSWorkerGlobalScope::setInterval):
1089         * bindings/js/JSXMLHttpRequestCustom.cpp:
1090         (WebCore::JSXMLHttpRequest::visitAdditionalChildren):
1091         (WebCore::JSXMLHttpRequest::open):
1092         (WebCore::JSXMLHttpRequest::send):
1093         (WebCore::JSXMLHttpRequest::responseText):
1094         (WebCore::JSXMLHttpRequest::response):
1095         * bindings/js/JSXPathResultCustom.cpp:
1096         (WebCore::JSXPathResult::visitAdditionalChildren):
1097         * bindings/js/JSXSLTProcessorCustom.cpp:
1098         (WebCore::JSXSLTProcessor::setParameter):
1099         (WebCore::JSXSLTProcessor::getParameter):
1100         (WebCore::JSXSLTProcessor::removeParameter):
1101         * bindings/js/ScheduledAction.cpp:
1102         (WebCore::ScheduledAction::execute):
1103         * bindings/js/ScriptCachedFrameData.cpp:
1104         (WebCore::ScriptCachedFrameData::restore):
1105         * bindings/js/ScriptController.cpp:
1106         (WebCore::ScriptController::clearWindowShell):
1107         (WebCore::ScriptController::collectIsolatedContexts):
1108         * bindings/js/ScriptState.cpp:
1109         (WebCore::domWindowFromExecState):
1110         * bindings/objc/DOM.mm:
1111         (+[DOMNode _nodeFromJSWrapper:]):
1112         * bindings/objc/DOMUtility.mm:
1113         (JSC::createDOMWrapper):
1114         * bindings/objc/WebScriptObject.mm:
1115         (-[WebScriptObject _isSafeScript]):
1116         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1117         * bindings/scripts/CodeGeneratorJS.pm:
1118         (GenerateGetOwnPropertySlotBody):
1119         (GenerateHeader):
1120         (GetIndexedGetterExpression):
1121         (GenerateImplementation):
1122         (NativeToJSValue):
1123         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1124         (WebCore::jsTestActiveDOMObjectExcitingAttr):
1125         (WebCore::jsTestActiveDOMObjectConstructor):
1126         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
1127         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1128         (WebCore::JSTestActiveDOMObjectOwner::finalize):
1129         (WebCore::JSTestActiveDOMObject::toWrapped):
1130         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1131         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
1132         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
1133         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1134         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1135         (WebCore::JSTestCustomNamedGetterOwner::finalize):
1136         (WebCore::JSTestCustomNamedGetter::toWrapped):
1137         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1138         (WebCore::jsTestEventConstructorAttr1):
1139         (WebCore::jsTestEventConstructorAttr2):
1140         (WebCore::JSTestEventConstructorOwner::finalize):
1141         (WebCore::JSTestEventConstructor::toWrapped):
1142         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1143         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1144         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
1145         (WebCore::JSTestEventTarget::getOwnPropertyNames):
1146         (WebCore::jsTestEventTargetPrototypeFunctionItem):
1147         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
1148         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
1149         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
1150         (WebCore::JSTestEventTarget::visitChildren):
1151         (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
1152         (WebCore::JSTestEventTargetOwner::finalize):
1153         (WebCore::JSTestEventTarget::toWrapped):
1154         * bindings/scripts/test/JS/JSTestException.cpp:
1155         (WebCore::jsTestExceptionName):
1156         (WebCore::JSTestExceptionOwner::finalize):
1157         (WebCore::JSTestException::toWrapped):
1158         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1159         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
1160         (WebCore::JSTestGenerateIsReachableOwner::finalize):
1161         (WebCore::JSTestGenerateIsReachable::toWrapped):
1162         * bindings/scripts/test/JS/JSTestInterface.cpp:
1163         (WebCore::jsTestInterfaceImplementsStr1):
1164         (WebCore::jsTestInterfaceImplementsStr2):
1165         (WebCore::jsTestInterfaceImplementsNode):
1166         (WebCore::jsTestInterfaceSupplementalStr1):
1167         (WebCore::jsTestInterfaceSupplementalStr2):
1168         (WebCore::jsTestInterfaceSupplementalNode):
1169         (WebCore::setJSTestInterfaceImplementsStr2):
1170         (WebCore::setJSTestInterfaceImplementsNode):
1171         (WebCore::setJSTestInterfaceSupplementalStr2):
1172         (WebCore::setJSTestInterfaceSupplementalNode):
1173         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
1174         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
1175         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
1176         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1177         (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
1178         (WebCore::JSTestInterfaceOwner::finalize):
1179         (WebCore::JSTestInterface::toWrapped):
1180         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1181         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1182         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
1183         (WebCore::JSTestMediaQueryListListener::toWrapped):
1184         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1185         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
1186         (WebCore::JSTestNamedConstructorOwner::finalize):
1187         (WebCore::JSTestNamedConstructor::toWrapped):
1188         * bindings/scripts/test/JS/JSTestNode.cpp:
1189         (WebCore::jsTestNodeName):
1190         (WebCore::setJSTestNodeName):
1191         (WebCore::JSTestNode::visitChildren):
1192         * bindings/scripts/test/JS/JSTestNode.h:
1193         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1194         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr):
1195         (WebCore::jsTestNondeterministicNondeterministicWriteableAttr):
1196         (WebCore::jsTestNondeterministicNondeterministicExceptionAttr):
1197         (WebCore::jsTestNondeterministicNondeterministicGetterExceptionAttr):
1198         (WebCore::jsTestNondeterministicNondeterministicSetterExceptionAttr):
1199         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
1200         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
1201         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
1202         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
1203         (WebCore::jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction):
1204         (WebCore::JSTestNondeterministicOwner::finalize):
1205         (WebCore::JSTestNondeterministic::toWrapped):
1206         * bindings/scripts/test/JS/JSTestObj.cpp:
1207         (WebCore::jsTestObjReadOnlyLongAttr):
1208         (WebCore::jsTestObjReadOnlyStringAttr):
1209         (WebCore::jsTestObjReadOnlyTestObjAttr):
1210         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
1211         (WebCore::jsTestObjEnumAttr):
1212         (WebCore::jsTestObjByteAttr):
1213         (WebCore::jsTestObjOctetAttr):
1214         (WebCore::jsTestObjShortAttr):
1215         (WebCore::jsTestObjUnsignedShortAttr):
1216         (WebCore::jsTestObjLongAttr):
1217         (WebCore::jsTestObjLongLongAttr):
1218         (WebCore::jsTestObjUnsignedLongLongAttr):
1219         (WebCore::jsTestObjStringAttr):
1220         (WebCore::jsTestObjTestObjAttr):
1221         (WebCore::jsTestObjXMLObjAttr):
1222         (WebCore::jsTestObjCreate):
1223         (WebCore::jsTestObjReflectedStringAttr):
1224         (WebCore::jsTestObjReflectedIntegralAttr):
1225         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
1226         (WebCore::jsTestObjReflectedBooleanAttr):
1227         (WebCore::jsTestObjReflectedURLAttr):
1228         (WebCore::jsTestObjReflectedCustomIntegralAttr):
1229         (WebCore::jsTestObjReflectedCustomBooleanAttr):
1230         (WebCore::jsTestObjReflectedCustomURLAttr):
1231         (WebCore::jsTestObjTypedArrayAttr):
1232         (WebCore::jsTestObjAttrWithGetterException):
1233         (WebCore::jsTestObjAttrWithSetterException):
1234         (WebCore::jsTestObjStringAttrWithGetterException):
1235         (WebCore::jsTestObjStringAttrWithSetterException):
1236         (WebCore::jsTestObjStrictTypeCheckingAttribute):
1237         (WebCore::jsTestObjOnfoo):
1238         (WebCore::jsTestObjWithScriptStateAttribute):
1239         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
1240         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
1241         (WebCore::jsTestObjWithScriptStateAttributeRaises):
1242         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
1243         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
1244         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1245         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1246         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
1247         (WebCore::jsTestObjConditionalAttr1):
1248         (WebCore::jsTestObjConditionalAttr2):
1249         (WebCore::jsTestObjConditionalAttr3):
1250         (WebCore::jsTestObjCachedAttribute1):
1251         (WebCore::jsTestObjCachedAttribute2):
1252         (WebCore::jsTestObjAnyAttribute):
1253         (WebCore::jsTestObjContentDocument):
1254         (WebCore::jsTestObjMutablePoint):
1255         (WebCore::jsTestObjImmutablePoint):
1256         (WebCore::jsTestObjStrawberry):
1257         (WebCore::jsTestObjStrictFloat):
1258         (WebCore::jsTestObjDescription):
1259         (WebCore::jsTestObjId):
1260         (WebCore::jsTestObjHash):
1261         (WebCore::jsTestObjReplaceableAttribute):
1262         (WebCore::jsTestObjNullableDoubleAttribute):
1263         (WebCore::jsTestObjNullableLongAttribute):
1264         (WebCore::jsTestObjNullableBooleanAttribute):
1265         (WebCore::jsTestObjNullableStringAttribute):
1266         (WebCore::jsTestObjNullableLongSettableAttribute):
1267         (WebCore::jsTestObjNullableStringValue):
1268         (WebCore::jsTestObjAttribute):
1269         (WebCore::jsTestObjAttributeWithReservedEnumType):
1270         (WebCore::jsTestObjPutForwardsAttribute):
1271         (WebCore::jsTestObjPutForwardsNullableAttribute):
1272         (WebCore::setJSTestObjEnumAttr):
1273         (WebCore::setJSTestObjByteAttr):
1274         (WebCore::setJSTestObjOctetAttr):
1275         (WebCore::setJSTestObjShortAttr):
1276         (WebCore::setJSTestObjUnsignedShortAttr):
1277         (WebCore::setJSTestObjLongAttr):
1278         (WebCore::setJSTestObjLongLongAttr):
1279         (WebCore::setJSTestObjUnsignedLongLongAttr):
1280         (WebCore::setJSTestObjStringAttr):
1281         (WebCore::setJSTestObjTestObjAttr):
1282         (WebCore::setJSTestObjXMLObjAttr):
1283         (WebCore::setJSTestObjCreate):
1284         (WebCore::setJSTestObjReflectedStringAttr):
1285         (WebCore::setJSTestObjReflectedIntegralAttr):
1286         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
1287         (WebCore::setJSTestObjReflectedBooleanAttr):
1288         (WebCore::setJSTestObjReflectedURLAttr):
1289         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
1290         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
1291         (WebCore::setJSTestObjReflectedCustomURLAttr):
1292         (WebCore::setJSTestObjTypedArrayAttr):
1293         (WebCore::setJSTestObjAttrWithGetterException):
1294         (WebCore::setJSTestObjAttrWithSetterException):
1295         (WebCore::setJSTestObjStringAttrWithGetterException):
1296         (WebCore::setJSTestObjStringAttrWithSetterException):
1297         (WebCore::setJSTestObjStrictTypeCheckingAttribute):
1298         (WebCore::setJSTestObjOnfoo):
1299         (WebCore::setJSTestObjWithScriptStateAttribute):
1300         (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
1301         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1302         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1303         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1304         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
1305         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1306         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1307         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1308         (WebCore::setJSTestObjConditionalAttr1):
1309         (WebCore::setJSTestObjConditionalAttr2):
1310         (WebCore::setJSTestObjConditionalAttr3):
1311         (WebCore::setJSTestObjAnyAttribute):
1312         (WebCore::setJSTestObjMutablePoint):
1313         (WebCore::setJSTestObjImmutablePoint):
1314         (WebCore::setJSTestObjStrawberry):
1315         (WebCore::setJSTestObjStrictFloat):
1316         (WebCore::setJSTestObjId):
1317         (WebCore::setJSTestObjNullableLongSettableAttribute):
1318         (WebCore::setJSTestObjNullableStringValue):
1319         (WebCore::setJSTestObjAttributeWithReservedEnumType):
1320         (WebCore::setJSTestObjPutForwardsAttribute):
1321         (WebCore::setJSTestObjPutForwardsNullableAttribute):
1322         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
1323         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1324         (WebCore::jsTestObjPrototypeFunctionByteMethod):
1325         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
1326         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
1327         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
1328         (WebCore::jsTestObjPrototypeFunctionLongMethod):
1329         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1330         (WebCore::jsTestObjPrototypeFunctionObjMethod):
1331         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1332         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1333         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1334         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
1335         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
1336         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1337         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1338         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1339         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
1340         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
1341         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1342         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1343         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
1344         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
1345         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
1346         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
1347         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
1348         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
1349         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
1350         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
1351         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
1352         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
1353         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
1354         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1355         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1356         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
1357         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
1358         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
1359         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
1360         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1361         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1362         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
1363         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
1364         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
1365         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
1366         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
1367         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
1368         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
1369         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1370         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1371         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1372         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1373         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1374         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1375         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1376         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
1377         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1378         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1379         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1380         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
1381         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
1382         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
1383         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1384         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1385         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1386         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
1387         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
1388         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
1389         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
1390         (WebCore::jsTestObjPrototypeFunctionConvert1):
1391         (WebCore::jsTestObjPrototypeFunctionConvert2):
1392         (WebCore::jsTestObjPrototypeFunctionConvert4):
1393         (WebCore::jsTestObjPrototypeFunctionConvert5):
1394         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
1395         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
1396         (WebCore::jsTestObjPrototypeFunctionOrange):
1397         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1398         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
1399         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
1400         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1401         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
1402         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
1403         (WebCore::jsTestObjPrototypeFunctionAny):
1404         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
1405         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
1406         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
1407         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
1408         (WebCore::JSTestObjOwner::finalize):
1409         (WebCore::JSTestObj::toWrapped):
1410         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1411         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
1412         (WebCore::JSTestOverloadedConstructors::toWrapped):
1413         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1414         (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
1415         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
1416         (WebCore::JSTestOverrideBuiltinsOwner::finalize):
1417         (WebCore::JSTestOverrideBuiltins::toWrapped):
1418         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1419         (WebCore::jsTestSerializedScriptValueInterfaceValue):
1420         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
1421         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
1422         (WebCore::jsTestSerializedScriptValueInterfacePorts):
1423         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
1424         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
1425         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1426         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
1427         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
1428         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1429         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
1430         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
1431         (WebCore::jsTestTypedefsAttrWithGetterException):
1432         (WebCore::jsTestTypedefsAttrWithSetterException):
1433         (WebCore::jsTestTypedefsStringAttrWithGetterException):
1434         (WebCore::jsTestTypedefsStringAttrWithSetterException):
1435         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1436         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1437         (WebCore::setJSTestTypedefsAttrWithGetterException):
1438         (WebCore::setJSTestTypedefsAttrWithSetterException):
1439         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1440         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1441         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
1442         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1443         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1444         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
1445         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
1446         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
1447         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
1448         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
1449         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
1450         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
1451         (WebCore::JSTestTypedefsOwner::finalize):
1452         (WebCore::JSTestTypedefs::toWrapped):
1453         * bindings/scripts/test/JS/JSattribute.cpp:
1454         (WebCore::jsattributeReadonly):
1455         (WebCore::JSattributeOwner::finalize):
1456         (WebCore::JSattribute::toWrapped):
1457         * bindings/scripts/test/JS/JSreadonly.cpp:
1458         (WebCore::JSreadonlyOwner::finalize):
1459         (WebCore::JSreadonly::toWrapped):
1460         * bridge/runtime_method.cpp:
1461         (JSC::callRuntimeMethod):
1462         * inspector/InspectorController.cpp:
1463         (WebCore::InspectorController::canAccessInspectedScriptState):
1464
1465 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1466
1467         IDL functions and attributes should be JSBuiltin by default if interface is marked as JSBuiltinConstructor
1468         https://bugs.webkit.org/show_bug.cgi?id=150438
1469
1470         Reviewed by Darin Adler.
1471
1472         Binding generator is now deducing that function/attribute is JSBuiltin if the interface is marked as JSBuiltin.
1473         One exception is custom setters, getters or functions which remain C++ handled.
1474         Updated streams API IDLs accordingly.
1475
1476         Binding generator knows whether class needs a DOM class by checking whether the interface is marked as JSBuiltin.
1477         Binding generator knows that class uses a JS built-in constructor if marked as JSBuiltin+Constructor.
1478         In particular, JSBuiltIn+CustomConstructor means that a DOM class is not needed and constructor is not JS built-in.
1479
1480         Applied JSBuiltin+CustomConstructor to ReadableStreamReader and ReadableStreamController.
1481         Removing ReadableStreamReader and ReadableStreamController classes.
1482
1483         Removed unneeded "Default" keyword for cancel function in WebIDL.
1484
1485         Added a binding test case.
1486         No change in behavior.
1487
1488         * Modules/streams/ByteLengthQueuingStrategy.idl: Marking interface as JSBuiltin and Constructable.
1489         * Modules/streams/CountQueuingStrategy.idl: Ditto.
1490         * Modules/streams/ReadableStream.idl: Ditto.
1491         * Modules/streams/ReadableStreamController.h: Removed.
1492         * Modules/streams/ReadableStreamController.idl: Marking interface as JSBuiltin and Constructable.
1493         * Modules/streams/ReadableStreamReader.h: Removed.
1494         * Modules/streams/ReadableStreamReader.idl: Marking interface as JSBuiltin and Constructable.
1495         * Modules/streams/WritableStream.idl: Ditto.
1496         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
1497         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject): Updated according new constructor.
1498         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject): Ditto.
1499         * bindings/scripts/CodeGeneratorJS.pm:
1500         (NeedsImplementationClass):
1501         (GetAttributeGetterName):
1502         (GetAttributeSetterName):
1503         (GetFunctionName):
1504         (InstanceNeedsVisitChildren):
1505         (GenerateHeader):
1506         (GenerateAttributesHashTable):
1507         (GenerateImplementation):
1508         (GetConstructorTemplateClassName):
1509         (GenerateConstructorDefinition):
1510         (GenerateConstructorHelperMethods):
1511         (IsConstructable):
1512         (ComputeFunctionSpecial):
1513         (IsJSBuiltin):
1514         (IsJSBuiltinConstructor):
1515         (AddJSBuiltinIncludesIfNeeded):
1516         (GetJSBuiltinFunctionName): Deleted.
1517         (GetJSBuiltinFunctionNameFromString): Deleted.
1518         (GetJSBuiltinScopeName): Deleted.
1519         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp:
1520         (webkit_dom_test_js_builtin_constructor_set_property):
1521         (webkit_dom_test_js_builtin_constructor_get_property):
1522         (webkit_dom_test_js_builtin_constructor_class_init):
1523         (webkit_dom_test_js_builtin_constructor_test_function):
1524         (webkit_dom_test_js_builtin_constructor_get_test_attribute):
1525         (webkit_dom_test_js_builtin_constructor_set_test_attribute):
1526         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h:
1527         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1528         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
1529         (WebCore::JSTestJSBuiltinConstructor::getOwnPropertySlot):
1530         (WebCore::jsTestJSBuiltinConstructorTestAttribute):
1531         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
1532         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
1533         (WebCore::setJSTestJSBuiltinConstructorTestAttribute):
1534         (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
1535         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestFunction):
1536         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
1537         (WebCore::JSTestJSBuiltinConstructorOwner::isReachableFromOpaqueRoots):
1538         (WebCore::JSTestJSBuiltinConstructorOwner::finalize):
1539         (WebCore::toJSNewlyCreated):
1540         (WebCore::toJS):
1541         (WebCore::JSTestJSBuiltinConstructor::toWrapped):
1542         (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
1543         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): Deleted.
1544         (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
1545         (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
1546         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
1547         (WebCore::JSTestJSBuiltinConstructor::create):
1548         (WebCore::JSTestJSBuiltinConstructor::finishCreation):
1549         (WebCore::wrapperOwner):
1550         (WebCore::toJS):
1551         (WebCore::JSTestJSBuiltinConstructor::createStructure): Deleted.
1552         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h:
1553         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
1554         (-[DOMTestJSBuiltinConstructor testAttribute]):
1555         (-[DOMTestJSBuiltinConstructor setTestAttribute:]):
1556         (-[DOMTestJSBuiltinConstructor testAttributeCustom]):
1557         (-[DOMTestJSBuiltinConstructor testAttributeRWCustom]):
1558         (-[DOMTestJSBuiltinConstructor setTestAttributeRWCustom:]):
1559         (-[DOMTestJSBuiltinConstructor testFunction]):
1560         (-[DOMTestJSBuiltinConstructor testCustomFunction]):
1561         * bindings/scripts/test/TestJSBuiltinConstructor.idl:
1562
1563 2015-10-29  Sergio Villar Senin  <svillar@igalia.com>
1564
1565         [CSS Grid Layout] min-content row does not always shrink
1566         https://bugs.webkit.org/show_bug.cgi?id=144581
1567
1568         Reviewed by Zalan Bujtas.
1569
1570         Grid items height must be recomputed whenever the grid tracks
1571         change if the items had been previously stretched. In those
1572         cases we have to clear the override height and layout the item
1573         with the new row size.
1574
1575         Tests: fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html
1576                fast/css-grid-layout/relayout-indefinite-heights.html
1577
1578         * rendering/RenderGrid.cpp:
1579         (WebCore::RenderGrid::logicalContentHeightForChild):
1580
1581 2015-11-01  Brady Eidson  <beidson@apple.com>
1582
1583         Modern IDB: IBDObjectStore.count() support.
1584         https://bugs.webkit.org/show_bug.cgi?id=150785
1585
1586         Reviewed by Darin Adler.
1587
1588         Tests: storage/indexeddb/modern/idbobjectstore-count-1.html
1589                storage/indexeddb/modern/idbobjectstore-count-failures.html
1590
1591         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1592         (WebCore::IDBClient::IDBConnectionToServer::getCount):
1593         (WebCore::IDBClient::IDBConnectionToServer::didGetCount):
1594         * Modules/indexeddb/client/IDBConnectionToServer.h:
1595         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1596         
1597         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1598         (WebCore::IDBClient::IDBObjectStore::count):
1599         (WebCore::IDBClient::IDBObjectStore::doCount):
1600         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1601         
1602         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1603         (WebCore::IDBClient::IDBRequest::setResult):
1604         * Modules/indexeddb/client/IDBRequestImpl.h:
1605         
1606         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1607         (WebCore::IDBClient::IDBTransaction::requestCount):
1608         (WebCore::IDBClient::IDBTransaction::getCountOnServer):
1609         (WebCore::IDBClient::IDBTransaction::didGetCountOnServer):
1610         * Modules/indexeddb/client/IDBTransactionImpl.h:
1611         
1612         * Modules/indexeddb/server/IDBBackingStore.h:
1613         
1614         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1615         (WebCore::IDBServer::IDBConnectionToClient::didGetCount):
1616         * Modules/indexeddb/server/IDBConnectionToClient.h:
1617         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1618         
1619         * Modules/indexeddb/server/IDBServer.cpp:
1620         (WebCore::IDBServer::IDBServer::getCount):
1621         * Modules/indexeddb/server/IDBServer.h:
1622         
1623         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1624         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
1625         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1626         
1627         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1628         (WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
1629         (WebCore::IDBServer::MemoryObjectStore::valueForKeyRange):
1630         (WebCore::IDBServer::MemoryObjectStore::lowestKeyWithRecordInRange):
1631         * Modules/indexeddb/server/MemoryObjectStore.h:
1632         
1633         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1634         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
1635         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
1636         (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
1637         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetCount):
1638         (WebCore::IDBServer::UniqueIDBDatabase::performCountCallback):
1639         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1640         
1641         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1642         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
1643         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
1644         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1645         
1646         * Modules/indexeddb/shared/IDBResultData.cpp:
1647         (WebCore::IDBResultData::IDBResultData):
1648         (WebCore::IDBResultData::getCountSuccess):
1649         * Modules/indexeddb/shared/IDBResultData.h:
1650         (WebCore::IDBResultData::resultInteger):
1651         
1652         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1653         (WebCore::InProcessIDBServer::didGetCount):
1654         (WebCore::InProcessIDBServer::getCount):
1655         * Modules/indexeddb/shared/InProcessIDBServer.h:
1656
1657 2015-11-01  Darin Adler  <darin@apple.com>
1658
1659         Tidy handling of type=color in HTMLInputElement a bit
1660         https://bugs.webkit.org/show_bug.cgi?id=150786
1661
1662         Reviewed by Andreas Kling.
1663
1664         * html/ColorInputType.cpp: Fix formatting.
1665         (WebCore::ColorInputType::fallbackValue): Use ASCIILiteral for slightly
1666         better performance.
1667         (WebCore::ColorInputType::sanitizeValue): Use convertToASCIILowercase,
1668         since there is no need for the general purpose Unicode lowercasing here;
1669         those non-ASCII characters aren't allowed by isValidColorString.
1670         (WebCore::ColorInputType::suggestions): Rewrote data list code to remove
1671         peculiarities such as using a null check to terminate the loop instead of
1672         the collection length, calling back to HTMLInputElement just to get the
1673         isValidColorString function called. Also used reserveInitialCapacity and
1674         uncheckedAppend for better memory use in the result vector.
1675         (WebCore::ColorInputType::selectColor): Added.
1676
1677         * html/ColorInputType.h: Made derivation from ColorChooserClient private.
1678         Made most functions private. Added overrides for valueAsColor and selectColor,
1679         now both virtual functions in InputType.
1680
1681         * html/HTMLInputElement.cpp: Removed now-unneeded include of ColorInputType.h.
1682         (WebCore::HTMLInputElement::valueAsColor): Added. Calls through to the InputType.
1683         In a later patch, will be used by accessibility code to get the color so it
1684         does not have to replicate the color parsing logic from this element.
1685         (WebCore::HTMLInputElement::selectColor): Renamed from selectColorInColorChooser,
1686         because the longer name is not clearer. Also made this non-conditional.
1687
1688         * html/HTMLInputElement.h: Added valueAsColor, renamed selectColorInColorChooser
1689         to selectColor and made it available unconditionally.
1690
1691         * html/InputType.cpp:
1692         (WebCore::InputType::valueAsColor): Added. Returns transparent color.
1693         (WebCore::InputType::selectColor): Added. Does nothing by default.
1694
1695         * html/InputType.h: Added virtual valueAsColor and selectColor. Also tidied
1696         up the header a bit and removed unneeded Noncopyable (since this class has
1697         a reference for one of the data members and so is intrinsically not copyable).
1698         Made isColorControl available unconditionally.
1699
1700         * testing/Internals.cpp:
1701         (WebCore::Internals::selectColorInColorChooser): Removed conditionals and
1702         made this call selectColor rather than selectColorInColorChooser.
1703
1704         * testing/Internals.h: Made selectColorInColorChooser unconditional.
1705
1706         * testing/Internals.idl: Made selectColorInColorChooser unconditionally
1707         present. Not important to optimize the test internals class by leaving it
1708         out when INPUT_TYPE_COLOR is not enabled.
1709
1710 2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
1711
1712         [ES6] Support Generator Syntax
1713         https://bugs.webkit.org/show_bug.cgi?id=150769
1714
1715         Reviewed by Geoffrey Garen.
1716
1717         Added ENABLE_ES6_GENERATORS flag.
1718
1719         * Configurations/FeatureDefines.xcconfig:
1720
1721 2015-11-01  Myles C. Maxfield  <mmaxfield@apple.com>
1722
1723         Clean up some CSS & Font code
1724         https://bugs.webkit.org/show_bug.cgi?id=150767
1725
1726         Reviewed by Darin Adler.
1727
1728         This patch migrates some CSS code to use references instead of pointers.
1729         It also migrates some Font code to use RefPtr instead of PassRefPtr.
1730
1731         No new tests because there is no behavior change.
1732
1733         * css/CSSDefaultStyleSheets.cpp:
1734         (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
1735         (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):
1736         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
1737         * css/CSSFontSelector.cpp:
1738         (WebCore::createFontFace):
1739         (WebCore::CSSFontSelector::addFontFaceRule):
1740         * css/CSSFontSelector.h:
1741         * css/DocumentRuleSets.cpp:
1742         (WebCore::DocumentRuleSets::initUserStyle):
1743         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
1744         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
1745         * css/RuleSet.cpp:
1746         (WebCore::RuleSet::addChildRules):
1747         (WebCore::RuleSet::addRulesFromSheet):
1748         * css/RuleSet.h:
1749         * css/StyleInvalidationAnalysis.cpp:
1750         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
1751         * platform/graphics/Font.cpp:
1752         (WebCore::Font::verticalRightOrientationFont):
1753         (WebCore::Font::uprightOrientationFont):
1754         (WebCore::Font::smallCapsFont):
1755         (WebCore::Font::emphasisMarkFont):
1756         (WebCore::Font::brokenIdeographFont):
1757         (WebCore::Font::nonSyntheticItalicFont):
1758         (WebCore::Font::createScaledFont):
1759         * platform/graphics/Font.h:
1760         (WebCore::Font::variantFont):
1761         * platform/graphics/cocoa/FontCocoa.mm:
1762         (WebCore::Font::platformCreateScaledFont):
1763         * svg/SVGFontFaceElement.h:
1764
1765 2015-11-01  Darin Adler  <darin@apple.com>
1766
1767         Remove some dead and unneeded code (ScrollbarThemeSafari, RenderThemeSafari, OPENCL, a little color space logic)
1768         https://bugs.webkit.org/show_bug.cgi?id=150783
1769
1770         Reviewed by Tim Horton.
1771
1772         * PlatformWinCairo.cmake: Removed ScrollbarThemeSafari.cpp, no reason to compile it.
1773
1774         * platform/graphics/ca/GraphicsLayerCA.cpp:
1775         (WebCore::GraphicsLayerCA::setContentsToImage): Removed the code that set a color space
1776         on an image if it's set to device color space. This has been dead code for many releases
1777         of OS X and iOS at this point.
1778
1779         * platform/graphics/filters/FEColorMatrix.h: Removed some ENABLE(OPENCL)-only code.
1780         * platform/graphics/filters/FEFlood.h: Ditto.
1781         * platform/graphics/filters/FEMerge.h: Ditto.
1782         * platform/graphics/filters/FETurbulence.h: Ditto.
1783         * platform/graphics/filters/FilterEffect.cpp:
1784         (WebCore::FilterEffect::applyAll): Removed.
1785         (WebCore::FilterEffect::apply): Removed ENABLE(OPENCL)-only code.
1786         (WebCore::FilterEffect::platformApplyOpenCL): Removed.
1787         (WebCore::FilterEffect::clearResult): Removed ENABLE(OPENCL)-only code.
1788         (WebCore::FilterEffect::asImageBuffer): Ditto.
1789         (WebCore::FilterEffect::openCLImageToImageBuffer): Removed.
1790         (WebCore::FilterEffect::createOpenCLImageResult): Removed.
1791         (WebCore::FilterEffect::transformResultColorSpace): Removed ENABLE(OPENCL)-only code.
1792
1793         * platform/graphics/filters/FilterEffect.h: Removed ENABLE(OPENCL)-only code.
1794         * platform/graphics/filters/SourceAlpha.h: Ditto.
1795         * platform/graphics/filters/SourceGraphic.h: Ditto.
1796
1797         * platform/win/ScrollbarThemeSafari.cpp: Removed.
1798         * platform/win/ScrollbarThemeSafari.h: Removed.
1799
1800         * rendering/RenderThemeMac.mm: Removed an obsolete comment.
1801
1802         * rendering/RenderThemeSafari.cpp: Removed.
1803         * rendering/RenderThemeSafari.h: Removed.
1804
1805         * svg/graphics/filters/SVGFEImage.h: Removed ENABLE(OPENCL)-only code.
1806
1807 2015-11-01  Andreas Kling  <akling@apple.com>
1808
1809         Move the ResourceUsageOverlay out of the way by default.
1810         <https://webkit.org/b/150776>
1811
1812         Reviewed by Darin Adler.
1813
1814         Have the ResourceUsageOverlay show up in the bottom center of the viewport
1815         by default, instead of the top left. This way, you won't have to drag it
1816         out of the way all the time.
1817
1818         * page/ResourceUsageOverlay.cpp:
1819         (WebCore::ResourceUsageOverlay::ResourceUsageOverlay):
1820         (WebCore::ResourceUsageOverlay::initialize):
1821         * page/ResourceUsageOverlay.h:
1822         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1823         (WebCore::ResourceUsageOverlay::platformInitialize):
1824
1825 2015-11-01  Philip Chimento  <philip.chimento@gmail.com>
1826
1827         [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
1828         https://bugs.webkit.org/show_bug.cgi?id=144560
1829
1830         Reviewed by Darin Adler.
1831
1832         * platform/graphics/PlatformDisplay.cpp: Only include the
1833         X11-specific GDK header on PLATFORM(X11). In other cases the
1834         normal gdk.h header is needed, which would otherwise be pulled in
1835         by gdkx.h.
1836         * platform/graphics/opentype/OpenTypeMathData.cpp: Change check
1837         for FourCharCode type from OS(DARWIN) to PLATFORM(COCOA). We
1838         can't remove it altogether because OT_MAKE_TAG doesn't work for
1839         all platforms.
1840
1841 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1842
1843         [GTK] Use RunLoop::Timer in main thread shared timer GTK+ implementation
1844         https://bugs.webkit.org/show_bug.cgi?id=150754
1845
1846         Reviewed by Darin Adler.
1847
1848         It's more efficient because it uses a persistent source and it
1849         simplifies the code even more.
1850
1851         * platform/MainThreadSharedTimer.cpp:
1852         (WebCore::MainThreadSharedTimer::fired): Make it non-const to be
1853         able to use it as function callback of a RunLoop::Timer.
1854         * platform/MainThreadSharedTimer.h:
1855         * platform/gtk/MainThreadSharedTimerGtk.cpp:
1856         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
1857         Initialize the RunLoop::Timer and set the prioriry.
1858         (WebCore::MainThreadSharedTimer::setFireInterval):
1859         (WebCore::MainThreadSharedTimer::stop):
1860
1861 2015-10-31  Andreas Kling  <akling@apple.com>
1862
1863         Add a debug overlay with information about web process resource usage.
1864         <https://webkit.org/b/150599>
1865
1866         Unreviewed follow-up to r191849.
1867
1868         Add missing call to uninstall the PageOverlay if the ResourceUsageOverlay is being
1869         disabled through the setting. This way you don't end up with an unremovable overlay
1870         in the MiniBrowser.
1871
1872         * page/ResourceUsageOverlay.cpp:
1873         (WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):
1874
1875 2015-10-31  Brady Eidson  <beidson@apple.com>
1876
1877         IDB: Date objects don't work as keys or values.
1878         https://bugs.webkit.org/show_bug.cgi?id=150743
1879
1880         Reviewed by Darin Adler.
1881
1882         Test: storage/indexeddb/modern/date-basic.html
1883
1884         The combination of the autogenerated bindings with Deprecated::ScriptValue was
1885         losing the fidelity of "Date" objects being Dates, and not just normal Objects.
1886         
1887         This was breaking their usage as IDBKeys.
1888         
1889         Custom binding + reworking the IDBObjectStore IDLs to use JSValue instead of ScriptValue
1890         fixes this handily.
1891         
1892         * Modules/indexeddb/IDBObjectStore.h:
1893         * Modules/indexeddb/IDBObjectStore.idl:
1894         
1895         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1896         (WebCore::IDBClient::IDBObjectStore::add):
1897         (WebCore::IDBClient::IDBObjectStore::put):
1898         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
1899         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1900         
1901         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
1902         (WebCore::LegacyObjectStore::add):
1903         (WebCore::LegacyObjectStore::put):
1904         * Modules/indexeddb/legacy/LegacyObjectStore.h:
1905         
1906         * bindings/js/IDBBindingUtilities.cpp:
1907         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
1908         (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
1909         (WebCore::canInjectIDBKeyIntoScriptValue):
1910         (WebCore::scriptValueToIDBKey):
1911         * bindings/js/IDBBindingUtilities.h:
1912
1913         * bindings/js/JSIDBObjectStoreCustom.cpp:
1914         (WebCore::putOrAdd):
1915         (WebCore::JSIDBObjectStore::putRecord):
1916         (WebCore::JSIDBObjectStore::add):
1917
1918 2015-10-31  Andreas Kling  <akling@apple.com>
1919
1920         Add a debug overlay with information about web process resource usage.
1921         <https://webkit.org/b/150599>
1922
1923         Reviewed by Darin Adler.
1924
1925         A new kind of PageOverlay is added behind the ENABLE(RESOURCE_USAGE_OVERLAY) flag.
1926         It's owned by Page, but not instantiated unless the Settings::resourceUsageOverlayVisible flag is set.
1927
1928         All ResourceUsageOverlay objects share a single sampler thread. The thread currently runs every 500ms
1929         and samples CPU usage, dirty memory regions, and GC heap size/capacity.
1930
1931         Most things in here are currently quite Mac-specific, but I will be iterating on this towards a more
1932         cross-platform friendly solution.
1933
1934         There are two small changes to PageOverlay in order to support dragging the resource usage overlay:
1935
1936             - A "should ignore mouse events outside bounds" state flag. This is on by default
1937               but turned off during a drag.
1938             - PageOverlay::bounds() will now return the override frame verbatim if one is set,
1939               instead of returning it relocated to 0,0.
1940
1941         Note that this is intended as a tool for WebKit engine developers to better understand memory usage.
1942         It's not a goal to expose this information to end users.
1943
1944         * WebCore.xcodeproj/project.pbxproj:
1945         * page/Page.cpp:
1946         (WebCore::Page::setResourceUsageOverlayVisible):
1947         * page/Page.h:
1948         * page/PageOverlay.cpp:
1949         (WebCore::PageOverlay::bounds):
1950         (WebCore::PageOverlay::mouseEvent):
1951         * page/PageOverlay.h:
1952         * page/ResourceUsageOverlay.cpp: Added.
1953         (WebCore::ResourceUsageOverlay::ResourceUsageOverlay):
1954         (WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):
1955         (WebCore::ResourceUsageOverlay::mouseEvent):
1956         * page/ResourceUsageOverlay.h: Added.
1957         * page/Settings.cpp:
1958         (WebCore::Settings::setResourceUsageOverlayVisible):
1959         * page/Settings.h:
1960         (WebCore::Settings::resourceUsageOverlayVisible):
1961         * page/cocoa/ResourceUsageOverlayCocoa.mm: Added.
1962         (-[WebOverlayLayer initWithResourceUsageOverlay:]):
1963         (-[WebOverlayLayer drawInContext:]):
1964         (WebCore::RingBuffer::RingBuffer):
1965         (WebCore::RingBuffer::append):
1966         (WebCore::RingBuffer::last):
1967         (WebCore::RingBuffer::forEach):
1968         (WebCore::RingBuffer::incrementIndex):
1969         (WebCore::RingBuffer::decrementIndex):
1970         (WebCore::sharedData):
1971         (WebCore::ResourceUsageOverlay::platformInitialize):
1972         (WebCore::ResourceUsageOverlay::platformDestroy):
1973         (WebCore::drawCpuHistory):
1974         (WebCore::drawGCHistory):
1975         (WebCore::drawSlice):
1976         (WebCore::drawPlate):
1977         (WebCore::drawMemoryPie):
1978         (WebCore::formatByteNumber):
1979         (WebCore::showText):
1980         (WebCore::ResourceUsageOverlay::draw):
1981         (WebCore::dirtyPagesPerVMTag):
1982         (WebCore::cpuUsage):
1983         (WebCore::runSamplerThread):
1984         * platform/spi/cocoa/MachVMSPI.h:
1985
1986 2015-10-31  Brady Eidson  <beidson@apple.com>
1987
1988         storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html is flaky.
1989         https://bugs.webkit.org/show_bug.cgi?id=150735
1990
1991         Reviewed by Darin Adler.
1992
1993         No new tests (Covered by existing tests).
1994
1995         Transactions were liable to commit too early because IDBRequests could be waiting
1996         to dispatch their error/success events but their operations would no longer be
1997         registered with the transaction.
1998         
1999         Having outstanding requests should also keep a transaction from committing, just
2000         like having outstanding operations should.
2001         
2002         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2003         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
2004         
2005         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2006         (WebCore::IDBClient::IDBRequest::dispatchEvent):
2007         
2008         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2009         (WebCore::IDBClient::IDBTransaction::addRequest):
2010         (WebCore::IDBClient::IDBTransaction::removeRequest):
2011         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
2012         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
2013         (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
2014         (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
2015         (WebCore::IDBClient::IDBTransaction::operationDidComplete):
2016         * Modules/indexeddb/client/IDBTransactionImpl.h:
2017         
2018         * Modules/indexeddb/client/TransactionOperation.h:
2019         (WebCore::IDBClient::TransactionOperation::completed):
2020
2021 2015-10-31  Philippe Normand  <pnormand@igalia.com>
2022
2023         [GStreamer][Mac] Fix WebAudio build
2024         https://bugs.webkit.org/show_bug.cgi?id=150030
2025
2026         Reviewed by Darin Adler.
2027
2028         Wrap Accelerate.framework API calls around USE(ACCELERATE) ifdefs.
2029
2030         * platform/audio/Biquad.cpp:
2031         (WebCore::Biquad::Biquad):
2032         (WebCore::Biquad::process):
2033         (WebCore::Biquad::reset):
2034         * platform/audio/Biquad.h:
2035         * platform/audio/DirectConvolver.cpp:
2036         (WebCore::DirectConvolver::process):
2037         * platform/audio/FFTFrame.h:
2038         * platform/audio/VectorMath.cpp:
2039
2040 2015-10-31  Brian Burg  <bburg@apple.com>
2041
2042         Builtins generator should put WebCore-only wrappers in the per-builtin header
2043         https://bugs.webkit.org/show_bug.cgi?id=150539
2044
2045         Reviewed by Youenn Fablet.
2046
2047         Fix includes of removed XXXWrapper.h headers.
2048
2049         * CMakeLists.txt:
2050         * DerivedSources.make:
2051         * WebCore.xcodeproj/project.pbxproj:
2052         * bindings/js/WebCoreJSBuiltinInternals.h:
2053         * bindings/js/WebCoreJSBuiltins.h:
2054
2055 2015-10-31  Yusuke Suzuki  <utatane.tea@gmail.com>
2056
2057         Add the support for Symbol attributes on IDL
2058         https://bugs.webkit.org/show_bug.cgi?id=150586
2059
2060         Reviewed by Ryosuke Niwa.
2061
2062         This patch addes readonly attribute support for Symbols.
2063         It involves the IDL generator functionality converting Native type (PrivateName) to Symbol.
2064
2065         * bindings/scripts/CodeGeneratorGObject.pm:
2066         (SkipAttribute):
2067         (SkipFunction):
2068         * bindings/scripts/CodeGeneratorJS.pm:
2069         (NativeToJSValue):
2070         * bindings/scripts/CodeGeneratorObjC.pm:
2071         (SkipFunction):
2072         (SkipAttribute):
2073         * bindings/scripts/test/JS/JSTestObj.cpp:
2074         (WebCore::jsTestObjReadOnlySymbolAttr):
2075         (WebCore::jsTestObjConstructorStaticReadOnlySymbolAttr):
2076         * bindings/scripts/test/TestObj.idl:
2077
2078 2015-10-30  Brady Eidson  <beidson@apple.com>
2079
2080         Modern IDB: Support IDBObjectStore.get() for IDBKeyRanges.
2081         https://bugs.webkit.org/show_bug.cgi?id=150718
2082
2083         Reviewed by Alex Christensen.
2084
2085         Test: storage/indexeddb/modern/get-keyrange.html
2086
2087         * Modules/indexeddb/IDBKeyRangeData.cpp:
2088         (WebCore::IDBKeyRangeData::IDBKeyRangeData):
2089         * Modules/indexeddb/IDBKeyRangeData.h:
2090         
2091         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2092         (WebCore::IDBClient::IDBConnectionToServer::getRecord):
2093         * Modules/indexeddb/client/IDBConnectionToServer.h:
2094         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2095         
2096         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2097         (WebCore::IDBClient::IDBObjectStore::get):
2098         
2099         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2100         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
2101         (WebCore::IDBClient::IDBTransaction::getRecordOnServer):
2102         * Modules/indexeddb/client/IDBTransactionImpl.h:
2103         
2104         * Modules/indexeddb/server/IDBBackingStore.h:
2105         
2106         * Modules/indexeddb/server/IDBServer.cpp:
2107         (WebCore::IDBServer::IDBServer::getRecord):
2108         * Modules/indexeddb/server/IDBServer.h:
2109         
2110         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2111         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
2112         
2113         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2114         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
2115         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2116         
2117         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2118         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
2119         (WebCore::IDBServer::MemoryObjectStore::setKeyValue):
2120         (WebCore::IDBServer::MemoryObjectStore::valueForKeyRange): Using a std::set, find the appropriate
2121           key in the range, and return the value if one exists.
2122         (WebCore::IDBServer::MemoryObjectStore::valueForKey): Deleted.
2123         * Modules/indexeddb/server/MemoryObjectStore.h:
2124         
2125         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2126         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
2127         (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
2128         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2129         
2130         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2131         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
2132         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2133         
2134         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2135         (WebCore::InProcessIDBServer::getRecord):
2136         * Modules/indexeddb/shared/InProcessIDBServer.h:
2137
2138 2015-10-30  Brady Eidson  <beidson@apple.com>
2139
2140         Modern IDB: IDBObjectStore.clear() support.
2141         https://bugs.webkit.org/show_bug.cgi?id=150733
2142
2143         Reviewed by Alex Christensen.
2144
2145         Tests: storage/indexeddb/modern/idbobjectstore-clear-1.html
2146                storage/indexeddb/modern/idbobjectstore-clear-2.html
2147
2148         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2149         (WebCore::IDBClient::IDBConnectionToServer::clearObjectStore):
2150         (WebCore::IDBClient::IDBConnectionToServer::didClearObjectStore):
2151         * Modules/indexeddb/client/IDBConnectionToServer.h:
2152         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2153         
2154         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2155         (WebCore::IDBClient::IDBObjectStore::clear):
2156         
2157         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2158         (WebCore::IDBClient::IDBRequest::setResultToUndefined):
2159         * Modules/indexeddb/client/IDBRequestImpl.h:
2160         
2161         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2162         (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
2163         (WebCore::IDBClient::IDBTransaction::clearObjectStoreOnServer):
2164         (WebCore::IDBClient::IDBTransaction::didClearObjectStoreOnServer):
2165         * Modules/indexeddb/client/IDBTransactionImpl.h:
2166
2167         * Modules/indexeddb/server/IDBBackingStore.h:
2168
2169         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2170         (WebCore::IDBServer::IDBConnectionToClient::didClearObjectStore):
2171         * Modules/indexeddb/server/IDBConnectionToClient.h:
2172         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2173
2174         * Modules/indexeddb/server/IDBServer.cpp:
2175         (WebCore::IDBServer::IDBServer::clearObjectStore):
2176         * Modules/indexeddb/server/IDBServer.h:
2177
2178         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2179         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
2180         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
2181         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2182         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2183         (WebCore::IDBServer::MemoryBackingStoreTransaction::isAborting):
2184
2185         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2186         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
2187         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2188
2189         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2190         (WebCore::IDBServer::MemoryObjectStore::clear):
2191         (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
2192         * Modules/indexeddb/server/MemoryObjectStore.h:
2193
2194         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2195         (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
2196         (WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore):
2197         (WebCore::IDBServer::UniqueIDBDatabase::didPerformClearObjectStore):
2198         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2199
2200         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2201         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore):
2202         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2203
2204         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2205         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
2206         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2207
2208         * Modules/indexeddb/shared/IDBResultData.cpp:
2209         (WebCore::IDBResultData::clearObjectStoreSuccess):
2210         * Modules/indexeddb/shared/IDBResultData.h:
2211
2212         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2213         (WebCore::InProcessIDBServer::didClearObjectStore):
2214         (WebCore::InProcessIDBServer::clearObjectStore):
2215         * Modules/indexeddb/shared/InProcessIDBServer.h:
2216
2217 2015-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2218
2219         CSSParserVariable leaks seen on leaks bots
2220         https://bugs.webkit.org/show_bug.cgi?id=150724
2221
2222         Reviewed by Darin Adler.
2223
2224         * css/CSSParserValues.cpp:
2225         (WebCore::destroy):
2226         Cleanup variable CSSParserValues.
2227
2228 2015-10-30  Alex Christensen  <achristensen@webkit.org>
2229
2230         Fix Windows build.
2231
2232         * PlatformWin.cmake:
2233         Add missing files.
2234
2235 2015-10-30  Beth Dakin  <bdakin@apple.com>
2236
2237         Tapping and holding a link should have a share option
2238         https://bugs.webkit.org/show_bug.cgi?id=150693
2239         -and corresponding-
2240         rdar://problem/21319702
2241
2242         Reviewed by Tim Horton.
2243
2244         * English.lproj/Localizable.strings:
2245
2246 2015-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2247
2248         Minor CGColor leaks seen on bots allocated in WebSystemBackdropLayer.mm
2249         https://bugs.webkit.org/show_bug.cgi?id=150722
2250
2251         Reviewed by Andreas Kling.
2252
2253         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm:
2254         (-[WebLightSystemBackdropLayer init]):
2255         (-[WebDarkSystemBackdropLayer init]):
2256
2257 2015-10-30  Csaba Osztrogonác  <ossy@webkit.org>
2258
2259         [EFL] Fix the debug build after r191758
2260         https://bugs.webkit.org/show_bug.cgi?id=150719
2261
2262         Reviewed by Alex Christensen.
2263
2264         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2265         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
2266
2267 2015-10-30  Dan Bernstein  <mitz@apple.com>
2268
2269         Fixed the build.
2270
2271         * platform/graphics/Image.cpp:
2272         (WebCore::Image::draw): Deleted an infinitely-recursive implementation that caused the
2273           compiler to emit an error.
2274         * platform/graphics/Image.h:
2275         (WebCore::Image::draw): Made this pure virtual.
2276
2277 2015-10-30  Brady Eidson  <beidson@apple.com>
2278
2279         Modern IDB: IDBObjectStore.add() support.
2280         https://bugs.webkit.org/show_bug.cgi?id=150711
2281
2282         Reviewed by Alex Christensen.
2283
2284         Test: storage/indexeddb/modern/basic-add.html
2285
2286         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2287         (WebCore::IDBClient::IDBObjectStore::add):
2288
2289         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2290         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
2291
2292 2015-10-30  Hunseop Jeong  <hs85.jeong@samsung.com>
2293
2294         Use modern for-loops in WebCore/dom.
2295         https://bugs.webkit.org/show_bug.cgi?id=150664
2296
2297         Reviewed by Darin Adler.
2298
2299         No new tests because there is no behavior change.
2300
2301         * dom/AuthorStyleSheets.cpp:
2302         (WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
2303         (WebCore::filterEnabledNonemptyCSSStyleSheets):
2304         (WebCore::AuthorStyleSheets::activeStyleSheetsContains):
2305         * dom/CheckedRadioButtons.cpp:
2306         (WebCore::RadioButtonGroup::updateValidityForAllButtons):
2307         * dom/ClientRectList.cpp:
2308         (WebCore::ClientRectList::ClientRectList):
2309         (WebCore::ClientRectList::~ClientRectList):
2310         * dom/ContainerNode.cpp:
2311         (WebCore::ContainerNode::insertBefore):
2312         * dom/DOMNamedFlowCollection.cpp:
2313         (WebCore::DOMNamedFlowCollection::DOMNamedFlowCollection):
2314         (WebCore::DOMNamedFlowCollection::length):
2315         (WebCore::DOMNamedFlowCollection::item):
2316         (WebCore::DOMNamedFlowCollection::namedItem):
2317         * dom/DOMStringList.cpp:
2318         (WebCore::DOMStringList::contains):
2319         * dom/Document.cpp:
2320         (WebCore::Document::Document):
2321         (WebCore::Document::~Document):
2322         (WebCore::Document::removedLastRef):
2323         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
2324         (WebCore::Document::updateHoverActiveState):
2325         * dom/DocumentMarkerController.cpp:
2326         (WebCore::DocumentMarkerController::copyMarkers):
2327         (WebCore::DocumentMarkerController::removeMarkers):
2328         (WebCore::DocumentMarkerController::repaintMarkers):
2329         (DocumentMarkerController::showMarkers):
2330         * dom/ElementData.cpp:
2331         (WebCore::UniqueElementData::findAttributeByName):
2332         * dom/EventDispatcher.cpp:
2333         (WebCore::EventPath::updateTouchLists):
2334         (WebCore::EventPath::hasEventListeners):
2335         * dom/EventListenerMap.cpp:
2336         (WebCore::EventListenerMap::contains):
2337         (WebCore::EventListenerMap::containsCapturing):
2338         (WebCore::EventListenerMap::eventTypes):
2339         (WebCore::EventListenerMap::add):
2340         (WebCore::EventListenerMap::find):
2341         (WebCore::copyListenersNotCreatedFromMarkupToTarget):
2342         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
2343         (WebCore::EventListenerIterator::EventListenerIterator):
2344         * dom/EventTarget.cpp:
2345         (WebCore::EventTarget::removeEventListener):
2346         (WebCore::EventTarget::getAttributeEventListener):
2347         (WebCore::EventTarget::removeAllEventListeners):
2348         * dom/IdTargetObserverRegistry.cpp:
2349         (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
2350         * dom/MessagePort.cpp:
2351         (WebCore::MessagePort::postMessage):
2352         (WebCore::MessagePort::disentanglePorts):
2353         * dom/MutationObserver.cpp:
2354         (WebCore::MutationObserver::observe):
2355         (WebCore::MutationObserver::deliver):
2356         (WebCore::MutationObserver::deliverAllMutations):
2357         * dom/NamedFlowCollection.cpp:
2358         (WebCore::NamedFlowCollection::namedFlows):
2359         (WebCore::NamedFlowCollection::createCSSOMSnapshot):
2360         * dom/Node.cpp:
2361         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2362         * dom/Range.cpp:
2363         (WebCore::Range::processNodes):
2364         (WebCore::Range::processAncestorsAndTheirSiblings):
2365         (WebCore::Range::absoluteBoundingBox):
2366         (WebCore::Range::collectSelectionRects):
2367         * dom/ScriptRunner.cpp:
2368         (WebCore::ScriptRunner::timerFired):
2369         * dom/ScriptedAnimationController.cpp:
2370         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2371         * dom/SelectorQuery.cpp:
2372         (WebCore::SelectorDataList::matches):
2373         (WebCore::SelectorDataList::executeFastPathForIdSelector):
2374         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
2375         (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
2376         (WebCore::SelectorDataList::execute):
2377         * dom/TreeScopeAdopter.cpp:
2378         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2379
2380 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2381
2382         Make every port implement MainThreadSharedTimer instead of using global functions
2383         https://bugs.webkit.org/show_bug.cgi?id=150498
2384
2385         Reviewed by Darin Adler.
2386
2387         Move MainThreadSharedTimer to its own files and add the common
2388         implementation there.
2389
2390         * CMakeLists.txt: Add MainThreadSharedTimer.cpp.
2391         * PlatformEfl.cmake: Update filenames.
2392         * PlatformGTK.cmake: Ditto.
2393         * PlatformMac.cmake: Ditto.
2394         * PlatformWin.cmake: Ditto.
2395         * platform/MainThreadSharedTimer.cpp: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
2396         (WebCore::MainThreadSharedTimer::singleton):
2397         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
2398         (WebCore::MainThreadSharedTimer::setFiredFunction):
2399         (WebCore::MainThreadSharedTimer::fired):
2400         * platform/MainThreadSharedTimer.h: Copied from Source/WebCore/platform/gtk/SharedTimerGtk.cpp.
2401         * platform/SharedTimer.h: Remove MainThreadSharedTimer
2402         implementation and reindent the code.
2403         (WebCore::SharedTimer::SharedTimer):
2404         (WebCore::SharedTimer::~SharedTimer):
2405         (WebCore::SharedTimer::invalidate):
2406         * platform/ThreadTimers.cpp:
2407         (WebCore::ThreadTimers::ThreadTimers): Use MainThreadSharedTimer::singleton().
2408         (WebCore::ThreadTimers::setSharedTimer): Use a lambda function
2409         instead of a pointer to a static method.
2410         (WebCore::ThreadTimers::sharedTimerFired): Deleted.
2411         * platform/ThreadTimers.h: Removed unsused static method sharedTimerFired.
2412         * platform/cf/MainThreadSharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.cpp.
2413         (WebCore::applicationDidBecomeActive):
2414         (WebCore::setupPowerObserver):
2415         (WebCore::timerFired):
2416         (WebCore::restartSharedTimer):
2417         (WebCore::MainThreadSharedTimer::invalidate):
2418         (WebCore::MainThreadSharedTimer::setFireInterval):
2419         (WebCore::MainThreadSharedTimer::stop):
2420         * platform/efl/MainThreadSharedTimerEfl.cpp: Renamed from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
2421         (WebCore::timerEvent):
2422         (WebCore::MainThreadSharedTimer::stop):
2423         (WebCore::MainThreadSharedTimer::setFireInterval):
2424         (WebCore::MainThreadSharedTimer::invalidate):
2425         * platform/gtk/MainThreadSharedTimerGtk.cpp: Renamed from Source/WebCore/platform/gtk/SharedTimerGtk.cpp.
2426         (WebCore::MainThreadSharedTimer::setFireInterval):
2427         (WebCore::MainThreadSharedTimer::stop):
2428         (WebCore::MainThreadSharedTimer::invalidate):
2429         * platform/win/MainThreadSharedTimerWin.cpp: Renamed from Source/WebCore/platform/win/SharedTimerWin.cpp.
2430         (WebCore::TimerWindowWndProc):
2431         (WebCore::initializeOffScreenTimerWindow):
2432         (WebCore::queueTimerProc):
2433         (WebCore::MainThreadSharedTimer::setFireInterval):
2434         (WebCore::MainThreadSharedTimer::stop):
2435         (WebCore::MainThreadSharedTimer::invalidate):
2436         * workers/WorkerRunLoop.cpp: Update WorkerSharedTimer
2437         implementation to use std::function instead of a pointer. Also
2438         mark the class as final and the virtual implementations as override.
2439
2440 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2441
2442         [GTK] Use RunLoop::Timer instead of GMainLoopSource
2443         https://bugs.webkit.org/show_bug.cgi?id=150592
2444
2445         Reviewed by Žan Doberšek.
2446
2447         * platform/network/ResourceHandle.h:
2448         * platform/network/ResourceHandleInternal.h:
2449         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2450         * platform/network/soup/ResourceHandleSoup.cpp:
2451         (WebCore::cleanupSoupRequestOperation):
2452         (WebCore::ResourceHandle::timeoutFired):
2453         (WebCore::ResourceHandle::sendPendingRequest):
2454         (WebCore::ResourceHandle::platformSetDefersLoading):
2455
2456 2015-10-30  Hunseop Jeong  <hs85.jeong@samsung.com>
2457
2458         REGRESSION(r191776): EFL build broken.
2459         https://bugs.webkit.org/show_bug.cgi?id=150713
2460
2461         Reviewed by Csaba Osztrogonác.
2462
2463         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2464         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2465
2466 2015-10-29  Brady Eidson  <beidson@apple.com>
2467
2468         Modern IDB: autoIncrement support.
2469         https://bugs.webkit.org/show_bug.cgi?id=150695
2470
2471         Reviewed by Alex Christensen.
2472
2473         Test: storage/indexeddb/modern/autoincrement-abort.html
2474
2475         * Modules/indexeddb/server/IDBBackingStore.h:
2476         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2477         (WebCore::IDBServer::MemoryBackingStoreTransaction::addNewObjectStore):
2478         (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingObjectStore):
2479         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2480         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2481         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2482         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord):
2483         (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
2484         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2485         * Modules/indexeddb/server/MemoryObjectStore.h:
2486         (WebCore::IDBServer::MemoryObjectStore::currentKeyGeneratorValue):
2487         (WebCore::IDBServer::MemoryObjectStore::setKeyGeneratorValue):
2488         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2489         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2490
2491 2015-10-29  Alex Christensen  <achristensen@webkit.org>
2492
2493         Make WebCore a framework in Mac CMake build
2494         https://bugs.webkit.org/show_bug.cgi?id=150702
2495
2496         Reviewed by Geoffrey Garen.
2497
2498         * CMakeLists.txt:
2499         * PlatformEfl.cmake:
2500         * PlatformGTK.cmake:
2501         * PlatformMac.cmake:
2502
2503 2015-10-29  Alex Christensen  <achristensen@webkit.org>
2504
2505         CMake build fix.
2506
2507         * editing/mac/EditorMac.mm:
2508         (WebCore::Editor::WebContentReader::readFilenames):
2509         Before r191553, text was a local variable and could be changed.
2510         This restores the same behavior and compiles correctly when ATTACHMENT_ELEMENT is disabled.
2511         * platform/mac/CursorMac.mm:
2512         (WebCore::Cursor::Cursor):
2513         (WebCore::Cursor::operator=):
2514         Added preprocessor macros.
2515
2516 2015-10-29  Brady Eidson  <beidson@apple.com>
2517
2518         Modern IDB: deleteObjectStore support.
2519         https://bugs.webkit.org/show_bug.cgi?id=150673
2520
2521         Reviewed by Alex Christensen.
2522
2523         Tests: storage/indexeddb/modern/deleteobjectstore-1.html
2524                storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html
2525                storage/indexeddb/modern/idbobjectstore-get-failures.html
2526
2527         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2528         (WebCore::IDBClient::IDBConnectionToServer::deleteObjectStore):
2529         (WebCore::IDBClient::IDBConnectionToServer::didDeleteObjectStore):
2530         * Modules/indexeddb/client/IDBConnectionToServer.h:
2531         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2532
2533         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2534         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
2535         (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
2536         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
2537         (WebCore::IDBClient::IDBDatabase::commitTransaction): Deleted.
2538         (WebCore::IDBClient::IDBDatabase::abortTransaction): Deleted.
2539         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2540
2541         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2542         (WebCore::IDBClient::IDBObjectStore::markAsDeleted):
2543         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
2544
2545         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2546         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
2547         (WebCore::IDBClient::IDBTransaction::abort):
2548         (WebCore::IDBClient::IDBTransaction::abortOnServer):
2549         (WebCore::IDBClient::IDBTransaction::commit):
2550         (WebCore::IDBClient::IDBTransaction::commitOnServer):
2551         (WebCore::IDBClient::IDBTransaction::deleteObjectStore):
2552         (WebCore::IDBClient::IDBTransaction::deleteObjectStoreOnServer):
2553         (WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
2554         (WebCore::IDBClient::IDBTransaction::activate):
2555         (WebCore::IDBClient::IDBTransaction::activationTimerFired): Deleted.
2556         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer): Deleted.
2557         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer): Deleted.
2558         (WebCore::IDBClient::IDBTransaction::getRecordOnServer): Deleted.
2559         (WebCore::IDBClient::IDBTransaction::putOrAddOnServer): Deleted.
2560         * Modules/indexeddb/client/IDBTransactionImpl.h:
2561         
2562         * Modules/indexeddb/client/TransactionOperation.h:
2563         (WebCore::IDBClient::TransactionOperation::completed):
2564         (WebCore::IDBClient::createTransactionOperation):
2565         
2566         * Modules/indexeddb/server/IDBBackingStore.h:
2567         
2568         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2569         (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
2570         * Modules/indexeddb/server/IDBConnectionToClient.h:
2571         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2572         
2573         * Modules/indexeddb/server/IDBServer.cpp:
2574         (WebCore::IDBServer::IDBServer::deleteObjectStore):
2575         * Modules/indexeddb/server/IDBServer.h:
2576         
2577         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2578         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
2579         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2580         (WebCore::IDBServer::MemoryBackingStoreTransaction::finish):
2581         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2582         
2583         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2584         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
2585         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
2586         (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
2587         (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
2588         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2589         
2590         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2591         (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
2592         (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
2593         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
2594         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore):
2595         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore): Deleted.
2596         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2597         
2598         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2599         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteObjectStore):
2600         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2601         
2602         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2603         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
2604         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2605         
2606         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
2607         (WebCore::IDBDatabaseInfo::deleteObjectStore):
2608         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
2609         
2610         * Modules/indexeddb/shared/IDBResultData.cpp:
2611         (WebCore::IDBResultData::deleteObjectStoreSuccess):
2612         * Modules/indexeddb/shared/IDBResultData.h:
2613         
2614         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2615         (WebCore::InProcessIDBServer::didDeleteObjectStore):
2616         (WebCore::InProcessIDBServer::deleteObjectStore):
2617         * Modules/indexeddb/shared/InProcessIDBServer.h:
2618
2619 2015-10-29  Simon Fraser  <simon.fraser@apple.com>
2620
2621         Very slow typing on pages with wheel event handlers on the body, and deep content
2622         https://bugs.webkit.org/show_bug.cgi?id=150692
2623         rdar://problem/23242631
2624
2625         Reviewed by Zalan Bujtas.
2626         
2627         On a large page with a wheel event handler on the body, we would call
2628         Element::absoluteEventHandlerBounds() for every element under the body,
2629         and compute an absolute bounds for each one. This is very slow.
2630         
2631         For now, optimize computing a region for the <body> by just using the document
2632         bounds, which will always be as big or larger. It's OK for this region to
2633         be an overestimate.
2634
2635         * dom/Document.cpp:
2636         (WebCore::Document::absoluteRegionForEventTargets):
2637
2638 2015-10-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2639
2640         Date input values should not overlap with menu list dropdown button on iOS
2641         https://bugs.webkit.org/show_bug.cgi?id=150681
2642         <rdar://problem/19965078>
2643
2644         Reviewed by Zalan Bujtas.
2645
2646         Adds a right margin on iOS date and time inputs so that the inner div does
2647         not render the value of the date on top of the dropdown button on the right
2648         of the menu list.
2649
2650         Tests: fast/forms/date/date-input-rendering-basic.html
2651                fast/forms/time/time-input-rendering-basic.html
2652
2653         * css/html.css:
2654         (input::-webkit-date-and-time-value):
2655
2656 2015-10-29  Alex Christensen  <achristensen@webkit.org>
2657
2658         Fix Mac CMake build
2659         https://bugs.webkit.org/show_bug.cgi?id=150686
2660
2661         Reviewed by Filip Pizlo.
2662
2663         * PlatformMac.cmake:
2664
2665 2015-10-29  Csaba Osztrogonác  <ossy@webkit.org>
2666
2667         One more URTBF after r191731.
2668
2669         * rendering/svg/RenderSVGResourcePattern.cpp:
2670
2671 2015-10-29  Csaba Osztrogonác  <ossy@webkit.org>
2672
2673         URTBF after r191731.
2674
2675         * rendering/svg/RenderSVGResourcePattern.cpp:
2676
2677 2015-10-29  Zalan Bujtas  <zalan@apple.com>
2678
2679         Fix ENABLE(TREE_DEBUGGING) release build.
2680
2681         Unreviewed build fix.
2682
2683         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2684         * dom/Position.cpp:
2685
2686 2015-10-29  Beth Dakin  <bdakin@apple.com>
2687
2688         Overlay scrollbars disappear during manual drag-scroll
2689         https://bugs.webkit.org/show_bug.cgi?id=150646
2690         -and corresponding-
2691         rdar://problem/23145734
2692
2693         Reviewed by Tim Horton.
2694
2695         New ScrollAnimator function so that we can tell the ScrollbarPainter whether 
2696         or not the mouse is tracking the scrollbar.
2697         * platform/ScrollAnimator.h:
2698         (WebCore::ScrollAnimator::ScrollAnimator::mouseIsDownInScrollbar):
2699         * platform/ScrollableArea.cpp:
2700         (WebCore::ScrollableArea::mouseIsDownInScrollbar):
2701         * platform/ScrollableArea.h:
2702
2703         Call into the new ScrollAnimator function of mouseDown and mouseUp.
2704         * platform/Scrollbar.cpp:
2705         (WebCore::Scrollbar::mouseUp):
2706         (WebCore::Scrollbar::mouseDown):
2707
2708         Add setTracking to the ScrollbarPainter.
2709         * platform/mac/NSScrollerImpDetails.h:
2710
2711         Implement mouseIsDownInScrollbar to call setTracking appropriately and to set 
2712         begin/endScrollGesture since drag scrolling does not normally trigger that 
2713         state change.
2714         * platform/mac/ScrollAnimatorMac.h:
2715         * platform/mac/ScrollAnimatorMac.mm:
2716         (WebCore::ScrollAnimatorMac::mouseIsDownInScrollbar):
2717
2718 2015-10-29  Eric Carlson  <eric.carlson@apple.com>
2719
2720         MediaPlayer::getSupportedTypes only returns types from the last engine registered
2721         https://bugs.webkit.org/show_bug.cgi?id=150669
2722
2723         Reviewed by Jer Noble.
2724
2725         No new tests, fixes existing tests.
2726
2727         * platform/graphics/MediaPlayer.cpp:
2728         (WebCore::MediaPlayer::getSupportedTypes):
2729         (WebCore::MediaPlayer::isAvailable):
2730
2731 2015-10-29  Joseph Pecoraro  <pecoraro@apple.com>
2732
2733         Web Inspector: Clean up and audit TimelineRecordFactory records
2734         https://bugs.webkit.org/show_bug.cgi?id=150660
2735
2736         Reviewed by Brian Burg.
2737
2738         Cleanup included removing unused methods and payload data that the
2739         frontend wasn't likely to use. Also added ASCIILiteral and removed
2740         unnecessary includes.
2741
2742         * inspector/InspectorNetworkAgent.cpp:
2743         * inspector/InspectorPageAgent.cpp:
2744         * inspector/InspectorTimelineAgent.cpp:
2745         (WebCore::InspectorTimelineAgent::willLayout):
2746         * inspector/InspectorTimelineAgent.h:
2747         * inspector/TimelineRecordFactory.cpp:
2748         (WebCore::TimelineRecordFactory::createGenericRecord):
2749         (WebCore::TimelineRecordFactory::createFunctionCallData):
2750         (WebCore::TimelineRecordFactory::createConsoleProfileData):
2751         (WebCore::TimelineRecordFactory::createEventDispatchData):
2752         (WebCore::TimelineRecordFactory::createGenericTimerData):
2753         (WebCore::TimelineRecordFactory::createTimerInstallData):
2754         (WebCore::TimelineRecordFactory::createEvaluateScriptData):
2755         (WebCore::TimelineRecordFactory::createTimeStampData):
2756         (WebCore::TimelineRecordFactory::createParseHTMLData):
2757         (WebCore::TimelineRecordFactory::createAnimationFrameData):
2758         (WebCore::TimelineRecordFactory::createPaintData):
2759         (WebCore::TimelineRecordFactory::appendLayoutRoot):
2760         (WebCore::TimelineRecordFactory::createBackgroundRecord): Deleted.
2761         (WebCore::TimelineRecordFactory::createLayoutData): Deleted.
2762         * inspector/TimelineRecordFactory.h:
2763         (WebCore::TimelineRecordFactory::TimelineRecordFactory):
2764
2765 2015-10-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
2766
2767         Exploitable crash happens when an SVG contains an indirect resource inheritance cycle
2768         https://bugs.webkit.org/show_bug.cgi?id=150203
2769
2770         Reviewed by Brent Fulgham.
2771
2772         Detecting cycles in SVG resource references happens in two places.
2773         1. In SVGResourcesCycleSolver::resolveCycles() which it is called from 
2774            SVGResourcesCache::addResourcesFromRenderer(). When a cycle is deleted,
2775            SVGResourcesCycleSolver::breakCycle() is called to break the link. In
2776            the case of a cyclic resource inheritance, SVGResources::resetLinkedResource()
2777            is called to break this cycle.
2778         2. SVGPatternElement::collectPatternAttributes() which is called from
2779            RenderSVGResourcePattern::buildPattern(). The purpose is to resolve
2780            the pattern attributes and to build a tile image which can be used to
2781            fill the SVG element renderer. Detecting the cyclic resource reference
2782            in this function is not sufficient and can detect simple cycles like
2783             <pattern id="a" xlink:href="#b"/>
2784             <pattern id="b" xlink:href="#a"/>.
2785            But it does not detect cycles like:
2786             <pattern id="a">
2787                 <rect fill="url(#b)"/>
2788             </pattern>
2789             <pattern id="b" xlink:href="#a"/>.
2790    
2791         The fix is to get rid of SVGPatternElement::collectPatternAttributes() which
2792         uses SVGURIReference::targetElementFromIRIString() to navigates through the
2793         referenced resource elements and tries to detect cycles. Instead we can
2794         implement RenderSVGResourcePattern::collectPatternAttributes() which calls
2795         SVGResourcesCache::cachedResourcesForRenderer() to get the SVGResources
2796         of the pattern. Then we use SVGResources::linkedResource() to navigate the
2797         resource inheritance tree. The cached SVGResources is guaranteed to be free
2798         of cycles.
2799
2800         Tests: svg/custom/pattern-content-inheritance-cycle.svg
2801
2802         * rendering/svg/RenderSVGResourcePattern.cpp:
2803         (WebCore::RenderSVGResourcePattern::collectPatternAttributes):
2804         Collect the pattern attributes through the cachedResourcesForRenderer().
2805         
2806         (WebCore::RenderSVGResourcePattern::buildPattern):
2807         Direct the call to the renderer function.
2808         
2809         * rendering/svg/RenderSVGResourcePattern.h:
2810         
2811         * rendering/svg/RenderSVGRoot.cpp:
2812         (WebCore::RenderSVGRoot::layout):
2813         RenderSVGRoot needs to call SVGResourcesCache::clientStyleChanged() for all
2814         the invalidated resources. If an attribute of an SVG resource was updated
2815         dynamically, the cached SVGResources associated with the renderer of this
2816         resource was stale.
2817         
2818         * rendering/svg/SVGRenderTreeAsText.cpp:
2819         (WebCore::writeSVGResourceContainer):
2820         Direct the call to the renderer function.        
2821         
2822         * svg/SVGPatternElement.cpp:
2823         (WebCore::SVGPatternElement::collectPatternAttributes):
2824         (WebCore::setPatternAttributes): Deleted.
2825         collectPatternAttributes() is a replacement of setPatternAttributes().
2826         
2827 2015-10-29  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2828
2829         [Streams API] Turn WS states into integers and fix state initialization
2830         https://bugs.webkit.org/show_bug.cgi?id=150667
2831
2832         Reviewed by Youenn Fablet.
2833
2834         The goal of this patch is turning the writable stream states into integers instead of strings.
2835
2836         First readable stream states were reworked to be shared with writable stream too, they are now just @stream*.
2837
2838         Next step was having writable stream using integers instead of strings and translating those integers back to
2839         strings to be able to return them correctly with the writable stream state attribute.
2840
2841         The state initialization was fixed and now it is not needed to check for the state to be undefined.
2842
2843         Rework, no new tests needed.
2844
2845         * Modules/streams/ReadableStream.js:
2846         (initializeReadableStream):
2847         * Modules/streams/ReadableStreamController.js:
2848         (enqueue):
2849         (error):
2850         (close):
2851         * Modules/streams/ReadableStreamInternals.js:
2852         (privateInitializeReadableStreamReader):
2853         (errorReadableStream):
2854         (cancelReadableStream):
2855         (finishClosingReadableStream):
2856         (closeReadableStream):
2857         (closeReadableStreamReader):
2858         (enqueueInReadableStream):
2859         (readFromReadableStreamReader):
2860         * Modules/streams/ReadableStreamReader.js:
2861         (cancel):
2862         * Modules/streams/WritableStream.js:
2863         (initializeWritableStream):
2864         (abort):
2865         (close):
2866         (write):
2867         (state):
2868         * Modules/streams/WritableStreamInternals.js:
2869         (syncWritableStreamStateWithQueue):
2870         (errorWritableStream):
2871         * bindings/js/JSDOMWindowBase.cpp:
2872         (WebCore::JSDOMWindowBase::finishCreation):
2873         * bindings/js/WebCoreBuiltinNames.h:
2874
2875 2015-10-28  Brady Eidson  <beidson@apple.com>
2876
2877         Modern IDB: Support IDBDatabase.transaction() (and transaction scheduling in general).
2878         https://bugs.webkit.org/show_bug.cgi?id=150614
2879
2880         Reviewed by Alex Christensen.
2881
2882         Tests: storage/indexeddb/modern/idbdatabase-transaction-failures.html
2883                storage/indexeddb/modern/transaction-scheduler-1.html
2884                storage/indexeddb/modern/transaction-scheduler-2.html
2885                storage/indexeddb/modern/transaction-scheduler-3.html
2886                storage/indexeddb/modern/transaction-scheduler-4.html
2887                storage/indexeddb/modern/transaction-scheduler-5.html
2888                storage/indexeddb/modern/transaction-scheduler-6.html
2889
2890         * Modules/indexeddb/IDBDatabase.idl:
2891
2892         * Modules/indexeddb/IndexedDB.h:
2893
2894         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2895         (WebCore::IDBClient::IDBConnectionToServer::establishTransaction):
2896         (WebCore::IDBClient::IDBConnectionToServer::didStartTransaction):
2897         (WebCore::IDBClient::IDBConnectionToServer::hasRecordOfTransaction):
2898         * Modules/indexeddb/client/IDBConnectionToServer.h:
2899         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2900
2901         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2902         (WebCore::IDBClient::IDBDatabase::transaction):
2903         (WebCore::IDBClient::IDBDatabase::didStartTransaction):
2904         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2905
2906         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2907         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
2908         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
2909         (WebCore::IDBClient::IDBTransaction::didStart):
2910         (WebCore::IDBClient::IDBTransaction::establishOnServer):
2911         (WebCore::IDBClient::IDBTransaction::activate):
2912         (WebCore::IDBClient::IDBTransaction::deactivate):
2913         * Modules/indexeddb/client/IDBTransactionImpl.h:
2914
2915         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2916         (WebCore::IDBServer::IDBConnectionToClient::didStartTransaction):
2917         * Modules/indexeddb/server/IDBConnectionToClient.h:
2918         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2919
2920         * Modules/indexeddb/server/IDBServer.cpp:
2921         (WebCore::IDBServer::IDBServer::establishTransaction):
2922         * Modules/indexeddb/server/IDBServer.h:
2923
2924         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2925         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
2926         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
2927         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
2928         (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
2929         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord):
2930         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord):
2931         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
2932         (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
2933         (WebCore::IDBServer::MemoryIDBBackingStore::unregisterObjectStore):
2934         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2935
2936         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2937         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
2938         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
2939         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
2940         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
2941         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
2942         (WebCore::IDBServer::UniqueIDBDatabase::transactionSchedulingTimerFired):
2943         (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):
2944         (WebCore::IDBServer::UniqueIDBDatabase::performActivateTransactionInBackingStore):
2945         (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
2946         (WebCore::IDBServer::scopesOverlap):
2947         (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
2948         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
2949         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2950
2951         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2952         (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
2953         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2954
2955         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2956         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
2957         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
2958         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::objectStoreIdentifiers):
2959         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::didActivateInBackingStore):
2960         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2961         
2962         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
2963         (WebCore::IDBTransactionInfo::clientTransaction):
2964         (WebCore::IDBTransactionInfo::isolatedCopy):
2965         * Modules/indexeddb/shared/IDBTransactionInfo.h:
2966         
2967         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2968         (WebCore::InProcessIDBServer::establishTransaction):
2969         (WebCore::InProcessIDBServer::didStartTransaction):
2970         * Modules/indexeddb/shared/InProcessIDBServer.h:
2971         
2972         * bindings/js/IDBBindingUtilities.cpp:
2973         (WebCore::deserializeIDBValueData):
2974         
2975         * bindings/js/JSIDBDatabaseCustom.cpp:
2976         (WebCore::JSIDBDatabase::transaction):
2977         
2978         * bindings/js/ScriptState.cpp:
2979         (WebCore::execStateFromPage):
2980
2981 2015-10-28  Eric Carlson  <eric.carlson@apple.com>
2982
2983         [MediaStream] Play MediaStream through media element and rendered to canvas
2984         https://bugs.webkit.org/show_bug.cgi?id=150449
2985
2986         Reviewed by Jer Noble.
2987
2988         * Modules/mediastream/MediaStream.cpp:
2989         (WebCore::MediaStream::create): Don't die a recursive death.
2990         (WebCore::MediaStream::MediaStream): setClient -> addObserver. Set private stream's public stream pointer.
2991         (WebCore::MediaStream::~MediaStream): setClient -> addObserver. Clear private stream's public stream pointer.
2992         (WebCore::MediaStream::didAddTrack): Short circuit calling internalAddTrack when the track is unknown.
2993         (WebCore::MediaStream::didRemoveTrack): ASSERT that the track is known.
2994         * Modules/mediastream/MediaStream.h:
2995
2996         * Modules/mediastream/MediaStreamTrack.cpp:
2997         (WebCore::MediaStreamTrack::trackProducingDataChanged): New.
2998         (WebCore::MediaStreamTrack::trackEnabledChanged): New.
2999         * Modules/mediastream/MediaStreamTrack.h:
3000
3001         * Modules/mediastream/RTCPeerConnection.cpp:
3002         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Use the new MediaStreamPrivate::publicStream() method.
3003
3004         * Modules/webaudio/MediaStreamAudioSource.cpp:
3005 ]        (WebCore::MediaStreamAudioSource::capabilities): capabilities isn't const.
3006         * Modules/webaudio/MediaStreamAudioSource.h:
3007
3008         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3009         (WebCore::MediaStreamAudioSourceNode::setFormat): Reformat to make it use early return.
3010
3011         * WebCore.xcodeproj/project.pbxproj: Remove MediaStreamPrivateAVFObjC.mm/h, they are no longer necessary.
3012
3013         * platform/graphics/MediaPlayer.cpp:
3014         (WebCore::buildMediaEnginesVector): Register MediaPlayerPrivateMediaStreamAVFObjC engine.
3015
3016         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3017         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3018         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Cleanup, add logging.
3019         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Add
3020           logging, remove private stream observer.
3021         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine): Cleanup.
3022         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Ditto.
3023         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes): Return an empty vector.
3024         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Use the MediaStreamPrivate passed instead
3025           of creating a new private stream. 
3026         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Pause output.
3027         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareToPlay): Add logging.
3028         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): m_previewLayer -> m_videoBackgroundLayer.
3029         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPausedImageVisible): New, show/hide the preview layer and configure
3030           the background layer so we show a still image even though the capture device continues to run. Start/stop clock.
3031         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Don't need to start the source, that happens in in load. Just
3032           set flags and hide the paused image.
3033         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Don't stop the source, it may be shared by more than one 
3034           stream/track. Just set the playing flag and show the paused image.
3035         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paused): Fix.
3036         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::internalSetVolume): New, called by setMuted and setVolume.
3037         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume): New.
3038         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted): Don't mute the source, it doesn't do what you think.
3039         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo): Pass-through to stream.
3040         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio): Ditto.
3041         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime): Return clock time.
3042         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): New.
3043         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Update readyState.
3044         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize): Update intrinsic size, create layers if necessary.
3045         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Create preview layers.
3046         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Update for changed characteristics.
3047         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable): 'seekable' must return an empty TimeRanges object.
3048         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): New.
3049         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::scheduleDeferredTask):
3050         (WebCore::mimeTypeCache): Deleted.
3051         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformMedia): Deleted.
3052         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Deleted.
3053         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pauseInternal): Deleted.
3054         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sizeChanged): Deleted.
3055         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::maxMediaTimeSeekable): Deleted.
3056         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::minMediaTimeSeekable): Deleted.
3057         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createImageFromSampleBuffer): Deleted.
3058         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsAcceleratedRendering): Deleted.
3059         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::movieLoadType): Deleted.
3060         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::extraMemoryCost): Deleted.
3061
3062         Delete MediaStreamPrivateAVFObjC.mm/.h as they aren't necessary. 
3063         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h: Removed.
3064         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm: Removed.
3065
3066         * platform/mediastream/MediaStreamPrivate.cpp:
3067         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Add track observer!
3068         (WebCore::MediaStreamPrivate::addObserver): New.
3069         (WebCore::MediaStreamPrivate::removeObserver): New.
3070         (WebCore::MediaStreamPrivate::updateActiveState): Remember the first active video track.
3071         (WebCore::MediaStreamPrivate::addTrack): Notify observers.
3072         (WebCore::MediaStreamPrivate::removeTrack): Ditto.
3073         (WebCore::MediaStreamPrivate::startProducingData): Pass-through to tracks.
3074         (WebCore::MediaStreamPrivate::stopProducingData): Ditto.
3075         (WebCore::MediaStreamPrivate::isProducingData): Ditto.
3076         (WebCore::MediaStreamPrivate::hasVideo): Ditto.
3077         (WebCore::MediaStreamPrivate::hasAudio): Ditto.
3078         (WebCore::MediaStreamPrivate::platformLayer): Ditto.
3079         (WebCore::MediaStreamPrivate::paintCurrentFrameInContext): Either pass-through to first active video
3080           track, or paint the context black.
3081         (WebCore::MediaStreamPrivate::currentFrameImage): Pass-through to first active video track.
3082         (WebCore::MediaStreamPrivate::characteristicsChanged): Inform observers.
3083         (WebCore::MediaStreamPrivate::trackMutedChanged):
3084         (WebCore::MediaStreamPrivate::trackStatesChanged):
3085         (WebCore::MediaStreamPrivate::trackEnabledChanged):
3086         (WebCore::MediaStreamPrivate::trackProducingDataChanged):
3087         (WebCore::MediaStreamPrivate::scheduleDeferredTask): New, call a function asynchronously on
3088           the main thread.
3089         * platform/mediastream/MediaStreamPrivate.h:
3090
3091         * platform/mediastream/MediaStreamTrackPrivate.cpp:
3092         (WebCore::MediaStreamTrackPrivate::endTrack):
3093         (WebCore::MediaStreamTrackPrivate::sourceProducingDataChanged): New, inform observers.
3094         (WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Ditto.
3095         * platform/mediastream/MediaStreamTrackPrivate.h:
3096
3097         * platform/mediastream/RealtimeMediaSource.cpp:
3098         (WebCore::RealtimeMediaSource::isProducingDataDidChange): New, inform observers.
3099         (WebCore::RealtimeMediaSource::setEnabled): Ditto.
3100         (WebCore::RealtimeMediaSource::stop): Call reset();
3101         * platform/mediastream/RealtimeMediaSource.h: Don't declare "capabilities" as const so 
3102           capabilities can be created and initialized lazily.
3103
3104         * platform/mediastream/mac/AVAudioCaptureSource.h:
3105         * platform/mediastream/mac/AVAudioCaptureSource.mm:
3106         (WebCore::AVAudioCaptureSource::initializeCapabilities): New.
3107         (WebCore::AVAudioCaptureSource::addObserver): Hold the lock while calling observers so the list
3108           can't be mutated.
3109         (WebCore::AVAudioCaptureSource::setupCaptureSession): Log and fail if the session won't add the
3110           input or output.
3111         (WebCore::AVAudioCaptureSource::shutdownCaptureSession): Cleanup.
3112         (WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): Don't block
3113           if it isn't possible to acquire the lock. Hold the lock while calling observers.
3114         (WebCore::AVAudioCaptureSource::capabilities): Deleted.
3115
3116         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3117         (WebCore::refreshCaptureDeviceList): Don't include devices that can't be used.
3118         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):  Use AVCaptureDeviceManager::sourceWithUID
3119           so constraints are considered.
3120         (WebCore::AVCaptureDeviceManager::sourceWithUID): Don't consider disabled devices. Always
3121           create a new capture device so each track starts out with a unique source.
3122         * platform/mediastream/mac/AVMediaCaptureSource.h:
3123
3124         * platform/mediastream/mac/AVMediaCaptureSource.mm:
3125         (WebCore::globaAudioCaptureSerialQueue):
3126         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource):
3127         (WebCore::AVMediaCaptureSource::~AVMediaCaptureSource): Remove KVO observers.
3128         (WebCore::AVMediaCaptureSource::startProducingData): m_isRunning is changed in captureSessionIsRunningDidChange.
3129         (WebCore::AVMediaCaptureSource::stopProducingData): Ditto.
3130         (WebCore::AVMediaCaptureSource::capabilities): New.
3131         (WebCore::AVMediaCaptureSource::setupSession): Add KVObservers for the properties we care about.
3132         (WebCore::AVMediaCaptureSource::reset): New, cleanup.
3133         (WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Dispatch to the main thread 
3134           to set m_isRunning, call isProducingDataDidChange so observers can find out.
3135         (WebCore::sessionKVOProperties):
3136         (-[WebCoreAVMediaCaptureSourceObserver disconnect]):
3137         (-[WebCoreAVMediaCaptureSourceObserver captureOutput:didOutputSampleBuffer:fromConnection:]):
3138         (-[WebCoreAVMediaCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]): Respond
3139           to running changes.
3140         (WebCore::AVMediaCaptureSource::captureSessionStoppedRunning): Deleted.
3141         (-[WebCoreAVMediaCaptureSourceObserver captureSessionStoppedRunning:]): Deleted.
3142
3143         * platform/mediastream/mac/AVVideoCaptureSource.h:
3144         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3145         (WebCore::AVVideoCaptureSource::initializeCapabilities): Partial implementation.
3146         (WebCore::AVVideoCaptureSource::setupCaptureSession):  Log and fail if the session won't add the
3147           input or output.
3148         (WebCore::AVVideoCaptureSource::shutdownCaptureSession): Cleanup.
3149         (WebCore::AVVideoCaptureSource::updateFramerate): Renamed from calculateFramerate.
3150         (WebCore::AVVideoCaptureSource::currentFrameImage): Return an Image.
3151         (WebCore::AVVideoCaptureSource::platformLayer): New.
3152         (WebCore::AVVideoCaptureSource::capabilities): Deleted.
3153         (WebCore::AVVideoCaptureSource::calculateFramerate): Deleted.
3154
3155         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
3156         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
3157         (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC): AudioConverterRef is
3158           not a CF/ObjC object so we can't use a RetainPtr<> for it.
3159         (WebCore::WebAudioSourceProviderAVFObjC::provideInput): Ditto.
3160         (WebCore::WebAudioSourceProviderAVFObjC::prepare): Ditto.
3161         (WebCore::WebAudioSourceProviderAVFObjC::unprepare): Ditto.
3162         (WebCore::WebAudioSourceProviderAVFObjC::process): Fix typo in logging.
3163
3164         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3165         (WebCore::MockSource::capabilities): Update for capabilities change.
3166
3167         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Update for capabilities change.
3168
3169 2015-10-28  Chris Dumez  <cdumez@apple.com>
3170
3171         Regression(r191673): [WIN][EFL][GTK] layout tests using data URLs time out
3172         https://bugs.webkit.org/show_bug.cgi?id=150661
3173
3174         Reviewed by Gyuyoung Kim.
3175
3176         Do a partial revert of r191673. For some reason, using a Timer in
3177         DataURLDecoder does not work (it does not fire). Since non COCOA ports
3178         don't support RunLoopTimer, this patch reintroduces the use of
3179         callOnMainThread() on non-COCOA ports.
3180
3181         * platform/network/DataURLDecoder.cpp:
3182         (WebCore::DataURLDecoder::decode):
3183         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer): Deleted.
3184
3185 2015-10-28  Joseph Pecoraro  <pecoraro@apple.com>
3186
3187         Web Inspector: Rename InspectorResourceAgent to InspectorNetworkAgent
3188         https://bugs.webkit.org/show_bug.cgi?id=150654
3189
3190         Reviewed by Geoffrey Garen.
3191
3192         * CMakeLists.txt:
3193         * WebCore.vcxproj/WebCore.vcxproj:
3194         * WebCore.vcxproj/WebCore.vcxproj.filters:
3195         * WebCore.xcodeproj/project.pbxproj:
3196         * inspector/InspectorAllInOne.cpp:
3197         * inspector/InspectorController.cpp:
3198         (WebCore::InspectorController::InspectorController):
3199         * inspector/InspectorController.h:
3200         * inspector/InspectorDOMDebuggerAgent.h:
3201         * inspector/InspectorFrontendClient.h:
3202         * inspector/InspectorInstrumentation.cpp:
3203         (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
3204         (WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
3205         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
3206         (WebCore::InspectorInstrumentation::willSendRequestImpl):
3207         (WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
3208         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
3209         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
3210         (WebCore::InspectorInstrumentation::didReceiveDataImpl):
3211         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
3212         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
3213         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
3214         (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
3215         (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
3216         (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
3217         (WebCore::InspectorInstrumentation::scriptImportedImpl):
3218         (WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
3219         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3220         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
3221         (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
3222         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
3223         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
3224         (WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
3225         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl):
3226         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl):
3227         (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
3228         * inspector/InspectorLayerTreeAgent.h:
3229         * inspector/InspectorNetworkAgent.cpp: Renamed from Source/WebCore/inspector/InspectorResourceAgent.cpp.
3230         (WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
3231         (WebCore::InspectorNetworkAgent::didCreateFrontendAndBackend):
3232         (WebCore::InspectorNetworkAgent::willDestroyFrontendAndBackend):
3233         (WebCore::buildObjectForHeaders):
3234         (WebCore::buildObjectForTiming):
3235         (WebCore::buildObjectForResourceRequest):
3236         (WebCore::buildObjectForResourceResponse):
3237         (WebCore::buildObjectForCachedResource):
3238         (WebCore::InspectorNetworkAgent::~InspectorNetworkAgent):
3239         (WebCore::InspectorNetworkAgent::timestamp):
3240         (WebCore::InspectorNetworkAgent::willSendRequest):
3241         (WebCore::InspectorNetworkAgent::markResourceAsCached):
3242         (WebCore::InspectorNetworkAgent::didReceiveResponse):
3243         (WebCore::isErrorStatusCode):
3244         (WebCore::InspectorNetworkAgent::didReceiveData):
3245         (WebCore::InspectorNetworkAgent::didFinishLoading):
3246         (WebCore::InspectorNetworkAgent::didFailLoading):
3247         (WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
3248         (WebCore::InspectorNetworkAgent::setInitialScriptContent):
3249         (WebCore::InspectorNetworkAgent::didReceiveScriptResponse):
3250         (WebCore::InspectorNetworkAgent::didFinishXHRLoading):
3251         (WebCore::InspectorNetworkAgent::didReceiveXHRResponse):
3252         (WebCore::InspectorNetworkAgent::willLoadXHRSynchronously):
3253         (WebCore::InspectorNetworkAgent::didLoadXHRSynchronously):
3254         (WebCore::InspectorNetworkAgent::willDestroyCachedResource):
3255         (WebCore::InspectorNetworkAgent::willRecalculateStyle):
3256         (WebCore::InspectorNetworkAgent::didRecalculateStyle):
3257         (WebCore::InspectorNetworkAgent::didScheduleStyleRecalculation):
3258         (WebCore::InspectorNetworkAgent::buildInitiatorObject):
3259         (WebCore::InspectorNetworkAgent::didCreateWebSocket):
3260         (WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest):
3261         (WebCore::InspectorNetworkAgent::didReceiveWebSocketHandshakeResponse):
3262         (WebCore::InspectorNetworkAgent::didCloseWebSocket):
3263         (WebCore::InspectorNetworkAgent::didReceiveWebSocketFrame):
3264         (WebCore::InspectorNetworkAgent::didSendWebSocketFrame):
3265         (WebCore::InspectorNetworkAgent::didReceiveWebSocketFrameError):
3266         (WebCore::InspectorNetworkAgent::enable):
3267         (WebCore::InspectorNetworkAgent::disable):
3268         (WebCore::InspectorNetworkAgent::setExtraHTTPHeaders):
3269         (WebCore::InspectorNetworkAgent::getResponseBody):
3270         (WebCore::InspectorNetworkAgent::setCacheDisabled):
3271         (WebCore::InspectorNetworkAgent::loadResource):
3272         (WebCore::InspectorNetworkAgent::mainFrameNavigated):
3273         * inspector/InspectorNetworkAgent.h: Renamed from Source/WebCore/inspector/InspectorResourceAgent.h.
3274         * inspector/InspectorPageAgent.h:
3275         * inspector/InstrumentingAgents.cpp:
3276         (WebCore::InstrumentingAgents::reset):
3277         * inspector/InstrumentingAgents.h:
3278         (WebCore::InstrumentingAgents::inspectorNetworkAgent):
3279         (WebCore::InstrumentingAgents::setInspectorNetworkAgent):
3280         (WebCore::InstrumentingAgents::inspectorResourceAgent): Deleted.
3281         (WebCore::InstrumentingAgents::setInspectorResourceAgent): Deleted.
3282         * inspector/NetworkResourcesData.h:
3283
3284 2015-10-28  Joseph Pecoraro  <pecoraro@apple.com>
3285
3286         Web Inspector: Remove unused / duplicate WebSocket timeline records
3287         https://bugs.webkit.org/show_bug.cgi?id=150647
3288
3289         Reviewed by Timothy Hatcher.
3290
3291         * Modules/websockets/WebSocketChannel.cpp:
3292         (WebCore::WebSocketChannel::connect):
3293         Only send what is needed by inspector now.
3294
3295         * inspector/InspectorInstrumentation.h:
3296         (WebCore::InspectorInstrumentation::didCreateWebSocket):
3297         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
3298         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
3299         (WebCore::InspectorInstrumentation::didCloseWebSocket):
3300         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
3301         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
3302         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
3303         These can all fast return if there is no frontend because the inspector
3304         doesn't record any information about web sockets until a frontend is connected.
3305         The inspector in this case just sends events to the frontend when things happen.
3306
3307         * inspector/InspectorInstrumentation.cpp:
3308         (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
3309         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
3310         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
3311         (WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
3312         Stop messaging the Timeline agent, we already message the Resource agent.
3313
3314         * inspector/InspectorTimelineAgent.cpp:
3315         (WebCore::InspectorTimelineAgent::didCreateWebSocket): Deleted.
3316         (WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest): Deleted.
3317         (WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse): Deleted.
3318         (WebCore::InspectorTimelineAgent::didDestroyWebSocket): Deleted.
3319         * inspector/InspectorTimelineAgent.h:
3320         * inspector/TimelineRecordFactory.h:
3321         (WebCore::TimelineRecordFactory::createWebSocketCreateData): Deleted.
3322         (WebCore::TimelineRecordFactory::createGenericWebSocketData): Deleted.
3323         This is all duplicate information from the network domain.
3324
3325 2015-10-28  Andy Estes  <aestes@apple.com>
3326
3327         [Content Filtering] Crash when allowing a 0-byte resource to load
3328         https://bugs.webkit.org/show_bug.cgi?id=150644
3329         <rdar://problem/23288538>
3330
3331         Reviewed by Darin Adler.
3332
3333         Test: contentfiltering/allow-empty-document.html
3334
3335         * loader/ContentFilter.cpp:
3336         (WebCore::ContentFilter::deliverResourceData): resourceBuffer will be null if the resource contained no data.
3337
3338 2015-10-28  Chris Dumez  <cdumez@apple.com>
3339
3340         Assertion failure in WebCore::FrameLoader::stopLoading() running fast/events tests
3341         https://bugs.webkit.org/show_bug.cgi?id=150624
3342
3343         Reviewed by Darin Adler.
3344
3345         After r191652, a form's target attribute can no longer refer to a frame's id,
3346         only its name. This is because the frame's id no longer sets the Window name
3347         when the frame's name attribute is missing. This caused a change in behavior
3348         for the fast/events/form-iframe-target-before-load-crash*.html tests, which
3349         exposed a pre-existing bug.
3350
3351         This patch updates the fast/events/form-iframe-target-before-load-crash*.html
3352         tests so they keep testing the same thing as before r191652. It also adds a
3353         variant to keep covering the newly exposed bug.
3354
3355         The issue was that the frame was no longer navigated when submitting the form
3356         (due to the form's target not matching the frame name). Therefore, when
3357         removing the iframe from the document, its navigation has not started yet and
3358         DocumentLoadTiming::navigationStart() is not initialized yet when
3359         FrameLoader::stopLoading() is called and we hit an assertion. This patch
3360         replaces the assertion with an if check as we now know it can happen and we
3361         have test coverage for it.
3362
3363         Test: fast/events/form-iframe-target-before-load-crash.html
3364
3365         * loader/FrameLoader.cpp:
3366         (WebCore::FrameLoader::stopLoading):
3367
3368 2015-10-28  Brian Burg  <bburg@apple.com>
3369
3370         Builtins generator should emit ENABLE(FEATURE) guards based on @conditional annotation
3371         https://bugs.webkit.org/show_bug.cgi?id=150536
3372
3373         Reviewed by Yusuke Suzuki.
3374
3375         Replace @optional=FEATURE with @conditional=ENABLE(FEATURE) in builtins files.
3376
3377         * Modules/streams/ByteLengthQueuingStrategy.js:
3378         * Modules/streams/CountQueuingStrategy.js:
3379         * Modules/streams/ReadableStream.js:
3380         * Modules/streams/ReadableStreamController.js:
3381         * Modules/streams/ReadableStreamInternals.js:
3382         * Modules/streams/ReadableStreamReader.js:
3383         * Modules/streams/StreamInternals.js:
3384         * Modules/streams/WritableStream.js:
3385         * Modules/streams/WritableStreamInternals.js:
3386
3387 2015-10-28  Zalan Bujtas  <zalan@apple.com>
3388
3389         Should never be reached failure in WebCore::backgroundRectForBox
3390         https://bugs.webkit.org/show_bug.cgi?id=150232
3391
3392         Reviewed by Simon Fraser.
3393
3394         We should never end up with simple container for composited layer when background-clip: text is present.
3395         (not even when the box has no decoration to paint)
3396
3397         Test: fast/backgrounds/background-clip-text-with-simple-container.html
3398
3399         * rendering/RenderLayerBacking.cpp:
3400         (WebCore::RenderLayerBacking::paintsBoxDecorations):
3401         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3402         (WebCore::backgroundRectForBox):
3403
3404 2015-10-28  Chris Dumez  <cdumez@apple.com>
3405
3406         Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
3407         https://bugs.webkit.org/show_bug.cgi?id=150609
3408         <rdar://problem/22702894>
3409
3410         Reviewed by Antti Koivisto.
3411
3412         Use RunLoopTimer in DataURLDecoder to avoid issues related to RunLoops.
3413         In particular, the callOnMainThread() call could fail to dispatch the
3414         decoding result to the main thread if the client-side would spin its own
3415         RunLoop.
3416
3417         This is similar to the approach used in DocumentLoader for
3418         DocumentLoaderTimer.
3419
3420         No new tests, verified through manual testing.
3421
3422         * WebCore.xcodeproj/project.pbxproj:
3423         * loader/ResourceLoader.cpp:
3424         (WebCore::ResourceLoader::loadDataURL):
3425         * page/Page.cpp:
3426         (WebCore::Page::Page):
3427         * page/Page.h:
3428         * page/mac/PageMac.mm: Renamed from Source/WebCore/page/mac/PageMac.cpp.
3429         (WebCore::Page::platformInitialize):
3430         (WebCore::Page::addSchedulePair):
3431         (WebCore::Page::removeSchedulePair):
3432         * platform/network/DataURLDecoder.cpp:
3433         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
3434         (WebCore::DataURLDecoder::DecodingResultDispatcher::DecodingResultDispatcher):
3435         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
3436         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
3437         (WebCore::DataURLDecoder::createDecodeTask):
3438         (WebCore::DataURLDecoder::decode):
3439         * platform/network/DataURLDecoder.h:
3440
3441 2015-10-28  Brady Eidson  <beidson@apple.com>
3442
3443         Modern IDB: Implement most readonly attributes of IDBObjectStore.
3444         https://bugs.webkit.org/show_bug.cgi?id=150617
3445
3446         Reviewed by Alex Christensen.
3447
3448         Test: storage/indexeddb/modern/objectstore-attributes.html
3449
3450         * Modules/indexeddb/IDBObjectStore.h:
3451
3452         * Modules/indexeddb/client/IDBAnyImpl.cpp:
3453         (WebCore::IDBClient::IDBAny::IDBAny):
3454         * Modules/indexeddb/client/IDBAnyImpl.h:
3455         (WebCore::IDBClient::IDBAny::create):
3456
3457         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3458         (WebCore::IDBClient::IDBObjectStore::name):
3459         (WebCore::IDBClient::IDBObjectStore::keyPathAny):
3460         (WebCore::IDBClient::IDBObjectStore::keyPath):
3461         (WebCore::IDBClient::IDBObjectStore::transaction):
3462         (WebCore::IDBClient::IDBObjectStore::id): Deleted.
3463         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
3464
3465         * Modules/indexeddb/legacy/LegacyObjectStore.h:
3466         (WebCore::LegacyObjectStore::transaction):
3467
3468 2015-10-28  Hunseop Jeong  <hs85.jeong@samsung.com>
3469
3470         Replace 0 and NULL with nullptr in WebCore/editing.
3471         https://bugs.webkit.org/show_bug.cgi?id=150555
3472
3473         Reviewed by Darin Adler.
3474
3475         No new tests because there is no behavior change.
3476
3477         * editing/ApplyStyleCommand.cpp:
3478         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
3479         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
3480         (WebCore::ApplyStyleCommand::applyInlineStyle):
3481         * editing/ApplyStyleCommand.h:
3482         (WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement):
3483         * editing/CompositeEditCommand.cpp:
3484         (WebCore::CompositeEditCommand::applyCommandToComposite):
3485         (WebCore::CompositeEditCommand::deleteInsignificantText):
3486         * editing/DeleteSelectionCommand.cpp:
3487         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3488         (WebCore::DeleteSelectionCommand::initializeStartEnd):
3489         * editing/EditCommand.cpp:
3490         (WebCore::EditCommand::EditCommand):
3491         * editing/EditCommand.h:
3492         * editing/EditingStyle.cpp:
3493         (WebCore::HTMLElementEquivalent::HTMLElementEquivalent):
3494         * editing/EditingStyle.h:
3495         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
3496         * editing/Editor.h:
3497         * editing/EditorCommand.cpp:
3498         (WebCore::Editor::commandIsSupportedFromMenuOrKeyBinding):
3499         (WebCore::Editor::Command::Command):
3500         * editing/FrameSelection.cpp:
3501         (WebCore::DragCaretController::setCaretPosition):
3502         (WebCore::FrameSelection::directionOfSelection):
3503         * editing/MarkupAccumulator.cpp:
3504         (WebCore::MarkupAccumulator::entityMaskForText):
3505         * editing/MarkupAccumulator.h:
3506         * editing/RenderedPosition.cpp:
3507         (WebCore::rendererFromPosition):
3508         (WebCore::RenderedPosition::RenderedPosition):
3509         * editing/RenderedPosition.h:
3510         (WebCore::RenderedPosition::operator==):
3511         (WebCore::RenderedPosition::uncachedInlineBox):
3512         (WebCore::RenderedPosition::RenderedPosition):
3513         * editing/ReplaceSelectionCommand.cpp:
3514         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
3515         * editing/SetNodeAttributeCommand.cpp:
3516         (WebCore::SetNodeAttributeCommand::doUnapply):
3517         * editing/SmartReplaceCF.cpp:
3518         (WebCore::getSmartSet):
3519         * editing/SpellChecker.cpp:
3520         (WebCore::SpellCheckRequest::SpellCheckRequest):
3521         (WebCore::SpellCheckRequest::didSucceed):
3522         (WebCore::SpellCheckRequest::didCancel):
3523         (WebCore::SpellCheckRequest::setCheckerAndSequence):
3524         (WebCore::SpellCheckRequest::requesterDestroyed):
3525         (WebCore::SpellChecker::SpellChecker):
3526         * editing/SpellChecker.h:
3527         * editing/VisiblePosition.cpp:
3528         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
3529         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
3530         (WebCore::VisiblePosition::localCaretRect):
3531         (WebCore::enclosingBlockFlowElement):
3532         * editing/VisibleUnits.cpp:
3533         (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
3534         (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextOrLineBreakBox):
3535         (WebCore::visualWordPosition):
3536         (WebCore::previousLinePosition):
3537         (WebCore::nextLinePosition):
3538         * editing/htmlediting.cpp:
3539         (WebCore::highestEnclosingNodeOfType):
3540         (WebCore::highestNodeToRemoveInPruning):
3541         * editing/htmlediting.h:
3542         (WebCore::firstPositionInOrBeforeNode):
3543         * editing/ios/EditorIOS.mm:
3544         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3545         (WebCore::Editor::fontForSelection):
3546         * editing/mac/AlternativeTextUIController.mm:
3547         (WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext):
3548         * editing/mac/EditorMac.mm:
3549         (WebCore::Editor::fontForSelection):
3550         * editing/markup.cpp:
3551         * editing/markup.h:
3552
3553 2015-10-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3554
3555         [Streams API] Add write method to writable stream
3556         https://bugs.webkit.org/show_bug.cgi?id=150589
3557
3558         Reviewed by Darin Adler.
3559
3560         Write method implemented on writable streams according to the spec.
3561
3562         Current test set suffices. Expectations are updated accordingly.
3563
3564         * Modules/streams/WritableStream.js:
3565         (write):
3566
3567 2015-10-27  Hunseop Jeong  <hs85.jeong@samsung.com>
3568
3569         [Cairo] Incorrect dashed and dotted border painting after r177686.
3570         https://bugs.webkit.org/show_bug.cgi?id=141967
3571
3572         Reviewed by Gyuyoung Kim.
3573
3574         Fix the incorrect dashed/dotted border painting in cairo.
3575
3576         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3577         (WebCore::GraphicsContext::drawLine):
3578         (WebCore::calculateStrokePatternOffset): Deleted.
3579         (WebCore::drawLineOnCairoContext): Deleted.
3580
3581 2015-10-27  Chris Dumez  <cdumez@apple.com>
3582
3583         id of iframe incorrectly sets window name
3584         https://bugs.webkit.org/show_bug.cgi?id=150565
3585
3586         Reviewed by Darin Adler.
3587
3588         As per the specification, the iframe's contentWindow name should be an
3589         empty string if the frame's name attribute is unset:
3590         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-name
3591
3592         Instead, WebKit was using the iframe's id as window name if the name
3593         was unset.
3594
3595         Firefox, IE and Chrome behave according to the specification.
3596
3597         This is a merge of the following Blink commit:
3598         https://src.chromium.org/viewvc/blink?revision=169803&view=revision
3599
3600         Test: fast/frames/iframe-no-name.html
3601
3602         * html/HTMLFrameElementBase.cpp:
3603         (WebCore::HTMLFrameElementBase::parseAttribute):
3604         (WebCore::HTMLFrameElementBase::insertedInto): Deleted.
3605
3606 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
3607
3608         Web Inspector: Remove Timeline MarkDOMContent and MarkLoad, data is already available
3609         https://bugs.webkit.org/show_bug.cgi?id=150615
3610
3611         Reviewed by Timothy Hatcher.
3612
3613         The timestamp only event data is already available from `Page.domContentEventFired`
3614         and `Page.loadEventFired` events. We can drop the Timeline specific events in
3615         favor of these which have existed for a very long time (before iOS 7).
3616
3617         * inspector/InspectorInstrumentation.cpp:
3618         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
3619         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): Deleted.
3620         * inspector/InspectorTimelineAgent.cpp:
3621         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent): Deleted.
3622         (WebCore::InspectorTimelineAgent::didMarkLoadEvent): Deleted.
3623         (WebCore::toProtocol): Deleted.
3624         * inspector/InspectorTimelineAgent.h:
3625         * inspector/TimelineRecordFactory.cpp:
3626         (WebCore::TimelineRecordFactory::createMarkData): Deleted.
3627         * inspector/TimelineRecordFactory.h:
3628
3629 2015-10-27  Jiewen Tan  <jiewen_tan@apple.com>
3630
3631         Null dereference loading Blink layout test editing/execCommand/format-block-uneditable-crash.html
3632         https://bugs.webkit.org/show_bug.cgi?id=150207
3633         <rdar://problem/23137066>
3634
3635         Reviewed by Enrica Casucci.
3636
3637         This is a merge of Blink r200238:
3638         https://codereview.chromium.org/1280263002
3639
3640         Test: editing/execCommand/format-block-uneditable-crash.html
3641
3642         * editing/ApplyBlockElementCommand.cpp:
3643         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
3644         splitTextNode() will return early if the given text node is not editable. Hence, check
3645         its editablity before calling the method.
3646
3647 2015-10-27  Brady Eidson  <beidson@apple.com>
3648
3649         Modern IDB: IDBTransaction.objectStore() support.
3650         https://bugs.webkit.org/show_bug.cgi?id=150607
3651
3652         Reviewed by Alex Christensen.
3653
3654         Tests: storage/indexeddb/modern/aborted-put.html
3655                storage/indexeddb/modern/idbtransaction-objectstore-failures.html
3656
3657         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3658         (WebCore::IDBClient::IDBObjectStore::put):
3659         
3660         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3661         (WebCore::IDBClient::IDBTransaction::objectStore):
3662         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
3663         * Modules/indexeddb/client/IDBTransactionImpl.h:
3664         
3665         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3666         (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingObjectStore):
3667         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
3668         
3669         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3670         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
3671         
3672         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3673         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
3674         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
3675         
3676         * Modules/indexeddb/shared/IDBTransactionInfo.h:
3677         (WebCore::IDBTransactionInfo::objectStores):
3678
3679 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
3680
3681         Web Inspector: Remove unused / duplicated XHR timeline instrumentation
3682         https://bugs.webkit.org/show_bug.cgi?id=150605
3683
3684         Reviewed by Timothy Hatcher.
3685
3686         These records are just duplicates of "EventDispatch" records for XHR
3687         load and readystatechange events. Due to the nesting, the XHR records
3688         were themselves never getting looked at, and their data (URL / readyState)
3689         not shown in the frontend.
3690
3691         * inspector/InspectorInstrumentation.cpp:
3692         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl): Deleted.
3693         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEventImpl): Deleted.
3694         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl): Deleted.
3695         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEventImpl): Deleted.
3696         * inspector/InspectorInstrumentation.h:
3697         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent): Deleted.
3698         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent): Deleted.
3699         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent): Deleted.
3700         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent): Deleted.
3701         * inspector/InspectorTimelineAgent.cpp:
3702         (WebCore::InspectorTimelineAgent::willDispatchXHRReadyStateChangeEvent): Deleted.
3703         (WebCore::InspectorTimelineAgent::didDispatchXHRReadyStateChangeEvent): Deleted.
3704         (WebCore::InspectorTimelineAgent::willDispatchXHRLoadEvent): Deleted.
3705         (WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
3706         (WebCore::toProtocol): Deleted.
3707         * inspector/InspectorTimelineAgent.h:
3708         * inspector/TimelineRecordFactory.cpp:
3709         (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData): Deleted.
3710         (WebCore::TimelineRecordFactory::createXHRLoadData): Deleted.
3711         * inspector/TimelineRecordFactory.h:
3712         * xml/XMLHttpRequest.cpp:
3713         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Deleted.
3714
3715 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
3716
3717         Web Inspector: Do not send RenderingFrame TimelineRecords that have no children
3718         https://bugs.webkit.org/show_bug.cgi?id=150600
3719
3720         Reviewed by Timothy Hatcher.
3721
3722         * inspector/InspectorTimelineAgent.cpp:
3723         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
3724         The frontend already filters out empty RenderingFrame records
3725         (in TimelineManager.prototype._processRecord). Filter them out
3726         on the backend to reduce protocol traffic / noise.
3727
3728 2015-10-27  Alex Christensen  <achristensen@webkit.org>
3729
3730         Cancel navigation policy checks like we do content policy checks.
3731         https://bugs.webkit.org/show_bug.cgi?id=150582
3732         rdar://problem/22077579
3733
3734         Reviewed by Brent Fulgham.
3735
3736         This was verified manually and I'll write a layout test for it soon.
3737
3738         * loader/DocumentLoader.cpp:
3739         (WebCore::DocumentLoader::DocumentLoader):
3740         (WebCore::DocumentLoader::~DocumentLoader):
3741         (WebCore::DocumentLoader::willSendRequest):
3742         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
3743         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):
3744         * loader/DocumentLoader.h:
3745         Add a bool to keep track of whether we are waiting for navigation policy checks, like we do with content policy checks.
3746         Without this check, sometimes callbacks are made to DocumentLoaders that do not exist any more because they do not get
3747         cancelled by cancelPolicyCheckIfNeeded when detaching from the frame.
3748
3749 2015-10-27  Brady Eidson  <beidson@apple.com>
3750
3751         Modern IDB: Support IDBObjectStore.put/get support.
3752         https://bugs.webkit.org/show_bug.cgi?id=150468
3753
3754         Reviewed by Alex Christensen.
3755
3756         Tests: storage/indexeddb/modern/basic-put.html
3757                storage/indexeddb/modern/keypath-basic.html
3758
3759         * CMakeLists.txt:
3760         * WebCore.xcodeproj/project.pbxproj:
3761
3762         * Modules/indexeddb/IDBKeyData.cpp:
3763         (WebCore::IDBKeyData::deletedValue):
3764         (WebCore::IDBKeyData::operator<):
3765         (WebCore::IDBKeyData::operator==):
3766         * Modules/indexeddb/IDBKeyData.h:
3767         (WebCore::IDBKeyData::isValid):
3768         (WebCore::IDBKeyData::operator!=):
3769         (WebCore::IDBKeyData::hash):
3770         (WebCore::IDBKeyData::isDeletedValue):
3771         (WebCore::IDBKeyDataHash::hash):
3772         (WebCore::IDBKeyDataHash::equal):
3773         (WebCore::IDBKeyDataHashTraits::constructDeletedValue):
3774         (WebCore::IDBKeyDataHashTraits::isDeletedValue):
3775         (WebCore::IDBKeyDataHashTraits::emptyValue):
3776         (WebCore::IDBKeyDataHashTraits::isEmptyValue):
3777
3778         * Modules/indexeddb/IndexedDB.h:
3779
3780         * Modules/indexeddb/client/IDBAnyImpl.cpp:
3781         (WebCore::IDBClient::IDBAny::IDBAny):
3782         (WebCore::IDBClient::IDBAny::modernIDBObjectStore):
3783         * Modules/indexeddb/client/IDBAnyImpl.h:
3784         (WebCore::IDBClient::IDBAny::create):
3785
3786         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3787         (WebCore::IDBClient::IDBConnectionToServer::createObjectStore):
3788         (WebCore::IDBClient::IDBConnectionToServer::didCreateObjectStore):
3789         (WebCore::IDBClient::IDBConnectionToServer::putOrAdd):
3790         (WebCore::IDBClient::IDBConnectionToServer::didPutOrAdd):
3791         (WebCore::IDBClient::IDBConnectionToServer::getRecord):
3792         (WebCore::IDBClient::IDBConnectionToServer::didGetRecord):
3793         (WebCore::IDBClient::IDBConnectionToServer::saveOperation):
3794         (WebCore::IDBClient::IDBConnectionToServer::completeOperation):
3795         * Modules/indexeddb/client/IDBConnectionToServer.h:
3796         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3797
3798         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3799         (WebCore::IDBClient::IDBObjectStore::autoIncrement):
3800         (WebCore::IDBClient::IDBObjectStore::put):
3801         (WebCore::IDBClient::IDBObjectStore::get):
3802         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
3803         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
3804         (WebCore::IDBClient::IDBObjectStore::info):
3805
3806         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3807         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest): Deleted.
3808
3809         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3810         (WebCore::IDBClient::IDBRequest::create):
3811         (WebCore::IDBClient::IDBRequest::IDBRequest):
3812         (WebCore::IDBClient::IDBRequest::sourceObjectStoreIdentifier):
3813         (WebCore::IDBClient::IDBRequest::hasPendingActivity):
3814         (WebCore::IDBClient::IDBRequest::dispatchEvent):
3815         (WebCore::IDBClient::IDBRequest::setResult):
3816         (WebCore::IDBClient::IDBRequest::setResultToStructuredClone):
3817         (WebCore::IDBClient::IDBRequest::requestCompleted):
3818         (WebCore::IDBClient::IDBRequest::onError):
3819         (WebCore::IDBClient::IDBRequest::onSuccess):
3820         * Modules/indexeddb/client/IDBRequestImpl.h:
3821
3822         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3823         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
3824         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
3825         (WebCore::IDBClient::IDBTransaction::isActive):
3826         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
3827         (WebCore::IDBClient::IDBTransaction::commit):
3828         (WebCore::IDBClient::IDBTransaction::didAbort):
3829         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
3830         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
3831         (WebCore::IDBClient::IDBTransaction::getRecordOnServer):
3832         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
3833         (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
3834         (WebCore::IDBClient::IDBTransaction::putOrAddOnServer):
3835         (WebCore::IDBClient::IDBTransaction::didPutOrAddOnServer):
3836         (WebCore::IDBClient::IDBTransaction::activate):
3837         (WebCore::IDBClient::IDBTransaction::deactivate):
3838         * Modules/indexeddb/client/IDBTransactionImpl.h:
3839         (WebCore::IDBClient::IDBTransaction::isReadOnly):
3840         (WebCore::IDBClient::TransactionActivator::TransactionActivator):
3841         (WebCore::IDBClient::TransactionActivator::~TransactionActivator):
3842
3843         * Modules/indexeddb/client/TransactionOperation.cpp: 
3844         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
3845         * Modules/indexeddb/client/TransactionOperation.h:
3846         (WebCore::IDBClient::TransactionOperation::objectStoreIdentifier):
3847         (WebCore::IDBClient::TransactionOperation::transaction):
3848         (WebCore::IDBClient::createTransactionOperation):
3849
3850         * Modules/indexeddb/server/IDBBackingStore.h:
3851         
3852         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3853         (WebCore::IDBServer::IDBConnectionToClient::didPutOrAdd):
3854         (WebCore::IDBServer::IDBConnectionToClient::didGetRecord):
3855         * Modules/indexeddb/server/IDBConnectionToClient.h:
3856         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3857
3858         * Modules/indexeddb/server/IDBServer.cpp:
3859         (WebCore::IDBServer::IDBServer::putOrAdd):
3860         (WebCore::IDBServer::IDBServer::getRecord):
3861         * Modules/indexeddb/server/IDBServer.h:
3862
3863         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3864         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
3865         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3866         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
3867
3868         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3869         (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
3870         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord):
3871         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord):
3872         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
3873         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3874
3875         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3876         (WebCore::IDBServer::MemoryObjectStore::containsRecord):
3877         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
3878         (WebCore::IDBServer::MemoryObjectStore::putRecord):
3879         (WebCore::IDBServer::MemoryObjectStore::valueForKey):
3880         * Modules/indexeddb/server/MemoryObjectStore.h:
3881
3882         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3883         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
3884         (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
3885         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
3886         (WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
3887         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
3888         (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
3889         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord):
3890         (WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback):
3891         (WebCore::IDBServer::UniqueIDBDatabase::performValueDataCallback):
3892         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3893
3894         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3895         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isReadOnly):
3896         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
3897         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
3898         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3899
3900         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3901         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
3902         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
3903
3904         * Modules/indexeddb/shared/IDBError.cpp:
3905         (WebCore::idbErrorName):
3906         (WebCore::idbErrorDescription):
3907         * Modules/indexeddb/shared/IDBError.h:
3908
3909         * Modules/indexeddb/shared/IDBRequestData.cpp:
3910         (WebCore::IDBRequestData::IDBRequestData):
3911         (WebCore::IDBRequestData::serverConnectionIdentifier):
3912         (WebCore::IDBRequestData::objectStoreIdentifier):
3913         * Modules/indexeddb/shared/IDBRequestData.h:
3914
3915         * Modules/indexeddb/shared/IDBResultData.cpp:
3916         (WebCore::IDBResultData::IDBResultData):
3917         (WebCore::IDBResultData::putOrAddSuccess):
3918         (WebCore::IDBResultData::getRecordSuccess):
3919         * Modules/indexeddb/shared/IDBResultData.h:
3920         (WebCore::IDBResultData::resultKey):
3921         (WebCore::IDBResultData::resultData):
3922
3923         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3924         (WebCore::InProcessIDBServer::didPutOrAdd):
3925         (WebCore::InProcessIDBServer::didGetRecord):
3926         (WebCore::InProcessIDBServer::putOrAdd):
3927         (WebCore::InProcessIDBServer::getRecord):
3928         * Modules/indexeddb/shared/InProcessIDBServer.h:
3929
3930         * bindings/js/IDBBindingUtilities.cpp:
3931         (WebCore::idbKeyToJSValue):
3932         (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
3933         (WebCore::canInjectIDBKeyIntoScriptValue):
3934         (WebCore::deserializeIDBValueData):
3935         (WebCore::scriptValueToIDBKey):
3936         (WebCore::idbKeyDataToScriptValue):
3937         * bindings/js/IDBBindingUtilities.h:
3938
3939         * platform/CrossThreadCopier.cpp:
3940         (WebCore::ThreadSafeDataBuffer>::copy):
3941         * platform/CrossThreadCopier.h:
3942
3943         * platform/ThreadSafeDataBuffer.h: Added.
3944         (WebCore::ThreadSafeDataBufferImpl::ThreadSafeDataBufferImpl):
3945         (WebCore::ThreadSafeDataBuffer::adoptVector):
3946         (WebCore::ThreadSafeDataBuffer::copyVector):
3947         (WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer):
3948         (WebCore::ThreadSafeDataBuffer::data):
3949
3950 2015-10-27  Tim Horton  <timothy_horton@apple.com>
3951
3952         WKView being inside WKWebView leads to weird API issues
3953         https://bugs.webkit.org/show_bug.cgi?id=150174
3954
3955         Reviewed by Anders Carlsson.
3956
3957         * platform/spi/cg/CoreGraphicsSPI.h:
3958
3959 2015-10-27  Zhuo Li  <zachli@apple.com>
3960
3961         Add WebKit API to clear data type Search Field Recent Searches.
3962         https://bugs.webkit.org/show_bug.cgi?id=150019.
3963
3964         Reviewed by Anders Carlsson.
3965
3966         * platform/cocoa/SearchPopupMenuCocoa.h: Add a function to remove recent searches based on
3967         time.
3968         * platform/cocoa/SearchPopupMenuCocoa.mm:
3969         (WebCore::typeCheckedRecentSearchesArray): Return nil if the recent searches array is
3970         corrupted, otherwise return the array.
3971         (WebCore::typeCheckedDateInRecentSearch): Return nil if the date in recent search is
3972         corrupted, otherwise return the date.
3973         (WebCore::typeCheckedRecentSearchesRemovingRecentSearchesAddedAfterDate): Return nil if the recent searches plist is
3974         corrupted, otherwise return the recent searches plist.
3975         (WebCore::writeEmptyRecentSearchesPlist): Replace the existing recent searches plist if there is
3976         any with a clean one.
3977         (WebCore::loadRecentSearches): Use -typeCheckedRecentSearchesArray and -typeCheckedDateInRecentSearch.
3978         (WebCore::removeRecentlyModifiedRecentSearches):
3979         When the time passed in is equivalent to [NSDate distantPast], clear all recent searches in
3980         the Recent Searches plist. Otherwise, we only clear the recent searches that were created
3981         after or at the time that is passed in as the parameter. If all recent searches associated
3982         with an autosave