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