Fix preloader issue with srcdoc documents.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-12-02  Yoav Weiss  <yoav@yoav.ws>
2
3         Fix preloader issue with srcdoc documents.
4         https://bugs.webkit.org/show_bug.cgi?id=151744
5
6         Reviewed by Ryosuke Niwa.
7
8         Make sure that PreloadRequest is resolving URLs based on the document's
9         baseURL() rather than using url() as the base URL, which is not how URLs
10         are resolved by the parser, and fails when document->url() diverges from
11         the document's base URL (e.g. in the case of srcdoc based documents).
12
13         Test: fast/preloader/iframe-srcdoc.html
14
15         * html/parser/HTMLResourcePreloader.cpp:
16         (WebCore::PreloadRequest::completeURL):
17
18 2015-12-02  Jer Noble  <jer.noble@apple.com>
19
20         Add a setting and restriction which will pause invisible autoplaying video
21         https://bugs.webkit.org/show_bug.cgi?id=151412
22
23         Reviewed by Eric Carlson.
24
25         Test: media/video-restricted-invisible-autoplay-not-allowed.html
26
27         Drive-by fix: m_autoplaying is reset in many places by calling pause() or play(), where those
28         calls did not originate from an explicit request to pause or play, e.g., during an interruption.
29         This causes m_autoplaying to be set to false, thus breaking resumption of autoplaying when the
30         interruption ends. Update PlatformMediaSession to remember its client's "autoplaying" state and
31         restore it when an interruption ends.
32
33         Add a means to register for viewport visibility notifications to FrameView, RenderView,
34         and RenderElement. Elements who wish to recieve these notifications must do so through their
35         renderer, and thus will have to re-register whenever a new renderer is attached.
36
37         Add a restriction to HTMLMediaElement which will pause autoplaying video when that video scrolls
38         out of the viewport, or is hidden with CSS.
39
40         Add a setting which controls whether that new restriction is set.
41
42         * dom/Element.h:
43         (WebCore::Element::isVisibleInViewportChanged): Add default empty virtual method.
44         * html/HTMLMediaElement.cpp:
45         (WebCore::HTMLMediaElement::HTMLMediaElement):
46         (WebCore::HTMLMediaElement::didMoveToNewDocument):
47         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache):
48         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
49         (WebCore::HTMLMediaElement::resumeAutoplaying):
50         (WebCore::mediaElementIsAllowedToAutoplay):
51         (WebCore::HTMLMediaElement::isVisibleInViewportChanged):
52         (WebCore::HTMLMediaElement::updateShouldAutoplay):
53         (WebCore::HTMLMediaElement::HTMLMediaElement): Set the new restriction based on the current Settings.
54         (WebCore::HTMLMediaElement::resumeAutoplaying): Continue autoplay, or begin playback.
55         (WebCore::HTMLMediaElement::didMoveToNewDocument): Update our autoplay state.
56         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
57         (WebCore::HTMLMediaElement::removedFrom): Ditto.
58         (WebCore::HTMLMediaElement::didAttachRenderers): Ditto.
59         (WebCore::HTMLMediaElement::didDetachRenderers): Ditto.
60         (WebCore::HTMLMediaElement::visibilityDidChange): Ditto.
61         (WebCore::HTMLMediaElement::willDetachRenderers): Unregister for visibility callbacks.
62         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Clear new restriction.
63         (WebCore::mediaElementIsAllowedToAutoplay): Check for autoplay requirements.
64         (WebCore::HTMLMediaElement::isVisibleInViewportChanged): Added, update our autoplay state.
65         (WebCore::HTMLMediaElement::updateShouldAutoplay): Set interruption if necessary, clear otherwise.
66         * html/HTMLMediaElement.h:
67         * html/MediaElementSession.cpp:
68         (WebCore::restrictionName): Added support for new restriction.
69         * html/MediaElementSession.h:
70         * page/FrameView.cpp:
71         (WebCore::FrameView::viewportContentsChanged): Update clients of viewport visibility.
72         * page/Settings.in:
73         * platform/audio/PlatformMediaSession.cpp:
74         (WebCore::stateName): Add new "Autoplay" state.
75         (WebCore::interruptionName): Added new interruption type.
76         (WebCore::PlatformMediaSession::beginInterruption): Set the m_interruptionType.
77         (WebCore::PlatformMediaSession::clientWillBeginAutoplaying): Set the m_state to Autoplaying.
78         * platform/audio/PlatformMediaSession.h:
79         (WebCore::PlatformMediaSession::interruptionType): Added getter.
80         (WebCore::PlatformMediaSessionClient::resumeAutoplaying): Added default.
81         * platform/audio/PlatformMediaSessionManager.cpp:
82         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): Only pause session if its state is playing.
83         * rendering/RenderElement.cpp:
84         (WebCore::RenderElement::RenderElement): Set new ivars.
85         (WebCore::RenderElement::~RenderElement): Unregister for callbacks if necessary.
86         (WebCore::RenderElement::registerForVisibleInViewportCallback): Register for callbacks from RenderView.
87         (WebCore::RenderElement::unregisterForVisibleInViewportCallback): Unregister from same.
88         (WebCore::RenderElement::visibleInViewportStateChanged): Notify Element if value has changed.
89         * rendering/RenderElement.h:
90         * rendering/RenderView.cpp:
91         (WebCore::RenderView::registerForVisibleInViewportCallback): Add renderer to list of callbacks.
92         (WebCore::RenderView::unregisterForVisibleInViewportCallback): Remove renderer from same.
93         (WebCore::RenderView::updateVisibleViewportRect): Walk renderers setting their visiblility based on the viewport visible rect.
94         * rendering/RenderView.h:
95         * testing/Internals.cpp:
96         (WebCore::Internals::setMediaElementRestrictions): Support new restriction.
97
98 2015-12-02  Brady Eidson  <beidson@apple.com>
99
100         Modern IDB: IDBTransaction::error is not exposed.
101         https://bugs.webkit.org/show_bug.cgi?id=151752
102
103         Reviewed by Alex Christensen.
104
105         No new tests (At least 3 failing tests now pass, plus changes to other faulty tests).
106
107         * Modules/indexeddb/client/IDBRequestImpl.cpp:
108         (WebCore::IDBClient::IDBRequest::dispatchEvent):
109         (WebCore::IDBClient::IDBRequest::uncaughtExceptionInEventHandler):
110         * Modules/indexeddb/client/IDBRequestImpl.h:
111         
112         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
113         (WebCore::IDBClient::IDBTransaction::error):
114         (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
115         (WebCore::IDBClient::IDBTransaction::abort):
116         (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
117         * Modules/indexeddb/client/IDBTransactionImpl.h:
118
119 2015-12-02  Adenilson Cavalcanti  <cavalcantii@gmail.com>
120
121         [css border] border-image doesn't honor border-style
122         https://bugs.webkit.org/show_bug.cgi?id=99922
123
124         Reviewed by Simon Fraser.
125
126         Ensure that WebKit will be compliant to css-backgrounds spec where a
127         border with an image will only be rendered if there is a style defined.
128
129         Quote: "None: No border. Color and width are ignored (i.e., the border has width 0)".
130         Reference: http://www.w3.org/TR/css3-background/#border-style
131
132         From W3C discussion: "The fact that these properties set the style of the border is
133         normative". Reference: https://lists.w3.org/Archives/Public/www-style/2015Nov/0260.html
134
135         Test: fast/borders/border-image-should-not-display.html
136
137         * rendering/style/BorderData.h:
138         (WebCore::BorderData::hasBorder):
139         (WebCore::BorderData::borderLeftWidth):
140         (WebCore::BorderData::borderRightWidth):
141         (WebCore::BorderData::borderTopWidth):
142         (WebCore::BorderData::borderBottomWidth):
143         * rendering/style/BorderValue.h:
144         (WebCore::BorderValue::nonZero):
145         (WebCore::BorderValue::isVisible):
146
147 2015-12-02  Eric Carlson  <eric.carlson@apple.com>
148
149         [MediaStream] Implement MediaStreamTrack.getSettings()
150         https://bugs.webkit.org/show_bug.cgi?id=151727
151
152         Reviewed by Jer Noble.
153
154         MediaStreamTrack.getStates has been replaced by MediaStreamTrack.getSettings. 
155
156         Test: fast/mediastream/MediaStreamTrack-getSettings.html
157
158         * CMakeLists.txt: MediaSourceStates.* -> MediaSourceSettings.*.
159         * DerivedSources.make: No more MediaSourceStates.idl.
160         * Modules/mediastream/CapabilityRange.cpp: MediaSourceStates.* -> MediaSourceSettings.*.
161         * Modules/mediastream/MediaSourceSettings.cpp: Copied from Source/WebCore/Modules/mediastream/MediaSourceStates.cpp.
162         (WebCore::MediaSourceSettings::create):
163         (WebCore::MediaSourceSettings::MediaSourceSettings):
164         (WebCore::MediaSourceSettings::facingMode):
165         (WebCore::MediaSourceStates::create): Deleted.
166         (WebCore::MediaSourceStates::MediaSourceStates): Deleted.
167         (WebCore::MediaSourceStates::sourceType): Deleted.
168         (WebCore::MediaSourceStates::facingMode): Deleted.
169         * Modules/mediastream/MediaSourceSettings.h: Copied from Source/WebCore/Modules/mediastream/MediaSourceStates.h.
170
171         MediaSourceStates.* renamed to MediaSourceSettings.* and updated to new API.
172         * Modules/mediastream/MediaSourceStates.cpp: Removed.
173         * Modules/mediastream/MediaSourceStates.h: Removed.
174         * Modules/mediastream/MediaSourceStates.idl: Removed.
175
176         * Modules/mediastream/MediaStreamCapabilities.cpp:
177         (WebCore::MediaStreamCapabilities::sourceType): Return an empty vector for now, will be fixed
178           by the changes for https://bugs.webkit.org/show_bug.cgi?id=151728.
179         (WebCore::MediaStreamCapabilities::sourceId): RealtimeMediaSourceStates -> MediaSourceSettings.
180         (WebCore::MediaStreamCapabilities::facingMode): Ditto.
181
182         * Modules/mediastream/MediaStreamTrack.cpp:
183         (WebCore::MediaStreamTrack::getSettings): New.
184         (WebCore::MediaStreamTrack::getCapabilities): Don't modify states, just pass through whatever
185           private track returns.
186         (WebCore::MediaStreamTrack::trackSettingsChanged):
187         (WebCore::MediaStreamTrack::states): Deleted.
188         (WebCore::MediaStreamTrack::trackStatesChanged): Deleted.
189         * Modules/mediastream/MediaStreamTrack.h:
190         * Modules/mediastream/MediaStreamTrack.idl: MediaSourceStates -> MediaSourceSettings.
191
192         * Modules/webaudio/MediaStreamAudioSource.cpp:
193         (WebCore::MediaStreamAudioSource::settings):
194         (WebCore::MediaStreamAudioSource::states): Deleted.
195         * Modules/webaudio/MediaStreamAudioSource.h: MediaSourceStates -> MediaSourceSettings.
196
197         * WebCore.xcodeproj/project.pbxproj: MediaSourceStates.* -> MediaSourceSettings.*.
198
199         * bindings/js/JSMediaSourceStatesCustom.cpp: Removed.
200         * bindings/js/JSMediaStreamTrackCustom.cpp: Added.
201         (WebCore::JSMediaStreamTrack::getSettings): MediaSourceSettings is a generic dictionary so 
202           it has to be generated manually.
203
204         * platform/mediastream/MediaStreamPrivate.cpp:
205         (WebCore::MediaStreamPrivate::intrinsicSize): states -> settings.
206         (WebCore::MediaStreamPrivate::trackStatesChanged): Deleted.
207         * platform/mediastream/MediaStreamPrivate.h:
208
209         * platform/mediastream/MediaStreamTrackPrivate.cpp:
210         (WebCore::MediaStreamTrackPrivate::settings):
211         (WebCore::MediaStreamTrackPrivate::sourceSettingsChanged):
212         (WebCore::MediaStreamTrackPrivate::states): Deleted.
213         (WebCore::MediaStreamTrackPrivate::sourceStatesChanged): Deleted.
214         * platform/mediastream/MediaStreamTrackPrivate.h:
215
216         * platform/mediastream/RealtimeMediaSource.cpp:
217         (WebCore::RealtimeMediaSource::settingsDidChanged):
218         (WebCore::RealtimeMediaSource::statesDidChanged): Deleted.
219         * platform/mediastream/RealtimeMediaSource.h:
220
221         * platform/mediastream/RealtimeMediaSourceCapabilities.h:
222         (WebCore::RealtimeMediaSourceCapabilities::facingModes): States -> Settings.
223         (WebCore::RealtimeMediaSourceCapabilities::addFacingMode): Ditto.
224         (WebCore::RealtimeMediaSourceCapabilities::sourceTypes): Deleted.
225         (WebCore::RealtimeMediaSourceCapabilities::setSourceType): Deleted.
226         (WebCore::RealtimeMediaSourceCapabilities::addSourceType): Deleted.
227
228         * platform/mediastream/RealtimeMediaSourceCenter.h: States -> Settings.
229         * platform/mediastream/RealtimeMediaSourceSettings.cpp: Copied from Source/WebCore/platform/mediastream/RealtimeMediaSourceStates.cpp.
230         (WebCore::RealtimeMediaSourceSettings::facingMode):
231         (WebCore::RealtimeMediaSourceStates::facingMode): Deleted.
232         (WebCore::RealtimeMediaSourceStates::sourceType): Deleted.
233
234         * platform/mediastream/RealtimeMediaSourceSettings.h: Copied from Source/WebCore/platform/mediastream/RealtimeMediaSourceStates.h.
235         * platform/mediastream/RealtimeMediaSourceStates.cpp: Removed.
236
237         * platform/mediastream/RealtimeMediaSourceStates.h: Removed.
238         * platform/mediastream/mac/AVAudioCaptureSource.h:
239         * platform/mediastream/mac/AVAudioCaptureSource.mm:
240         (WebCore::AVAudioCaptureSource::updateStates): Deleted.
241
242         * platform/mediastream/mac/AVCaptureDeviceManager.h:
243         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
244
245         * platform/mediastream/mac/AVMediaCaptureSource.h:
246         * platform/mediastream/mac/AVMediaCaptureSource.mm:
247         (WebCore::AVMediaCaptureSource::states): Deleted.
248
249         * platform/mediastream/mac/AVVideoCaptureSource.h:
250         * platform/mediastream/mac/AVVideoCaptureSource.mm:
251         (WebCore::AVVideoCaptureSource::updateStates): Deleted.
252
253         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
254
255         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
256
257         * platform/mock/MockRealtimeAudioSource.cpp:
258         (WebCore::MockRealtimeAudioSource::initializeSupportedConstraints):
259         (WebCore::MockRealtimeAudioSource::updateStates): Deleted.
260         * platform/mock/MockRealtimeAudioSource.h:
261
262         * platform/mock/MockRealtimeMediaSource.cpp:
263         (WebCore::MockRealtimeMediaSource::capabilities): Minor cleanup.
264         (WebCore::MockRealtimeMediaSource::settings):
265         (WebCore::MockRealtimeMediaSource::supportedConstraints):
266         (WebCore::MockRealtimeMediaSource::states): Deleted.
267         * platform/mock/MockRealtimeMediaSource.h:
268         (WebCore::MockRealtimeMediaSource::constraints):
269         (WebCore::MockRealtimeMediaSource::currentStates): Deleted.
270
271         * platform/mock/MockRealtimeVideoSource.cpp:
272         (WebCore::MockRealtimeVideoSource::updateSettings):
273         (WebCore::MockRealtimeVideoSource::initializeCapabilities):
274         (WebCore::MockRealtimeVideoSource::initializeSupportedConstraints):
275         (WebCore::MockRealtimeVideoSource::setFrameRate): states -> settings.
276         (WebCore::MockRealtimeVideoSource::setSize): Ditto.
277         (WebCore::MockRealtimeVideoSource::drawAnimation): Ditto.
278         (WebCore::MockRealtimeVideoSource::drawText): Ditto.
279         (WebCore::MockRealtimeVideoSource::updateStates): Deleted.
280         (WebCore::MockRealtimeVideoSource::setFacingMode): Deleted.
281         * platform/mock/MockRealtimeVideoSource.h:
282
283 2015-11-30  David Hyatt  <hyatt@apple.com>
284
285         Implement the picture element.
286         https://bugs.webkit.org/show_bug.cgi?id=116963
287
288         Reviewed by Dean Jackson.
289
290         Added fast/picture tests.
291
292         * WebCore.xcodeproj/project.pbxproj:
293         Add HTMLPictureElement.* to the project.
294
295         * html/HTMLImageElement.cpp:
296         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
297         Remove the CURRENT_SRC ifdef.
298
299         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
300         New helper function that checks the <source> elements of a <picture> parent
301         for the best match.
302
303         (WebCore::HTMLImageElement::selectImageSource):
304         Pull out the process of image selection into its own function so that this can
305         be called from many places (to ensure that dynamic changes are reflected as elements
306         get changed, added or removed).
307
308         (WebCore::HTMLImageElement::parseAttribute):
309         Call selectImageSource when attributes change.
310
311         (WebCore::HTMLImageElement::insertedInto):
312         If inserted into a picture element, make sure to update the source.
313
314         * html/HTMLImageElement.h:
315         (WebCore::HTMLImageElement::currentSrc):
316         Remove the CURRENT_SRC ifdef.
317
318         * html/HTMLImageElement.idl:
319         Remove the CURRENT_SRC ifdef.
320
321         * html/HTMLPictureElement.cpp: Added.
322         (WebCore::HTMLPictureElement::HTMLPictureElement):
323         (WebCore::HTMLPictureElement::create):
324         (WebCore::HTMLPictureElement::sourcesChanged):
325         * html/HTMLPictureElement.h: Added.
326         The new picture element. Has a sourcesChanged() function that is invoked whenever anything
327         about the <source> elements changes.
328
329         * html/HTMLSourceElement.cpp:
330         (WebCore::HTMLSourceElement::insertedInto):
331         (WebCore::HTMLSourceElement::removedFrom):
332         (WebCore::HTMLSourceElement::parseAttribute):
333         Make sure to call sourcesChanged when new sources come and go or when attributes on
334         source elements change.
335
336         * html/HTMLSourceElement.h:
337         Added parseAttribute function so we can see when attributes change that force us to
338         do a dynamic update.
339
340         * html/HTMLTagNames.in:
341         Add the picture element.
342
343         * html/parser/HTMLSrcsetParser.h:
344         (WebCore::ImageCandidate::srcOrigin):
345         (WebCore::ImageCandidate::isEmpty):
346         Some helpers for picture parsing.
347
348 2015-12-02  Per Arne Vollan  <peavo@outlook.com>
349
350         [WinCairo][MediaFoundation] Video is not rendered correctly on some graphics cards.
351         https://bugs.webkit.org/show_bug.cgi?id=151757
352
353         Reviewed by Alex Christensen.
354
355         We need to make sure we use the same bitmap format as in the Direct3D surface
356         in video memory when copying surface data and rendering with Cairo.
357
358         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
359         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
360         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
361
362 2015-12-02  Brady Eidson  <beidson@apple.com>
363
364         Modern IDB: Get rid of IDBExceptionCode.
365         https://bugs.webkit.org/show_bug.cgi?id=151753
366
367         Reviewed by Alex Christensen.
368
369         No new tests (No change in behavior).
370
371         * Modules/indexeddb/client/IDBIndexImpl.cpp:
372         (WebCore::IDBClient::IDBIndex::count):
373         (WebCore::IDBClient::IDBIndex::doCount):
374         (WebCore::IDBClient::IDBIndex::get):
375         (WebCore::IDBClient::IDBIndex::doGet):
376         (WebCore::IDBClient::IDBIndex::getKey):
377         (WebCore::IDBClient::IDBIndex::doGetKey):
378         
379         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
380         (WebCore::IDBClient::IDBObjectStore::get):
381         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
382         (WebCore::IDBClient::IDBObjectStore::clear):
383         (WebCore::IDBClient::IDBObjectStore::createIndex):
384         (WebCore::IDBClient::IDBObjectStore::index):
385         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
386         (WebCore::IDBClient::IDBObjectStore::count):
387         (WebCore::IDBClient::IDBObjectStore::doCount):
388         
389         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
390         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
391         
392         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
393         (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
394         
395         * Modules/indexeddb/server/IndexValueStore.cpp:
396         (WebCore::IDBServer::IndexValueStore::addRecord):
397         
398         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
399         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
400         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
401         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
402         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
403         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
404         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
405         (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
406         (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
407         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
408         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
409         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
410         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
411         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
412         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
413         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
414         
415         * Modules/indexeddb/server/MemoryIndex.cpp:
416         (WebCore::IDBServer::MemoryIndex::putIndexKey):
417         
418         * Modules/indexeddb/server/MemoryObjectStore.cpp:
419         (WebCore::IDBServer::MemoryObjectStore::createIndex):
420         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
421         
422         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
423         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
424         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
425         
426         * Modules/indexeddb/shared/IDBError.cpp:
427         (WebCore::IDBError::IDBError):
428         (WebCore::IDBError::name):
429         (WebCore::IDBError::message):
430         (WebCore::idbErrorName): Deleted.
431         (WebCore::idbErrorDescription): Deleted.
432         
433         * Modules/indexeddb/shared/IDBError.h:
434         (WebCore::IDBError::code):
435         (WebCore::IDBError::isNull):
436
437 2015-12-02  Jiewen Tan  <jiewen_tan@apple.com>
438
439         Null dereference loading Blink layout test fast/loader/unload-mutation-crash.html
440         https://bugs.webkit.org/show_bug.cgi?id=149305
441         <rdar://problem/22747892>
442
443         Reviewed by Brent Fulgham.
444
445         Add an extra guard to replaceDocument() against rude JS in unload event handlers.
446
447         Test: fast/loader/unload-mutation-crash.html
448
449         * loader/DocumentWriter.cpp:
450         (WebCore::DocumentWriter::replaceDocument):
451         (WebCore::DocumentWriter::begin):
452
453 2015-12-02  Per Arne Vollan  <peavo@outlook.com>
454
455         [WinCairo] Compile error.
456         https://bugs.webkit.org/show_bug.cgi?id=151742
457
458         Reviewed by Csaba Osztrogon√°c.
459
460         System font flag has moved from Font class to FontData class.
461
462         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
463         (WebCore::Font::platformInit):
464
465 2015-12-01  Commit Queue  <commit-queue@webkit.org>
466
467         Unreviewed, rolling out r192894 and r192904.
468         https://bugs.webkit.org/show_bug.cgi?id=151738
469
470         Crashes sometimes on Windows (Requested by litherum on
471         #webkit).
472
473         Reverted changesets:
474
475         "[Win] Web fonts with small caps have excess whitespace with
476         the complex text codepath"
477         https://bugs.webkit.org/show_bug.cgi?id=151698
478         http://trac.webkit.org/changeset/192894
479
480         "Test gardening after r192894"
481         http://trac.webkit.org/changeset/192904
482
483 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
484
485         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
486         https://bugs.webkit.org/show_bug.cgi?id=150792
487
488         Reviewed by Saam Barati.
489
490         * Configurations/FeatureDefines.xcconfig:
491
492 2015-12-01  Commit Queue  <commit-queue@webkit.org>
493
494         Unreviewed, rolling out r192914.
495         https://bugs.webkit.org/show_bug.cgi?id=151734
496
497         JSC tests for this change are failing on 32 and 64-bit bots
498         (Requested by ryanhaddad on #webkit).
499
500         Reverted changeset:
501
502         "[ES6] Implement LLInt/Baseline Support for ES6 Generators and
503         enable this feature"
504         https://bugs.webkit.org/show_bug.cgi?id=150792
505         http://trac.webkit.org/changeset/192914
506
507 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
508
509         [SVG -> OTF Converter] Force UnitsPerEm to 1000
510         https://bugs.webkit.org/show_bug.cgi?id=151650
511
512         Reviewed by Antti Koivisto.
513
514         According to the Adobe Type 1 Font Format:
515
516         "Type 1 font programs generally use a 1000 to 1 scaling matrix
517         for the definition of the relationship of character space unites
518         to user space units."
519
520         Windows actually disregards the "unitsPerEm" value in the "head"
521         table for some calculations, and hardcodes 1000 instead. In order
522         to have consistent renderings on Windows and OS X, this patch
523         forces all generated fonts to have a unitsPerEm of 1000, and
524         appropriately scales all necessary values.
525
526         Test: svg/W3C-SVG-1.1/fonts-elem-03-b.svg
527
528         * svg/SVGToOTFFontConversion.cpp:
529         (WebCore::SVGToOTFFontConverter::scaleUnitsPerEm):
530         (WebCore::SVGToOTFFontConverter::appendHEADTable):
531         (WebCore::SVGToOTFFontConverter::appendOS2Table):
532         (WebCore::SVGToOTFFontConverter::appendVORGTable):
533         (WebCore::SVGToOTFFontConverter::appendVHEATable):
534         (WebCore::SVGToOTFFontConverter::appendVMTXTable):
535         (WebCore::SVGToOTFFontConverter::addKerningPair):
536         (WebCore::CFFBuilder::CFFBuilder):
537         (WebCore::CFFBuilder::boundingBox):
538         (WebCore::CFFBuilder::updateBoundingBox):
539         (WebCore::CFFBuilder::unscaledLineTo):
540         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
541         (WebCore::SVGToOTFFontConverter::processGlyphElement):
542         (WebCore::SVGToOTFFontConverter::appendLigatureGlyphs):
543         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
544
545 2015-12-01  Brady Eidson  <beidson@apple.com>
546
547         Give a more detailed message for TypeErrors that result from EnforceRange.
548         https://bugs.webkit.org/show_bug.cgi?id=151725
549
550         Reviewed by Tim Horton.
551
552         No new tests (Covered by changes to existing tests).
553
554         * bindings/js/JSDOMBinding.cpp:
555         (WebCore::rangeErrorString):
556         (WebCore::enforceRange):
557
558 2015-12-01  Jer Noble  <jer.noble@apple.com>
559
560         [iOS] Abrupt transition between Fullscreen -> PiP
561         https://bugs.webkit.org/show_bug.cgi?id=151719
562
563         Reviewed by Eric Carlson.
564
565         Rather than abruptly hiding the fullscreen window, explicitly exit fullscreen mode upon entering PiP.
566
567         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
568         (WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture):
569
570 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
571
572         Give String and AtomicString an existingHash() function
573         https://bugs.webkit.org/show_bug.cgi?id=151717
574
575         Reviewed by Andreas Kling.
576
577         No new tests because there is no behavior change.
578
579         * platform/graphics/Font.cpp:
580         (WebCore::CharacterFallbackMapKeyHash::hash):
581
582 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
583
584         [Win] Build fix after r192895
585
586         Unreviewed.
587
588         * platform/graphics/FontPlatformData.h:
589         (WebCore::FontPlatformData::isSystemFont):
590         (WebCore::FontPlatformData::setIsSystemFont):
591         * platform/graphics/win/SimpleFontDataCGWin.cpp:
592         (WebCore::Font::platformInit):
593         (WebCore::Font::platformWidthForGlyph):
594
595 2015-12-01  Alexey Proskuryakov  <ap@apple.com>
596
597         Update bindings test results after r192903.
598
599         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
600         (WebCore::JSTestEventConstructorConstructor::construct):
601
602 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
603
604         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
605         https://bugs.webkit.org/show_bug.cgi?id=150792
606
607         Reviewed by Saam Barati.
608
609         * Configurations/FeatureDefines.xcconfig:
610
611 2015-12-01  Brady Eidson  <beidson@apple.com>
612
613         Add "RaisesExceptionWithMessage" IDL attribute.
614         https://bugs.webkit.org/show_bug.cgi?id=151720
615
616         Reviewed by Alex Christensen.
617
618         No new tests (Covered by changes to existing bindings tests).
619
620         * bindings/scripts/CodeGeneratorJS.pm:
621         (GenerateImplementation):
622         (GenerateParametersCheck):
623         (GenerateReturnParameters):
624         (GenerateImplementationFunctionCall):
625         (GenerateConstructorDefinition):
626         
627         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
628         (webkit_dom_test_obj_method_with_exception_with_message):
629         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
630         
631         * bindings/scripts/test/JS/JSTestObj.cpp:
632         (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
633         
634         * bindings/scripts/test/ObjC/DOMTestObj.h:
635         * bindings/scripts/test/ObjC/DOMTestObj.mm:
636         (-[DOMTestObj methodWithExceptionWithMessage]):
637         
638         * bindings/scripts/test/TestObj.idl:
639
640 2015-12-01  Darin Adler  <darin@apple.com>
641
642         Fix anomaly where isMouseEvent returns false for wheel events
643         https://bugs.webkit.org/show_bug.cgi?id=151685
644
645         Reviewed by Alexey Proskuryakov.
646
647         Back three years ago when we made WheelEvent inherit from MouseEvent,
648         someone decided that isMouseEvent should return false for the wheel events.
649         An audit of all the callers of isMouseEvent indicated that in almost every
650         case, it's better to return true, so this patch does that.
651
652         All the other call sites that were checking isMouseEvent, here and in the
653         higher levels of WebKit, benefit from getting true even for wheel events.
654
655         * bindings/objc/DOMEvents.mm:
656         (kitClass): Use eventInterface instead of isMouseEvent to create the appropriate
657         wrapper class.
658
659         * bindings/scripts/CodeGeneratorJS.pm:
660         (GenerateConstructorDefinition): Eliminated a peculiar search and replace
661         mistake; "stateution" instead of "execution".
662
663         * dom/Node.cpp:
664         (WebCore::Node::handleLocalEvents): Add an isWheelEvent check here so that we
665         will not ignore wheel events. This preserves behavior. A FIXME questions whether
666         that is the behavior we want.
667
668         * dom/WheelEvent.cpp:
669         (WebCore::WheelEvent::isMouseEvent): Deleted. No need to override and return false.
670         * dom/WheelEvent.h: Ditto.
671
672         * html/HTMLTextAreaElement.cpp:
673         (WebCore::HTMLTextAreaElement::defaultEventHandler): Removed unneeded checks for
674         drag events and wheel events; both are types of mouse event, and so a single
675         isMouseEvent check takes care of all three of these.
676         * html/TextFieldInputType.cpp:
677         (WebCore::TextFieldInputType::forwardEvent): Ditto.
678
679 2015-12-01  Alex Christensen  <achristensen@webkit.org>
680
681         Use Optional for matrix inverses
682         https://bugs.webkit.org/show_bug.cgi?id=151575
683
684         Reviewed by Myles C. Maxfield.
685
686         This patch should have no change in behavior.  Some unnecessary checks are removed.
687         There are a few places where we are no longer multiplying by the identity matrix.
688         This should remind future coders that not all matrices are invertible.
689
690         * css/WebKitCSSMatrix.cpp:
691         (WebCore::WebKitCSSMatrix::inverse):
692         (WebCore::WebKitCSSMatrix::translate):
693         * html/canvas/CanvasRenderingContext2D.cpp:
694         (WebCore::CanvasRenderingContext2D::restore):
695         (WebCore::CanvasRenderingContext2D::scale):
696         (WebCore::CanvasRenderingContext2D::rotate):
697         (WebCore::CanvasRenderingContext2D::translate):
698         (WebCore::CanvasRenderingContext2D::transform):
699         (WebCore::CanvasRenderingContext2D::setTransform):
700         (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
701         (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
702         * platform/graphics/GraphicsContext.cpp:
703         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
704         * platform/graphics/ShadowBlur.cpp:
705         (WebCore::ShadowBlur::calculateLayerBoundingRect):
706         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
707         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
708         * platform/graphics/cg/ImageBufferCG.cpp:
709         (WebCore::ImageBuffer::putByteArray):
710         * platform/graphics/filters/Filter.h:
711         (WebCore::Filter::setFilterScale):
712         (WebCore::Filter::absoluteTransform):
713         (WebCore::Filter::mapAbsolutePointToLocalPoint):
714         (WebCore::Filter::renderingMode):
715         (WebCore::Filter::setRenderingMode):
716         * platform/graphics/texmap/TextureMapperLayer.cpp:
717         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
718         (WebCore::TextureMapperLayer::replicaTransform):
719         (WebCore::TextureMapperLayer::setAnimatedFilters):
720         (WebCore::TextureMapperLayer::mapScrollOffset):
721         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
722         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
723         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
724         * platform/graphics/transforms/AffineTransform.cpp:
725         (WebCore::AffineTransform::yScale):
726         (WebCore::det):
727         (WebCore::AffineTransform::isInvertible):
728         (WebCore::AffineTransform::inverse):
729         (WebCore::AffineTransform::det): Deleted.
730         * platform/graphics/transforms/AffineTransform.h:
731         * platform/graphics/transforms/TransformState.cpp:
732         (WebCore::TransformState::mappedPoint):
733         (WebCore::TransformState::mappedQuad):
734         (WebCore::TransformState::mapQuad):
735         (WebCore::TransformState::flattenWithTransform):
736         * platform/graphics/transforms/TransformationMatrix.cpp:
737         (WebCore::TransformationMatrix::isInvertible):
738         (WebCore::TransformationMatrix::inverse):
739         * platform/graphics/transforms/TransformationMatrix.h:
740         * rendering/HitTestingTransformState.cpp:
741         (WebCore::HitTestingTransformState::flattenWithTransform):
742         (WebCore::HitTestingTransformState::mappedPoint):
743         (WebCore::HitTestingTransformState::mappedQuad):
744         (WebCore::HitTestingTransformState::mappedArea):
745         (WebCore::HitTestingTransformState::boundsOfMappedArea):
746         * rendering/PaintInfo.h:
747         (WebCore::PaintInfo::applyTransform):
748         * rendering/RenderLayer.cpp:
749         (WebCore::RenderLayer::paintLayerByApplyingTransform):
750         (WebCore::RenderLayer::hitTestLayer):
751         * rendering/svg/RenderSVGContainer.cpp:
752         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
753         * rendering/svg/RenderSVGForeignObject.cpp:
754         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
755         * rendering/svg/RenderSVGImage.cpp:
756         (WebCore::RenderSVGImage::nodeAtFloatPoint):
757         * rendering/svg/RenderSVGResourceClipper.cpp:
758         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
759         * rendering/svg/RenderSVGResourceFilter.cpp:
760         (WebCore::RenderSVGResourceFilter::postApplyResource):
761         * rendering/svg/RenderSVGRoot.cpp:
762         (WebCore::RenderSVGRoot::nodeAtPoint):
763         * rendering/svg/RenderSVGShape.cpp:
764         (WebCore::RenderSVGShape::setupNonScalingStrokeContext):
765         (WebCore::RenderSVGShape::nodeAtFloatPoint):
766         (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
767         * rendering/svg/RenderSVGText.cpp:
768         (WebCore::RenderSVGText::nodeAtFloatPoint):
769         * rendering/svg/SVGRenderSupport.cpp:
770         (WebCore::SVGRenderSupport::intersectRepaintRectWithShadows):
771         * rendering/svg/SVGRenderingContext.cpp:
772         (WebCore::SVGRenderingContext::clipToImageBuffer):
773         * svg/SVGLocatable.cpp:
774         (WebCore::SVGLocatable::getTransformToElement):
775         * svg/SVGMatrix.h:
776         (WebCore::SVGMatrix::inverse):
777         (WebCore::SVGMatrix::rotateFromVector):
778
779 2015-12-01  Tim Horton  <timothy_horton@apple.com>
780
781         Remove swipe snapshot before main document load if scroll position is already restored
782         https://bugs.webkit.org/show_bug.cgi?id=151224
783
784         Reviewed by Darin Adler.
785
786         * loader/FrameLoaderClient.h:
787         * loader/HistoryController.cpp:
788         (WebCore::HistoryController::restoreScrollPositionAndViewState):
789         Each time we try to restore the scroll position, see if the requested
790         scroll position is something we can scroll to by going through ScrollView's
791         scroll position constraint logic. If we can scroll there, tell our client
792         (and eventually ViewGestureController) that we successfully restored the
793         scroll position!
794
795 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
796
797         [iOS] Adjacent emoji overlap each other
798         https://bugs.webkit.org/show_bug.cgi?id=151690
799         <rdar://problem/23430453>
800
801         Reviewed by Simon Fraser.
802
803         This is a partial revert of r188737. It turns out that only CoreText gives correct
804         glyph advances for emoji. In r188737, I reverted the special iOS emoji processing,
805         but also removed the logic of using CoreText for emoji advances. This patch adds
806         the m_isEmoji boolean back, so we can tell if we need to force
807         platformWidthForGlyph() to use CoreText.
808
809         This patch also performs a little bit of cleanup by moving Font's m_isSystemFont
810         to FontPlatformData where it belongs.
811
812         Test: fast/text/emoji-overlap.html
813
814         * platform/graphics/Font.cpp:
815         (WebCore::fillGlyphPage): Removed unnecessary argument.
816         (WebCore::Font::Font): Deleted.
817         * platform/graphics/Font.h: Moved getters and booleans to FontPlatformData.
818         (WebCore::Font::hasCustomTracking): Deleted.
819         (WebCore::Font::isSystemFont): Deleted.
820         * platform/graphics/FontPlatformData.cpp:
821         (WebCore::FontPlatformData::FontPlatformData): Initialize new booleans.
822         (WebCore::FontPlatformData::operator=): Ditto.
823         * platform/graphics/FontPlatformData.h: Getters for new booleans.
824         (WebCore::FontPlatformData::isSystemFont):
825         (WebCore::FontPlatformData::hasCustomTracking):
826         (WebCore::FontPlatformData::isEmoji):
827         * platform/graphics/GlyphPage.h: Remove unnecessary argument.
828         * platform/graphics/cocoa/FontCocoa.mm:
829         (WebCore::advanceForColorBitmapFont): Return an Optional instead of using an out
830         argument.
831         (WebCore::canUseFastGlyphAdvanceGetter): Make sure that we use CoreText if we are
832         using the Emoji font.
833         (WebCore::Font::platformWidthForGlyph):
834         (WebCore::Font::platformInit): Deleted.
835         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Deal with the new booleans.
836         (WebCore::FontPlatformData::FontPlatformData):
837         (WebCore::FontPlatformData::platformDataInit):
838         (WebCore::FontPlatformData::platformDataAssign):
839         (WebCore::FontPlatformData::setFont):
840         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
841         (WebCore::GlyphPage::fill): Removed unnecessary argument.
842         * platform/graphics/mac/GlyphPageMac.cpp:
843         (WebCore::shouldUseCoreText): Use a reference instead of a pointer.
844         (WebCore::GlyphPage::fill): Removed unnecessary argument.
845         * platform/graphics/win/FontCGWin.cpp:
846         (WebCore::FontCascade::drawGlyphs): Update for new location of booleans.
847         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
848         (WebCore::GlyphPage::fill): Removed unnecessary argument.
849         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
850         (WebCore::GlyphPage::fill): Removed unnecessary argument.
851         * platform/graphics/win/UniscribeController.cpp:
852         (WebCore::UniscribeController::shapeAndPlaceItem): Update for new location of
853         booleans.
854
855 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
856
857         [Win] Web fonts with small caps have excess whitespace with the complex text codepath
858         https://bugs.webkit.org/show_bug.cgi?id=151698
859
860         Reviewed by Darin Adler.
861
862         When performing small-caps on OS X, we bake in the smaller font size into the platform's native font
863         object. On Windows, we currently don't do that; instead, we just change some ancillary data inside
864         the FontPlatformData, and our advance & drawing calculations are sensitive to this ancillary data.
865         However, in the complex text codepath, Uniscribe only takes the native font object as input, and
866         therefore operates with the wrong font size.
867
868         The solution is to bake the smaller font size into the native platform font on Windows, similar to
869         OS X. It isn't clear why we didn't do this previously, but it seems like we weren't sure that
870         Windows would select the correct font when we provide new selection criteria. However, for web fonts,
871         we already use the same mechanism (CreateFontIndirect()) when we create the font in the first place;
872         therefore, this scaled font request will always work as well.
873
874         Test: fast/text/small-caps-complex.html
875
876         * platform/graphics/win/SimpleFontDataWin.cpp:
877         (WebCore::Font::platformCreateScaledFont): Deleted.
878
879 2015-12-01  Brady Eidson  <beidson@apple.com>
880
881         Modern IDB: storage/indexeddb/create-and-remove-object-store.html fails.
882         https://bugs.webkit.org/show_bug.cgi?id=151704
883
884         Reviewed by Alex Christensen.
885
886         No new tests (At least one previously failing test now passes).
887
888         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
889         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
890
891 2015-12-01  Brady Eidson  <beidson@apple.com>
892
893         Modern IDB: storage/indexeddb/basics.html fails.
894         https://bugs.webkit.org/show_bug.cgi?id=151694
895
896         Reviewed by Alex Christensen.
897
898         No new tests (At least one failing test now passes, and covered by changes to 3 previously incorrect tests).
899
900         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
901         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Set the flag determining whether
902           or not the request's transaction should be exposed to the DOM.
903         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
904         
905         * Modules/indexeddb/client/IDBRequestImpl.cpp:
906         (WebCore::IDBClient::IDBRequest::result): Throw an exception if the request is not done.
907         (WebCore::IDBClient::IDBRequest::error): Ditto.
908         (WebCore::IDBClient::IDBRequest::transaction): Only return the transaction to the DOM if the flag says so.
909         * Modules/indexeddb/client/IDBRequestImpl.h:
910         
911         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
912         (WebCore::IDBClient::IDBTransaction::abort):
913         (WebCore::IDBClient::IDBTransaction::commit):
914
915 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
916
917         [GTK] ASSERTION FAILED: m_table running /webkit2/BackForwardList/navigation in Debug build
918         https://bugs.webkit.org/show_bug.cgi?id=151700
919
920         Reviewed by Martin Robinson.
921
922         This happens when the frame notifies its observers that the page
923         will be detached. The m_table that asserts is the
924         FrameDestructionObserver HashSet. It happens when clearing the
925         GObject DOM cache wrappers during frame destruction, and there's a
926         Document object wrapped whose last reference is held by the DOM
927         wrapper. In that case, the Document object is destroyed while the
928         frame is being destroyed. Deleting the wrapper objects after the
929         frame destruction fixes the crash.
930
931         * bindings/gobject/DOMObjectCache.cpp:
932
933 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
934
935         [Streams API] pull function of tee should call readFromReadableStreamReader directly
936         https://bugs.webkit.org/show_bug.cgi?id=151497
937
938         Reviewed by Darin Adler.
939
940         Covered by added test.
941
942         * Modules/streams/ReadableStreamInternals.js:
943         (teeReadableStreamPullFunction): directly calling readFromReadableStreamReader.
944
945 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
946
947         [Streams API] Clean-up JS built-in code using arrow functions
948         https://bugs.webkit.org/show_bug.cgi?id=151489
949
950         Reviewed by Darin Adler.
951
952         Using arrow functions to remove need for _this.
953         Made errorWritableStream take two parameters to simplify code and align it with the spec.
954
955         No change in behavior.
956
957         * Modules/streams/ReadableStream.js:
958         (initializeReadableStream):
959         * Modules/streams/WritableStream.js:
960         (initializeWritableStream):
961         (abort):
962         (write):
963         * Modules/streams/WritableStreamInternals.js:
964         (errorWritableStream):
965         (writableStreamAdvanceQueue):
966         (closeWritableStream):
967
968 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
969
970         [Streams API] teeReadableStream should not directly use stream.getReader()
971         https://bugs.webkit.org/show_bug.cgi?id=151487
972
973         Reviewed by Darin Adler.
974
975         Covered by added test.
976
977         * Modules/streams/ReadableStreamInternals.js:
978         (teeReadableStream): Create a @ReadableStreamReader instead of calling getReader() which may be disrupted by user scripts.
979
980 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
981
982         [Streams API] streams should not directly use Number and related methods
983         https://bugs.webkit.org/show_bug.cgi?id=151499
984
985         Reviewed by Darin Adler.
986
987         Covered by updated test.
988
989         Using @Number, @isFinite and @isNaN in place of Number, Number.isFinite and Number.isNaN.
990
991         * Modules/streams/ReadableStreamInternals.js:
992         (enqueueInReadableStream):
993         * Modules/streams/StreamInternals.js:
994         (validateAndNormalizeQueuingStrategy):
995         (enqueueValueWithSize):
996
997 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
998
999         Unreviewed. Fix GTK+ build after r192849.
1000
1001         * bindings/scripts/CodeGeneratorGObject.pm:
1002         (GenerateFunction):
1003         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1004         (webkit_dom_test_interface_supplemental_method1):
1005         (webkit_dom_test_interface_supplemental_method2):
1006         (webkit_dom_test_interface_set_supplemental_str2):
1007         (webkit_dom_test_interface_get_supplemental_node):
1008         (webkit_dom_test_interface_set_supplemental_node):
1009
1010 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1011
1012         [Streams API] Remove use of @catch for exposed promises
1013         https://bugs.webkit.org/show_bug.cgi?id=151625
1014
1015         Reviewed by Darin Adler.
1016
1017         Promise @catch is calling "then" which may be controlled by user scripts.
1018         This patch simply replaces @catch by calling @then directly.
1019
1020         Covered by modified tests.
1021
1022         * Modules/streams/ReadableStream.js:
1023         (pipeTo):
1024         * Modules/streams/ReadableStreamInternals.js:
1025         (teeReadableStream):
1026
1027 2015-11-30  Jaehun Lim  <ljaehun.lim@samsung.com>
1028
1029         Unreviewed, fix build after r192848 and r192849
1030
1031         - Rename canSuspendForPageCache to canSuspendForDocumentSuspension
1032         - Use references instead of pointers
1033
1034         * Modules/battery/BatteryManager.cpp:
1035         (WebCore::BatteryManager::canSuspendForDocumentSuspension):
1036         (WebCore::BatteryManager::canSuspendForPageCache): Deleted.
1037         * Modules/battery/BatteryManager.h:
1038         * Modules/battery/NavigatorBattery.cpp:
1039         (WebCore::NavigatorBattery::webkitBattery):
1040         * Modules/battery/NavigatorBattery.h:
1041         * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
1042         (WebCore::NavigatorGamepad::webkitGetGamepads):
1043         * Modules/gamepad/deprecated/NavigatorGamepad.h:
1044         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1045         (WebCore::NavigatorContentUtils::registerProtocolHandler):
1046         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
1047         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
1048         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
1049         * Modules/vibration/NavigatorVibration.cpp:
1050         (WebCore::NavigatorVibration::vibrate):
1051         * Modules/vibration/NavigatorVibration.h:
1052
1053 2015-11-30  Jiewen Tan  <jiewen_tan@apple.com>
1054
1055         Amazon.com Additional Information links aren't clickable
1056         https://bugs.webkit.org/show_bug.cgi?id=151401
1057         <rdar://problem/23454261>
1058
1059         Reviewed by Darin Adler.
1060
1061         The cause of this issue is that the painting order is different from the hittest order so we can end up
1062         with visible but unreachable content. To fix this, the executation flow of hittest has been reordered.
1063         According to the paint system, which renders the webpage from the bottom RenderLayer to the top, contents
1064         are rendered before floats. Hence, for the hittest, which determines the hitted location from top RenderLayer
1065         to the bottom, should do it reversedly. Now, hittest will first test floats then contents.
1066
1067         Test: fast/block/float/hit-test-on-overlapping-floats.html
1068
1069         * rendering/RenderBlock.cpp:
1070         (WebCore::RenderBlock::nodeAtPoint):
1071
1072 2015-11-30  Simon Fraser  <simon.fraser@apple.com>
1073
1074         Fix possible crash with animated layers in reflections
1075         https://bugs.webkit.org/show_bug.cgi?id=151689
1076         rdar://problem/23018612
1077
1078         Reviewed by Darin Adler.
1079
1080         Reflections create additional PlatformCALayers whose owner is set to the GraphicsLayerCA.
1081         Those PlatformCALayers need their owner pointer cleared out when the GraphicsLayerCA
1082         is destroyed.
1083         
1084         Tested by compositing/reflections/nested-reflection-transition.html
1085
1086         * platform/graphics/ca/GraphicsLayerCA.cpp:
1087         * platform/graphics/ca/GraphicsLayerCA.h:
1088
1089 2015-11-30  Brady Eidson  <beidson@apple.com>
1090
1091         Modern IDB: Iterating index cursors to a specific key is busted.
1092         https://bugs.webkit.org/show_bug.cgi?id=151684
1093
1094         Reviewed by Darin Adler.
1095
1096         No new tests (At least one failing test now passes).
1097
1098         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
1099         (WebCore::IDBServer::MemoryIndexCursor::iterate):
1100
1101 2015-11-30  Brady Eidson  <beidson@apple.com>
1102
1103         Modern IDB: ObjectStore cursors should not be able to iterate out of their range.
1104         https://bugs.webkit.org/show_bug.cgi?id=151683
1105
1106         Reviewed by Darin Adler.
1107
1108         No new tests (Covered by at least one failing test that now passes).
1109
1110         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
1111         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
1112         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
1113
1114 2015-11-30  Anders Carlsson  <andersca@apple.com>
1115
1116         CTTE autogenerated bindings code
1117         https://bugs.webkit.org/show_bug.cgi?id=151682
1118
1119         Reviewed by Darin Adler.
1120
1121         Make sure that JS bindings pass a reference to the object when calling static member functions.
1122
1123         * Modules/gamepad/NavigatorGamepad.cpp:
1124         (WebCore::NavigatorGamepad::getGamepads):
1125         * Modules/gamepad/NavigatorGamepad.h:
1126         * Modules/geolocation/NavigatorGeolocation.cpp:
1127         (WebCore::NavigatorGeolocation::geolocation):
1128         * Modules/geolocation/NavigatorGeolocation.h:
1129         * Modules/mediasource/AudioTrackMediaSource.h:
1130         (WebCore::AudioTrackMediaSource::sourceBuffer):
1131         * Modules/mediasource/TextTrackMediaSource.h:
1132         (WebCore::TextTrackMediaSource::sourceBuffer):
1133         * Modules/mediasource/VideoTrackMediaSource.h:
1134         (WebCore::VideoTrackMediaSource::sourceBuffer):
1135         * Modules/mediastream/HTMLMediaElementMediaStream.cpp:
1136         (WebCore::HTMLMediaElementMediaStream::srcObject):
1137         (WebCore::HTMLMediaElementMediaStream::setSrcObject):
1138         * Modules/mediastream/HTMLMediaElementMediaStream.h:
1139         * Modules/mediastream/NavigatorMediaDevices.cpp:
1140         (WebCore::NavigatorMediaDevices::mediaDevices):
1141         * Modules/mediastream/NavigatorMediaDevices.h:
1142         * Modules/notifications/DOMWindowNotifications.cpp:
1143         (WebCore::DOMWindowNotifications::webkitNotifications):
1144         * Modules/notifications/DOMWindowNotifications.h:
1145         * Modules/notifications/Notification.cpp:
1146         (WebCore::Notification::Notification):
1147         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
1148         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
1149         * Modules/notifications/WorkerGlobalScopeNotifications.h:
1150         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
1151         (WebCore::DOMWindowSpeechSynthesis::speechSynthesis):
1152         * Modules/speech/DOMWindowSpeechSynthesis.h:
1153         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1154         (WebCore::DOMWindowWebDatabase::openDatabase):
1155         * Modules/webdatabase/DOMWindowWebDatabase.h:
1156         * bindings/scripts/CodeGeneratorJS.pm:
1157         (GenerateImplementation):
1158         (GenerateParametersCheck):
1159         * testing/Internals.cpp:
1160         (WebCore::Internals::enableMockSpeechSynthesizer):
1161
1162 2015-11-30  Katlyn Graff  <kgraff@apple.com>
1163
1164         Rename ActiveDOMObject/DOMWindow PageCacheSuspension code to support more reasons for suspension
1165         https://bugs.webkit.org/show_bug.cgi?id=151677
1166
1167         Reviewed by Ryosuke Niwa.
1168
1169         Simply a refactoring patch, so no new tests.
1170
1171         * Modules/encryptedmedia/MediaKeySession.cpp:
1172         (WebCore::MediaKeySession::canSuspendForDocumentSuspension):
1173         (WebCore::MediaKeySession::canSuspendForPageCache): Deleted.
1174         * Modules/encryptedmedia/MediaKeySession.h:
1175         * Modules/geolocation/Geolocation.cpp:
1176         (WebCore::Geolocation::canSuspendForDocumentSuspension):
1177         (WebCore::Geolocation::canSuspendForPageCache): Deleted.
1178         * Modules/geolocation/Geolocation.h:
1179         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1180         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForDocumentSuspension):
1181         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromDocumentSuspension):
1182         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache): Deleted.
1183         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache): Deleted.
1184         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
1185         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1186         (WebCore::IDBClient::IDBDatabase::canSuspendForDocumentSuspension):
1187         (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache): Deleted.
1188         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1189         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1190         (WebCore::IDBClient::IDBRequest::canSuspendForDocumentSuspension):
1191         (WebCore::IDBClient::IDBRequest::canSuspendForPageCache): Deleted.
1192         * Modules/indexeddb/client/IDBRequestImpl.h:
1193         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1194         (WebCore::IDBClient::IDBTransaction::canSuspendForDocumentSuspension):
1195         (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache): Deleted.
1196         * Modules/indexeddb/client/IDBTransactionImpl.h:
1197         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
1198         (WebCore::LegacyDatabase::canSuspendForDocumentSuspension):
1199         (WebCore::LegacyDatabase::canSuspendForPageCache): Deleted.
1200         * Modules/indexeddb/legacy/LegacyDatabase.h:
1201         * Modules/indexeddb/legacy/LegacyRequest.cpp:
1202         (WebCore::LegacyRequest::canSuspendForDocumentSuspension):
1203         (WebCore::LegacyRequest::canSuspendForPageCache): Deleted.
1204         * Modules/indexeddb/legacy/LegacyRequest.h:
1205         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
1206         (WebCore::LegacyTransaction::canSuspendForDocumentSuspension):
1207         (WebCore::LegacyTransaction::canSuspendForPageCache): Deleted.
1208         * Modules/indexeddb/legacy/LegacyTransaction.h:
1209         * Modules/mediasource/MediaSource.cpp:
1210         (WebCore::MediaSource::canSuspendForDocumentSuspension):
1211         (WebCore::MediaSource::canSuspendForPageCache): Deleted.
1212         * Modules/mediasource/MediaSource.h:
1213         * Modules/mediasource/SourceBuffer.cpp:
1214         (WebCore::SourceBuffer::canSuspendForDocumentSuspension):
1215         (WebCore::SourceBuffer::canSuspendForPageCache): Deleted.
1216         * Modules/mediasource/SourceBuffer.h:
1217         * Modules/mediastream/MediaStreamTrack.cpp:
1218         (WebCore::MediaStreamTrack::canSuspendForDocumentSuspension):
1219         (WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
1220         * Modules/mediastream/MediaStreamTrack.h:
1221         * Modules/mediastream/RTCDTMFSender.cpp:
1222         (WebCore::RTCDTMFSender::canSuspendForDocumentSuspension):
1223         (WebCore::RTCDTMFSender::canSuspendForPageCache): Deleted.
1224         * Modules/mediastream/RTCDTMFSender.h:
1225         * Modules/mediastream/RTCPeerConnection.cpp:
1226         (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
1227         (WebCore::RTCPeerConnection::canSuspendForPageCache): Deleted.
1228         * Modules/mediastream/RTCPeerConnection.h:
1229         * Modules/notifications/DOMWindowNotifications.cpp:
1230         (WebCore::DOMWindowNotifications::disconnectFrameForDocumentSuspension):
1231         (WebCore::DOMWindowNotifications::reconnectFrameFromDocumentSuspension):
1232         (WebCore::DOMWindowNotifications::disconnectFrameForPageCache): Deleted.
1233         (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache): Deleted.
1234         * Modules/notifications/DOMWindowNotifications.h:
1235         * Modules/notifications/Notification.cpp:
1236         (WebCore::Notification::canSuspendForDocumentSuspension):
1237         (WebCore::Notification::canSuspendForPageCache): Deleted.
1238         * Modules/notifications/Notification.h:
1239         * Modules/notifications/NotificationCenter.cpp:
1240         (WebCore::NotificationCenter::canSuspendForDocumentSuspension):
1241         (WebCore::NotificationCenter::canSuspendForPageCache): Deleted.
1242         * Modules/notifications/NotificationCenter.h:
1243         * Modules/webaudio/AudioContext.cpp:
1244         (WebCore::AudioContext::canSuspendForDocumentSuspension):
1245         (WebCore::AudioContext::canSuspendForPageCache): Deleted.
1246         * Modules/webaudio/AudioContext.h:
1247         * Modules/webdatabase/DatabaseContext.cpp:
1248         (WebCore::DatabaseContext::canSuspendForDocumentSuspension):
1249         (WebCore::DatabaseContext::canSuspendForPageCache): Deleted.
1250         * Modules/webdatabase/DatabaseContext.h:
1251         * Modules/websockets/WebSocket.cpp:
1252         (WebCore::WebSocket::canSuspendForDocumentSuspension):
1253         (WebCore::WebSocket::canSuspendForPageCache): Deleted.
1254         * Modules/websockets/WebSocket.h:
1255         * css/FontLoader.cpp:
1256         (WebCore::FontLoader::canSuspendForDocumentSuspension):
1257         (WebCore::FontLoader::canSuspendForPageCache): Deleted.
1258         * css/FontLoader.h:
1259         * dom/ActiveDOMObject.cpp:
1260         (WebCore::ActiveDOMObject::canSuspendForDocumentSuspension):
1261         (WebCore::ActiveDOMObject::canSuspendForPageCache): Deleted.
1262         * dom/ActiveDOMObject.h:
1263         * dom/Document.cpp:
1264         (WebCore::Document::~Document):
1265         * dom/ScriptExecutionContext.cpp:
1266         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForTabSuspension):
1267         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache): Deleted.
1268         * dom/ScriptExecutionContext.h:
1269         * fileapi/FileReader.cpp:
1270         (WebCore::FileReader::canSuspendForDocumentSuspension):
1271         (WebCore::FileReader::canSuspendForPageCache): Deleted.
1272         * fileapi/FileReader.h:
1273         * history/CachedFrame.cpp:
1274         (WebCore::CachedFrame::CachedFrame):
1275         * history/PageCache.cpp:
1276         (WebCore::canCacheFrame):
1277         * html/HTMLMarqueeElement.cpp:
1278         (WebCore::HTMLMarqueeElement::canSuspendForDocumentSuspension):
1279         (WebCore::HTMLMarqueeElement::canSuspendForPageCache): Deleted.
1280         * html/HTMLMarqueeElement.h:
1281         * html/HTMLMediaElement.cpp:
1282         (WebCore::HTMLMediaElement::canSuspendForDocumentSuspension):
1283         (WebCore::HTMLMediaElement::canSuspendForPageCache): Deleted.
1284         * html/HTMLMediaElement.h:
1285         * html/HTMLSourceElement.cpp:
1286         (WebCore::HTMLSourceElement::canSuspendForDocumentSuspension):
1287         (WebCore::HTMLSourceElement::canSuspendForPageCache): Deleted.
1288         * html/HTMLSourceElement.h:
1289         * html/PublicURLManager.cpp:
1290         (WebCore::PublicURLManager::canSuspendForDocumentSuspension):
1291         (WebCore::PublicURLManager::canSuspendForPageCache): Deleted.
1292         * html/PublicURLManager.h:
1293         * html/canvas/WebGLRenderingContextBase.cpp:
1294         (WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension):
1295         (WebCore::WebGLRenderingContextBase::canSuspendForPageCache): Deleted.
1296         * html/canvas/WebGLRenderingContextBase.h:
1297         * loader/FrameLoader.cpp:
1298         (WebCore::FrameLoader::clear):
1299         (WebCore::FrameLoader::open):
1300         * loader/appcache/DOMApplicationCache.cpp:
1301         (WebCore::DOMApplicationCache::disconnectFrameForDocumentSuspension):
1302         (WebCore::DOMApplicationCache::reconnectFrameFromDocumentSuspension):
1303         (WebCore::DOMApplicationCache::disconnectFrameForPageCache): Deleted.
1304         (WebCore::DOMApplicationCache::reconnectFrameFromPageCache): Deleted.
1305         * loader/appcache/DOMApplicationCache.h:
1306         * page/DOMWindow.cpp:
1307         (WebCore::DOMWindow::DOMWindow):
1308         (WebCore::DOMWindow::~DOMWindow):
1309         (WebCore::DOMWindow::resetUnlessSuspendedForDocumentSuspension):
1310         (WebCore::DOMWindow::suspendForDocumentSuspension):
1311         (WebCore::DOMWindow::resumeFromDocumentSuspension):
1312         (WebCore::DOMWindow::disconnectDOMWindowProperties):
1313         (WebCore::DOMWindow::reconnectDOMWindowProperties):
1314         (WebCore::DOMWindow::resetUnlessSuspendedForPageCache): Deleted.
1315         (WebCore::DOMWindow::suspendForPageCache): Deleted.
1316         (WebCore::DOMWindow::resumeFromPageCache): Deleted.
1317         * page/DOMWindow.h:
1318         * page/DOMWindowExtension.cpp:
1319         (WebCore::DOMWindowExtension::disconnectFrameForDocumentSuspension):
1320         (WebCore::DOMWindowExtension::reconnectFrameFromDocumentSuspension):
1321         (WebCore::DOMWindowExtension::disconnectFrameForPageCache): Deleted.
1322         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache): Deleted.
1323         * page/DOMWindowExtension.h:
1324         * page/DOMWindowProperty.cpp:
1325         (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
1326         (WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
1327         (WebCore::DOMWindowProperty::disconnectFrameForPageCache): Deleted.
1328         (WebCore::DOMWindowProperty::reconnectFrameFromPageCache): Deleted.
1329         * page/DOMWindowProperty.h:
1330         * page/EventSource.cpp:
1331         (WebCore::EventSource::canSuspendForDocumentSuspension):
1332         (WebCore::EventSource::canSuspendForPageCache): Deleted.
1333         * page/EventSource.h:
1334         * page/SuspendableTimer.cpp:
1335         (WebCore::SuspendableTimer::canSuspendForDocumentSuspension):
1336         (WebCore::SuspendableTimer::canSuspendForPageCache): Deleted.
1337         * page/SuspendableTimer.h:
1338         * workers/Worker.cpp:
1339         (WebCore::Worker::canSuspendForDocumentSuspension):
1340         (WebCore::Worker::canSuspendForPageCache): Deleted.
1341         * workers/Worker.h:
1342         * xml/XMLHttpRequest.cpp:
1343         (WebCore::XMLHttpRequest::canSuspendForDocumentSuspension):
1344         (WebCore::XMLHttpRequest::canSuspendForPageCache): Deleted.
1345         * xml/XMLHttpRequest.h:
1346
1347 2015-11-30  Brady Eidson  <beidson@apple.com>
1348
1349         Modern IDB: "prevunique" cursors should point at the lowest primary key that matches, not the highest.
1350         https://bugs.webkit.org/show_bug.cgi?id=151675.
1351
1352         Reviewed by Darin Adler.
1353
1354         No new tests (Covered by at least one failing test that now passes, and updates to previously incorrect tests).
1355
1356         * Modules/indexeddb/server/IndexValueEntry.cpp:
1357         (WebCore::IDBServer::IndexValueEntry::reverseBegin): If CursorDuplicity is NoDuplicates, start at the lowest
1358           entry instead of the highest.
1359         (WebCore::IDBServer::IndexValueEntry::reverseFind):
1360         * Modules/indexeddb/server/IndexValueEntry.h:
1361         
1362         * Modules/indexeddb/server/IndexValueStore.cpp:
1363         (WebCore::IDBServer::IndexValueStore::reverseFind):
1364         (WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
1365         (WebCore::IDBServer::IndexValueStore::Iterator::nextIndexEntry):
1366         * Modules/indexeddb/server/IndexValueStore.h:
1367         
1368         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
1369         (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor):
1370         (WebCore::IDBServer::MemoryIndexCursor::iterate):
1371         
1372         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
1373         (WebCore::IDBCursorInfo::duplicity):
1374         (WebCore::IDBCursorInfo::isDirectionNoDuplicate): Deleted.
1375         * Modules/indexeddb/shared/IDBCursorInfo.h:
1376
1377 2015-11-30  Jiewen Tan  <jiewen_tan@apple.com>
1378
1379         Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
1380         https://bugs.webkit.org/show_bug.cgi?id=149309
1381         <rdar://problem/22748363>
1382
1383         Reviewed by Brent Fulgham.
1384
1385         A weird order of event execution introduced by the test case will kill the webpage in a
1386         subframe of the page while executing its |frame.loader().checkLoadCompleteForThisFrame()|.
1387         Therefore, any frames comes after the failing subframe will have no page. Check it before
1388         calling to those frames' |frame.loader().checkLoadCompleteForThisFrame()|, otherwise the
1389         assertion in |frame.loader().checkLoadCompleteForThisFrame()| will fail.
1390
1391         Test: http/tests/misc/detach-during-notifyDone.html
1392
1393         * loader/FrameLoader.cpp:
1394         (WebCore::FrameLoader::checkLoadComplete):
1395
1396 2015-11-30  Commit Queue  <commit-queue@webkit.org>
1397
1398         Unreviewed, rolling out r192819.
1399         https://bugs.webkit.org/show_bug.cgi?id=151681
1400
1401         This change broke existing layout tests on Windows (Requested
1402         by ryanhaddad on #webkit).
1403
1404         Reverted changeset:
1405
1406         "Unify font-variant-* with font-variant shorthand"
1407         https://bugs.webkit.org/show_bug.cgi?id=149773
1408         http://trac.webkit.org/changeset/192819
1409
1410 2015-11-30  Darin Adler  <darin@apple.com>
1411
1412         Use Optional instead of isNull out argument for nullable getters
1413         https://bugs.webkit.org/show_bug.cgi?id=151676
1414
1415         Reviewed by Anders Carlsson.
1416
1417         No behavior change, just cleaner code.
1418
1419         * Modules/geolocation/Coordinates.cpp:
1420         (WebCore::Coordinates::altitude): Return an Optional.
1421         (WebCore::Coordinates::altitudeAccuracy): Ditto.
1422         (WebCore::Coordinates::heading): Ditto.
1423         (WebCore::Coordinates::speed): Ditto.
1424         * Modules/geolocation/Coordinates.h: Ditto.
1425
1426         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1427         (WebCore::IDBVersionChangeEvent::create): Added. The code before was calling
1428         through to Event::create, which is clearly not what was wanted. Also removed
1429         unneeded explicit destructor.
1430         * Modules/indexeddb/IDBVersionChangeEvent.h: Changed return type of newVersion
1431         to Optional and updated for above change.
1432
1433         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
1434         (WebCore::IDBClient::IDBVersionChangeEvent::newVersion): Changed to return
1435         an Optional.
1436         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed unused
1437         default argument values; the event type one, at least, was clearly incorrect.
1438         Made more things private, got rid of unneeded destructor, marked class final
1439         instead of marking all functions final.
1440
1441         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
1442         (WebCore::LegacyVersionChangeEvent::newVersion): Same as above.
1443         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Ditto.
1444
1445         * Modules/mediastream/MediaTrackConstraints.cpp:
1446         (WebCore::MediaTrackConstraints::optional): Removed bogus bool value. If we
1447         come back to finish later we will have to implement optional return values
1448         for arrays in the JavaScript bindings generator, which should be straightforward.
1449         * Modules/mediastream/MediaTrackConstraints.h: Ditto.
1450
1451         * bindings/js/JSDOMBinding.h:
1452         (WebCore::toNullableJSNumber): Added. This function template is used for
1453         return values that are nullable numbers.
1454
1455         * bindings/scripts/CodeGeneratorGObject.pm:
1456         (GenerateFunction): Replaced some existing bogus code to handle nullables with
1457         new equally-bogus code that should be no worse and will compile.
1458
1459         * bindings/scripts/CodeGeneratorJS.pm:
1460         (GenerateImplementation): Removed old support for nullables.
1461         (NativeToJSValue): Added new support for nullable numbers.
1462
1463         * bindings/scripts/CodeGeneratorObjC.pm:
1464         (GenerateImplementation): Removed support for nullables. We almost certainly
1465         won't need it for Objective-C bindings.
1466
1467         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Updated.
1468         * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
1469         * bindings/scripts/test/ObjC/DOMTestObj.mm: Updated.
1470
1471 2015-11-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1472
1473         Split platform-independent logic in AVCaptureDeviceManager out into a new class
1474         https://bugs.webkit.org/show_bug.cgi?id=151388
1475         <rdar://problem/23593980>
1476
1477         Reviewed by Eric Carlson.
1478
1479         To prepare for creating a MockCaptureDeviceManager to be able to test
1480         MediaDevices.getUserMedia, we create a platform-independent capture device manager
1481         which all platforms should extend and add platform-specific logic to.
1482
1483         The methods CaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints and
1484         CaptureDeviceManager::captureDeviceList should be overridden by each platform
1485         CaptureDeviceManager to respectively create a RealtimeMediaSource and return a list of
1486         capture devices. createMediaSourceForCaptureDeviceWithConstraints attempts to create
1487         a media source for a given device with some constraints; if the contraints cannot be
1488         satisfied, this returns null.
1489
1490         The refactored capture device manager also introduces the notion of a platform-
1491         independent capture session which may be extended by platform device managers for
1492         determining whether a given constraint name, value and media type is valid.
1493
1494         A platform-independent CaptureDeviceInfo now represents either the video or audio
1495         component of a capture device, but not both at once. This means a capture device that
1496         supports both video and audio will emit two separate capture devices.
1497
1498         No new tests, since there should be no behavior change.
1499
1500         * Modules/mediastream/CaptureDeviceInfo.h: Added.
1501         (WebCore::CaptureSessionInfo::~CaptureSessionInfo):
1502         (WebCore::CaptureSessionInfo::supportsVideoSize):
1503         (WebCore::CaptureSessionInfo::bestSessionPresetForVideoDimensions):
1504         * Modules/mediastream/CaptureDeviceManager.cpp: Added.
1505         (CaptureDeviceManager::~CaptureDeviceManager):
1506         (CaptureDeviceManager::getSourcesInfo):
1507         (CaptureDeviceManager::captureDeviceFromDeviceID):
1508         (CaptureDeviceManager::verifyConstraintsForMediaType):
1509         (CaptureDeviceManager::bestSourcesForTypeAndConstraints):
1510         (CaptureDeviceManager::sourceWithUID):
1511         (CaptureDeviceManager::bestDeviceForFacingMode):
1512         (facingModeFromString):
1513         (CaptureDeviceManager::sessionSupportsConstraint):
1514         (CaptureDeviceManager::isSupportedFrameRate):
1515         * Modules/mediastream/CaptureDeviceManager.h: Added.
1516         (WebCore::CaptureDeviceManager::refreshCaptureDeviceList):
1517         (WebCore::CaptureDeviceManager::defaultCaptureSession):
1518         * WebCore.xcodeproj/project.pbxproj:
1519         * platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp: Added.
1520         (WebCore::RealtimeMediaSourceSupportedConstraints::nameForConstraint):
1521         (WebCore::RealtimeMediaSourceSupportedConstraints::constraintFromName):
1522         (WebCore::RealtimeMediaSourceSupportedConstraints::supportsConstraint):
1523         * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:
1524         * platform/mediastream/mac/AVCaptureDeviceManager.h:
1525         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1526         (WebCore::AVCaptureSessionInfo::AVCaptureSessionInfo):
1527         (WebCore::AVCaptureSessionInfo::supportsVideoSize):
1528         (WebCore::AVCaptureSessionInfo::bestSessionPresetForVideoDimensions):
1529         (WebCore::AVCaptureDeviceManager::captureDeviceList):
1530         (WebCore::shouldConsiderDeviceInDeviceList):
1531         (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList):
1532         (WebCore::AVCaptureDeviceManager::AVCaptureDeviceManager):
1533         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
1534         (WebCore::AVCaptureDeviceManager::sourceWithUID):
1535         (WebCore::AVCaptureDeviceManager::getSourcesInfo):
1536         (WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType):
1537         (WebCore::AVCaptureDeviceManager::defaultCaptureSession):
1538         (WebCore::AVCaptureDeviceManager::sessionSupportsConstraint):
1539         (WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints):
1540         (WebCore::AVCaptureDeviceManager::deviceDisconnected):
1541         (WebCore::AVCaptureDeviceManager::isSupportedFrameRate):
1542         (WebCore::CaptureDevice:::m_enabled): Deleted.
1543         (WebCore::captureDeviceList): Deleted.
1544         (WebCore::captureDeviceFromDeviceID): Deleted.
1545         (WebCore::refreshCaptureDeviceList): Deleted.
1546         (WebCore::AVCaptureDeviceManager::bestSessionPresetForVideoSize): Deleted.
1547         (WebCore::AVCaptureDeviceManager::deviceSupportsFacingMode): Deleted.
1548         (WebCore::AVCaptureDeviceManager::bestDeviceForFacingMode): Deleted.
1549         (WebCore::AVCaptureDeviceManager::isValidConstraint): Deleted.
1550         (WebCore::AVCaptureDeviceManager::validConstraintNames): Deleted.
1551         (WebCore::AVCaptureDeviceManager::validFacingModes): Deleted.
1552         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1553         (WebCore::AVVideoCaptureSource::applyConstraints):
1554         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1555         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
1556         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
1557
1558 2015-11-30  Brady Eidson  <beidson@apple.com>
1559
1560         Modern IDB: Set the correct source on the IDBRequest for cursor updates
1561         https://bugs.webkit.org/show_bug.cgi?id=151665
1562
1563         Reviewed by Andy Estes.
1564
1565         No new tests (At least one existing failing test now passes).
1566
1567         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1568         (WebCore::IDBClient::IDBCursor::update):
1569         
1570         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1571         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
1572         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
1573         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1574         
1575         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1576         (WebCore::IDBClient::IDBRequest::IDBRequest):
1577         (WebCore::IDBClient::IDBRequest::setSource):
1578         * Modules/indexeddb/client/IDBRequestImpl.h:
1579
1580 2015-11-30  Tim Horton  <timothy_horton@apple.com>
1581
1582         Get rid of the legacy TextIndicatorWindow style
1583         https://bugs.webkit.org/show_bug.cgi?id=151674
1584
1585         Reviewed by Anders Carlsson.
1586
1587         * page/TextIndicator.h:
1588         * page/mac/TextIndicatorWindow.mm:
1589         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted.
1590
1591 2015-11-30  Brady Eidson  <beidson@apple.com>
1592
1593         Modern IDB: Correct handling of cursors finishing iteration.
1594         https://bugs.webkit.org/show_bug.cgi?id=151664
1595
1596         Reviewed by Andy Estes.
1597
1598         No new tests (At least one previously failing test now passes).
1599
1600         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1601         (WebCore::IDBClient::IDBCursor::setGetResult):
1602         
1603         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1604         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
1605
1606 2015-11-30  Myles C. Maxfield  <mmaxfield@apple.com>
1607
1608         Unify font-variant-* with font-variant shorthand
1609         https://bugs.webkit.org/show_bug.cgi?id=149773
1610
1611         Reviewed by Darin Adler.
1612
1613         This patch makes font-variant a shorthand for the following properties:
1614         font-variant-ligatures
1615         font-variant-position
1616         font-variant-caps
1617         font-variant-numeric
1618         font-variant-alternates
1619         font-variant-east-asian
1620
1621         This is consistent with the CSS Fonts Level 3 spec.
1622
1623         This patch also migrates the "font" longhand to use the font-variant-caps
1624         property.
1625
1626         Test: fast/text/font-variant-shorthand.html
1627
1628         * css/CSSComputedStyleDeclaration.cpp:
1629         (WebCore::fontVariantEastAsianPropertyValue): Rename FontVariantEastAsian values.
1630         (WebCore::fontVariantFromStyle): We must consult with the longhand properties to determine
1631         font-variant computed style.
1632         (WebCore::ComputedStyleExtractor::propertyValue): Don't put any-old font-variant-caps inside
1633         the font shorthand.
1634         * css/CSSFontSelector.cpp:
1635         (WebCore::CSSFontSelector::addFontFaceRule): Guard against incorrect downcasts (due to inherit
1636         of the new shorthand property).
1637         * css/CSSParser.cpp: Parse font-variant as a shorthand. Also implement its "normal" and "none" values.
1638         (WebCore::CSSParser::parseValue):
1639         (WebCore::CSSParser::parseFont):
1640         (WebCore::CSSParser::parseSystemFont):
1641         (WebCore::CSSParser::parseFontVariantLigatures):
1642         (WebCore::CSSParser::parseFontVariantNumeric):
1643         (WebCore::CSSParser::parseFontVariantEastAsian):
1644         (WebCore::CSSParser::parseFontVariant):
1645         (WebCore::isValidKeywordPropertyAndValue): Deleted.
1646         (WebCore::isKeywordPropertyID): Deleted.
1647         * css/CSSParser.h:
1648         * css/CSSPropertyNames.in: Turn font-variant into a shorthand property.
1649         * css/FontVariantBuilder.h: Guard against incorrect downcasts. Also update for renamed
1650         FontVariantEastAsian type.
1651         (WebCore::applyValueFontVariantLigatures):
1652         (WebCore::applyValueFontVariantNumeric):
1653         (WebCore::applyValueFontVariantEastAsian):
1654         * css/StyleProperties.cpp: Update to use the more specific property.
1655         (WebCore::StyleProperties::appendFontLonghandValueIfExplicit):
1656         (WebCore::StyleProperties::fontValue):
1657         (WebCore::StyleProperties::asText):
1658         * css/StyleResolver.cpp: Ditto.
1659         (WebCore::StyleResolver::isValidCueStyleProperty):
1660         * editing/EditingStyle.cpp: Ditto.
1661         * editing/cocoa/HTMLConverter.mm: Ditto.
1662         (HTMLConverterCaches::propertyValueForNode):
1663         (HTMLConverter::computedAttributesForElement):
1664         * editing/ios/EditorIOS.mm: Ditto.
1665         (WebCore::Editor::removeUnchangeableStyles):
1666         * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
1667         (WebCore::CanvasRenderingContext2D::font):
1668         (WebCore::CanvasRenderingContext2D::setFont):
1669         * platform/graphics/FontCache.h: Removing duplicate cache key value.
1670         (WebCore::FontDescriptionKey::makeFlagsKey):
1671         * platform/graphics/FontCascade.cpp: Migrate to the new font-variant-caps from the old member variable.
1672         (WebCore::FontCascade::glyphDataForCharacter):
1673         * platform/graphics/FontCascade.h: Ditto.
1674         (WebCore::FontCascade::isSmallCaps):
1675         * platform/graphics/FontDescription.cpp: Ditto.
1676         (WebCore::FontDescription::FontDescription):
1677         * platform/graphics/FontDescription.h: Ditto.
1678         (WebCore::FontCascadeDescription::equalForTextAutoSizing):
1679         (WebCore::FontDescription::smallCaps): Deleted.
1680         (WebCore::FontDescription::setSmallCaps): Deleted.
1681         (WebCore::FontDescription::setIsSmallCaps): Deleted.
1682         (WebCore::FontDescription::operator==): Deleted.
1683         * platform/graphics/cocoa/FontCacheCoreText.cpp: Rename FontVariantEastAsianWidth.
1684         (WebCore::computeFeatureSettingsFromVariants):
1685         * platform/text/TextFlags.h: Ditto.
1686         (WebCore::FontVariantSettings::operator==):
1687         * rendering/RenderText.cpp: Migrage to the new font-variant-caps from the old member variable.
1688         (WebCore::RenderText::widthFromCache):
1689
1690 2015-11-30  Brady Eidson  <beidson@apple.com>
1691
1692         Modern IDB: After versionchange transactions abort, fire onerror on the original IDBOpenDBRequest.
1693         https://bugs.webkit.org/show_bug.cgi?id=151648
1694
1695         Reviewed by Andy Estes.
1696
1697         No new tests. Covered by at least one existing failing test which now passes, and many
1698         other tests updated to fix their incorrect behavior.
1699
1700         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1701         (WebCore::IDBClient::IDBDatabase::transaction):
1702         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
1703         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
1704         
1705         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1706         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
1707         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
1708         
1709         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1710         (WebCore::IDBClient::IDBTransaction::notifyDidAbort):
1711         (WebCore::IDBClient::IDBTransaction::didAbort):
1712         (WebCore::IDBClient::IDBTransaction::didCommit):
1713         * Modules/indexeddb/client/IDBTransactionImpl.h:
1714
1715 2015-11-30  Chris Dumez  <cdumez@apple.com>
1716
1717         location.origin is undefined in a web worker
1718         https://bugs.webkit.org/show_bug.cgi?id=151614
1719
1720         Reviewed by Darin Adler.
1721
1722         Expose location.origin to web workers, as per:
1723         https://html.spec.whatwg.org/multipage/workers.html#workerlocation
1724
1725         This behavior is consistent with the behavior of Firefox and Chrome.
1726
1727         Test: fast/workers/worker-location.html
1728
1729         * workers/WorkerLocation.cpp:
1730         (WebCore::WorkerLocation::origin):
1731         * workers/WorkerLocation.h:
1732         * workers/WorkerLocation.idl:
1733
1734 2015-11-30  Brady Eidson  <beidson@apple.com>
1735
1736         Modern IDB: Support updating cursor values when the object store uses inline keys.
1737         https://bugs.webkit.org/show_bug.cgi?id=151647
1738
1739         Reviewed by Andy Estes.
1740
1741         No new tests (At least two previously failing tests now pass and are unskipped).
1742
1743         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1744         (WebCore::IDBClient::IDBCursor::update): Use putForCursorUpdate() instead of put()
1745         
1746         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1747         (WebCore::IDBClient::IDBObjectStore::add):
1748         (WebCore::IDBClient::IDBObjectStore::put):
1749         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate): Use the flag to skip the inline-key check.
1750         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Add a flag to skip the inline-key check.
1751         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1752
1753 2015-11-30  Brady Eidson  <beidson@apple.com>
1754
1755         Modern IDB: Resolve flaky GC-vs-wrapper issue with IDBOpenDBRequest.
1756         https://bugs.webkit.org/show_bug.cgi?id=151645
1757
1758         Reviewed by Andy Estes.
1759
1760         No new tests (Resolves flakiness with hundreds of existing IDB tests).
1761
1762         Do to improper management of the m_hasPendingActivity flag on IDBRequestImpl,
1763         the request wrapper for an IDBOpenDBRequest might be garbage collected in between the
1764         onUpgradeNeeded event and onSuccess event.
1765         
1766         This manifested as flakiness in many tests, some more than others.
1767         
1768         I tried to write a targeted 100% reproducible case manually forcing GC, but could not get
1769         the timing right.
1770         
1771         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1772         (WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
1773         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
1774         
1775         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1776         (WebCore::IDBClient::IDBRequest::dispatchEvent):
1777         (WebCore::IDBClient::IDBRequest::willIterateCursor):
1778         * Modules/indexeddb/client/IDBRequestImpl.h:
1779         (WebCore::IDBClient::IDBRequest::isOpenDBRequest):
1780
1781 2015-11-30  Per Arne Vollan  <peavo@outlook.com>
1782
1783         [WinCairo][MediaFoundation] Implement seek.
1784         https://bugs.webkit.org/show_bug.cgi?id=151609
1785
1786         Reviewed by Alex Christensen.
1787
1788         The methods maxTimeSeekable() and buffered() needs to be implemented.
1789
1790         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1791         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
1792         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
1793         (WebCore::MediaPlayerPrivateMediaFoundation::readyState):
1794         (WebCore::MediaPlayerPrivateMediaFoundation::maxTimeSeekable):
1795         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
1796         (WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
1797         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::currentTime):
1798         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
1799         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1800         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::maxTimeLoaded):
1801
1802 2015-11-30  Brady Eidson  <beidson@apple.com>
1803
1804         Modern IDB: openCursor() fix resulting in at least 4 more passing tests.
1805         https://bugs.webkit.org/show_bug.cgi?id=151630
1806
1807         Reviewed by Andy Estes.
1808
1809         No new tests (At least 4 failing tests now pass, and 9 other incorrect tests updated).
1810
1811         * Modules/indexeddb/IDBGetResult.cpp:
1812         (WebCore::IDBGetResult::isolatedCopy):
1813         * Modules/indexeddb/IDBGetResult.h:
1814         (WebCore::IDBGetResult::IDBGetResult):
1815         (WebCore::IDBGetResult::isDefined):
1816
1817         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1818         (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor): If the IDBGetResult is undefined,
1819           do not expose the cursor as the result property of the IDBRequest.
1820
1821 2015-11-30  Brady Eidson  <beidson@apple.com>
1822
1823         Modern IDB: Support keyPath injection into object store records.
1824         https://bugs.webkit.org/show_bug.cgi?id=151640
1825
1826         Reviewed by Andy Estes.
1827
1828         No new tests (At least one existing failure now passes and is unskipped,
1829         while many other existing failures are now closer to passing).
1830
1831         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1832         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord): Use the new UniqueIDBDatabase VM/ExecState.
1833         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords): Ditto
1834         (WebCore::IDBServer::indexVM): Deleted.
1835         (WebCore::IDBServer::indexGlobalExec): Deleted.
1836         
1837         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1838         (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM):
1839         (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState):
1840         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): If appropriate, inject the key that will be used into
1841           the value before storing the record.
1842         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1843
1844         Add modern JSValue/ExecState& version of some binding utilities, for use today and in preparation of getting 
1845         rid of the DOMRequestState and Deprecated::ScriptValue versions later:
1846         * bindings/js/IDBBindingUtilities.cpp:
1847         (WebCore::idbKeyToJSValue):
1848         (WebCore::injectIDBKeyIntoScriptValue):
1849         (WebCore::deserializeIDBValueData):
1850         (WebCore::deserializeIDBValueDataToJSValue):
1851         * bindings/js/IDBBindingUtilities.h:
1852
1853 2015-11-25  Andy Estes  <aestes@apple.com>
1854
1855         [Content Filtering] Avoid creating a ContentFilter when loading the empty document
1856         https://bugs.webkit.org/show_bug.cgi?id=151615
1857
1858         Reviewed by Daniel Bates.
1859
1860         It's expensive to create the first ContentFilter since two frameworks must be soft-linked. There's no reason to
1861         pay this cost if we're just loading the empty document.
1862
1863         No new tests. It's not possible to write a test that would fail without this change since ContentFilter is not
1864         notified of empty document loads.
1865
1866         * loader/DocumentLoader.cpp:
1867         (WebCore::DocumentLoader::startLoadingMainResource): Don't initialize m_contentFilter until we know we aren't
1868         loading the empty document.
1869         (WebCore::DocumentLoader::DocumentLoader):
1870
1871 2015-11-29  Antoine Quint  <graouts@apple.com>
1872
1873         Browser does not fall back to SVG attribute value when CSS style value is invalid or not supported
1874         https://bugs.webkit.org/show_bug.cgi?id=147932
1875
1876         Reviewed by Dean Jackson.
1877
1878         Instead of returning an SVGPaint object of type SVG_PAINTTYPE_UNKNOWN when we encounter an SVG paint
1879         value that cannot be parsed, we now return `nullptr` which will cause that value to be ignored and
1880         let another paint value in the cascade be used instead. This is the same approach used for SVGColor.
1881         Since we're removing the only call site for `SVGPaint::createUnknown()`, we remove that function entirely.
1882
1883         Tests: svg/css/invalid-color-cascade.svg
1884                svg/css/invalid-paint-cascade.svg
1885
1886         * css/SVGCSSParser.cpp:
1887         (WebCore::CSSParser::parseSVGPaint):
1888         * svg/SVGPaint.h:
1889         (WebCore::SVGPaint::createUnknown): Deleted.
1890
1891 2015-11-29  Simon Fraser  <simon.fraser@apple.com>
1892
1893         Use SVGTransform::SVGTransformType instead of an unsigned short
1894         https://bugs.webkit.org/show_bug.cgi?id=151637
1895
1896         Reviewed by Brady Eidson.
1897
1898         Make 'type' more strongly typed.
1899
1900         * svg/SVGTransformable.cpp:
1901         (WebCore::SVGTransformable::parseTransformValue):
1902         (WebCore::parseAndSkipType):
1903         (WebCore::SVGTransformable::parseTransformType):
1904         (WebCore::SVGTransformable::parseTransformAttribute):
1905         * svg/SVGTransformable.h:
1906
1907 2015-11-27  Brady Eidson  <beidson@apple.com>
1908
1909         Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
1910         https://bugs.webkit.org/show_bug.cgi?id=151627
1911
1912         Reviewed by Alexey Proskuryakov.
1913
1914         No new tests (No change in behavior).
1915
1916         * CMakeLists.txt:
1917         * WebCore.xcodeproj/project.pbxproj:
1918
1919         * Modules/indexeddb/IDBGetResult.cpp: Added.
1920         (WebCore::IDBGetResult::dataFromBuffer):
1921         (WebCore::IDBGetResult::isolatedCopy):
1922         * Modules/indexeddb/IDBGetResult.h:
1923         (WebCore::IDBGetResult::IDBGetResult):
1924         (WebCore::IDBGetResult::valueBuffer):
1925         (WebCore::IDBGetResult::keyData):
1926         (WebCore::IDBGetResult::primaryKeyData):
1927         (WebCore::IDBGetResult::keyPath):
1928         (WebCore::IDBGetResult::setValueBuffer):
1929         (WebCore::IDBGetResult::setKeyData):
1930         (WebCore::IDBGetResult::setPrimaryKeyData):
1931         (WebCore::IDBGetResult::setKeyPath):
1932         (WebCore::IDBGetResult::dataFromBuffer): Deleted.
1933         (WebCore::IDBGetResult::isolatedCopy): Deleted.
1934
1935         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1936         (WebCore::IDBClient::IDBCursor::setGetResult):
1937         * Modules/indexeddb/client/IDBCursorImpl.h:
1938
1939         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1940         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
1941
1942         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
1943         (WebCore::GetOperation::perform):
1944
1945         * Modules/indexeddb/server/IDBBackingStore.h:
1946
1947         * Modules/indexeddb/server/MemoryCursor.h:
1948
1949         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
1950         (WebCore::IDBServer::MemoryIndexCursor::currentData):
1951
1952         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
1953         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
1954
1955         * platform/CrossThreadCopier.h:
1956
1957 2015-11-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1958
1959         [GTK] Do not use the WebCore garbage collector timer
1960         https://bugs.webkit.org/show_bug.cgi?id=151623
1961
1962         Reviewed by Martin Robinson.
1963
1964         Now that garbage collector timers have been implemented in
1965         JavaScriptCore for glib, we don't need to use another Timer in WebCore.
1966
1967         * bindings/js/GCController.cpp:
1968         (WebCore::GCController::garbageCollectSoon):
1969         (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
1970
1971 2015-11-18  Andy Estes  <aestes@apple.com>
1972
1973         [Content Filtering] Crash in DocumentLoader::notifyFinished() when allowing a media document to load
1974         https://bugs.webkit.org/show_bug.cgi?id=151433
1975         rdar://problem/23506594
1976
1977         Reviewed by Alexey Proskuryakov.
1978
1979         When the main resource of a media document commits, WebKit cancels its load since the plug-in or media engine
1980         will do its own loading. If content filtering is enabled, and the filter waits allow the load until the entire
1981         resource is downloaded, then ContentFilter will attempt to call DocumentLoader::notifyFinished() immediately
1982         after delivering the buffered resource data to DocumentLoader. However, delivering the data will have nulled out
1983         DocumentLoader's m_mainResource when the load was cancelled, leading to a crash in notifyFinished().
1984
1985         To resolve this, add a new Stopped state to ContentFilter. Set this state if DocumentLoader clears its main
1986         resource or detaches from its frame. If ContentFilter is in the Stopped state after calling
1987         DocumentLoader::dataReceived(), do not proceed to call DocumentLoader::notifyFinished().
1988
1989         Test: contentfiltering/allow-media-document.html
1990
1991         * loader/ContentFilter.cpp:
1992         (WebCore::ContentFilter::stopFilteringMainResource): Set m_state to Stopped. If m_mainResource is non-null,
1993         removed ContentFilter as a client and set m_mainResource to null.
1994         (WebCore::ContentFilter::notifyFinished): Stopped calling DocumentLoader::notifyFinished() if m_state is Stopped
1995         after calling DocumentLoader::dataReceived().
1996         * loader/ContentFilter.h:
1997         * loader/DocumentLoader.cpp:
1998         (WebCore::DocumentLoader::detachFromFrame): Called ContentFilter::stopFilteringMainResource() instead of setting
1999         m_contentFilter to null.
2000         (WebCore::DocumentLoader::clearMainResource): Ditto.
2001
2002 2015-11-25  Pranjal Jumde  <pjumde@apple.com>
2003
2004         Checks for buffer-overflows when reading characters from textRun
2005         https://bugs.webkit.org/show_bug.cgi?id=151055
2006         <rdar://problem/23251789>
2007
2008         Reviewed by Myles C. Maxfield.
2009
2010         Prevents an off by one error when adding the last font data to the GlyphBuffer.
2011
2012         * Source/WebCore/platform/graphics/WidthIterator.cpp:
2013         * Source/WebCore/platform/graphics/FontCascade.cpp:
2014
2015 2015-11-24  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2016
2017         [Streams API] Implement pipeTo method in readable Stream
2018         https://bugs.webkit.org/show_bug.cgi?id=151588
2019
2020         Reviewed by Darin Adler.
2021
2022         Implemented pipeTo method according to the reference implementation in the spec as the spec is not written
2023         yet. It can be found at https://github.com/whatwg/streams/blob/632b26a05f3106650b1ec91239ad5b012e6c64af/reference-implementation/lib/readable-stream.js#L75.
2024
2025         Tests: streams/pipe-to.html
2026                streams/reference-implementation/brand-checks.html
2027                streams/reference-implementation/pipe-through.html
2028                streams/reference-implementation/pipe-to.html
2029                streams/reference-implementation/pipe-to-options.html
2030                streams/reference-implementation/readable-stream-templated
2031
2032         * Modules/streams/ReadableStream.js:
2033         (doPipe): Internal function of pipeTo.
2034         (closeDest): Internal function of pipeTo.
2035         (abortDest): Internal function of pipeTo.
2036         (pipeTo): Implemented as per spec with some other internal functions as helpers.
2037
2038 2015-11-24  Antti Koivisto  <antti@apple.com>
2039
2040         REGRESSION (r190983): Non-element, non-text nodes should not be distributed to slots
2041         https://bugs.webkit.org/show_bug.cgi?id=151566
2042         rdar://problem/23430177
2043
2044         Reviewed by Zalan Bujtas.
2045
2046         We don't invalidate slot assignments except for text or element children. Fix by not
2047         not assigning other nodes to slots as it is not useful.
2048
2049         Test: fast/html/details-comment-crash.html
2050
2051         * dom/SlotAssignment.cpp:
2052         (WebCore::slotNameFromSlotAttribute):
2053         (WebCore::SlotAssignment::findAssignedSlot):
2054         (WebCore::SlotAssignment::assignSlots):
2055
2056 2015-11-23  David Kilzer  <ddkilzer@apple.com>
2057
2058         Hardening against CSSSelector double frees
2059         <http://webkit.org/b/56124>
2060         <rdar://problem/9119036>
2061
2062         Reviewed by Antti Koivisto.
2063
2064         Add some security assertions to catch this issue if it ever
2065         happens in Debug builds, and make changes in
2066         CSSSelector::~CSSSelector() and
2067         CSSSelectorList::deleteSelectors() to prevent obvious issues if
2068         they're ever called twice in Release builds.
2069
2070         No new tests because we don't know how to reproduce this.
2071
2072         * css/CSSSelector.cpp:
2073         (WebCore::CSSSelector::CSSSelector): Initialize
2074         m_destructorHasBeenCalled.
2075         * css/CSSSelector.h:
2076         (WebCore::CSSSelector::m_destructorHasBeenCalled): Add bitfield.
2077         (WebCore::CSSSelector::CSSSelector): Initialize
2078         m_destructorHasBeenCalled.
2079         (WebCore::CSSSelector::~CSSSelector): Add security assertion
2080         that this is never called twice.  Clear out any fields that
2081         would have caused us to dereference an object twice.
2082
2083         * css/CSSSelectorList.cpp:
2084         (WebCore::CSSSelectorList::deleteSelectors): Clear
2085         m_selectorArray when freeing the memory to which it was
2086         pointing.  This prevents re-entrancy issues or calling this
2087         method twice on the same thread.  Also restructure the for()
2088         loop to prevent calling CSSSelector::isLastInSelectorList()
2089         after CSSSelector::~CSSSelector() has been called (via CRBug
2090         241892).
2091
2092 2015-11-23  Brian Burg  <bburg@apple.com>
2093
2094         Web Inspector: inspector settings should not be shared between different inspection levels
2095         https://bugs.webkit.org/show_bug.cgi?id=151151
2096
2097         Reviewed by Timothy Hatcher.
2098
2099         InspectorController and InspectorFrontendClient should know how to compute their
2100         inspection levels, so that this level can be exposed to the Inspector frontend for
2101         preference disambiguation by inspection level.
2102
2103          - A Page with normal web content has an inspection level of 0.
2104          - The first Web Inspector has an inspection level of 1.
2105          - The second Web Inspector that inspects the Inspector has an inspection level of 2.
2106          - And so forth...
2107
2108         For local frontend clients (WK1 and the ProtocolTestStub), the inspection level of
2109         a Page computed as follows:
2110
2111         - If the page's inspector controller has no frontend client, then the Page
2112         is normal web content (level 0).
2113         - If the page's inspector controller has a frontend client, ask for its inspection level.
2114         A frontend client looks at the inspection level reported by inspected page's inspector
2115         controller and increments by one to account for the crossed inspection boundary.
2116
2117         No new tests, this is blocked by test infrastructure fixes (https://webkit.org/b/151573).
2118
2119         * inspector/InspectorController.cpp:
2120         (WebCore::InspectorController::inspectionLevel): Added.
2121         (WebCore::InspectorController::hasInspectorFrontendClient): Deleted.
2122         * inspector/InspectorController.h:
2123         * inspector/InspectorFrontendClient.h:
2124         * inspector/InspectorFrontendClientLocal.cpp:
2125         (WebCore::InspectorFrontendClientLocal::canAttachWindow): Check inspectionLevel().
2126         (WebCore::InspectorFrontendClientLocal::inspectionLevel): Added.
2127         * inspector/InspectorFrontendClientLocal.h:
2128         * inspector/InspectorFrontendHost.cpp:
2129         (WebCore::InspectorFrontendHost::inspectionLevel): Added.
2130         * inspector/InspectorFrontendHost.h:
2131         * inspector/InspectorFrontendHost.idl:
2132         * page/ContextMenuController.cpp:
2133         (WebCore::ContextMenuController::populate): Check inspectionLevel().
2134
2135 2015-11-20  Brian Burg  <bburg@apple.com>
2136
2137         Web Inspector: RemoteInspector should track targets and connections for remote automation
2138         https://bugs.webkit.org/show_bug.cgi?id=151042
2139
2140         Reviewed by Joseph Pecoraro.
2141
2142         Use the new RemoteControllableTarget API method names.
2143
2144         No new tests, no behavior change.
2145
2146         * page/PageDebuggable.cpp:
2147         (WebCore::PageDebuggable::connect):
2148         (WebCore::PageDebuggable::dispatchMessageFromRemote):
2149         (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend): Deleted.
2150         * page/PageDebuggable.h:
2151
2152 2015-11-23  Brady Eidson  <beidson@apple.com>
2153
2154         Modern IDB: Unskip all indexeddb/mozilla tests that pass.
2155         https://bugs.webkit.org/show_bug.cgi?id=151568
2156         
2157         Reviewed by Alex Christensen.
2158
2159         No new tests (Lots of skipped existing tests now pass).
2160
2161         * Modules/indexeddb/shared/IDBError.h:
2162
2163 2015-11-23  Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
2164
2165         Add WebCore namespace for generated bindings for supplemental method calls
2166         https://bugs.webkit.org/show_bug.cgi?id=151431
2167
2168         Reviewed by Alex Christensen.
2169
2170         Address build failures for generated supplemental method calls which are in the WebCore namespace. 
2171         The bindings are outside the WebCore namespace - so add WebCore namespace specifier where required.
2172
2173         * bindings/scripts/CodeGeneratorJS.pm:
2174         (GenerateHeader):
2175         (GenerateImplementation):
2176         (GenerateParametersCheck):
2177         * bindings/scripts/CodeGeneratorObjC.pm:
2178         (GenerateImplementation):
2179         * bindings/scripts/test/JS/JSTestInterface.cpp:
2180         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
2181         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
2182         (WebCore::jsTestInterfaceSupplementalStr1):
2183         (WebCore::jsTestInterfaceSupplementalStr2):
2184         (WebCore::jsTestInterfaceSupplementalNode):
2185         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2186         (WebCore::setJSTestInterfaceSupplementalStr2):
2187         (WebCore::setJSTestInterfaceSupplementalNode):
2188         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
2189         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2190         (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
2191         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2192         (-[DOMTestInterface supplementalStr1]):
2193         (-[DOMTestInterface supplementalStr2]):
2194         (-[DOMTestInterface setSupplementalStr2:]):
2195         (-[DOMTestInterface supplementalStr3]):
2196         (-[DOMTestInterface setSupplementalStr3:]):
2197         (-[DOMTestInterface supplementalNode]):
2198         (-[DOMTestInterface setSupplementalNode:]):
2199         (-[DOMTestInterface builtinAttribute]):
2200         (-[DOMTestInterface setBuiltinAttribute:]):
2201         (-[DOMTestInterface supplementalMethod1]):
2202         (-[DOMTestInterface supplementalMethod2:objArg:]):
2203         (-[DOMTestInterface supplementalMethod3]):
2204         (-[DOMTestInterface supplementalMethod4]):
2205         (-[DOMTestInterface builtinFunction]):
2206
2207 2015-11-23  Brady Eidson  <beidson@apple.com>
2208
2209         Modern IDB: When a transaction is aborted, call onerror handlers for all in-progress requests.
2210         https://bugs.webkit.org/show_bug.cgi?id=151550
2211
2212         Reviewed by Alex Christensen.
2213
2214         Test: storage/indexeddb/modern/abort-requests-cancelled.html
2215               storage/indexeddb/modern/idbtransaction-objectstore-failures.html (with changes)
2216               storage/indexeddb/modern/index-5.html (with changes)
2217               Various (currently skipped) legacy IDB tests.
2218
2219         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2220         (WebCore::IDBClient::IDBDatabase::transaction):
2221         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
2222         (WebCore::IDBClient::IDBDatabase::didStartTransaction):
2223         (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
2224         (WebCore::IDBClient::IDBDatabase::didCommitTransaction):
2225         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
2226         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
2227         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
2228         
2229         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2230         (WebCore::IDBClient::IDBTransaction::abort):
2231         (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
2232         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
2233         (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
2234         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
2235         (WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
2236         (WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
2237         (WebCore::IDBClient::IDBTransaction::immediateAbort): Deleted.
2238         (WebCore::IDBClient::IDBTransaction::abortOnServer): Deleted.
2239         * Modules/indexeddb/client/IDBTransactionImpl.h:
2240         
2241         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2242         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
2243         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
2244         
2245         * Modules/indexeddb/shared/IDBError.cpp:
2246         (WebCore::idbErrorName):
2247         (WebCore::idbErrorDescription):
2248         * Modules/indexeddb/shared/IDBError.h:
2249         
2250         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
2251         (WebCore::IDBResourceIdentifier::loggingString):
2252         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
2253
2254 2015-11-23  Brady Eidson  <beidson@apple.com>
2255
2256         Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
2257         https://bugs.webkit.org/show_bug.cgi?id=151557
2258
2259         Reviewed by Alex Christensen.
2260
2261         No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).
2262
2263         - Reworking some invalid ASSERTS
2264         - Actually opening pending open-database-requests after a version change transaction completes
2265         - Allow starting new transactions when the version change transaction has *started* finishing, 
2266           but before it finishes finishing.
2267
2268         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2269         (WebCore::IDBClient::IDBDatabase::transaction):
2270         
2271         * Modules/indexeddb/client/IDBTransactionImpl.h:
2272         
2273         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2274         (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
2275         
2276         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
2277         (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.
2278         
2279         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2280         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
2281         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
2282         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2283         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2284
2285 2015-11-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2286
2287         Remove DOMPromiseWithCallback
2288         https://bugs.webkit.org/show_bug.cgi?id=151565
2289
2290         Reviewed by Eric Carlson.
2291
2292         DOMPromiseWithCallback is no longer used as WebCore JS built-ins are used to the cases where DOMPromiseWithCallback made sense.
2293
2294         No change in behavior.
2295
2296         * Modules/mediastream/MediaDevices.h: Moved from DOMPromiseWithCallback to DOMPromise since the API is now called by JS built-ins.
2297         * bindings/js/JSDOMPromise.h:
2298         (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback): Deleted.
2299         (WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback): Deleted.
2300         (WebCore::Error>::resolve): Deleted.
2301         (WebCore::Error>::reject): Deleted.
2302         (WebCore::Error>::resolveEnd): Deleted.
2303
2304 2015-11-23  Brian Burg  <bburg@apple.com>
2305
2306         Web Inspector: when inspecting the inspector, add the inspection level to the title bar
2307         https://bugs.webkit.org/show_bug.cgi?id=151555
2308
2309         Reviewed by Timothy Hatcher.
2310
2311         * English.lproj/Localizable.strings: add new localized string for alternate inspector title.
2312
2313 2015-11-23  Zan Dobersek  <zdobersek@igalia.com>
2314
2315         [GStreamer] No need to assert the pipeline's bus presence in MediaPlayerPrivateGStreamerBase dtor
2316         https://bugs.webkit.org/show_bug.cgi?id=151558
2317
2318         Reviewed by Carlos Garcia Campos.
2319
2320         In the MediaPlayerPrivateGStreamerBase destructor, there's some leftover code
2321         that acquires a reference to the GStreamer pipeline's bus object and then
2322         just asserts that it's not null. Not very useful, so remove it.
2323
2324         Also use nullptr to null out the m_player member.
2325
2326         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2327         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2328
2329 2015-11-17  Sergio Villar Senin  <svillar@igalia.com>
2330
2331         ASSERTION FAILED: freeSpace >= 0 in WebCore::RenderGrid::computeTrackSizesForDirection
2332         https://bugs.webkit.org/show_bug.cgi?id=151254
2333
2334         Reviewed by Darin Adler.
2335
2336         When in quirks mode, abnormally huge margins could lead to
2337         negative computations of available logical sizes. We could add
2338         an !document.inQuirksMode() check in the assertion but since
2339         negative freeSpace values are valid (i.e. the condition is not
2340         really part of the contract and everything will work as
2341         expected) I've decided to simply remove it.
2342
2343         Test: fast/css-grid-layout/grid-quirks-mode-huge-margin-crash.html
2344
2345         * rendering/RenderGrid.cpp:
2346         (WebCore::RenderGrid::computeTrackSizesForDirection): Deleted.
2347
2348 2015-11-22  Myles C. Maxfield  <mmaxfield@apple.com>
2349
2350         Font selection should not consult font-variant property
2351         https://bugs.webkit.org/show_bug.cgi?id=151537
2352
2353         Reviewed by Simon Fraser.
2354
2355         In section 4.7 of the CSS Fonts Level 3 spec, it says "[The font-variant and
2356         font-feature-settings] do not affect font selection."
2357
2358         All the other browsers (Chrome, Firefox, and Edge) all obey the spec here. We
2359         are the only one who misbehaves. This patch aligns our behavior with the other
2360         browsers.
2361
2362         Test: fast/text/font-selection-font-variant.html
2363
2364         * css/CSSFontSelector.cpp:
2365         (WebCore::computeTraitsMask): Deleted.
2366         (WebCore::compareFontFaces): Deleted.
2367         (WebCore::CSSFontSelector::getFontFace): Deleted.
2368         * css/CSSParser.cpp:
2369         (WebCore::isValidKeywordPropertyAndValue):
2370         (WebCore::isKeywordPropertyID):
2371         (WebCore::CSSParser::createFontFaceRule):
2372         (WebCore::CSSParser::CSSParser): Deleted.
2373         (WebCore::CSSParser::parseValue): Deleted.
2374         (WebCore::CSSParser::parseDeclaration): Deleted.
2375         (WebCore::CSSParser::clearProperties): Deleted.
2376         (WebCore::CSSParser::parseFontVariant): Deleted.
2377         (WebCore::CSSParser::createStyleRule): Deleted.
2378         (WebCore::CSSParser::deleteFontFaceOnlyValues): Deleted.
2379         * css/CSSParser.h:
2380         * platform/graphics/FontDescription.cpp:
2381         (WebCore::FontDescription::traitsMask): Deleted.
2382         * platform/graphics/win/FontCacheWin.cpp:
2383         (WebCore::traitsInFamilyEnumProc):
2384         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2385         (WebCore::toTraitsMask):
2386         * platform/text/TextFlags.h:
2387
2388 2015-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2389
2390         Unreviewed, rolling out r192727.
2391
2392         It made the selections transparent again and broke
2393         /webkit2/WebKitWebView/snapshot
2394
2395         Reverted changeset:
2396
2397         "[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor,
2398         et. al. should not clobber state of cached GtkStyleContexts"
2399         https://bugs.webkit.org/show_bug.cgi?id=151533
2400         http://trac.webkit.org/changeset/192727
2401
2402 2015-11-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2403
2404         [GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
2405         https://bugs.webkit.org/show_bug.cgi?id=151533
2406
2407         Reviewed by Carlos Garcia Campos.
2408
2409         platformActiveSelectionBackgroundColor(), platformInactiveSelectionBackgroundColor(), etc.
2410         are const functions intended only to return a color used for painting, but since r174929
2411         they also change the state of the cached style contexts we use for GTK_TYPE_ENTRY and
2412         GTK_TYPE_TREE_VIEW. That's wrong; those style contexts should not have any state set. This
2413         could cause theme colors returned by those GtkStyleContexts to change unexpectedly,
2414         depending on whether the state is explicitly set before each use, or whether the theme
2415         actually uses the states.
2416
2417         This didn't cause any regression only because every place using these style contexts
2418         explicitly sets the state of the style contexts before use. In fact, the GtkTreeView style
2419         context is not used anywhere else, and the GtkEntry style context is only used in
2420         paintTextField, which does set the state before use (and then reverts it using
2421         save/restore), so this cannot have broken anything in practice. But it's a landmine waiting
2422         for the next programmer to trip it.
2423
2424         Fix this with a gtk_style_context_save()/gtk_style_context_restore() pair.
2425
2426         * rendering/RenderThemeGtk.cpp:
2427         (WebCore::styleColor):
2428
2429 2015-11-21  Myles C. Maxfield  <mmaxfield@apple.com>
2430
2431         Tiny cleanup in ComplexTextController::collectComplexTextRuns()
2432         https://bugs.webkit.org/show_bug.cgi?id=151534
2433
2434         Reviewed by Zalan Bujtas.
2435
2436         The isMissingGlyph boolean is completely unnecessary. Its entire
2437         responsiblity is duplicated by the "font" pointer.
2438
2439         No new tests because there is no behavior change.
2440
2441         * platform/graphics/mac/ComplexTextController.cpp:
2442         (WebCore::ComplexTextController::collectComplexTextRuns):
2443
2444 == Rolled over to ChangeLog-2015-11-21 ==