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