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