Fix Windows build after r190611.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-06  Alex Christensen  <achristensen@webkit.org>
2
3         Fix Windows build after r190611.
4
5         * PlatformWin.cmake:
6         Forward headers from contentextensions.
7
8 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
9
10         Use modern for-loops in WebCore/html.
11         https://bugs.webkit.org/show_bug.cgi?id=149662
12
13         Reviewed by Darin Adler.
14
15         No new tests because there is no behavior change.
16
17         * html/DOMFormData.cpp:
18         (WebCore::DOMFormData::DOMFormData):
19         * html/EmailInputType.cpp:
20         (WebCore::EmailInputType::typeMismatchFor):
21         * html/FileInputType.cpp:
22         (WebCore::FileInputType::receiveDroppedFiles):
23         * html/FormController.cpp:
24         (WebCore::FormControlState::serializeTo):
25         (WebCore::FormControlState::deserialize):
26         (WebCore::SavedFormState::serializeTo):
27         (WebCore::SavedFormState::getReferencedFilePaths):
28         (WebCore::FormController::createSavedFormStateMap):
29         (WebCore::FormController::formElementsState):
30         (WebCore::FormController::restoreControlStateIn):
31         (WebCore::FormController::getReferencedFilePaths):
32         * html/HTMLAnchorElement.cpp:
33         (WebCore::hasNonEmptyBox):
34         * html/HTMLCanvasElement.cpp:
35         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
36         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
37         (WebCore::HTMLCanvasElement::reset):
38         (WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer):
39         * html/HTMLFieldSetElement.cpp:
40         (WebCore::HTMLFieldSetElement::length):
41         * html/HTMLFormControlsCollection.cpp:
42         (WebCore::firstNamedItem):
43         * html/HTMLFormElement.cpp:
44         (WebCore::HTMLFormElement::~HTMLFormElement):
45         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
46         (WebCore::HTMLFormElement::removedFrom):
47         (WebCore::HTMLFormElement::length):
48         (WebCore::HTMLFormElement::submitImplicitly):
49         (WebCore::HTMLFormElement::validateInteractively):
50         (WebCore::HTMLFormElement::getTextFieldValues):
51         (WebCore::HTMLFormElement::submit):
52         (WebCore::HTMLFormElement::reset):
53         (WebCore::HTMLFormElement::defaultButton):
54         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
55         (WebCore::HTMLFormElement::removeFromPastNamesMap):
56         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
57         * html/HTMLInputElement.cpp:
58         (WebCore::parseAcceptAttribute):
59         * html/HTMLKeygenElement.cpp:
60         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
61         * html/HTMLMediaElement.cpp:
62         (WebCore::HTMLMediaElement::setMediaGroup):
63         * html/HTMLOptionElement.cpp:
64         (WebCore::HTMLOptionElement::index):
65         * html/HTMLSelectElement.cpp:
66         (WebCore::HTMLSelectElement::saveLastSelection):
67         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
68         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
69         (WebCore::HTMLSelectElement::selectedIndex):
70         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
71         (WebCore::HTMLSelectElement::saveFormControlState):
72         (WebCore::HTMLSelectElement::restoreFormControlState):
73         (WebCore::HTMLSelectElement::appendFormData):
74         (WebCore::HTMLSelectElement::reset):
75         * html/HTMLTextAreaElement.cpp:
76         (WebCore::HTMLTextAreaElement::setDefaultValue):
77         * html/InputType.cpp:
78         (WebCore::populateInputTypeFactoryMap):
79         * html/MediaController.cpp:
80         (MediaController::duration):
81         (MediaController::setCurrentTime):
82         (MediaController::play):
83         (MediaController::setPlaybackRate):
84         (MediaController::setVolume):
85         (MediaController::setMuted):
86         (playbackStateWaiting):
87         (MediaController::updateMediaElements):
88         (MediaController::bringElementUpToSpeed):
89         (MediaController::isBlocked):
90         (MediaController::hasEnded):
91         (MediaController::asyncEventTimerFired):
92         (MediaController::clearPositionTimerFired):
93         (MediaController::hasAudio):
94         (MediaController::hasVideo):
95         (MediaController::hasClosedCaptions):
96         (MediaController::setClosedCaptionsVisible):
97         (MediaController::supportsScanning):
98         (MediaController::beginScrubbing):
99         (MediaController::endScrubbing):
100         (MediaController::canPlay):
101         (MediaController::isLiveStream):
102         (MediaController::hasCurrentSrc):
103         (MediaController::returnToRealtime):
104         * html/MediaFragmentURIParser.cpp:
105         (WebCore::MediaFragmentURIParser::parseTimeFragment):
106         * html/PublicURLManager.cpp:
107         (WebCore::PublicURLManager::revoke):
108         (WebCore::PublicURLManager::stop):
109         * html/canvas/WebGLBuffer.cpp:
110         (WebCore::WebGLBuffer::getCachedMaxIndex):
111         (WebCore::WebGLBuffer::setCachedMaxIndex):
112         (WebCore::WebGLBuffer::setTarget):
113         * html/canvas/WebGLContextGroup.cpp:
114         (WebCore::WebGLContextGroup::loseContextGroup):
115         * html/canvas/WebGLDrawBuffers.cpp:
116         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
117         * html/canvas/WebGLFramebuffer.cpp:
118         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
119         (WebCore::WebGLFramebuffer::checkStatus):
120         (WebCore::WebGLFramebuffer::deleteObjectImpl):
121         (WebCore::WebGLFramebuffer::initializeAttachments):
122         (WebCore::WebGLFramebuffer::drawBuffers):
123         * html/canvas/WebGLRenderingContextBase.cpp:
124         (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
125         (WebCore::WebGLRenderingContextBase::deleteTexture):
126         * html/canvas/WebGLVertexArrayObject.cpp:
127         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
128         * html/canvas/WebGLVertexArrayObjectOES.cpp:
129         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
130         * html/parser/AtomicHTMLToken.h:
131         (WebCore::AtomicHTMLToken::initializeAttributes):
132         * html/parser/HTMLConstructionSite.cpp:
133         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
134         * html/parser/HTMLFormattingElementList.cpp:
135         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
136         * html/parser/HTMLPreloadScanner.cpp:
137         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
138         * html/parser/XSSAuditor.cpp:
139         (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
140         * html/shadow/ContentDistributor.cpp:
141         (WebCore::ContentDistributor::distribute):
142         (WebCore::ContentDistributor::invalidate):
143         * html/shadow/MediaControlElements.cpp:
144         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
145         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
146         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
147         * html/track/AudioTrackList.cpp:
148         (AudioTrackList::getTrackById):
149         * html/track/LoadableTextTrack.cpp:
150         (WebCore::LoadableTextTrack::newCuesAvailable):
151         (WebCore::LoadableTextTrack::newRegionsAvailable):
152         * html/track/TextTrackCueList.cpp:
153         (WebCore::TextTrackCueList::getCueById):
154         (WebCore::TextTrackCueList::activeCues):
155         * html/track/TextTrackList.cpp:
156         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
157         (TextTrackList::invalidateTrackIndexesAfterTrack):
158         * html/track/TrackListBase.cpp:
159         (TrackListBase::isAnyTrackEnabled):
160         * html/track/VideoTrackList.cpp:
161         (VideoTrackList::getTrackById):
162
163 2015-10-06  Alex Christensen  <achristensen@webkit.org>
164
165         Report error when main resource is blocked by content blocker
166         https://bugs.webkit.org/show_bug.cgi?id=149719
167         rdar://problem/21970595
168
169         Reviewed by Brady Eidson.
170
171         Test: http/tests/contentextensions/main-resource.html
172
173         * English.lproj/Localizable.strings:
174         * contentextensions/ContentExtensionActions.h:
175         * contentextensions/ContentExtensionError.h:
176         (WebCore::ContentExtensions::make_error_code):
177         * contentextensions/ContentExtensionsBackend.cpp:
178         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
179         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
180         Instead of nulling out the ResourceRequest, processContentExtensionRulesForLoad 
181         now returns a status indicating whether the request should be blocked.
182         This is needed because the DocumentLoader needs a CachedResource with an error representing the blocking
183         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
184         * contentextensions/ContentExtensionsBackend.h:
185         * html/HTMLMediaElement.cpp:
186         (WebCore::HTMLMediaElement::loadResource):
187         * loader/DocumentLoader.cpp:
188         (WebCore::DocumentLoader::startLoadingMainResource):
189         Dispatch an error if the resource is blocked by a content blocker.
190         * loader/EmptyClients.h:
191         * loader/FrameLoader.cpp:
192         (WebCore::FrameLoader::loadResourceSynchronously):
193         (WebCore::FrameLoader::cancelledError):
194         (WebCore::FrameLoader::blockedByContentBlockerError):
195         (WebCore::FrameLoader::connectionProperties):
196         * loader/FrameLoader.h:
197         * loader/FrameLoaderClient.h:
198         * loader/ResourceLoader.cpp:
199         (WebCore::ResourceLoader::willSendRequestInternal):
200         * loader/cache/CachedResourceLoader.cpp:
201         (WebCore::CachedResourceLoader::requestResource):
202         * page/UserContentController.cpp:
203         (WebCore::UserContentController::removeAllUserContentExtensions):
204         (WebCore::UserContentController::processContentExtensionRulesForLoad):
205         (WebCore::UserContentController::actionsForResourceLoad):
206         * page/UserContentController.h:
207         * platform/efl/ErrorsEfl.cpp:
208         (WebCore::blockedError):
209         (WebCore::blockedByContentBlockerError):
210         (WebCore::cannotShowURLError):
211         * platform/efl/ErrorsEfl.h:
212         * platform/gtk/ErrorsGtk.cpp:
213         (WebCore::blockedError):
214         (WebCore::blockedByContentBlockerError):
215         (WebCore::cannotShowURLError):
216         * platform/gtk/ErrorsGtk.h:
217
218 2015-10-06  Xabier Rodriguez Calvar  <calvaris@igalia.com>
219
220         JSBuiltinConstructor must always add builtin header
221         https://bugs.webkit.org/show_bug.cgi?id=149759
222
223         Reviewed by Darin Adler.
224
225         Covered by TestJSBuiltinConstructor.idl.
226
227         * bindings/scripts/CodeGeneratorJS.pm:
228         (AddIncludesForJSBuiltinMethods): Forces adding the builtin header when the JSBuiltinConstructor is present.
229         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Expectation.
230
231 2015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
232
233         Migrate streams API to JS Builtins
234         https://bugs.webkit.org/show_bug.cgi?id=147092
235
236         Reviewed by Darin Adler.
237
238         Moved ReadableStream implementation from C++ to JS Builtins.
239         Created specific private constructors for ReadableStreamReader and ReadableStreamController.
240         Added these constructors to  JSDOMWindowBase.
241         Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
242
243         Covered by existing tests.
244
245         * CMakeLists.txt:
246         * DerivedSources.make:
247         * Modules/streams/ReadableStream.cpp: Removed.
248         * Modules/streams/ReadableStream.h: Removed.
249         * Modules/streams/ReadableStream.idl:
250         * Modules/streams/ReadableStream.js:
251         (strategy.size):
252         (initializeReadableStream):
253         (cancel):
254         (getReader):
255         (pipeTo):
256         (tee):
257         (locked):
258         * Modules/streams/ReadableStreamController.h:
259         * Modules/streams/ReadableStreamController.idl:
260         * Modules/streams/ReadableStreamController.js: Added.
261         (enqueue):
262         (error):
263         (close):
264         (desiredSize):
265         * Modules/streams/ReadableStreamInternals.js:
266         (privateInitializeReadableStreamReader):
267         (privateInitializeReadableStreamController):
268         (isReadableStream):
269         (isReadableStreamReader):
270         (isReadableStreamController):
271         (errorReadableStream):
272         (requestReadableStreamPull):
273         (getReadableStreamDesiredSize):
274         (releaseReadableStreamReader):
275         (cancelReadableStream):
276         (finishClosingReadableStream):
277         (closeReadableStream):
278         (closeReadableStreamReader):
279         (enqueueInReadableStream):
280         (readFromReadableStreamReader):
281         (invokeOrNoop):
282         (promiseInvokeOrNoop):
283         * Modules/streams/ReadableStreamReader.cpp: Removed.
284         * Modules/streams/ReadableStreamReader.h:
285         * Modules/streams/ReadableStreamReader.idl:
286         * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
287         (cancel):
288         (read):
289         (releaseLock):
290         (closed):
291         * WebCore.vcxproj/WebCore.vcxproj:
292         * WebCore.vcxproj/WebCore.vcxproj.filters:
293         * WebCore.xcodeproj/project.pbxproj:
294         * bindings/js/JSBindingsAllInOne.cpp:
295         * bindings/js/JSDOMConstructor.h: Added.
296         (WebCore::JSBuiltinConstructor::create):
297         (WebCore::JSBuiltinConstructor::createStructure):
298         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
299         (WebCore::JSBuiltinConstructor::initializeProperties):
300         (WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
301         (WebCore::JSBuiltinConstructor<JSClass>::construct):
302         (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
303         * bindings/js/JSDOMWindowBase.cpp:
304         (WebCore::JSDOMWindowBase::finishCreation):
305         * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
306         * bindings/js/JSReadableStreamCustom.cpp: Removed.
307         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
308         (WebCore::constructJSReadableStreamController):
309         (WebCore::constructJSReadableStreamReader):
310         (WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
311         (WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
312         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
313         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
314         (WebCore::createReadableStreamReaderPrivateConstructor):
315         (WebCore::createReadableStreamControllerPrivateConstructor):
316         * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
317         * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
318         * bindings/js/ReadableJSStream.cpp: Removed.
319         * bindings/js/ReadableJSStream.h: Removed.
320         * bindings/js/WebCoreBuiltinNames.h: Added.
321         (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
322         * bindings/js/WebCoreJSBuiltins.cpp:
323         * bindings/js/WebCoreJSClientData.h:
324         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
325         (WebCore::WebCoreJSClientData::builtinNames):
326         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
327         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
328
329 2015-10-05  Chris Dumez  <cdumez@apple.com>
330
331         data: URLs should not be preloaded
332         https://bugs.webkit.org/show_bug.cgi?id=149829
333
334         Reviewed by Ryosuke Niwa.
335
336         Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
337         There is no need as the data is already available.
338
339         Test: fast/preloader/image-data-url.html
340
341         * html/parser/HTMLPreloadScanner.cpp:
342         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
343
344 2015-10-05  Jer Noble  <jer.noble@apple.com>
345
346         [iOS] REGRESSION(r190434): Media continues to play when locking screen
347         https://bugs.webkit.org/show_bug.cgi?id=149822
348
349         Reviewed by Brent Fulgham.
350
351         In MediaSessionManagerIOS.mm, both -applicationWillEnterForeground: and
352         -applicationDidBecomeActive: called
353         PlatformMediaSessionManager::applicationWillEnterForeground(), leading to the
354         PlatformMediaSession's m_interruptionCount becoming increasingly unbalanced.
355
356         Rename PlatformMediaSessionManager::applicationWillEnterForeground() to
357         applicationDidEnterForeground() to more correctly reflect when this notification will be
358         called. Add a new method, MediaSessionManagerIOS::applicationWillEnterForeground(bool),
359         whose paramater is whether the screen was locked. This allows the beginInterruption() and
360         endInterruption() methods to be correctly balanced.
361
362         Drive-by fix: remove the unimplemented declarations for application{will,did}Enter{Fore,Back}ground()
363         from PlatformMediaSession.h.
364
365         * platform/audio/PlatformMediaSession.h:
366         * platform/audio/PlatformMediaSessionManager.cpp:
367         (WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
368         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): Deleted.
369         * platform/audio/PlatformMediaSessionManager.h:
370         * platform/audio/ios/MediaSessionManagerIOS.h:
371         * platform/audio/ios/MediaSessionManagerIOS.mm:
372         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
373         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
374         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
375         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
376         * testing/Internals.cpp:
377         (WebCore::Internals::applicationDidEnterForeground):
378         (WebCore::Internals::applicationWillEnterForeground): Deleted.
379         * testing/Internals.h:
380         * testing/Internals.idl:
381
382 2015-10-05  Alex Christensen  <achristensen@webkit.org>
383
384         Invalid CSS Selector for Content Blockers invalidates others
385         https://bugs.webkit.org/show_bug.cgi?id=148446
386         rdar://problem/22918235
387
388         Reviewed by Benjamin Poulain.
389
390         Test: http/tests/contentextensions/invalid-selector.html
391
392         * contentextensions/ContentExtensionParser.cpp:
393         (WebCore::ContentExtensions::loadTrigger):
394         (WebCore::ContentExtensions::isValidSelector):
395         (WebCore::ContentExtensions::loadAction):
396         (WebCore::ContentExtensions::loadRule):
397         Add a check to see if a selector is valid before adding it.
398
399 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
400
401         CSSGradientValue should check whether gradientLength is zero or not.
402         https://bugs.webkit.org/show_bug.cgi?id=149373
403         <rdar://problem/22771418>
404
405         Reviewed by Darin Adler.
406
407         This is a merge of Blink r158220,
408         https://chromiumcodereview.appspot.com/24350008
409
410         Test: fast/gradients/css3-repeating-radial-gradients-crash.html
411
412         * css/CSSGradientValue.cpp:
413         (WebCore::CSSGradientValue::addStops):
414         Check whether gradientLength > 0 before using it as denominator.
415
416 2015-10-05  Dean Jackson  <dino@apple.com>
417
418         EXT_texture_filter_anisotropic extension exposed with WEBKIT_ prefix
419         https://bugs.webkit.org/show_bug.cgi?id=149765
420         <rdar://problem/22983722>
421
422         Reviewed by Beth Dakin.
423
424         We can now remove the WEBKIT_ prefix from this extension.
425
426         Test: fast/canvas/webgl/unprefixed-anisotropic-extension.html
427
428         * html/canvas/WebGL2RenderingContext.cpp: Support the prefixed and unprefixed form.
429         (WebCore::WebGL2RenderingContext::getExtension):
430         * html/canvas/WebGLRenderingContext.cpp:
431         (WebCore::WebGLRenderingContext::getExtension):
432         (WebCore::WebGLRenderingContext::getSupportedExtensions):
433
434 2015-10-05  Dean Jackson  <dino@apple.com>
435
436         Reference cycles during SVG dependency invalidation
437         https://bugs.webkit.org/show_bug.cgi?id=149824
438         <rdar://problem/22771412>
439
440         Reviewed by Tim Horton.
441
442         Detect any reference cycles as we are invalidating.
443
444         This is mostly a merge of the following Blink commit:
445         https://chromium.googlesource.com/chromium/blink/+/a4bc83453bda89823b672877dc02247652a02d51
446
447         Test: svg/custom/reference-cycle.svg
448
449         * rendering/svg/RenderSVGResource.cpp:
450         (WebCore::removeFromCacheAndInvalidateDependencies): Keep around a hash
451         table of dependencies, so that we can detect if an element is already
452         present before marking it.
453
454 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
455
456         Fix null pointer dereference in WebSocket::connect()        
457         https://bugs.webkit.org/show_bug.cgi?id=149311
458         <rdar://problem/22748858>
459
460         Reviewed by Chris Dumez.
461
462         This is a merge of Blink r187441,
463         https://codereview.chromium.org/785933005
464
465         Test: http/tests/websocket/construct-in-detached-frame.html
466
467         * Modules/websockets/WebSocket.cpp:
468         (WebCore::WebSocket::connect):
469         Call function implemented below instead of duplicating the code.
470         * page/ContentSecurityPolicy.cpp:
471         (WebCore::ContentSecurityPolicy::shouldBypassMainWorldContentSecurityPolicy):
472         * page/ContentSecurityPolicy.h:
473         Factor the logic to check shouldBypassMainWorldContentSecurityPolicy into 
474         a function in this class. Check Frame pointers are not null before getting 
475         shouldBypassMainWorldContentSecurityPolicy via those pointers.
476         * page/EventSource.cpp:
477         (WebCore::EventSource::create):
478         This got fixed as a bonus.
479         * xml/XMLHttpRequest.cpp:
480         (WebCore::XMLHttpRequest::open):
481         This got fixed as a bonus too.
482
483 2015-10-05  Beth Dakin  <bdakin@apple.com>
484
485         WebCore::IOSurface should ask the IOSurface for the pixel format instead of 
486         caching it
487         https://bugs.webkit.org/show_bug.cgi?id=149820
488         -and corresponding-
489         rdar://problem/22976230
490
491         Reviewed by Tim Horton.
492
493         Also there is no reason to make YUV be iOS only, so this patch removes those 
494         PLATFORM checks.
495
496         * platform/graphics/cocoa/IOSurface.h:
497         * platform/graphics/cocoa/IOSurface.mm:
498         (IOSurface::IOSurface):
499         (IOSurface::format):
500         * platform/spi/cocoa/IOSurfaceSPI.h:
501
502 2015-10-02  Ryosuke Niwa  <rniwa@webkit.org>
503
504         ShadowRoot with leading or trailing white space cause a crash
505         https://bugs.webkit.org/show_bug.cgi?id=149782
506
507         Reviewed by Chris Dumez.
508
509         Fixed the crash by adding a null pointer check since a TextNode that appears as a direct child
510         of a ShadowRoot doesn't have a parent element.
511
512         Test: fast/shadow-dom/shadow-root-with-child-whitespace-text-crash.html
513
514         * style/RenderTreePosition.cpp:
515         (WebCore::RenderTreePosition::previousSiblingRenderer):
516
517 2015-10-05  Beth Dakin  <bdakin@apple.com>
518
519         Build fix. 
520
521         * platform/spi/cocoa/IOSurfaceSPI.h:
522
523 2015-10-05  Beth Dakin  <bdakin@apple.com>
524
525         Unreviewed build fix.
526
527         * platform/spi/cocoa/IOSurfaceSPI.h:
528
529 2015-10-05  Brady Eidson  <beidson@apple.com>
530
531         Modernize IDBRequest::ReadyState into an enum class.
532         https://bugs.webkit.org/show_bug.cgi?id=149817
533
534         Reviewed by Alex Christensen.
535
536         No new tests (Refactor, no behavior change).
537
538         * Modules/indexeddb/IDBRequest.h:
539         
540         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
541         (WebCore::LegacyOpenDBRequest::shouldEnqueueEvent):
542         
543         * Modules/indexeddb/legacy/LegacyRequest.cpp:
544         (WebCore::LegacyRequest::LegacyRequest):
545         (WebCore::LegacyRequest::result):
546         (WebCore::LegacyRequest::error):
547         (WebCore::LegacyRequest::errorCode):
548         (WebCore::LegacyRequest::readyState):
549         (WebCore::LegacyRequest::markEarlyDeath):
550         (WebCore::LegacyRequest::abort):
551         (WebCore::LegacyRequest::setCursorDetails):
552         (WebCore::LegacyRequest::setPendingCursor):
553         (WebCore::LegacyRequest::setResultCursor):
554         (WebCore::LegacyRequest::finishCursor):
555         (WebCore::LegacyRequest::shouldEnqueueEvent):
556         (WebCore::LegacyRequest::stop):
557         (WebCore::LegacyRequest::dispatchEvent):
558         (WebCore::LegacyRequest::transactionDidFinishAndDispatch):
559         (WebCore::LegacyRequest::enqueueEvent):
560         * Modules/indexeddb/legacy/LegacyRequest.h:
561
562 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
563
564         Cleaning up after revision 190339
565         https://bugs.webkit.org/show_bug.cgi?id=149732
566
567         Reviewed by Myles C. Maxfield.
568
569         * xml/XSLStyleSheet.h:
570         * xml/XSLStyleSheetLibxslt.cpp:
571         (WebCore::XSLStyleSheet::compileStyleSheet):
572
573 2015-10-05  Beth Dakin  <bdakin@apple.com>
574
575         Errant space!!
576         * platform/graphics/cocoa/IOSurface.mm:
577         (IOSurface::releaseGraphicsContext):
578         (IOSurface::convertToFormat):
579
580 2015-10-05  Beth Dakin  <bdakin@apple.com>
581
582         Compress snapshots on iOS
583         https://bugs.webkit.org/show_bug.cgi?id=149814
584         -and corresponding-
585         rdar://problem/22976230
586
587         Reviewed by Simon Fraser.
588
589         Though the default is still RGBA, it is now possible to create an IOSurface 
590         that uses the YUV422 pixel format.
591         * platform/graphics/cocoa/IOSurface.h:
592         * platform/graphics/cocoa/IOSurface.mm:
593         (IOSurface::surfaceFromPool):
594         (IOSurface::create):
595         (IOSurface::createFromImage):
596         (IOSurface::IOSurface):
597         (IOSurface::releaseGraphicsContext):
598
599         In order to have a YUV IOSurface, we actually have to create an RGBA surface 
600         first and then convert it to YUV, so this class method will handle that.
601         (IOSurface::convertToFormat):
602
603         Necessary SPI.
604         * platform/spi/cocoa/IOSurfaceSPI.h:
605
606 2015-10-05  Zalan Bujtas  <zalan@apple.com>
607
608         Mark the line dirty when RenderQuote's text changes.
609         https://bugs.webkit.org/show_bug.cgi?id=149784
610         rdar://problem/22558169
611
612         Reviewed by Antti Koivisto.
613
614         When quotation mark changes ( " -> ' or empty string), we
615         need to mark the line dirty to ensure its content gets laid out properly.
616
617         Test: fast/inline/quotation-text-changes-dynamically.html
618
619         * rendering/RenderQuote.cpp:
620         (WebCore::quoteTextRenderer):
621         (WebCore::RenderQuote::updateText):
622         (WebCore::fragmentChild): Deleted.
623
624 2015-10-03  Filip Pizlo  <fpizlo@apple.com>
625
626         Allow an object's marking state to track The Three Colors
627         https://bugs.webkit.org/show_bug.cgi?id=149654
628
629         Reviewed by Geoffrey Garen.
630
631         No new tests because no new behavior.
632
633         * bindings/scripts/CodeGeneratorJS.pm:
634         (GenerateImplementation):
635
636 2015-10-05  Katlyn Graff  <kgraff@apple.com>
637
638         Update setImageSmoothingQuality for additional reviews.
639         https://bugs.webkit.org/show_bug.cgi?id=149541
640
641         Reviewed by Chris Dumez.
642
643         * html/canvas/CanvasRenderingContext2D.cpp:
644         (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
645
646 2015-10-05  Andreas Kling  <akling@apple.com>
647
648         Remove unused HistoryItem::targetItem()
649         <https://webkit.org/b/149803>
650
651         Reviewed by Anders Carlsson.
652
653         This is ancient code with no remaining clients since 2010 (r53650)
654
655         * history/HistoryItem.cpp:
656         (WebCore::HistoryItem::findTargetItem): Deleted.
657         (WebCore::HistoryItem::targetItem): Deleted.
658         * history/HistoryItem.h:
659
660 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
661
662         Unprefix -webkit-font-feature-settings
663         https://bugs.webkit.org/show_bug.cgi?id=149722
664
665         Reviewed by Sam Weinig.
666
667         * css/CSSComputedStyleDeclaration.cpp:
668         (WebCore::ComputedStyleExtractor::propertyValue):
669         * css/CSSParser.cpp:
670         (WebCore::CSSParser::parseValue):
671         (WebCore::CSSParser::parseFontFeatureSettings):
672         * css/CSSPropertyNames.in:
673         * css/CSSValueKeywords.in:
674         * css/StyleBuilderCustom.h:
675         (WebCore::StyleBuilderCustom::applyInitialFontFeatureSettings):
676         (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings):
677         (WebCore::StyleBuilderCustom::applyInitialWebkitFontFeatureSettings): Deleted.
678         (WebCore::StyleBuilderCustom::applyInheritWebkitFontFeatureSettings): Deleted.
679
680 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
681
682         [GStreamer] Replace uses of std::bind() with lambdas
683         https://bugs.webkit.org/show_bug.cgi?id=149802
684
685         Reviewed by Carlos Garcia Campos.
686
687         Instead of std::bind(), use C++ lambdas to create std::function<>
688         wrappers in GStreamer-related class implementations.
689
690         Ref-counted classes are protected by capturing a RefPtr object.
691         GstObject-derived objects are protected by capturing a GRefPtr object.
692         Necessary specializations for WebKitVideoSink and WebKitWebSrc are added.
693
694         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
695         (WebCore::AudioFileReader::createBus):
696         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
697         (WTF::adoptGRef):
698         (WTF::refGPtr<WebKitVideoSink>):
699         (WTF::derefGPtr<WebKitVideoSink>):
700         (WTF::refGPtr<WebKitWebSrc>):
701         (WTF::derefGPtr<WebKitWebSrc>):
702         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
703         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
704         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
705         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
706         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
707         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
708         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
709         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
710         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
711         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
712         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
713         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
714         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
715         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
716         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
717         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
718         (webkitVideoSinkRender):
719         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
720         (webKitWebSrcChangeState):
721         (webKitWebSrcNeedDataCb):
722         (webKitWebSrcEnoughDataCb):
723         (webKitWebSrcSeekDataCb):
724
725 2015-10-05  Andreas Kling  <akling@apple.com>
726
727         Remove unused HistoryItem::parent
728         <https://webkit.org/b/149803>
729
730         Reviewed by Anders Carlsson.
731
732         Remove the effectively-unused "parent" field from HistoryItem.
733         This also allows us to get rid of a HistoryItem constructor.
734
735         * history/HistoryItem.cpp:
736         (WebCore::HistoryItem::HistoryItem): Deleted.
737         (WebCore::HistoryItem::reset): Deleted.
738         (WebCore::HistoryItem::parent): Deleted.
739         (WebCore::HistoryItem::setParent): Deleted.
740         * history/HistoryItem.h:
741         (WebCore::HistoryItem::create): Deleted.
742         * loader/HistoryController.cpp:
743         (WebCore::HistoryController::initializeItem): Deleted.
744
745 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
746
747         GLContext should control ownership of context-related objects
748         https://bugs.webkit.org/show_bug.cgi?id=149794
749
750         Reviewed by Martin Robinson.
751
752         Creation of GLContext objects can depend on various platform-specific
753         objects like native window representations. Since these objects are
754         used solely for the GLContext purposes, it would make sense to allow
755         GLContext to provide an extensible way to impose ownership on these
756         objects and control their lifetime.
757
758         GLContext::Data is declared with a defaulted virtual destructor.
759         Users of these implementations can declare classes that derive from
760         GLContext::Data and store context-related objects in instances of the
761         derived class, and ensure that these objects are properly cleaned up
762         when GLContext destroys the Data object.
763
764         The GLContext::Data object is managed through a protected
765         std::unique_ptr<> member in the GLContext class. For now the member
766         is only set in GLContextEGL::createWindowContext() and is destroyed
767         during the GLContext destruction.
768
769         The local OffscreenContextData class in
770         PlatformDisplayWayland::createSharingGLContext() derives from
771         GLContext::Data and is used to store the wl_surface and
772         EGLNativeWindowType (aka wl_egl_window) objects for offscreen
773         GLContexts under the Wayland platform that are used for the sharing
774         context and WebGL, effectively avoiding the leak that would further
775         propagate problems into the compositor and the graphics library.
776         (Such offscreen contexts are actually mimicked via a 1x1px
777         wl_egl_window object that acts as a dummy base for the related
778         wl_surface object).
779
780         * platform/graphics/GLContext.h:
781         * platform/graphics/egl/GLContextEGL.cpp:
782         (WebCore::GLContextEGL::createWindowContext):
783         * platform/graphics/egl/GLContextEGL.h:
784         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
785         (WebCore::PlatformDisplayWayland::createSharingGLContext):
786
787 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
788
789         Make gdk.h inclusion in FontPlatformDataFreeType.cpp properly GTK-specific
790         https://bugs.webkit.org/show_bug.cgi?id=149793
791
792         Reviewed by Carlos Garcia Campos.
793
794         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
795         Instead of including <gdk/gdk.h> header for all platforms but EFL, only
796         include it for the GTK platform, since no other platform depends on the
797         GDK library.
798
799 2015-10-03  Ricky Mondello  <rmondello@apple.com>
800
801         "Plug-in is blocked" message doesn't draw correctly
802         https://bugs.webkit.org/show_bug.cgi?id=149741
803         <rdar://problem/22920949>
804
805         Patch by Conrad Shultz and Ricky Mondello.
806
807         Reviewed by Anders Carlsson.
808
809         No new tests are added.
810
811         Add PluginData API to check whether a MIME type is supported, regardless of plug-in visibility.
812
813         * plugins/PluginData.cpp:
814         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices): Adopt getMimesAndPluginIndiciesForPlugins.
815         (WebCore::PluginData::getMimesAndPluginIndices): Added.
816         (WebCore::PluginData::getMimesAndPluginIndiciesForPlugins): Essentially factored out of
817             getWebVisibleMimesAndPluginIndices.
818         (WebCore::PluginData::supportsMimeType): Added. Somewhat similar to preexisting supportsWebVisibleMimeType.
819         * plugins/PluginData.h: Declare supportsMimeType.
820
821 2015-10-02  Antti Koivisto  <antti@apple.com>
822
823         Inserting a child to a slot assigned node doesn't trigger repaint
824         https://bugs.webkit.org/show_bug.cgi?id=149739
825
826         Reviewed by Ryosuke Niwa.
827
828         Test: fast/shadow-dom/insert-child-to-assigned-node.html
829
830         * dom/Node.cpp:
831         (WebCore::Node::derefEventTarget):
832         (WebCore::traverseStyleParent):
833         (WebCore::traverseFirstStyleParent):
834         (WebCore::Node::updateAncestorsForStyleRecalc):
835
836             Traverse in style parent order.
837
838 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
839
840         Unreviewed, rolling out r190520, some tests assert / crash.
841
842         * ForwardingHeaders/heap/HeapObserver.h: Removed.
843         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Removed.
844         * WebCore.vcxproj/WebCore.vcxproj:
845         * WebCore.vcxproj/WebCore.vcxproj.filters:
846         * inspector/InspectorController.cpp:
847         (WebCore::InspectorController::InspectorController): Deleted.
848         (WebCore::InspectorController::vm): Deleted.
849         * inspector/InspectorController.h:
850         * inspector/WorkerInspectorController.cpp:
851         (WebCore::WorkerInspectorController::vm): Deleted.
852         * inspector/WorkerInspectorController.h:
853
854 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
855
856         Web Inspector: Include Garbage Collection Event in Timeline
857         https://bugs.webkit.org/show_bug.cgi?id=142510
858
859         Reviewed by Geoffrey Garen.
860
861         Tests: inspector/heap/garbageCollected.html
862                inspector/heap/gc.html
863
864         * ForwardingHeaders/heap/HeapObserver.h: Added.
865         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added.
866         * WebCore.vcxproj/WebCore.vcxproj:
867         * WebCore.vcxproj/WebCore.vcxproj.filters:
868         Forwarding headers.
869
870         * inspector/InspectorController.cpp:
871         (WebCore::InspectorController::InspectorController):
872         (WebCore::InspectorController::vm):
873         * inspector/InspectorController.h:
874         * inspector/WorkerInspectorController.cpp:
875         (WebCore::WorkerInspectorController::vm):
876         * inspector/WorkerInspectorController.h:
877         Implement InspectorEnvironment::vm and create a Heap agent for the
878         Page inspector controller.
879
880 2015-10-02  Jer Noble  <jer.noble@apple.com>
881
882         [MSE] Browser crashes when appending invalid data to MSE source buffer
883         https://bugs.webkit.org/show_bug.cgi?id=149689
884
885         Reviewed by Darin Adler.
886
887         Test: media/media-source/media-source-stpp-crash.html
888
889         Bail out early (as specced) after disconnecting the SourceBuffer from its MediaSource.
890
891         * Modules/mediasource/SourceBuffer.cpp:
892         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
893
894 2015-10-02  Simon Fraser  <simon.fraser@apple.com>
895
896         ASSERTION FAILED: param >= 0 in AnimationBase::updateStateMachine()
897         https://bugs.webkit.org/show_bug.cgi?id=149737
898         rdar://problem/19017465
899
900         Reviewed by Dean Jackson.
901
902         CoreAnimation can give us an animation beginTime that is slightly into the future,
903         which results in 'param' here being < 0, so relax the assertion slightly.
904         
905         Fixes lots of assertions running iOS WK2 layout tests.
906
907         * page/animation/AnimationBase.cpp:
908         (WebCore::AnimationBase::updateStateMachine):
909
910 2015-10-02  Per Arne Vollan  <peavo@outlook.com>
911
912         [WinCairo] Fix linker warnings.
913         https://bugs.webkit.org/show_bug.cgi?id=149754
914
915         Reviewed by Alex Christensen.
916
917         Avoid compiling these files twice, they are already included in
918         RenderingAllInOne.cpp.
919
920         * PlatformWinCairo.cmake:
921
922 2015-10-02  Alex Christensen  <achristensen@webkit.org>
923
924         Reloading without content blockers doesn't apply to resource loads after the main frame finishes
925         https://bugs.webkit.org/show_bug.cgi?id=149430
926         rdar://problem/22742222
927
928         Reviewed by Geoffrey Garen.
929
930         Test: http/tests/contentextensions/disable-blocker.html
931
932         * html/HTMLMediaElement.cpp:
933         (WebCore::HTMLMediaElement::loadResource):
934         * loader/DocumentLoader.h:
935         (WebCore::DocumentLoader::userContentExtensionsEnabled):
936         (WebCore::DocumentLoader::setUserContentExtensionsEnabled):
937         Store and use the state of whether content blockers are enabled or not on the DocumentLoader
938         so that it stays constant for a document's entire life.  This state comes from the Page when
939         making the DocumentLoader in WebKit2.
940         * loader/FrameLoader.cpp:
941         (WebCore::FrameLoader::loadResourceSynchronously):
942         * loader/ResourceLoader.cpp:
943         (WebCore::ResourceLoader::willSendRequestInternal):
944         * loader/cache/CachedResourceLoader.cpp:
945         (WebCore::CachedResourceLoader::requestResource):
946         * page/DOMWindow.cpp:
947         (WebCore::DOMWindow::open):
948         * page/UserContentController.cpp:
949         (WebCore::UserContentController::removeAllUserContentExtensions):
950         (WebCore::UserContentController::processContentExtensionRulesForLoad):
951         (WebCore::UserContentController::actionsForResourceLoad):
952         * page/UserContentController.h:
953
954 2015-10-02  Antoine Quint  <graouts@apple.com>
955
956         popstate is fired at the wrong time on load
957         https://bugs.webkit.org/show_bug.cgi?id=94265
958
959         Reviewed by Darin Adler.
960
961         Don't fire popstate event on initial document load
962
963         According to the specification [1], a popstate event should only be fired
964         when the document has a "last entry" and the entry being navigated to isn't
965         it.  A document is created without a "last entry" and gets one just after
966         this check when it is first navigated to, so a popstate should be fired any
967         time a document is navigated to except for the first time after it has been
968         created.
969
970         Patch adapted from work by jl@opera.com on Blink [2].
971
972         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#traverse-the-history (step 12-14 in particular)
973         [2] https://src.chromium.org/viewvc/blink?revision=165221&view=revision
974
975         * dom/Document.cpp:
976         (WebCore::Document::implicitClose):
977
978 2015-10-02  Javier Fernandez  <jfernandez@igalia.com>
979
980         [CSS Grid Layout] Support for Content Alignment in grid layout
981         https://bugs.webkit.org/show_bug.cgi?id=145520
982
983         Reviewed by Darin Adler.
984
985         According to CSS Box Alignment specification, Content Distribution
986         alignment controls alignment of the box's content within the box. The
987         alignment container is the grid container's content box. The alignment
988         subjects are the grid tracks.
989
990         This patch implements Grid Layout support for Content Distribution
991         alignment along both block/column and inline/row axis, which are handled
992         by align-content and justify-content properties respectively.
993
994         This patch provides support for overflow handling, similar to what
995         Self Alignment provides with grid items, and both <content-position>
996         and <content-distribution> values.
997
998         Baseline Alignment is still missing because it requires some additional
999         behavior to be supported on grids before considering its implementation.
1000
1001         Tests: css3/overwrite-content-alignment.html
1002                css3/overwrite-self-alignment.html
1003                fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html
1004                fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html
1005                fast/css-grid-layout/grid-align-content-distribution.html
1006                fast/css-grid-layout/grid-align-content-vertical-lr.html
1007                fast/css-grid-layout/grid-align-content-vertical-rl.html
1008                fast/css-grid-layout/grid-align-content.html
1009                fast/css-grid-layout/grid-content-alignment-overflow.html
1010                fast/css-grid-layout/grid-content-alignment-with-different-sized-tracks.html
1011                fast/css-grid-layout/grid-content-alignment-with-span-vertical-lr.html
1012                fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html
1013                fast/css-grid-layout/grid-content-alignment-with-span.html
1014                fast/css-grid-layout/grid-justify-content-distribution-vertical-lr.html
1015                fast/css-grid-layout/grid-justify-content-distribution-vertical-rl.html
1016                fast/css-grid-layout/grid-justify-content-distribution.html
1017                fast/css-grid-layout/grid-justify-content-vertical-lr.html
1018                fast/css-grid-layout/grid-justify-content-vertical-rl.html
1019                fast/css-grid-layout/grid-justify-content.html
1020
1021         * rendering/RenderFlexibleBox.cpp:
1022         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
1023         (WebCore::RenderFlexibleBox::layoutColumnReverse):
1024         (WebCore::RenderFlexibleBox::alignFlexLines):
1025         * rendering/RenderGrid.cpp:
1026         (WebCore::ContentAlignmentData::ContentAlignmentData):
1027         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1028         (WebCore::RenderGrid::layoutGridItems):
1029         (WebCore::RenderGrid::gridAreaBreadthForChild):
1030         (WebCore::RenderGrid::populateGridPositions):
1031         (WebCore::resolveContentDistributionFallback):
1032         (WebCore::offsetToStartEdge):
1033         (WebCore::offsetToEndEdge):
1034         (WebCore::contentDistributionOffset):
1035         (WebCore::RenderGrid::computeContentPositionAndDistributionColumnOffset):
1036         (WebCore::RenderGrid::computeContentPositionAndDistributionRowOffset):
1037         (WebCore::RenderGrid::findChildLogicalPosition):
1038         (WebCore::RenderGrid::computePreferredLogicalWidths): Deleted.
1039         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Deleted.
1040         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Deleted.
1041         (WebCore::RenderGrid::cachedGridCoordinate): Deleted.
1042         (WebCore::RenderGrid::rowPositionForChild): Deleted.
1043         * rendering/RenderGrid.h:
1044         * rendering/style/RenderStyle.cpp:
1045         (WebCore::RenderStyle::resolvedAlignContentPosition):
1046         (WebCore::RenderStyle::resolvedAlignContentDistribution):
1047         (WebCore::RenderStyle::resolvedJustifyContentPosition):
1048         (WebCore::RenderStyle::resolvedJustifyContentDistribution):
1049         * rendering/style/RenderStyle.h:
1050
1051 2015-10-02  Dean Jackson  <dino@apple.com>
1052
1053         Attempted build fix.
1054
1055         * DerivedSources.make:
1056         * page/make_settings.pl:
1057         (printGetterAndSetter):
1058
1059 2015-10-01  Dean Jackson  <dino@apple.com>
1060
1061         Expose WEBGL_debug_renderer_info
1062         https://bugs.webkit.org/show_bug.cgi?id=149735
1063         <rdar://problem/18343500>
1064
1065         Reviewed by Simon Fraser.
1066
1067         Take two at landing this.
1068
1069         Enable the extension that allows content to query
1070         for the GPUs vendor and details.
1071
1072         Now that we're enabling this, there was no need for
1073         the internal setting that identified privileged situations.
1074         However, since this meant that WEBGL_debug_shaders was
1075         also exposed, I explicitly disable it since it is
1076         not yet conformant.
1077
1078         Test: fast/canvas/webgl/webgl-debug-renderer-info.html
1079         as well as the general conformance suite.
1080
1081         * html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
1082         (WebCore::WebGL2RenderingContext::getExtension):
1083         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1084         * html/canvas/WebGLRenderingContext.cpp: Ditto.
1085         (WebCore::WebGLRenderingContext::getExtension):
1086         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1087         * html/canvas/WebGLRenderingContextBase.cpp:
1088         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
1089         * html/canvas/WebGLRenderingContextBase.h:
1090         * page/Settings.in: Remove privilegedWebGLExtensions.
1091         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
1092         extension while it is still buggy.
1093         (WebCore::Extensions3DOpenGL::supportsExtension):
1094
1095 2015-10-01  Csaba Osztrogonác  <ossy@webkit.org>
1096
1097         Fix the #if guard in PointerLockController.cpp
1098         https://bugs.webkit.org/show_bug.cgi?id=149705
1099
1100         Reviewed by Gyuyoung Kim.
1101
1102         * page/PointerLockController.cpp:
1103
1104 2015-10-01  Dean Jackson  <dino@apple.com>
1105
1106         Rollout r190446 for the moment. It broke the build.
1107
1108         * html/canvas/WebGL2RenderingContext.cpp:
1109         (WebCore::WebGL2RenderingContext::getExtension):
1110         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1111         * html/canvas/WebGLRenderingContext.cpp:
1112         (WebCore::WebGLRenderingContext::getExtension):
1113         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1114         * html/canvas/WebGLRenderingContextBase.cpp:
1115         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions):
1116         * html/canvas/WebGLRenderingContextBase.h:
1117         * page/Settings.in:
1118         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1119         (WebCore::Extensions3DOpenGL::supportsExtension): Deleted.
1120
1121 2015-10-01  Jaehun Lim  <ljaehun.lim@samsung.com>
1122
1123         Unreviewed, fix build warning after r190434
1124
1125         Fix error: variable ‘interruption’ set but not used [-Werror=unused-but-set-variable]
1126
1127         * testing/Internals.cpp:
1128         (WebCore::Internals::beginMediaSessionInterruption):
1129
1130 2015-10-01  Dean Jackson  <dino@apple.com>
1131
1132         Expose WEBGL_debug_renderer_info
1133         https://bugs.webkit.org/show_bug.cgi?id=149735
1134         <rdar://problem/18343500>
1135
1136         Reviewed by Simon Fraser.
1137
1138         Enable the extension that allows content to query
1139         for the GPUs vendor and details.
1140
1141         Now that we're enabling this, there was no need for
1142         the internal setting that identified privileged situations.
1143         However, since this meant that WEBGL_debug_shaders was
1144         also exposed, I explicitly disable it since it is
1145         not yet conformant.
1146
1147         Test: fast/canvas/webgl/webgl-debug-renderer-info.html
1148         as well as the general conformance suite.
1149
1150         * html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
1151         (WebCore::WebGL2RenderingContext::getExtension):
1152         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1153         * html/canvas/WebGLRenderingContext.cpp: Ditto.
1154         (WebCore::WebGLRenderingContext::getExtension):
1155         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1156         * html/canvas/WebGLRenderingContextBase.cpp:
1157         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
1158         * html/canvas/WebGLRenderingContextBase.h:
1159         * page/Settings.in: Remove privilegedWebGLExtensions.
1160         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
1161         extension while it is still buggy.
1162         (WebCore::Extensions3DOpenGL::supportsExtension):
1163
1164 2015-10-01  Eric Carlson  <eric.carlson@apple.com>
1165
1166         [iOS] AirPlay should not stop when the screen locks
1167         https://bugs.webkit.org/show_bug.cgi?id=148315
1168         <rdar://problem/22770703>
1169
1170         Reviewed by Jer Noble.
1171
1172         Tested by media/video-interruption-with-resume-allowing-play.html
1173                   media/video-interruption-with-resume-not-allowing-play.html
1174
1175         * Modules/webaudio/AudioContext.h: overrideBackgroundPlaybackRestriction -> 
1176           shouldOverrideBackgroundPlaybackRestriction.
1177
1178         * html/HTMLMediaElement.cpp:
1179         (WebCore::HTMLMediaElement::suspendPlayback): Fix a typo in the logging.
1180         (WebCore::HTMLMediaElement::mayResumePlayback): Ditto.
1181         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Renamed from
1182           overrideBackgroundPlaybackRestriction.
1183         (WebCore::HTMLMediaElement::overrideBackgroundPlaybackRestriction): Deleted.
1184         * html/HTMLMediaElement.h:
1185
1186         * platform/audio/PlatformMediaSession.cpp:
1187         (WebCore::stateName):
1188         (WebCore::interruptionName): New, log the name of the interruption.
1189         (WebCore::PlatformMediaSession::beginInterruption): Log the interruption type. Don't
1190           increment the interruption counter if we are going to ignore it. Incorporate logic
1191           from doInterruption.
1192         (WebCore::PlatformMediaSession::doInterruption): Deleted.
1193         (WebCore::PlatformMediaSession::shouldDoInterruption): Deleted.
1194         (WebCore::PlatformMediaSession::forceInterruption): Deleted.
1195
1196         * platform/audio/PlatformMediaSession.h: Add SuspendedUnderLock interruption type.
1197         * platform/audio/PlatformMediaSessionManager.cpp:
1198         (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground): Deleted.
1199         * platform/audio/PlatformMediaSessionManager.h:
1200
1201         * platform/audio/ios/MediaSessionManagerIOS.h:
1202         * platform/audio/ios/MediaSessionManagerIOS.mm:
1203         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground): Call beginInterruption
1204           when appropriate.
1205
1206 2015-10-01  Ryosuke Niwa  <rniwa@webkit.org>
1207
1208         Slot elements should support fallback contents
1209         https://bugs.webkit.org/show_bug.cgi?id=149701
1210
1211         Reviewed by Antti Koivisto.
1212
1213         Following discussions on Github discussions [1] [2], we're adding the default rule of `display: contents`
1214         on slot elements and making slot elements render its children when there are no assigned nodes [3].
1215
1216         Make these changes by attaching renderers on direct-children of slot elements when there are no assigned
1217         nodes during render tree construction. Note `display: contents` will be aded in webkit.org/b/149439.
1218
1219         [1] https://github.com/w3c/webcomponents/issues/317
1220         [2] https://github.com/w3c/webcomponents/issues/308
1221         [3] https://github.com/w3c/webcomponents/issues/308#issuecomment-143655347
1222
1223         Tests: fast/shadow-dom/css-scoping-shadow-slot-fallback.html
1224                fast/shadow-dom/shadow-layout-after-slot-fallback-changes.html
1225
1226         * style/StyleResolveTree.cpp:
1227         (WebCore::Style::attachSlotAssignees):
1228         (WebCore::Style::detachSlotAssignees):
1229         (WebCore::Style::resolveSlotAssignees):
1230
1231 2015-10-01  Brent Fulgham  <bfulgham@apple.com>
1232
1233         Latch does not clear when a scroll snap animation is triggered
1234         https://bugs.webkit.org/show_bug.cgi?id=149681
1235         <rdar://problem/22733922>
1236
1237         Reviewed by Simon Fraser.
1238
1239         Test: tiled-drawing/scrolling/latched-div-with-scroll-snap.html
1240
1241         The scroll snap animation logic bypasses some of the normal clean-up code used
1242         for wheel event handling. When this happens, the scroll latching state is not
1243         cleared. In some cases this "stale" latch state is used when starting a new
1244         gesture in the same frame. This causes the wrong page element to receive the
1245         mouse wheel events, and hilarity ensues.
1246
1247         * page/mac/EventHandlerMac.mm:
1248         (WebCore::EventHandler::platformNotifyIfEndGesture): Clear latched state when
1249         ending the gesture.
1250
1251 2015-10-01  Brent Fulgham  <bfulgham@apple.com>
1252
1253         [Win] Unreviewed CMake build fixes.
1254
1255         * CMakeLists.txt: Match original Windows build flags for WebCoreTest.
1256         * PlatformAppleWin.cmake: Use the same build defines as the
1257         original Windows build.
1258
1259 2015-09-30  João Oliveira  <hello@jxs.pt>
1260
1261         Web Inspector: Adjust font size of Developer Tools using Command,+ or Command,-
1262         https://bugs.webkit.org/show_bug.cgi?id=149590
1263
1264         Reviewed by Joseph Pecoraro.
1265
1266         Patch by João Oliveira and Brian Burg.
1267
1268         Expose the frontend page's zoom factor so we can implement relative zoom.
1269
1270         * inspector/InspectorFrontendHost.cpp:
1271         (WebCore::InspectorFrontendHost::zoomFactor): Added.
1272         * inspector/InspectorFrontendHost.h:
1273         * inspector/InspectorFrontendHost.idl:
1274         * page/Frame.h:
1275         (WebCore::Frame::pageZoomFactor):
1276
1277 2015-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1278
1279         [GTK] Websites with invalid auth header keep loading forever
1280         https://bugs.webkit.org/show_bug.cgi?id=149710
1281
1282         Reviewed by Martin Robinson.
1283
1284         We don't correctly handle a null realm from the server when
1285         retrieving and storing credentials from libsecret. First
1286         secret_attributes_build() fails because we pass a null domain, and
1287         we pass null attributes to secret_service_search() that returns
1288         early on a g_return macro and the callback is never called so the
1289         load doesn't continue after the auth challenge.
1290
1291         * platform/network/gtk/CredentialBackingStore.cpp:
1292         (WebCore::createAttributeHashTableFromChallenge):
1293         (WebCore::CredentialBackingStore::credentialForChallenge):
1294         (WebCore::CredentialBackingStore::storeCredentialsForChallenge):
1295
1296 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1297
1298         Refactor binding generator to factor JS DOM class m_impl handling
1299         https://bugs.webkit.org/show_bug.cgi?id=149660
1300
1301         Reviewed by Darin Adler.
1302
1303         Added JSDOMWrapperWithImplementation template class to move m_impl out of the binding generator.
1304         Updated custom bindings to use impl() instead of m_impl directly.
1305         Updated binding generator accordingly.
1306
1307         Covered by existing tests and binding tests.
1308
1309         * bindings/js/JSDOMStringMapCustom.cpp:
1310         (WebCore::JSDOMStringMap::getOwnPropertyNames):
1311         (WebCore::JSDOMStringMap::deleteProperty):
1312         * bindings/js/JSDOMWrapper.h:
1313         (WebCore::JSDOMWrapperWithImplementation::impl):
1314         (WebCore::JSDOMWrapperWithImplementation::~JSDOMWrapperWithImplementation):
1315         (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
1316         (WebCore::JSDOMWrapperWithImplementation::releaseImpl):
1317         * bindings/js/JSGeolocationCustom.cpp:
1318         (WebCore::JSGeolocation::getCurrentPosition):
1319         (WebCore::JSGeolocation::watchPosition):
1320         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1321         (WebCore::JSSQLResultSetRowList::item):
1322         * bindings/js/JSSQLTransactionCustom.cpp:
1323         (WebCore::JSSQLTransaction::executeSql):
1324         * bindings/js/JSStorageCustom.cpp:
1325         (WebCore::JSStorage::deleteProperty):
1326         (WebCore::JSStorage::getOwnPropertyNames):
1327         * bindings/js/JSSubtleCryptoCustom.cpp:
1328         (WebCore::JSSubtleCrypto::encrypt):
1329         (WebCore::JSSubtleCrypto::decrypt):
1330         (WebCore::JSSubtleCrypto::sign):
1331         (WebCore::JSSubtleCrypto::verify):
1332         (WebCore::JSSubtleCrypto::wrapKey):
1333         (WebCore::JSSubtleCrypto::unwrapKey):
1334         * bindings/scripts/CodeGeneratorJS.pm:
1335         (GetParentClassName):
1336         (GetImplClassName):
1337         (GenerateHeader):
1338         (GenerateImplementation):
1339         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1340         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
1341         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot): Deleted.
1342         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1343         (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
1344         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1345         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
1346         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): Deleted.
1347         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
1348         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
1349         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::finishCreation): Deleted.
1350         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1351         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
1352         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot): Deleted.
1353         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1354         (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
1355         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1356         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
1357         (WebCore::jsTestEventConstructorAttr1): Deleted.
1358         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1359         (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
1360         (WebCore::JSTestEventConstructor::finishCreation): Deleted.
1361         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1362         (WebCore::JSTestEventTarget::JSTestEventTarget):
1363         (WebCore::JSTestEventTarget::getOwnPropertySlot): Deleted.
1364         * bindings/scripts/test/JS/JSTestEventTarget.h:
1365         (WebCore::JSTestEventTarget::~JSTestEventTarget):
1366         * bindings/scripts/test/JS/JSTestException.cpp:
1367         (WebCore::JSTestException::JSTestException):
1368         (WebCore::JSTestException::getOwnPropertySlot): Deleted.
1369         * bindings/scripts/test/JS/JSTestException.h:
1370         (WebCore::JSTestException::~JSTestException):
1371         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1372         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
1373         (WebCore::jsTestGenerateIsReachableConstructor): Deleted.
1374         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1375         (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
1376         (WebCore::JSTestGenerateIsReachable::finishCreation): Deleted.
1377         * bindings/scripts/test/JS/JSTestInterface.cpp:
1378         (WebCore::JSTestInterface::JSTestInterface):
1379         (WebCore::JSTestInterface::getOwnPropertySlot): Deleted.
1380         * bindings/scripts/test/JS/JSTestInterface.h:
1381         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1382         (WebCore::jsTestJSBuiltinConstructorConstructor): Deleted.
1383         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
1384         (WebCore::JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor):
1385         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1386         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
1387         (WebCore::jsTestMediaQueryListListenerConstructor): Deleted.
1388         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1389         (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
1390         (WebCore::JSTestMediaQueryListListener::finishCreation): Deleted.
1391         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1392         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
1393         (WebCore::jsTestNamedConstructorConstructor): Deleted.
1394         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1395         (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
1396         (WebCore::JSTestNamedConstructor::finishCreation): Deleted.
1397         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1398         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
1399         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr): Deleted.
1400         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1401         (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
1402         (WebCore::JSTestNondeterministic::finishCreation): Deleted.
1403         * bindings/scripts/test/JS/JSTestObj.cpp:
1404         (WebCore::JSTestObj::JSTestObj):
1405         (WebCore::JSTestObj::getOwnPropertySlot): Deleted.
1406         * bindings/scripts/test/JS/JSTestObj.h:
1407         (WebCore::JSTestObj::~JSTestObj):
1408         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1409         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
1410         (WebCore::jsTestOverloadedConstructorsConstructor): Deleted.
1411         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1412         (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
1413         (WebCore::JSTestOverloadedConstructors::finishCreation): Deleted.
1414         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1415         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
1416         (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot): Deleted.
1417         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1418         (WebCore::JSTestOverrideBuiltins::~JSTestOverrideBuiltins):
1419         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1420         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
1421         (WebCore::jsTestSerializedScriptValueInterfaceValue): Deleted.
1422         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1423         (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
1424         (WebCore::JSTestSerializedScriptValueInterface::finishCreation): Deleted.
1425         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1426         (WebCore::JSTestTypedefs::JSTestTypedefs):
1427         (WebCore::JSTestTypedefs::getOwnPropertySlot): Deleted.
1428         * bindings/scripts/test/JS/JSTestTypedefs.h:
1429         (WebCore::JSTestTypedefs::~JSTestTypedefs):
1430         * bindings/scripts/test/JS/JSattribute.cpp:
1431         (WebCore::JSattribute::JSattribute):
1432         (WebCore::jsattributeReadonly): Deleted.
1433         * bindings/scripts/test/JS/JSattribute.h:
1434         (WebCore::JSattribute::~JSattribute):
1435         (WebCore::JSattribute::finishCreation): Deleted.
1436         * bindings/scripts/test/JS/JSreadonly.cpp:
1437         (WebCore::JSreadonly::JSreadonly):
1438         (WebCore::jsreadonlyConstructor): Deleted.
1439         * bindings/scripts/test/JS/JSreadonly.h:
1440         (WebCore::JSreadonly::~JSreadonly):
1441         (WebCore::JSreadonly::finishCreation): Deleted.
1442
1443 2015-10-01  Csaba Osztrogonác  <ossy@webkit.org>
1444
1445         Fix the ARM build after r190192
1446         https://bugs.webkit.org/show_bug.cgi?id=149620
1447
1448         Reviewed by Darin Adler.
1449
1450         * platform/graphics/FontFeatureSettings.h:
1451         (WebCore::fontFeatureTag):
1452
1453 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1454
1455         [Streams API] Add support for private WebCore JS builtins functions
1456         https://bugs.webkit.org/show_bug.cgi?id=149518
1457
1458         Reviewed by Darin Adler.
1459
1460         Using ReadableStream tee method as a testbed to add support for private WebCore JS builtins functions.
1461         Private functions are hooked to JSDOMWindowBase, as it is the one connected to WebCoreClientData.
1462         WebCoreClientData is responsible to export the private function symbols to the VM.
1463
1464         Updated generate-js-builtins script to generate a class that can create and own all JS functions.
1465         This class is used by JSDOMWindowBase to create the JS builtin functions.
1466         It is also used to manage the GC of these objects.
1467
1468         Covered by rebased tests.
1469
1470         * CMakeLists.txt: Adding ReadableStreamInternals builtin files.
1471         * DerivedSources.cpp: Ditto.
1472         * DerivedSources.make: Ditto.
1473         * Modules/streams/ReadableStream.idl: Adding tee declaration as builtin
1474         * Modules/streams/ReadableStream.js:
1475         (tee): Calling @teeReadableStream
1476         * Modules/streams/ReadableStreamInternals.js: Barebone @teeReadableStream implementation.
1477         (teeReadableStream):
1478         * WebCore.vcxproj/WebCore.vcxproj: Adding ReadableStreamInternals builtin files.
1479         * WebCore.xcodeproj/project.pbxproj: Adding ReadableStreamInternals builtin files.
1480         * bindings/js/JSDOMWindowBase.cpp:
1481         (WebCore::JSDOMWindowBase::JSDOMWindowBase): Creating ReadableStreamInternalsBuiltinFunctions object.
1482         (WebCore::JSDOMWindowBase::finishCreation): Creating builtin functions through ReadableStreamInternalsBuiltinFunctions and registering them to the JS engine.
1483         (WebCore::JSDOMWindowBase::visitChildren): Ensuring GC does not collect private builtin functions through ReadableStreamInternalsBuiltinFunctions object
1484         * bindings/js/JSDOMWindowBase.h:
1485         * bindings/js/WebCoreJSClientData.h:
1486         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Exporting private names of ReadableStreamInternalsBuiltins
1487         (WebCore::WebCoreJSClientData::readableStreamBuiltins):
1488         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins):
1489         * generate-js-builtins: Adding support for ReadableStreamInternalsBuiltinFunctions and exportNames.
1490
1491 2015-10-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1492
1493         Binding generator should make mutable CachedAttribute member fields
1494         https://bugs.webkit.org/show_bug.cgi?id=148056
1495
1496         Reviewed by Chris Dumez.
1497
1498         Making mutable CachedAttribute member fields.
1499         Removing const_cast from custom binding code.
1500         Rebased bindings tests.
1501
1502         No change in behavior.
1503
1504         * bindings/js/JSHistoryCustom.cpp:
1505         (WebCore::JSHistory::state):
1506         * bindings/js/JSMessageEventCustom.cpp:
1507         (WebCore::JSMessageEvent::data):
1508         * bindings/js/JSPopStateEventCustom.cpp:
1509         (WebCore::cacheState):
1510         (WebCore::JSPopStateEvent::state):
1511         * bindings/js/JSReadableStreamReaderEventCustom.cpp:
1512         (WebCore::JSReadableStreamReader::closed):
1513         * bindings/js/JSXMLHttpRequestCustom.cpp:
1514         (WebCore::JSXMLHttpRequest::response):
1515         * bindings/scripts/CodeGeneratorJS.pm:
1516         (GenerateHeader):
1517         * bindings/scripts/test/JS/JSTestObj.h:
1518         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1519
1520 2015-10-01  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1521
1522         [Streams API] Create ByteLengthQueuingStrategy object as per spec
1523         https://bugs.webkit.org/show_bug.cgi?id=147153
1524
1525         Reviewed by Darin Adler.
1526
1527         Added ByteLengthQueuingStream class as the spec defines at https://streams.spec.whatwg.org/#blqs-class.
1528
1529         Tests are covered by current set.
1530
1531         * CMakeLists.txt:
1532         * DerivedSources.cpp:
1533         * DerivedSources.make:
1534         * WebCore.vcxproj/WebCore.vcxproj:
1535         * WebCore.vcxproj/WebCore.vcxproj.filters:
1536         * WebCore.xcodeproj/project.pbxproj:
1537         * bindings/js/WebCoreJSBuiltins.cpp: Added build instructions.
1538         * Modules/streams/ByteLengthQueuingStrategy.idl: Added.
1539         * Modules/streams/ByteLengthQueuingStrategy.js: Copied from Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp.
1540         (size): Return byteLength attribute of the chunk.
1541         (initializeByteLengthQueuingStrategy): Initialize the highWaterMark property.
1542         * bindings/js/WebCoreJSClientData.h:
1543         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Initialize the blqs builtins.
1544         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Return the attribute.
1545
1546 2015-10-01  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1547
1548         Clean up all uses of PassRefPtr in Modules/geolocation
1549         https://bugs.webkit.org/show_bug.cgi?id=149552
1550
1551         Reviewed by Darin Adler.
1552
1553         * Modules/geolocation/GeoNotifier.cpp:
1554         (WebCore::GeoNotifier::GeoNotifier):
1555         (WebCore::GeoNotifier::setFatalError):
1556         * Modules/geolocation/GeoNotifier.h:
1557         (WebCore::GeoNotifier::create):
1558         * Modules/geolocation/Geolocation.cpp:
1559         (WebCore::createGeoposition):
1560         (WebCore::createPositionError):
1561         (WebCore::Geolocation::Watchers::add):
1562         (WebCore::Geolocation::getCurrentPosition):
1563         (WebCore::Geolocation::watchPosition):
1564         (WebCore::Geolocation::startRequest):
1565         * Modules/geolocation/Geolocation.h:
1566         * Modules/geolocation/GeolocationError.h:
1567         * Modules/geolocation/GeolocationPosition.h:
1568         * Modules/geolocation/Geoposition.h:
1569         (WebCore::Geoposition::create):
1570         (WebCore::Geoposition::isolatedCopy):
1571         (WebCore::Geoposition::Geoposition):
1572         * Modules/geolocation/PositionError.h:
1573         * Modules/geolocation/PositionOptions.h:
1574
1575 2015-09-30  Hunseop Jeong  <hs85.jeong@samsung.com>
1576
1577         [EFL][Gtk] Try to fix the build after r190379.
1578         https://bugs.webkit.org/show_bug.cgi?id=149693
1579
1580         Reviewed by Gyuyoung Kim.
1581
1582         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1583
1584 2015-09-30  Katlyn Graff  <kgraff@apple.com>
1585
1586         Add support for the imageSmoothingQuality property for CanvasRenderingContext2D.
1587         https://bugs.webkit.org/show_bug.cgi?id=149541
1588
1589         Reviewed by Ryosuke Niwa.
1590
1591         As documented here: https://html.spec.whatwg.org/multipage/scripting.html#image-smoothing
1592         Exposes the smooothing quality of algorithms used for scaling images. Valid input
1593         values are low, medium, and high: associated algorithms are expected to vary for
1594         differing hardware. setImageSmoothingQuality provides a handle into CGInterpolationQuality.
1595
1596         Test: fast/canvas/canvas-imageSmoothingQuality.html
1597
1598         * html/canvas/CanvasRenderingContext2D.cpp:
1599         (WebCore::CanvasRenderingContext2D::State::State):
1600         (WebCore::CanvasRenderingContext2D::State::operator=):
1601         (WebCore::smoothingToInterpolationQuality):
1602         (WebCore::CanvasRenderingContext2D::imageSmoothingQuality):
1603         (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
1604         (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled):
1605         * html/canvas/CanvasRenderingContext2D.h:
1606         * html/canvas/CanvasRenderingContext2D.idl:
1607
1608 2015-09-30  Dean Jackson  <dino@apple.com>
1609
1610         GraphicsContext3D::mappedSymbolName should initialize count variable
1611         https://bugs.webkit.org/show_bug.cgi?id=149692
1612         <rdar://problem/22871304>
1613
1614         Reviewed by Simon Fraser.
1615
1616         While debugging another WebGL issue, I noticed that some
1617         OpenGL renderers can get into a state where they
1618         drop resources (e.g. a GPU reset). If we don't detect that
1619         in time, we might try to ask for the currently attached
1620         resources and our in-parameter will not be set. In this
1621         case, initialize it to zero so that we don't do silly things.
1622
1623         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1624         (WebCore::GraphicsContext3D::mappedSymbolName): Initialize count to 0.
1625
1626 2015-09-30  Dean Jackson  <dino@apple.com>
1627
1628         Crash in gleLookupHashObject when context is lost
1629         https://bugs.webkit.org/show_bug.cgi?id=149690
1630         <rdar://problem/22751585>
1631         <rdar://problem/22465495>
1632
1633         Reviewed by Simon Fraser.
1634
1635         When we received notification that the GPU has reset,
1636         we were nulling out and deleting our OpenGL contexts
1637         and then trying to do it all over again. The fix was
1638         to flip the order of operations.
1639
1640         While there I added some logging, and changed the
1641         way we check GPU status to make sure we do a check
1642         after the first draw call.
1643
1644         Unfortunately we can't test automatically because it
1645         involves resetting the GPU which can possibly cause
1646         concurrent tests to fail.
1647
1648         * platform/graphics/mac/GraphicsContext3DMac.mm:
1649         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Move forceContextLost()
1650         to be the first thing we do after we've realised we need to
1651         bail.
1652
1653 2015-09-30  Brady Eidson  <beidson@apple.com>
1654
1655         Add UniqueIDBDatabase object, IDBBackingStore objects, and a database operation thread.
1656         https://bugs.webkit.org/show_bug.cgi?id=149678
1657
1658         Reviewed by Alex Christensen.
1659
1660         Test: storage/indexeddb/modern/opendatabase-request-event.html
1661
1662         - UniqueIDBDatabase represents a specific IDB database instance that can have multiple 
1663           connections to it.
1664         - IDBBackingStore is an abstract representation of a unique database's backing store, 
1665           and has a concrete in-memory implementation for now.
1666         - The database thread exists on IDBServer and is for offloading actual database I/O from 
1667           the main thread.
1668
1669         * CMakeLists.txt:
1670
1671         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
1672         (WebCore::IDBDatabaseIdentifier::isolatedCopy):
1673         * Modules/indexeddb/IDBDatabaseIdentifier.h:
1674
1675         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1676         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
1677         (WebCore::IDBClient::IDBConnectionToServer::didOpenDatabase):
1678         * Modules/indexeddb/client/IDBConnectionToServer.h:
1679         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1680
1681         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
1682         (WebCore::IDBClient::IDBFactory::openInternal):
1683
1684         * Modules/indexeddb/server/IDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
1685         (WebCore::IDBServer::IDBBackingStore::~IDBBackingStore):
1686
1687         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1688         (WebCore::IDBServer::IDBConnectionToClient::didOpenDatabase):
1689         * Modules/indexeddb/server/IDBConnectionToClient.h:
1690         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1691
1692         * Modules/indexeddb/server/IDBServer.cpp:
1693         (WebCore::IDBServer::IDBServer::IDBServer):
1694         (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
1695         (WebCore::IDBServer::IDBServer::createBackingStore):
1696         (WebCore::IDBServer::IDBServer::openDatabase):
1697         (WebCore::IDBServer::IDBServer::deleteDatabase):
1698         (WebCore::IDBServer::IDBServer::postDatabaseTask):
1699         (WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
1700         (WebCore::IDBServer::IDBServer::databaseThreadEntry):
1701         (WebCore::IDBServer::IDBServer::databaseRunLoop):
1702         (WebCore::IDBServer::IDBServer::handleTaskRepliesOnMainThread):
1703         * Modules/indexeddb/server/IDBServer.h:
1704
1705         * Modules/indexeddb/server/IDBServerOperation.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
1706         (WebCore::IDBServer::IDBServerOperation::create):
1707         (WebCore::IDBServer::IDBServerOperation::IDBServerOperation):
1708         * Modules/indexeddb/server/IDBServerOperation.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
1709         (WebCore::IDBServer::IDBServerOperation::connection):
1710         (WebCore::IDBServer::IDBServerOperation::requestData):
1711
1712         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp.
1713         (WebCore::IDBServer::MemoryIDBBackingStore::create):
1714         (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
1715         (WebCore::IDBServer::MemoryIDBBackingStore::~MemoryIDBBackingStore):
1716         (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
1717         * Modules/indexeddb/server/MemoryIDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h.
1718
1719         * Modules/indexeddb/server/UniqueIDBDatabase.cpp: Added.
1720         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
1721         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
1722         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
1723         (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
1724         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
1725         * Modules/indexeddb/server/UniqueIDBDatabase.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
1726         (WebCore::IDBServer::UniqueIDBDatabase::create):
1727
1728         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
1729         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
1730         (WebCore::IDBDatabaseInfo::isolatedCopy):
1731         * Modules/indexeddb/shared/IDBDatabaseInfo.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
1732         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
1733
1734         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1735         (WebCore::InProcessIDBServer::didDeleteDatabase):
1736         (WebCore::InProcessIDBServer::openDatabase):
1737         (WebCore::InProcessIDBServer::didOpenDatabase):
1738         * Modules/indexeddb/shared/InProcessIDBServer.h:
1739
1740         * WebCore.xcodeproj/project.pbxproj:
1741
1742         * platform/CrossThreadCopier.cpp:
1743         (WebCore::IDBDatabaseInfo>::copy):
1744         (WebCore::IDBDatabaseIdentifier>::copy):
1745         * platform/CrossThreadCopier.h:
1746
1747 2015-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
1748
1749         Crash when using an SVG font with > 390 glyphs
1750         https://bugs.webkit.org/show_bug.cgi?id=149677
1751         <rdar://problem/21676402>
1752
1753         Reviewed by Simon Fraser.
1754
1755         The "Charset Index" in OTF are indices into a collection of strings. There are
1756         390 predefined strings in this collection. We were currently assigning each
1757         glyph to one of these strings. However, if there are more glyphs than strings,
1758         we will be using invalid indices.
1759
1760         The values of the strings themselves are not necessary for SVG fonts. Therefore,
1761         the solution is to create a single dummy string, and have all glyphs target it.
1762
1763         Tests: svg/custom/many-glyphs.svg
1764
1765         * css/CSSFontFaceSource.cpp:
1766         (WebCore::CSSFontFaceSource::font):
1767         * svg/SVGToOTFFontConversion.cpp:
1768         (WebCore::SVGToOTFFontConverter::appendCFFTable):
1769
1770 2015-09-30  Chris Dumez  <cdumez@apple.com>
1771
1772         Unreviewed, roll out r188331: "NetworkProcess: DNS prefetch happens in the Web Process"
1773         <rdar://problem/22560715>
1774
1775         Speculative roll out of r188331 as we had a ~2.5% PLT regression around
1776         the time it landed and it seems the most likely culprit. I'll reland if
1777         the perf bots do not recover after the roll out.
1778
1779         * html/HTMLAnchorElement.cpp:
1780         (WebCore::HTMLAnchorElement::parseAttribute):
1781         * loader/FrameLoaderClient.h:
1782         * loader/LinkLoader.cpp:
1783         (WebCore::LinkLoader::loadLink):
1784         * page/Chrome.cpp:
1785         (WebCore::Chrome::mouseDidMoveOverElement):
1786
1787 2015-09-30  Timothy Horton  <timothy_horton@apple.com>
1788
1789         Compute document marker rects at use time instead of paint time
1790         https://bugs.webkit.org/show_bug.cgi?id=149643
1791
1792         Reviewed by Darin Adler.
1793
1794         * dom/DocumentMarkerController.cpp:
1795         (WebCore::DocumentMarkerController::DocumentMarkerController):
1796         (WebCore::DocumentMarkerController::detach):
1797         Store and zero the Document backpointer.
1798
1799         (WebCore::DocumentMarkerController::addMarker):
1800         (WebCore::DocumentMarkerController::addTextMatchMarker):
1801         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
1802         (WebCore::DocumentMarkerController::addDictationResultMarker):
1803         (WebCore::DocumentMarkerController::copyMarkers):
1804         Remove some useless comments.
1805
1806         (WebCore::updateRenderedRectsForMarker):
1807         Use Range to compute the (unclipped, absolute) text rects, and store them
1808         on the RenderedDocumentMarker.
1809
1810         (WebCore::DocumentMarkerController::invalidateRectsForAllMarkers):
1811         (WebCore::DocumentMarkerController::invalidateRectsForMarkersInNode):
1812         Mark the relevant markers' rects as invalid, and notify the ChromeClient.
1813
1814         (WebCore::DocumentMarkerController::updateRectsForInvalidatedMarkersOfType):
1815         Run through all markers, computing rects for ones that don't have valid rects.
1816         We will do layout (once) if necessary. However, this is most commonly
1817         called from a place where layout should already be up to date, so this
1818         should not happen often. updateRenderedRectsForMarker also asserts
1819         that layout is up to date.
1820
1821         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
1822         Retrieve all markers of the given type, clip them by overflow clip and
1823         frame clip, and return them to the caller.
1824
1825         (WebCore::DocumentMarkerController::addMarker):
1826         (WebCore::DocumentMarkerController::markerContainingPoint):
1827         (WebCore::DocumentMarkerController::markersFor):
1828         (WebCore::DocumentMarkerController::repaintMarkers):
1829         (WebCore::DocumentMarkerController::shiftMarkers):
1830         (DocumentMarkerController::setMarkersActive):
1831         (DocumentMarkerController::hasMarkers):
1832         Modern iteration.
1833         
1834         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect): Deleted.
1835         * dom/DocumentMarkerController.h:
1836
1837         * dom/Document.cpp:
1838         (WebCore::Document::Document):
1839         Pass the Document to the DocumentMarkerController.
1840
1841         * dom/RenderedDocumentMarker.h:
1842         (WebCore::RenderedDocumentMarker::contains):
1843         (WebCore::RenderedDocumentMarker::setUnclippedAbsoluteRects):
1844         (WebCore::RenderedDocumentMarker::unclippedAbsoluteRects):
1845         (WebCore::RenderedDocumentMarker::invalidate):
1846         (WebCore::RenderedDocumentMarker::isValid):
1847         (WebCore::RenderedDocumentMarker::addRenderedRect): Deleted.
1848         (WebCore::RenderedDocumentMarker::renderedRects): Deleted.
1849         Instead of keeping "rendered" rects, keep unclipped rects in absolute
1850         document coordinates. Invalidation will happen wholesale instead of
1851         based on dirty rects, because computation no longer happens at paint
1852         time, so it's safe to throw all of the rects away.
1853         Keep track of whether we have valid rects or not.
1854
1855         * editing/Editor.cpp:
1856         (WebCore::Editor::countMatchesForText):
1857         We don't need to do a fake whole-document paint just to compute the
1858         document marker rects. They are computed on demand, using layout information
1859         instead of paint-time information.
1860
1861         * page/ChromeClient.h:
1862         Remove an unnecessary semicolon.
1863         Add didInvalidateDocumentMarkerRects, which DocumentMarkerController
1864         will call whenever document marker rects are invalidated (and when e.g.
1865         the find holes PageOverlay should repaint itself).
1866
1867         * page/FrameView.cpp:
1868         (WebCore::FrameView::layout):
1869         Invalidate document marker's layout-computed rects after layout is complete.
1870         They'll be lazily recomputed when next requested.
1871
1872         (WebCore::FrameView::willPaintContents):
1873         Remove the pre-painting invalidation of document marker rects.
1874
1875         * rendering/InlineTextBox.cpp:
1876         (WebCore::InlineTextBox::paintTextMatchMarker):
1877         (WebCore::InlineTextBox::paintDocumentMarker): Deleted.
1878         (WebCore::InlineTextBox::computeRectForReplacementMarker): Deleted.
1879         (WebCore::InlineTextBox::paintDocumentMarkers): Deleted.
1880         Don't bother computing rendered rects for document markers at paint time.
1881         Just do the actual painting work (which, for replacement markers, is
1882         nothing at all).
1883
1884         * rendering/InlineTextBox.h:
1885         * rendering/RenderLayer.cpp:
1886         (WebCore::RenderLayer::updateLayerPositions):
1887         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
1888         When RenderLayers move, invalidate document marker rects.
1889
1890         * rendering/svg/SVGInlineFlowBox.cpp:
1891         (WebCore::SVGInlineFlowBox::paint):
1892         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer): Deleted.
1893         * rendering/svg/SVGInlineFlowBox.h:
1894         * rendering/svg/SVGRootInlineBox.cpp:
1895         (WebCore::SVGRootInlineBox::paint):
1896         Don't bother computing rendered rects for document markers at paint time.
1897
1898         * testing/Internals.cpp:
1899         (WebCore::markerTypeFrom):
1900         (WebCore::markerTypesFrom):
1901         Add markerTypeFrom, which returns MarkerType enum values for the input string
1902         instead of a MarkerTypes class.
1903
1904         (WebCore::Internals::dumpMarkerRects):
1905         Dump all markers for the given type, and request them from DocumentMarkerController
1906         instead of from the RenderedDocumentMarker, because we want fully clipped
1907         rects, which can only be obtained from DocumentMarkerController.
1908
1909         * editing/FrameSelection.cpp:
1910         (WebCore::FrameSelection::getTextRectangles):
1911         Avoid enclosing unnecessarily, to avoid inflating zero-width text rects
1912         to have a non-zero width. Callers appear to be OK with non-integral positions.
1913
1914         * testing/Internals.h:
1915         * testing/Internals.idl:
1916
1917 2015-09-30  Eric Carlson  <eric.carlson@apple.com>
1918
1919         REGRESSION(r190262): User media unit test failures after r190262
1920         https://bugs.webkit.org/show_bug.cgi?id=149580
1921
1922         Reviewed by Darin Adler.
1923
1924         * Modules/mediastream/RTCPeerConnection.cpp:
1925         (WebCore::RTCPeerConnection::getStats): Drive-by fix to deal with optional param.
1926
1927         * Modules/mediastream/UserMediaRequest.cpp:
1928         (WebCore::UserMediaRequest::constraintsValidated): Swap the track parameter order.
1929         * Modules/mediastream/UserMediaRequest.h:
1930
1931         * platform/mediastream/MediaStreamCreationClient.h:
1932         (WebCore::MediaStreamCreationClient::validateRequestConstraints): Swap the track parameter order.
1933
1934         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1935         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): If there is no 
1936           constraint for a media type, don't return a device of that type.
1937
1938         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
1939         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.
1940
1941         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1942         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
1943
1944         * platform/mock/TimerEventBasedMock.h:
1945         (WebCore::TimerEvent::~TimerEvent): Clear the m_mock pointer.
1946
1947         * platform/mock/UserMediaClientMock.h:
1948         (WebCore::UserMediaClientMock::fire): Deal with empty device vectors.
1949
1950         * testing/Internals.cpp:
1951         (WebCore::Internals::Internals): Don't register UserMediaController, it isn't needed for
1952           WKTR.
1953
1954 2015-09-29  Antti Koivisto  <antti@apple.com>
1955
1956         Use separate style resolver for user agent shadow trees
1957         https://bugs.webkit.org/show_bug.cgi?id=149626
1958
1959         Reviewed by Andreas Kling.
1960
1961         We now support separate style resolvers for shadow trees. Use this mechanism to have a separate
1962         per-document style resolver for user agent shadow trees. This isolates user agent shadow trees
1963         from author style better and simplifies the style resolver. It can also avoid some unnecessary style recalcs.
1964
1965         * css/DocumentRuleSets.cpp:
1966         (WebCore::DocumentRuleSets::resetAuthorStyle):
1967         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
1968
1969             Change interface so that only the new rules are provided.
1970
1971         * css/DocumentRuleSets.h:
1972         * css/ElementRuleCollector.cpp:
1973         (WebCore::ElementRuleCollector::addElementStyleProperties):
1974         (WebCore::ElementRuleCollector::collectMatchingRules):
1975
1976             We can remove special bailout as shadow tree style resolver won't have other author style
1977
1978         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1979
1980             Remove the exception that disables property whitelists for UA stylesheets. We don't seem to use the feature.
1981
1982         (WebCore::ElementRuleCollector::matchUARules):
1983         (WebCore::MatchingUARulesScope::MatchingUARulesScope): Deleted.
1984         (WebCore::MatchingUARulesScope::~MatchingUARulesScope): Deleted.
1985         (WebCore::MatchingUARulesScope::isMatchingUARules): Deleted.
1986
1987             Remove this unnecessary hack.
1988
1989         * css/ElementRuleCollector.h:
1990         (WebCore::ElementRuleCollector::ElementRuleCollector):
1991         * css/RuleSet.cpp:
1992         (WebCore::RuleSet::addStyleRule):
1993         (WebCore::RuleSet::copyShadowPseudoElementRulesFrom):
1994
1995             Also copy WebVTT rules. They are currently a sort of mixture of UA and author shadow tree.
1996
1997         (WebCore::shrinkMapVectorsToFit):
1998         * css/RuleSet.h:
1999         (WebCore::RuleData::containsUncommonAttributeSelector):
2000         (WebCore::RuleData::linkMatchType):
2001         (WebCore::RuleData::hasDocumentSecurityOrigin):
2002         (WebCore::RuleData::propertyWhitelistType):
2003         (WebCore::RuleData::descendantSelectorIdentifierHashes):
2004         (WebCore::RuleSet::ruleCount):
2005         (WebCore::RuleSet::hasShadowPseudoElementRules):
2006         * css/StyleInvalidationAnalysis.cpp:
2007         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
2008         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
2009
2010             Don't invalidate the whole tree when author shadow pseudo element rules change. Just invalidate the shadow trees.
2011
2012         (WebCore::StyleInvalidationAnalysis::invalidateStyleForTree):
2013         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
2014         (WebCore::invalidateIfNeeded): Deleted.
2015         (WebCore::invalidateStyleForTree): Deleted.
2016         * css/StyleInvalidationAnalysis.h:
2017         (WebCore::StyleInvalidationAnalysis::dirtiesAllStyle):
2018         (WebCore::StyleInvalidationAnalysis::hasShadowPseudoElementRulesInAuthorSheet):
2019         * css/StyleResolver.cpp:
2020         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2021         (WebCore::StyleResolver::StyleResolver):
2022         (WebCore::StyleResolver::appendAuthorStyleSheets):
2023
2024             Simpler interface.
2025
2026         * css/StyleResolver.h:
2027         (WebCore::StyleResolver::document):
2028         (WebCore::StyleResolver::documentSettings):
2029         (WebCore::StyleResolver::ruleSets):
2030         * dom/AuthorStyleSheets.cpp:
2031         (WebCore::AuthorStyleSheets::collectActiveStyleSheets):
2032         (WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
2033
2034             Cleanups.
2035
2036         (WebCore::filterEnabledNonemptyCSSStyleSheets):
2037         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
2038         (WebCore::AuthorStyleSheets::updateStyleResolver):
2039
2040             Factor to a function.
2041             Copy any author shadow pseudo elements to user agent shadow tree resolver.
2042
2043         (WebCore::AuthorStyleSheets::activeStyleSheetsForInspector):
2044         * dom/AuthorStyleSheets.h:
2045         * dom/Document.cpp:
2046         (WebCore::Document::createStyleResolver):
2047         (WebCore::Document::userAgentShadowTreeStyleResolver):
2048
2049             Use separate resolver.
2050
2051         (WebCore::Document::fontsNeedUpdate):
2052         (WebCore::Document::clearStyleResolver):
2053         * dom/Document.h:
2054         (WebCore::Document::ensureStyleResolver):
2055         * dom/ShadowRoot.cpp:
2056         (WebCore::ShadowRoot::styleResolver):
2057
2058             Return document-global shadow tree resolver for ua trees.
2059
2060         * style/StyleResolveTree.cpp:
2061         (WebCore::Style::resolveShadowTree):
2062
2063             Take styleChange of shadow root into account.
2064
2065 2015-09-30  Gwang Yoon Hwang  <yoon@igalia.com>
2066
2067         [GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
2068         https://bugs.webkit.org/show_bug.cgi?id=141782
2069
2070         Reviewed by Carlos Garcia Campos.
2071
2072         This patch fixes HiDPI issue in the TextureMapper.
2073         To support HiDPI in the TextureMapper, we need to draw scaled contents
2074         in the TextureMapperTile, and apply the global scale in the root layer
2075         to apply transforms correctly.
2076
2077         Supporting the device scale is handled at LayerTreeHostGtk and
2078         TextureMapperBackingStore, and GraphicsLayerTextureMapper doesn't handle
2079         the device scale directly.
2080
2081         From the TextureMapperLayer, deviceScale and pageScale do not have to be
2082         handled differently. These are multiplied and provided to
2083         TextureMapperBackingStore.
2084
2085         * platform/graphics/texmap/TextureMapperTile.cpp:
2086         (WebCore::TextureMapperTile::updateContents):
2087         * platform/graphics/texmap/TextureMapperTile.h:
2088         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
2089
2090             Modified to increase the cover rect for tiles creation. For the image
2091             contents, it just creates texture with a image size, regardless of the
2092             contents scale.
2093
2094         * platform/graphics/texmap/BitmapTexture.cpp:
2095         (WebCore::BitmapTexture::updateContents):
2096
2097             Apply the device scale to the graphics context before painting contents.
2098
2099         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2100         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
2101         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
2102
2103             Apply the device scale and the page scale to the backing store
2104
2105 2015-09-29  Ryosuke Niwa  <rniwa@webkit.org>
2106
2107         ASSERTION FAILED: !isUnreachableNode(m_target.get()) when hovering over any input element
2108         https://bugs.webkit.org/show_bug.cgi?id=149589
2109
2110         Reviewed by Darin Adler.
2111
2112         The bug was caused by target not being reset across shadow boundary when SHADOW_DOM was disabled.
2113
2114         No new tests since exiting tests cover this in debug builds. e.g. editing/deleting/5290534.html
2115
2116         * dom/EventDispatcher.cpp:
2117         (WebCore::EventPath::EventPath):
2118
2119 2015-09-29  Jon Honeycutt  <jhoneycutt@apple.com>
2120
2121         Avoid reparsing an XSLT stylesheet after the first failure.
2122         https://bugs.webkit.org/show_bug.cgi?id=149188
2123         <rdar://problem/22709912>
2124
2125         Reviewed by Dave Hyatt.
2126
2127         Patch by Jiewen Tan, jiewen_tan@apple.com.
2128
2129         Test: svg/custom/invalid-xslt-crash.svg
2130
2131         * xml/XSLStyleSheet.h:
2132         Add a new member variable m_compilationFailed that tracks whether
2133         compilation has failed. Default value is false.
2134
2135         * xml/XSLStyleSheetLibxslt.cpp:
2136         (WebCore::XSLStyleSheet::compileStyleSheet):
2137         Return early if the compilation has failed before. After compiling the
2138         style sheet, if we failed, set m_compilationFailed to true.
2139
2140 2015-09-29  Hunseop Jeong  <hs85.jeong@samsung.com>
2141
2142         Use modern for-loops in WebCore/loader.
2143         https://bugs.webkit.org/show_bug.cgi?id=149397
2144
2145         Reviewed by Darin Adler.
2146
2147         No new tests because there is no behavior change.
2148
2149         * loader/CrossOriginAccessControl.cpp:
2150         (WebCore::parseAccessControlExposeHeadersAllowList):
2151         * loader/DocumentLoader.cpp:
2152         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
2153         * loader/FormSubmission.cpp:
2154         (WebCore::FormSubmission::create):
2155         * loader/FrameLoader.cpp:
2156         (WebCore::FrameLoader::~FrameLoader):
2157         (WebCore::FrameLoader::commitProvisionalLoad):
2158         (WebCore::FrameLoader::detachChildren):
2159         (WebCore::FrameLoader::shouldClose):
2160         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
2161         * loader/HistoryController.cpp:
2162         (WebCore::HistoryController::currentFramesMatchItem):
2163         * loader/SubframeLoader.cpp:
2164         (WebCore::findPluginMIMETypeFromURL):
2165         (WebCore::SubframeLoader::createJavaAppletWidget):
2166         * loader/appcache/ApplicationCache.cpp:
2167         (WebCore::ApplicationCache::isURLInOnlineWhitelist):
2168         (WebCore::ApplicationCache::urlMatchesFallbackNamespace):
2169         * loader/appcache/ApplicationCacheGroup.cpp:
2170         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2171         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2172         (WebCore::ApplicationCacheGroup::postListenerTask):
2173         * loader/appcache/ApplicationCacheHost.cpp:
2174         (WebCore::ApplicationCacheHost::stopDeferringEvents):
2175         * loader/appcache/ApplicationCacheStorage.cpp:
2176         (WebCore::StorageIDJournal::~StorageIDJournal):
2177         (WebCore::ApplicationCacheStorage::store):
2178         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
2179         * loader/archive/Archive.cpp:
2180         (WebCore::Archive::clearAllSubframeArchivesImpl):
2181         * loader/archive/ArchiveResourceCollection.cpp:
2182         (WebCore::ArchiveResourceCollection::addAllResources):
2183         * loader/archive/cf/LegacyWebArchive.cpp:
2184         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
2185         (WebCore::LegacyWebArchive::create):
2186         * loader/archive/mhtml/MHTMLArchive.cpp:
2187         (WebCore::MHTMLArchive::generateMHTMLData):
2188         * loader/cache/CachedImage.cpp:
2189         (WebCore::CachedImage::switchClientsToRevalidatedResource):
2190         (WebCore::CachedImage::createImage):
2191         * loader/cache/CachedResource.cpp:
2192         (WebCore::CachedResource::switchClientsToRevalidatedResource):
2193         * loader/cache/CachedResourceLoader.cpp:
2194         (WebCore::CachedResourceLoader::~CachedResourceLoader):
2195         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
2196         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
2197         (WebCore::CachedResourceLoader::isPreloaded):
2198         (WebCore::CachedResourceLoader::printPreloadStats):
2199         * loader/icon/IconDatabase.cpp:
2200         (WebCore::IconDatabase::removeAllIcons):
2201         (WebCore::IconDatabase::setIconDataForIconURL):
2202         (WebCore::IconDatabase::iconRecordCountWithData):
2203         (WebCore::IconDatabase::notifyPendingLoadDecisions):
2204         (WebCore::IconDatabase::performURLImport):
2205         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
2206         (WebCore::IconDatabase::readFromDatabase):
2207         (WebCore::IconDatabase::writeToDatabase):
2208
2209 2015-09-29  Chris Dumez  <cdumez@apple.com>
2210
2211         sectionRowIndex must return -1 when its parent is not a table, tbody, thead, or tfoot
2212         https://bugs.webkit.org/show_bug.cgi?id=148841
2213         <rdar://problem/22586870>
2214
2215         Reviewed by Ryosuke Niwa.
2216
2217         Update HTMLTableRowElement.sectionRowIndex to match the specification:
2218         https://html.spec.whatwg.org/multipage/tables.html#dom-tr-sectionrowindex
2219
2220         In particular, it now returns -1 if the parent is not a table, tbody,
2221         thead and tfoot.
2222
2223         No new tests, already covered by existing test.
2224
2225         * html/HTMLTableRowElement.cpp:
2226         (WebCore::HTMLTableRowElement::sectionRowIndex):
2227
2228 2015-09-29  Daniel Bates  <dabates@apple.com>
2229
2230         Make WebKit for iOS Simulator build with the public iOS 9 SDK
2231         https://bugs.webkit.org/show_bug.cgi?id=149652
2232
2233         Reviewed by Simon Fraser.
2234
2235         * WebCore.xcodeproj/project.pbxproj: Add private header pthreadSPI.h. Also move entry for IDBTransaction.h so that it is in sorted order.
2236         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Substitute AVPlayerViewControllerDelegate_WebKitOnly for AVPlayerViewControllerDelegate.
2237         * platform/spi/cocoa/AVKitSPI.h: As of iOS 9, AVPlayerViewControllerDelegate is a public protocol. Separate out WebKit-specific SPI into protocol
2238         AVPlayerViewControllerDelegate_WebKitOnly, which extends AVPlayerViewControllerDelegate. Also, the properties -[AVPlayerViewController allowsPictureInPicturePlayback] and -[AVPlayerViewController delegate] are public in iOS 9.
2239         * platform/spi/cocoa/pthreadSPI.h: Added.
2240         * platform/spi/ios/LaunchServicesSPI.h: Add more SPI.
2241         * platform/spi/ios/MediaPlayerSPI.h: Ignore deprecation warnings for UIPopoverController and UIActionSheet.
2242
2243 2015-09-29  Brady Eidson  <beidson@apple.com>
2244
2245         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
2246         https://bugs.webkit.org/show_bug.cgi?id=149651
2247
2248         Rubberstamped by Alex Christensen.
2249
2250         No new tests (No change in behavior).
2251
2252         * platform/CrossThreadTask.h: Now in WebCore, use the WebCore namespace.
2253
2254 2015-09-29  Brady Eidson  <beidson@apple.com>
2255
2256         Move WebKit2 AsyncTask to WebCore CrossThreadTask.
2257         https://bugs.webkit.org/show_bug.cgi?id=149651
2258
2259         Reviewed by Alex Christensen.
2260
2261         No new tests (No change in behavior).
2262         
2263         It will be needed in WebCore to support IndexedDB.
2264
2265         * WebCore.xcodeproj/project.pbxproj:
2266         * platform/CrossThreadTask.h: Renamed from Source/WebKit2/Shared/AsyncTask.h.
2267         (WebKit::CrossThreadTask::CrossThreadTask):
2268         (WebKit::CrossThreadTask::performTask):
2269         (WebKit::createCrossThreadTask):
2270
2271 2015-09-29  Wenson Hsieh  <wenson_hsieh@apple.com>
2272
2273         Snap offsets should update when style is programmatically changed
2274         https://bugs.webkit.org/show_bug.cgi?id=135964
2275         <rdar://problem/18162411>
2276
2277         Reviewed by Darin Adler.
2278
2279         Tests:  css3/scroll-snap/scroll-snap-style-changed-coordinates.html
2280                 css3/scroll-snap/scroll-snap-style-changed-repeat.html
2281
2282         Updating scroll snap style properties now programmatically updates the scroll snap container. Does not yet
2283         handle the case of reparented elements with scroll snap coordinates. Adds some plumbing the FrameView and
2284         RenderLayerCompositor to immediately update the scrolling coordinator when updating the FrameView due to
2285         style changes.
2286
2287         * page/FrameView.cpp:
2288         (WebCore::FrameView::updateScrollingCoordinatorScrollSnapProperties): Calls on the compositor to reupdate scroll snap
2289             properties on the FrameView.
2290         * page/FrameView.h:
2291         * page/scrolling/AsyncScrollingCoordinator.cpp: Sets snap offsets to an empty vector when appropriate.
2292         (WebCore::setStateScrollingNodeSnapOffsetsAsFloat): Ditto.
2293         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Ditto.
2294         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
2295         (WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView): Updates scroll snap properties
2296             from a given FrameView.
2297         * page/scrolling/AsyncScrollingCoordinator.h:
2298         * page/scrolling/ScrollingCoordinator.h:
2299         (WebCore::ScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):
2300         * rendering/RenderLayerCompositor.cpp:
2301         (WebCore::RenderLayerCompositor::updateScrollSnapPropertiesWithFrameView): Updates the scrolling coordinator's
2302             scroll snap properties.
2303         * rendering/RenderLayerCompositor.h: Plumb scroll snap property updating to the FrameView.
2304         * rendering/RenderLayerModelObject.cpp: Checks for style changes and updates snap offsets when appropriate.
2305         (WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate): Ditto.
2306         (WebCore::RenderLayerModelObject::styleDidChange): Ditto.
2307
2308 2015-09-29  Jer Noble  <jer.noble@apple.com>
2309
2310         REGRESSION: WebAudio user-gesture restriction is no longer lifted by touchstart event
2311         https://bugs.webkit.org/show_bug.cgi?id=149367
2312
2313         Reviewed by Eric Carlson.
2314
2315         Use processingUserGestureForMedia() rather than processingUserGesture(),
2316         as the former includes touchstart and the latter does not.
2317
2318         * Modules/webaudio/AudioContext.cpp:
2319         (WebCore::AudioContext::willBeginPlayback):
2320         (WebCore::AudioContext::willPausePlayback):
2321         * html/MediaElementSession.cpp:
2322         (WebCore::MediaElementSession::playbackPermitted):
2323         (WebCore::MediaElementSession::dataLoadingPermitted):
2324         (WebCore::MediaElementSession::fullscreenPermitted):
2325         (WebCore::MediaElementSession::showPlaybackTargetPicker):
2326
2327 2015-09-29  Ryosuke Niwa  <rniwa@webkit.org>
2328
2329         Update style/layout when a slot is added or removed
2330         https://bugs.webkit.org/show_bug.cgi?id=149593
2331
2332         Reviewed by Antti Koivisto.
2333
2334         Fixed the bug by forcing the render tree reconstruction on the shadow host when a slot is inserted or removed.
2335         We should optimize these reconstructions by only triggering them on the affected slot elements in the future.
2336
2337         Also fixed a bug that we were not invalidating the slot assignments when a default slot is introduced dynamically
2338         after the slot assignment algorithm had run.
2339
2340         Test (existing): fast/shadow-dom/shadow-layout-after-slot-changes.html
2341
2342         * dom/ShadowRoot.cpp:
2343         (WebCore::ShadowRoot::addSlotElementByName): Passes in ShadowRoot.
2344         (WebCore::ShadowRoot::removeSlotElementByName): Ditto.
2345         * dom/SlotAssignment.cpp:
2346         (WebCore::SlotAssignment::addSlotElementByName): Call setNeedsStyleRecalc.
2347         (WebCore::SlotAssignment::removeSlotElementByName): Call setNeedsStyleRecalc if the host is still alive since this
2348         function can be called while the host is being destructed in which case shadowRoot.host() would be nullptr.
2349         * dom/SlotAssignment.h:
2350
2351 2015-09-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2352
2353         Improve binding of JSBuiltinConstructor classes
2354         https://bugs.webkit.org/show_bug.cgi?id=149556
2355
2356         Reviewed by Darin Adler.
2357
2358         JSBuiltinConstructor classes no longer need definition of a DOM class.
2359         These classes no longer go through the JS wrapper cache.
2360         Removed code related to DOM class handling (m_impl, releaseImpl, WrapperOwner, toJS, ...)
2361         Updated creation code.
2362
2363         Refactoring of the binding generator code to simplify whether generating or not some methods.
2364
2365         Removed unneeded include of DOM class in JSXX.cpp (already done in JSXX.h)
2366
2367         Added new binding test to cover JSBuiltinConstructor keyword.
2368
2369         Covered by binding tests.
2370
2371         * bindings/js/JSDOMBinding.h:
2372         (WebCore::createJSBuiltin):
2373         (WebCore::DOMConstructorObject::createStructure):.
2374         * bindings/scripts/CodeGeneratorJS.pm:
2375         (NeedsImplementationClass):
2376         (ShouldGenerateToWrapped):
2377         (ShouldGenerateWrapperOwnerCode):
2378         (ShouldGenerateToJSDeclaration):
2379         (ShouldGenerateToJSImplementation):
2380         (GenerateHeader):
2381         (GenerateImplementation):
2382         (GenerateConstructorDefinition):
2383         (ComputeFunctionSpecial):.
2384         (UseJSBuiltins):.
2385         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp: Added.
2386         (WebKit::kit):
2387         (WebKit::core):
2388         (WebKit::wrapTestJSBuiltinConstructor):
2389         (webkit_dom_test_js_builtin_constructor_finalize):
2390         (webkit_dom_test_js_builtin_constructor_constructor):
2391         (webkit_dom_test_js_builtin_constructor_class_init):
2392         (webkit_dom_test_js_builtin_constructor_init):
2393         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h: Added.
2394         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructorPrivate.h: Added.
2395         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2396         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2397         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2398         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2399         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2400         * bindings/scripts/test/JS/JSTestException.cpp:
2401         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2402         * bindings/scripts/test/JS/JSTestInterface.cpp:
2403         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Added.
2404         (WebCore::JSTestJSBuiltinConstructorPrototype::create):
2405         (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure):
2406         (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
2407         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
2408         (WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
2409         (WebCore::JSTestJSBuiltinConstructorConstructor::constructJSTestJSBuiltinConstructor):
2410         (WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
2411         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
2412         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
2413         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
2414         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
2415         (WebCore::JSTestJSBuiltinConstructor::createPrototype):
2416         (WebCore::JSTestJSBuiltinConstructor::getPrototype):
2417         (WebCore::JSTestJSBuiltinConstructor::destroy):
2418         (WebCore::JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor):
2419         (WebCore::jsTestJSBuiltinConstructorConstructor):
2420         (WebCore::JSTestJSBuiltinConstructor::getConstructor):
2421         (WebCore::JSTestJSBuiltinConstructor::visitChildren):
2422         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: Added.
2423         (WebCore::JSTestJSBuiltinConstructor::create):
2424         (WebCore::JSTestJSBuiltinConstructor::createStructure):
2425         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2426         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2427         * bindings/scripts/test/JS/JSTestNode.cpp:
2428         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2429         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2430         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2431         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2432         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2433         * bindings/scripts/test/JS/JSattribute.cpp:
2434         * bindings/scripts/test/JS/JSreadonly.cpp:
2435         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h: Added.
2436         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm: Added.
2437         (-[DOMTestJSBuiltinConstructor dealloc]):
2438         (-[DOMTestJSBuiltinConstructor finalize]):
2439         (core):
2440         (kit):
2441         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructorInternal.h: Added.
2442         * bindings/scripts/test/TestJSBuiltinConstructor.idl: Added.
2443
2444 2015-09-29  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2445
2446         [Streams API] [Win] Remove reference to dead CountQueuingStrategy.h
2447         https://bugs.webkit.org/show_bug.cgi?id=149623
2448
2449         Reviewed by Darin Adler.
2450
2451         No new tests needed.
2452
2453         * WebCore.vcxproj/WebCore.vcxproj.filters:
2454
2455 2015-09-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2456
2457         Build WebCore JS Builtins according the ENABLE flags
2458         https://bugs.webkit.org/show_bug.cgi?id=149624
2459
2460         Reviewed by Csaba Osztrogonác.
2461
2462         Created WebCoreJSBuiltins.cpp to include all JSXXBuiltins.cpp files with the right #ifdef.
2463         Added WebCoreJSBuiltins.cpp to CMake, win and mac build systems.
2464
2465         No change in behavior.
2466
2467         * CMakeLists.txt:
2468         * DerivedSources.cpp:
2469         * WebCore.vcxproj/WebCore.vcxproj:
2470         * WebCore.xcodeproj/project.pbxproj:
2471         * bindings/js/WebCoreJSBuiltins.cpp: Added.
2472
2473 2015-09-29  Javier Fernandez  <jfernandez@igalia.com>
2474
2475         [CSS Grid Layout] Flex tracks sizing alg must handle 0fr values
2476         https://bugs.webkit.org/show_bug.cgi?id=148944
2477
2478         Reviewed by Darin Adler.
2479
2480         We don't allow 0 as flexible size value, which is not following current
2481         specs; it just states that it must be a positive value. This patch
2482         adds such change in the parser but some additional logic must be added
2483         as well to handle 0 values during the flex tracks sizing algorithm.
2484
2485         The old algorithm didn't take 0 values into account, so there is the risk
2486         of division by zero. Additionally, it was not handling fraction values
2487         in the best way. The last versions of the spec changed this algorithm in
2488         order to handle fraction values so that they don't cause exponential
2489         grow of tracks using values bigger than 1.
2490
2491         This patch implements also such new algorithm, so we can deal not only
2492         with 0 values, but managing fraction values properly.
2493
2494         No new tests, just some additional test cases and some of them rebaselined.
2495
2496         * rendering/RenderGrid.cpp:
2497         (WebCore::normalizedFlexFraction):
2498         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2499         (WebCore::RenderGrid::computeFlexFactorUnitSize): Added.
2500         (WebCore::RenderGrid::findFlexFactorUnitSize): Added.
2501         (WebCore::RenderGrid::GridTrackForNormalization): Deleted.
2502         (WebCore::RenderGrid::computeNormalizedFractionBreadth): Deleted.
2503         * rendering/RenderGrid.h:
2504
2505 2015-09-29  Csaba Osztrogonác  <ossy@webkit.org>
2506
2507         Fix the broken !ENABLE(STREAM_API) build
2508         https://bugs.webkit.org/show_bug.cgi?id=149525
2509
2510         Reviewed by Darin Adler.
2511
2512         * bindings/js/WebCoreJSClientData.h: Revert r190225.
2513
2514
2515 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2516
2517         printing does not use minimum page zoom factor
2518         https://bugs.webkit.org/show_bug.cgi?id=108507
2519
2520         Reviewed by Darin Adler.
2521
2522         * page/PrintContext.cpp:
2523         (WebCore::PrintContext::beginAndComputePageRectsWithPageSize):
2524         Helper function to share common code from numberOfPages() and
2525         spoolAllPagesWithBoundaries().
2526         (WebCore::PrintContext::numberOfPages): Use beginAndComputePageRectsWithPageSize().
2527         (WebCore::PrintContext::spoolAllPagesWithBoundaries): Use
2528         beginAndComputePageRectsWithPageSize() and don't flip the Y axis
2529         for non Cocoa platforms.
2530         * page/PrintContext.h:
2531
2532 2015-09-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2533
2534         Add support for WebIDL JSBuiltin attributes
2535         https://bugs.webkit.org/show_bug.cgi?id=149554
2536
2537         Reviewed by Darin Adler.
2538
2539         Covered by bindings tests.
2540
2541         * bindings/scripts/CodeGeneratorGObject.pm:
2542         (SkipAttribute): Disabled GObject binding generation of JSBuiltin attribute.
2543         * bindings/scripts/CodeGeneratorJS.pm:
2544         (GetAttributeGetterName): Handling of Builtin function to retrieve BuiltinGenerator.
2545         (GetAttributeSetterName): Ditto.
2546         (GenerateAttributesHashTable): Set JSBuiltin attributes as "Accessor | Builtin".
2547         (GenerateImplementation): Skip implementation for JSBuiltin attributes
2548         * bindings/scripts/test/JS/JSTestObj.cpp: Adding binding test for JSBuiltin attributes.
2549         * bindings/scripts/test/ObjC/DOMTestObj.h:
2550         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2551         (-[DOMTestObj jsBuiltinAttribute]):
2552         (-[DOMTestObj setJsBuiltinAttribute:]):
2553         (-[DOMTestObj jsBuiltinReadOnlyAttribute]):
2554         * bindings/scripts/test/TestObj.idl: Ditto.
2555
2556 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
2557
2558         [Win] Fix build after r190295.
2559
2560         * PlatformWin.cmake: Add missing Forwarding Header.
2561
2562 2015-09-28  Brady Eidson  <beidson@apple.com>
2563
2564         Add an IDB Server that can roundtrip a request back to the client.
2565         https://bugs.webkit.org/show_bug.cgi?id=149603
2566
2567         Reviewed by NOBODY (Build fix).
2568
2569         * Modules/indexeddb/IDBRequest.h: Remove unneeded #include, fixing the WK/WK2 builds.
2570
2571 2015-09-28  Brent Fulgham  <bfulgham@apple.com>
2572
2573         Expose 'geometryFlipped' state for debugging/logging purposes
2574         https://bugs.webkit.org/show_bug.cgi?id=149557
2575
2576         Reviewed by Simon Fraser.
2577
2578         No new tests: No new behavior.
2579
2580         * platform/graphics/ca/PlatformCALayer.h:
2581         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2582         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2583         (PlatformCALayerCocoa::geometryFlipped): Added.
2584         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2585         (PlatformCALayerWin::geometryFlipped): Added.
2586         (printLayer): Log flipped state of geometry.
2587         * platform/graphics/ca/win/PlatformCALayerWin.h:
2588
2589 2015-09-28  Brady Eidson  <beidson@apple.com>
2590
2591         Add an IDB Server that can roundtrip a request back to the client.
2592         https://bugs.webkit.org/show_bug.cgi?id=149603
2593
2594         Reviewed by Alex Christensen.
2595
2596         Test: storage/indexeddb/modern/deletedatabase-request-event.html
2597
2598         This is a critical piece of IDB infrastructure that:
2599         - Puts a database client/server divide in place.
2600         - Client synchronously sends requests to the server, and asynchronously receives a response back from it.
2601         - Introduces a class structure that makes it easy for WebKit2 to add a thin layer to replace the 
2602           in-process server with an out-of-process server.
2603
2604         To allow for the most basic of tests, the "delete database" request is hard coded as always failing 
2605         with an indeterminate error.
2606
2607         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2608         (WebCore::DOMWindowIndexedDatabase::indexedDB):
2609
2610         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
2611         (WebCore::IDBDatabaseIdentifier::debugString):
2612         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2613
2614         * Modules/indexeddb/client/IDBConnectionToServer.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
2615         (WebCore::IDBClient::IDBConnectionToServer::create):
2616         (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer):
2617         (WebCore::IDBClient::IDBConnectionToServer::identifier):
2618         (WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
2619         (WebCore::IDBClient::IDBConnectionToServer::didDeleteDatabase):
2620
2621         * Modules/indexeddb/client/IDBConnectionToServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2622         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2623         (WebCore::IDBClient::IDBConnectionToServerDelegate::~IDBConnectionToServerDelegate):
2624
2625         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
2626         (WebCore::IDBClient::IDBFactory::create):
2627         (WebCore::IDBClient::IDBFactory::IDBFactory):
2628         (WebCore::IDBClient::IDBFactory::openInternal):
2629         (WebCore::IDBClient::IDBFactory::deleteDatabase):
2630         * Modules/indexeddb/client/IDBFactoryImpl.h:
2631
2632         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2633         (WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
2634         (WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
2635         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
2636         (WebCore::IDBClient::IDBOpenDBRequest::~IDBOpenDBRequest):
2637         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
2638         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
2639         (WebCore::IDBClient::IDBOpenDBRequest::databaseIdentifier):
2640         (WebCore::IDBClient::IDBOpenDBRequest::version):
2641         (WebCore::IDBClient::IDBOpenDBRequest::create): Deleted.
2642
2643         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2644         (WebCore::IDBClient::IDBRequest::IDBRequest):
2645         (WebCore::IDBClient::IDBRequest::enqueueEvent):
2646         * Modules/indexeddb/client/IDBRequestImpl.h:
2647         (WebCore::IDBClient::IDBRequest::requestIdentifier):
2648
2649         * Modules/indexeddb/server/IDBConnectionToClient.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
2650         (WebCore::IDBServer::IDBConnectionToClient::create):
2651         (WebCore::IDBServer::IDBConnectionToClient::IDBConnectionToClient):
2652         (WebCore::IDBServer::IDBConnectionToClient::identifier):
2653         (WebCore::IDBServer::IDBConnectionToClient::didDeleteDatabase):
2654         * Modules/indexeddb/server/IDBConnectionToClient.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2655         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2656         (WebCore::IDBServer::IDBConnectionToClientDelegate::~IDBConnectionToClientDelegate):
2657
2658         * Modules/indexeddb/server/IDBServer.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp.
2659         (WebCore::IDBServer::IDBServer::create):
2660         (WebCore::IDBServer::IDBServer::IDBServer):
2661         (WebCore::IDBServer::IDBServer::registerConnection):
2662         (WebCore::IDBServer::IDBServer::unregisterConnection):
2663         (WebCore::IDBServer::IDBServer::deleteDatabase):
2664         * Modules/indexeddb/server/IDBServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2665
2666         * Modules/indexeddb/shared/IDBError.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp.
2667         (WebCore::idbExceptionEntry):
2668         (WebCore::IDBError::IDBError):
2669         (WebCore::IDBError::operator=):
2670         (WebCore::IDBError::name):
2671         (WebCore::IDBError::message):
2672         * Modules/indexeddb/shared/IDBError.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp.
2673         (WebCore::IDBError::IDBError):
2674         (WebCore::IDBError::isNull):
2675
2676         * Modules/indexeddb/shared/IDBRequestData.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
2677         (WebCore::IDBRequestData::IDBRequestData):
2678         * Modules/indexeddb/shared/IDBRequestData.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2679         (WebCore::IDBRequestData::requestIdentifier):
2680         (WebCore::IDBRequestData::databaseIdentifier):
2681
2682         * Modules/indexeddb/shared/IDBRequestIdentifier.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp.
2683         (WebCore::nextRequestNumber):
2684         (WebCore::IDBRequestIdentifier::IDBRequestIdentifier):
2685         (WebCore::IDBRequestIdentifier::emptyValue):
2686         (WebCore::IDBRequestIdentifier::deletedValue):
2687         (WebCore::IDBRequestIdentifier::isHashTableDeletedValue):
2688         * Modules/indexeddb/shared/IDBRequestIdentifier.h: Added.
2689         (WebCore::IDBRequestIdentifier::isEmpty):
2690         (WebCore::IDBRequestIdentifier::hash):
2691         (WebCore::IDBRequestIdentifier::operator==):
2692         (WebCore::IDBRequestIdentifier::connectionIdentifier):
2693         (WebCore::IDBRequestIdentifierHash::hash):
2694         (WebCore::IDBRequestIdentifierHash::equal):
2695         (WebCore::IDBRequestIdentifierHashTraits::emptyValue):
2696         (WebCore::IDBRequestIdentifierHashTraits::isEmptyValue):
2697         (WebCore::IDBRequestIdentifierHashTraits::constructDeletedValue):
2698         (WebCore::IDBRequestIdentifierHashTraits::isDeletedValue):
2699
2700         * Modules/indexeddb/shared/IDBResultData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
2701         (WebCore::IDBResultData::IDBResultData):
2702         * Modules/indexeddb/shared/IDBResultData.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
2703         (WebCore::IDBResultData::requestIdentifier):
2704         (WebCore::IDBResultData::error):
2705
2706         * Modules/indexeddb/shared/InProcessIDBServer.cpp: Added.
2707         (WebCore::InProcessIDBServer::create):
2708         (WebCore::InProcessIDBServer::InProcessIDBServer):
2709         (WebCore::InProcessIDBServer::identifier):
2710         (WebCore::InProcessIDBServer::connectionToServer):
2711         (WebCore::InProcessIDBServer::connectionToClient):
2712         (WebCore::InProcessIDBServer::deleteDatabase):
2713         (WebCore::InProcessIDBServer::didDeleteDatabase):
2714         * Modules/indexeddb/shared/InProcessIDBServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h.
2715
2716         * CMakeLists.txt:
2717         * WebCore.xcodeproj/project.pbxproj:
2718
2719         * loader/EmptyClients.cpp:
2720
2721         * page/DatabaseProvider.h:
2722
2723         * page/Page.cpp:
2724         (WebCore::Page::idbConnection):
2725         * page/Page.h:
2726
2727         * page/SecurityOriginData.cpp:
2728         (WebCore::SecurityOriginData::debugString):
2729         * page/SecurityOriginData.h:
2730
2731 2015-09-28  Ryosuke Niwa  <rniwa@webkit.org>
2732
2733         relatedNode should be retargeted respecting slots
2734         https://bugs.webkit.org/show_bug.cgi?id=149591
2735
2736         Reviewed by Antti Koivisto.
2737
2738         This patch retargets relatedNode with respect to shadow boundaries after r190214 as specified in
2739         https://w3c.github.io/webcomponents/spec/shadow/#retargeting-relatedtarget
2740
2741         Naively implementing the spec'ed behavior can result in O(n^2) behavior since we need to find the common tree scope
2742         ancestor for each target in the event path. This patch avoids this by implementing an O(1) incremental update step
2743         for when target's tree scope changes in the event path. See the description for moveToNewTreeScope below.
2744
2745         Test: fast/shadow-dom/event-with-related-target.html
2746
2747         * dom/EventContext.h: Replaced toMouseOrFocusEventContext by downcast<MouseOrFocusEventContext>.
2748         * dom/EventDispatcher.cpp:
2749         (WebCore::EventRelatedNodeResolver): Removed the code for relatedNode. This class is now only used for touch events.
2750         (WebCore::EventPath): Added m_event as a member variable.
2751
2752         (WebCore::RelatedNodeRetargeter): Added.
2753
2754         (WebCore::RelatedNodeRetargeter::RelatedNodeRetargeter): Does the initial retargeting of relatedNode. When the
2755         tree scope of relatedNode and the target are the same, we immediately exit without collecting ancestor tree scopes
2756         of relatedNode as an optimization. We also special case when the relatedNode and the target are in two different
2757         documents (relatedNode should be nullptr) and when one is in document and the other one is not in the document
2758         (relatedNode should be the host of the outermost shadow root). Otherwise we have to do the real work by collecting
2759         all tree scope ancestors and walking downwards from the document tree scope (note target and relatedNode share the
2760         same document scope here since we would have exited early otherwise).
2761
2762         (WebCore::RelatedNodeRetargeter::currentNode): Returned relatedNode retargeted for the current tree scope.
2763
2764         (WebCore::RelatedNodeRetargeter::moveToNewTreeScope): Moves to a new tree scope. If the original target and
2765         relatedNode were in different trees, there is nothing to be done. Note that we can only move out of a shadow root
2766         to its host or move into a slot so newTreeScope (current target's tree scope) and previousTreeScope (previous
2767         target's tree scope) must have a child-parent relationship.
2768
2769         If previousTreeScope did not contain the retargeted relatedNode, then neither can its child shadow trees. Thus,
2770         there is nothing to be done when moving into a slot in this case. If we're moving out of previousTreeScope, then
2771         newTreeScope may contain the retargeted relatedNode but that still doesn't require any work. So we exit early in
2772         both cases.
2773
2774         Otherwise (previousTreeScope contained retargeted relatedNode), if we're moving out of a child shadow root
2775         (previousTreeScope) then relatedNode should also move to previousTreeScope's shadow host since previousTreeScope
2776         is a direct-child shadow tree of newTreeScope and previousTreeScope's shadow host resides in newTreeScope.
2777
2778         If we're moving into a child shadow root via a slot, then there are three possibilities: relatedNode is in
2779         previousTreeScope, newTreeScope and its child shadow trees, or newTreeScope's sibling tree scopes and its children.
2780         If it is in previousTreeScope (m_lowestCommonAncestorIndex is zero) or in newTreeScope's sibling, then
2781         previousTreeScope is the lowest common tree scope ancestor so there is nothing to be done. If relatedNode is in
2782         newTreeScope, then the retargeted relatedNode is either the shadow host of the shadow tree that contains
2783         relatedNode or relatedNode itself.
2784
2785         (WebCore::RelatedNodeRetargeter::checkConsistency): Finds the retargeted relatedNode in the simplest way to verify
2786         the correctness of the algorithm. We can disable this consistency check if it slows down debug builds too much.
2787         (WebCore::RelatedNodeRetargeter::nodeInLowestCommonAncestor): Finds the 
2788         (WebCore::RelatedNodeRetargeter::collectTreeScopes):
2789         (WebCore::EventPath::setRelatedTarget): Rewritten using RelatedNodeRetargeter.
2790
2791 2015-09-28  Alex Christensen  <achristensen@webkit.org>
2792
2793         Build WK1 with CMake on Mac
2794         https://bugs.webkit.org/show_bug.cgi?id=149604
2795
2796         Reviewed by Chris Dumez.
2797
2798         * CMakeLists.txt:
2799         * PlatformMac.cmake:
2800         Make a list of IDL files for the ObjC bindings.
2801
2802 2015-09-28  Chris Dumez  <cdumez@apple.com>
2803
2804         Drop support for legacy EventException
2805         https://bugs.webkit.org/show_bug.cgi?id=149597
2806         <rdar://problem/22879795>
2807
2808         Reviewed by Sam Weinig.
2809
2810         Drop support for legacy EventException. Both Firefox and Chrome do not
2811         support it, and our implementation no longer throws such exceptions.
2812
2813         No new tests, already covered by existing test.
2814
2815         * CMakeLists.txt:
2816         * DerivedSources.cpp:
2817         * DerivedSources.make:
2818         * Modules/indexeddb/legacy/LegacyRequest.cpp:
2819         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
2820         * Modules/websockets/WebSocket.cpp:
2821         * WebCore.vcxproj/WebCore.vcxproj:
2822         * WebCore.vcxproj/WebCore.vcxproj.filters:
2823         * WebCore.xcodeproj/project.pbxproj:
2824         * bindings/gobject/WebKitDOMPrivate.cpp:
2825         * bindings/js/JSExceptionBase.cpp:
2826         (WebCore::toExceptionBase): Deleted.
2827         * dom/DOMAllInOne.cpp:
2828         * dom/DOMExceptions.in:
2829         * dom/EventException.cpp: Removed.
2830         * dom/EventException.h:
2831         (WebCore::EventException::EventException): Deleted.
2832         * dom/EventException.idl:
2833         * dom/EventListenerMap.cpp:
2834         * dom/EventTarget.cpp:
2835         * dom/MessagePort.cpp:
2836         * dom/Node.cpp:
2837         * loader/appcache/DOMApplicationCache.cpp:
2838         * page/DOMWindow.cpp:
2839         * page/EventSource.cpp:
2840         * page/PerformanceUserTiming.h:
2841         * workers/AbstractWorker.cpp:
2842         * workers/Worker.cpp:
2843         * workers/WorkerGlobalScope.cpp:
2844         * xml/XMLHttpRequest.cpp:
2845         * xml/XMLHttpRequestUpload.cpp:
2846
2847 2015-09-28  Chris Dumez  <cdumez@apple.com>
2848
2849         Object.getOwnPropertyNames() does not return named properties
2850         https://bugs.webkit.org/show_bug.cgi?id=149562
2851         <rdar://problem/22879779>
2852
2853         Reviewed by Darin Adler.
2854
2855         Previously, Object.getOwnPropertyNames() did not return named properties
2856         for interfaces with named property getters. This patch adds support for
2857         this in the JS bindings generator and uses it for HTMLCollection only
2858         for now. Other interfaces will be taken care of independently.
2859
2860         Note that currently, even though the named properties are returned by
2861         Object.getOwnPropertyNames(), these properties are still not enumerated.
2862         This is because these are always unenumerable for existing DOM interfaces:
2863         - https://dom.spec.whatwg.org/#interface-htmlcollection
2864         - https://dom.spec.whatwg.org/#namednodemap
2865
2866         In the future, we may need to extend support if some interfaces require
2867         those to be enumerable.
2868
2869         Test: fast/dom/htmlcollection-getownpropertynames.html
2870
2871         * Modules/mediastream/RTCStatsResponse.cpp:
2872         (WebCore::WebCore::RTCStatsResponse::supportedPropertyNames):
2873         * Modules/mediastream/RTCStatsResponse.h:
2874         * bindings/scripts/CodeGeneratorJS.pm:
2875         (GenerateHeader):
2876         (GenerateImplementation):
2877         * css/StyleSheetList.cpp:
2878         (WebCore::StyleSheetList::supportedPropertyNames):
2879         * css/StyleSheetList.h:
2880         * dom/DOMNamedFlowCollection.cpp:
2881         (WebCore::DOMNamedFlowCollection::supportedPropertyNames):
2882         * dom/DOMNamedFlowCollection.h:
2883         * dom/NamedNodeMap.cpp:
2884         (WebCore::NamedNodeMap::supportedPropertyNames):
2885         * dom/NamedNodeMap.h:
2886         * html/HTMLCollection.cpp:
2887         (WebCore::HTMLCollection::supportedPropertyNames):
2888         * html/HTMLCollection.h:
2889         (WebCore::CollectionNamedElementCache::propertyNames):
2890         (WebCore::CollectionNamedElementCache::appendToIdCache):
2891         (WebCore::CollectionNamedElementCache::appendToNameCache):
2892         (WebCore::CollectionNamedElementCache::memoryCost):
2893         (WebCore::CollectionNamedElementCache::append):
2894         * plugins/DOMMimeTypeArray.cpp:
2895         (WebCore::DOMMimeTypeArray::supportedPropertyNames):
2896         * plugins/DOMMimeTypeArray.h:
2897         * plugins/DOMPlugin.cpp:
2898         (WebCore::DOMPlugin::supportedPropertyNames):
2899         * plugins/DOMPlugin.h:
2900         * plugins/DOMPluginArray.cpp:
2901         (WebCore::DOMPluginArray::supportedPropertyNames):
2902         * plugins/DOMPluginArray.h:
2903
2904 2015-09-28  Per Arne Vollan  <peavo@outlook.com>
2905
2906         [Curl] Deadlock when downloading.
2907         https://bugs.webkit.org/show_bug.cgi?id=149596
2908
2909         Reviewed by Alex Christensen.
2910
2911         Avoid grabbing the same lock twice.
2912
2913         * platform/network/curl/CurlDownload.cpp:
2914         (WebCore::CurlDownload::init):
2915         (WebCore::CurlDownload::addHeaders):
2916
2917 2015-09-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
2918
2919         An SVG inherits the container size of the previously drawn HTMLImageElement when drawing it on a canvas
2920         https://bugs.webkit.org/show_bug.cgi?id=148845
2921
2922         Reviewed by Darin Adler.
2923
2924         When drawing an SVG image on a canvas we need to make sure that the container
2925         size of the SVG is set to the image source size. If we do not do that, the
2926         previous container size will be used as the size of the image. When drawing
2927         it as HTMLImageElement, the renderer calls SVGImage::drawForContainer() which
2928         calls setContainerSize() and then calls draw(). This call ensures that the
2929         size is set correctly for cached images. But when drawing the SVGImage on
2930         CanvasRenderingContext2D, the SVGImage::draw() is called directly because
2931         it calls it through the base class method Image::draw().
2932         
2933         If the image.isSVGImage(), CanvasRenderingContext2D::drawImage() has to call
2934         SVGImage::setContainerSize() before calling Image::draw().
2935
2936         Test: svg/as-image/svg-cached-draw-canvas.html
2937
2938         * html/canvas/CanvasRenderingContext2D.cpp:
2939         (WebCore::CanvasRenderingContext2D::drawImage):
2940         Call SVGImage::setContainerSize() before calling Image::draw().
2941
2942 2015-09-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
2943
2944         Rename all the variables and parameters of type HTMLImageElement in CanvasRenderingContext2D.cpp from 'image' to 'imageElement'
2945
2946         Reviewed by Darin Adler.
2947
2948         This does not change functionality in this file. It is a preparation for
2949         the fix of the https://bugs.webkit.org/show_bug.cgi?id=148845.
2950
2951         * html/canvas/CanvasRenderingContext2D.cpp:
2952         (WebCore::size):
2953         (WebCore::normalizeRect):
2954         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
2955         (WebCore::CanvasRenderingContext2D::setAlpha):
2956         (WebCore::CanvasRenderingContext2D::createRadialGradient):
2957         (WebCore::CanvasRenderingContext2D::createPattern):
2958         (WebCore::CanvasRenderingContext2D::drawImage):
2959
2960 2015-09-27  Yusuke Suzuki  <utatane.tea@gmail.com>
2961
2962         [ES6] Implement ES6 Module loader hook stubs in WebCore
2963         https://bugs.webkit.org/show_bug.cgi?id=149574
2964
2965         Reviewed by Ryosuke Niwa.
2966
2967         In this patch, we implement the loader hooks in the WebCore side.
2968         Since the fetcher and actual evaluation code are separated from
2969         this patch, they become empty.
2970
2971         Here, WebCore implements 3 loader hooks.
2972
2973         1. resolve hook
2974
2975             Takes the module name and resolve it to the unique module key.
2976             In WebCore, we use URL as a module key.
2977             And for the inlined module tag (e.g. <script type="module">import ...</script>),
2978             we use the ES6 symbol as a module key.
2979             In WebCore, we take the module name like "./hello.js" and resolve it by using
2980             the URL of the importer module.
2981             This functionality is implemented in this patch.
2982
2983         2. fetch hook
2984
2985             Fetches the resource specified by the module key. In WebCore, the module key is
2986             URL. We use CachedResource loading system to load the resource of the modules.
2987             The actual code of the fetch hook will be implemented in the subsequent patch.
2988
2989         3. evaluate hook
2990
2991             This is additional hook to instrument the module's execution for the inspector.
2992             The actual code of the evaluate hook will be implemented in the subsequent patch.
2993
2994         In addition to that, we added required JSC forward headers for the module loader
2995         implementation.
2996
2997         * CMakeLists.txt:
2998         * ForwardingHeaders/runtime/JSInternalPromise.h: Added.
2999         * ForwardingHeaders/runtime/JSInternalPromiseDeferred.h: Added.
3000         * ForwardingHeaders/runtime/JSModuleRecord.h: Added.
3001         * ForwardingHeaders/runtime/Symbol.h: Added.
3002         * WebCore.vcxproj/WebCore.vcxproj:
3003         * WebCore.vcxproj/WebCore.vcxproj.filters:
3004         * WebCore.xcodeproj/project.pbxproj:
3005         * bindings/js/JSBindingsAllInOne.cpp:
3006         * bindings/js/JSDOMWindowBase.cpp:
3007         (WebCore::JSDOMWindowBase::moduleLoaderResolve):
3008         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
3009         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
3010         * bindings/js/JSDOMWindowBase.h:
3011         * bindings/js/JSModuleLoader.cpp: Added.
3012         (WebCore::JSModuleLoader::JSModuleLoader):
3013         (WebCore::JSModuleLoader::resolve):
3014         (WebCore::JSModuleLoader::fetch):
3015         (WebCore::JSModuleLoader::evaluate):
3016         * bindings/js/JSModuleLoader.h: Added.
3017         (WebCore::JSModuleLoader::document):
3018         * dom/Document.cpp:
3019         (WebCore::Document::Document):
3020         (WebCore::Document::~Document):
3021         * dom/Document.h:
3022         (WebCore::Document::moduleLoader):
3023
3024 2015-09-26  Hunseop Jeong  <hs85.jeong@samsung.com>
3025
3026         Use modern for-loops in WebCore/inspector.
3027         https://bugs.webkit.org/show_bug.cgi?id=149579
3028
3029         Reviewed by Darin Adler.
3030
3031         No new tests because there is no behavior change.
3032
3033         * inspector/DOMPatchSupport.cpp:
3034         (WebCore::DOMPatchSupport::diff):
3035         (WebCore::DOMPatchSupport::innerPatchChildren):
3036         (WebCore::DOMPatchSupport::removeChildAndMoveToNew):
3037         (WebCore::DOMPatchSupport::markNodeAsUsed):
3038         * inspector/InspectorCSSAgent.cpp:
3039         (WebCore::computePseudoClassMask):
3040         (WebCore::ChangeRegionOversetTask::timerFired):
3041         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3042         (WebCore::InspectorCSSAgent::resetPseudoStates):
3043         * inspector/InspectorDOMAgent.cpp:
3044         (WebCore::RevalidateStyleAttributeTask::timerFired):
3045         (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
3046         (WebCore::InspectorDOMAgent::getEventListenersForNode):
3047         (WebCore::InspectorDOMAgent::getEventListeners):
3048         (WebCore::InspectorDOMAgent::performSearch):
3049         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
3050         * inspector/InspectorDOMDebuggerAgent.cpp:
3051         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
3052         * inspector/InspectorDatabaseAgent.cpp:
3053         (WebCore::InspectorDatabaseAgent::enable):
3054         (WebCore::InspectorDatabaseAgent::disable):
3055         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
3056         (WebCore::InspectorDatabaseAgent::databaseId):
3057         (WebCore::InspectorDatabaseAgent::findByFileName):
3058         * inspector/InspectorFrontendClientLocal.cpp:
3059         (WebCore::InspectorFrontendClientLocal::frontendLoaded):
3060         * inspector/InspectorFrontendHost.cpp:
3061         * inspector/InspectorIndexedDBAgent.cpp:
3062         * inspector/InspectorOverlay.cpp:
3063         (WebCore::buildRendererHighlight):
3064         (WebCore::buildObjectForHighlight):
3065         * inspector/InspectorPageAgent.cpp:
3066         (WebCore::InspectorPageAgent::getCookies):
3067         * inspector/InspectorReplayAgent.cpp:
3068         (WebCore::buildInspectorObjectForSession):
3069         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
3070         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
3071         * inspector/InspectorResourceAgent.cpp:
3072         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
3073         (WebCore::InspectorResourceAgent::willRecalculateStyle):
3074         * inspector/InspectorStyleSheet.cpp:
3075         (flattenSourceData):
3076         (WebCore::InspectorStyle::buildArrayForComputedStyle):
3077         (WebCore::InspectorStyle::populateAllProperties):
3078         (WebCore::selectorsFromSource):
3079         (WebCore::InspectorStyleSheet::ruleIndexByStyle):
3080         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
3081         * inspector/InspectorWorkerAgent.cpp:
3082         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannelsForExistingWorkers):
3083         (WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
3084         * inspector/NetworkResourcesData.cpp:
3085         (WebCore::NetworkResourcesData::removeCachedResource):
3086         (WebCore::NetworkResourcesData::clear):
3087         * inspector/PageRuntimeAgent.cpp:
3088         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
3089         * inspector/PageScriptDebugServer.cpp:
3090         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
3091         * inspector/WebConsoleAgent.cpp:
3092         (WebCore::WebConsoleAgent::frameWindowDiscarded):
3093         * inspector/WebInjectedScriptManager.cpp:
3094         (WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
3095
3096 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
3097
3098         Clean up user media request internal API
3099         https://bugs.webkit.org/show_bug.cgi?id=149527
3100
3101         Reviewed by Tim Horton.
3102
3103         No new tests, no functional change.
3104
3105         * Modules/mediastream/UserMediaRequest.cpp:
3106         (WebCore::UserMediaRequest::constraintsValidated): Use track persistent ID to create vectors
3107           as that is what the platform code needs to map to a capture device.
3108         (WebCore::UserMediaRequest::userMediaAccessGranted): m_chosenXXDeviceUID -> m_XXDeviceUIDAllowed.
3109           Use the device IDs to create the MediaStream. Switch audio/video parameter order.
3110         (WebCore::UserMediaRequest::didCreateStream): Don't assume constraints are valid.
3111         * Modules/mediastream/UserMediaRequest.h:
3112         (WebCore::UserMediaRequest::videoDeviceUIDs):
3113         (WebCore::UserMediaRequest::audioDeviceUIDs):
3114         (WebCore::UserMediaRequest::allowedVideoDeviceUID):
3115         (WebCore::UserMediaRequest::allowedAudioDeviceUID):
3116         (WebCore::UserMediaRequest::requiresAudio): Deleted.
3117         (WebCore::UserMediaRequest::requiresVideo): Deleted.
3118         (WebCore::UserMediaRequest::firstVideoDeviceUID): Deleted.
3119         (WebCore::UserMediaRequest::firstAudioDeviceUID): Deleted.
3120
3121         * platform/mediastream/mac/AVMediaCaptureSource.mm:
3122         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Call setPersistentId.
3123
3124 2015-09-25  Antti Koivisto  <antti@apple.com>
3125
3126         Implement scoped styling for shadow DOM
3127         https://bugs.webkit.org/show_bug.cgi?id=149230
3128
3129         Reviewed by Ryosuke Niwa.
3130
3131         Test: fast/shadow-dom/css-scoping-shadow-with-rules-no-style-leak.html
3132
3133         * css/ElementRuleCollector.cpp:
3134         (WebCore::ElementRuleCollector::collectMatchingRules):
3135
3136             Only use special path here for user agent shadow trees.
3137
3138         * dom/AuthorStyleSheets.cpp:
3139         (WebCore::AuthorStyleSheets::AuthorStyleSheets):
3140         (WebCore::AuthorStyleSheets::removePendingSheet):
3141         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
3142
3143             Basic support for ShadowRoot scoped stylesheets.
3144
3145         * dom/AuthorStyleSheets.h:
3146         (WebCore::AuthorStyleSheets::activeStyleSheets):
3147         * dom/InlineStyleSheetOwner.cpp:
3148         (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
3149         (WebCore::authorStyleSheetsForElement):
3150         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
3151         (WebCore::InlineStyleSheetOwner::removedFromDocument):
3152         (WebCore::InlineStyleSheetOwner::clearDocumentData):
3153         (WebCore::InlineStyleSheetOwner::childrenChanged):
3154         (WebCore::InlineStyleSheetOwner::createSheet):
3155         (WebCore::InlineStyleSheetOwner::isLoading):
3156         (WebCore::InlineStyleSheetOwner::sheetLoaded):
3157         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
3158
3159             Basic support for ShadowRoot scoped inline stylesheets.
3160
3161         * dom/InlineStyleSheetOwner.h:
3162         (WebCore::InlineStyleSheetOwner::sheet):
3163         * dom/ShadowRoot.cpp:
3164         (WebCore::ShadowRoot::styleResolver):
3165
3166             Create and initialize ShadowRoot scoped style resolver.
3167
3168         (WebCore::ShadowRoot::resetStyleResolver):
3169         (WebCore::ShadowRoot::authorStyleSheets):
3170
3171             Collection of author stylesheets in the shadow tree.
3172
3173         (WebCore::ShadowRoot::updateStyle):
3174
3175             Trigger style recalc when stylesheets change.
3176
3177         (WebCore::ShadowRoot::cloneNode):
3178         * dom/ShadowRoot.h:
3179         (WebCore::ShadowRoot::resetStyleInheritance):
3180         * html/HTMLStyleElement.h:
3181         * svg/SVGStyleElement.h:
3182
3183 2015-09-25  Alex Christensen  <achristensen@webkit.org>
3184
3185         Clean up CMake build on Mac
3186         https://bugs.webkit.org/show_bug.cgi?id=149573
3187
3188         Reviewed by Chris Dumez.
3189
3190         * CMakeLists.txt:
3191         * PlatformEfl.cmake:
3192         * PlatformGTK.cmake:
3193         * PlatformMac.cmake:
3194         * platform/graphics/DisplayRefreshMonitor.cpp:
3195
3196 2015-09-25  Tim Horton  <timothy_horton@apple.com>
3197
3198         Scrolling a overflow: scroll region makes find overlay holes stick to the edge of the region
3199         https://bugs.webkit.org/show_bug.cgi?id=149572
3200         <rdar://problem/13093602>
3201
3202         Reviewed by Simon Fraser.
3203
3204         Test: fast/text/mark-matches-overflow-clip.html
3205
3206         * rendering/InlineTextBox.cpp:
3207         (WebCore::InlineTextBox::paintTextMatchMarker):
3208         Clip the rendered marker rect to the overflow rect.
3209
3210         * testing/Internals.cpp:
3211         (WebCore::Internals::dumpMarkerRectsForNode):
3212         * testing/Internals.h:
3213         * testing/Internals.idl:
3214         Add a internals function to dump the rendered rects for a marker.
3215
3216 2015-09-25  Alex Christensen  <achristensen@webkit.org>
3217
3218         [Win] Switch to CMake
3219         https://bugs.webkit.org/show_bug.cgi?id=148111
3220
3221         Reviewed by Brent Fulgham.
3222
3223         * WebCore.vcxproj/WebCore.proj:
3224
3225 2015-09-25  Beth Dakin  <bdakin@apple.com>
3226
3227         Clicking on a data detected item inside a form control always pops up a map 
3228         on force touch trackpad
3229         https://bugs.webkit.org/show_bug.cgi?id=149559
3230         -and corresponding-
3231         rdar://problem/22826796
3232
3233         Reviewed by Tim Horton.
3234
3235         The real bug here appears to be a bug in Lookup, but we can work around it. 
3236         For normal text, we call directly into Data Detectors for map results, and 
3237         that works fine. For text within form controls, we did not properly extract 
3238         the text for DD, so we sent it to Lookup instead, and Lookup has this bug 
3239         where they will pop open the map right away. If we properly extract the text 
3240         for form controls, then we can work around this bug.
3241
3242         * editing/mac/DataDetection.mm:
3243         (WebCore::detectItemAtPositionWithRange):
3244         (WebCore::DataDetection::detectItemAroundHitTestResult):
3245
3246 2015-09-25  Brady Eidson  <beidson@apple.com>
3247
3248         PassRefPtr<> to RefPtr<> conversion in legacy IndexedDB code.
3249         https://bugs.webkit.org/show_bug.cgi?id=149558
3250
3251         Reviewed by Beth Dakin.
3252
3253         No new tests (No behavior change.)
3254         
3255         This patch does not attempt to completely remove all PassRefPtr usage inside legacy IDB.
3256
3257         It just switches over all PassRefPtr usage at the top level IDB interfaces that 
3258         modern IDB is implementing.
3259
3260         The rest of the usage inside the legacy implementation can be dealt with later via `git rm`.
3261
3262         * Modules/indexeddb/IDBAny.h:
3263         * Modules/indexeddb/IDBCursor.h:
3264         * Modules/indexeddb/IDBDatabase.h:
3265         * Modules/indexeddb/IDBDatabaseError.h:
3266         * Modules/indexeddb/IDBFactory.h:
3267         * Modules/indexeddb/IDBIndex.h:
3268         * Modules/indexeddb/IDBObjectStore.h:
3269         * Modules/indexeddb/IDBRequest.h:
3270         * Modules/indexeddb/IDBTransaction.h:
3271         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
3272         (WebCore::IDBClient::IDBFactory::getDatabaseNames):
3273         (WebCore::IDBClient::IDBFactory::open):
3274         (WebCore::IDBClient::IDBFactory::deleteDatabase):
3275         * Modules/indexeddb/client/IDBFactoryImpl.h:
3276         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3277         (WebCore::IDBClient::IDBRequest::result):
3278         (WebCore::IDBClient::IDBRequest::error):
3279         (WebCore::IDBClient::IDBRequest::source):
3280         (WebCore::IDBClient::IDBRequest::transaction):
3281         * Modules/indexeddb/client/IDBRequestImpl.h:
3282         * Modules/indexeddb/legacy/LegacyAny.cpp:
3283         (WebCore::LegacyAny::createInvalid):
3284         (WebCore::LegacyAny::createNull):
3285         (WebCore::LegacyAny::createString):
3286         (WebCore::LegacyAny::domStringList):
3287         (WebCore::LegacyAny::idbCursor):
3288         (WebCore::LegacyAny::idbCursorWithValue):
3289         (WebCore::LegacyAny::idbDatabase):
3290         (WebCore::LegacyAny::idbFactory):
3291         (WebCore::LegacyAny::idbIndex):
3292         (WebCore::LegacyAny::idbObjectStore):
3293         (WebCore::LegacyAny::idbTransaction):
3294         (WebCore::LegacyAny::LegacyAny):
3295         * Modules/indexeddb/legacy/LegacyAny.h:
3296         (WebCore::LegacyAny::create):
3297         * Modules/indexeddb/legacy/LegacyCursor.cpp:
3298         (WebCore::LegacyCursor::update):
3299         (WebCore::LegacyCursor::deleteFunction):
3300         * Modules/indexeddb/legacy/LegacyCursor.h:
3301         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
3302         (WebCore::LegacyDatabase::objectStoreNames):
3303         (WebCore::LegacyDatabase::createObjectStore):
3304         (WebCore::LegacyDatabase::transaction):
3305         * Modules/indexeddb/legacy/LegacyDatabase.h:
3306         * Modules/indexeddb/legacy/LegacyFactory.cpp:
3307         (WebCore::LegacyFactory::getDatabaseNames):
3308         (WebCore::LegacyFactory::open):
3309         (WebCore::LegacyFactory::deleteDatabase):
3310         * Modules/indexeddb/legacy/LegacyFactory.h:
3311         * Modules/indexeddb/legacy/LegacyIndex.cpp:
3312         (WebCore::LegacyIndex::openCursor):
3313         (WebCore::LegacyIndex::count):
3314         (WebCore::LegacyIndex::openKeyCursor):
3315         (WebCore::LegacyIndex::get):
3316         (WebCore::LegacyIndex::getKey):
3317         * Modules/indexeddb/legacy/LegacyIndex.h:
3318         (WebCore::LegacyIndex::legacyObjectStore):
3319         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
3320         (WebCore::LegacyObjectStore::indexNames):
3321         (WebCore::LegacyObjectStore::get):
3322         (WebCore::LegacyObjectStore::add):
3323         (WebCore::LegacyObjectStore::put):
3324         (WebCore::LegacyObjectStore::deleteFunction):
3325         (WebCore::LegacyObjectStore::clear):
3326         (WebCore::LegacyObjectStore::createIndex):
3327         (WebCore::LegacyObjectStore::index):
3328         (WebCore::LegacyObjectStore::openCursor):
3329         (WebCore::LegacyObjectStore::count):
3330         * Modules/indexeddb/legacy/LegacyObjectStore.h:
3331         (WebCore::LegacyObjectStore::keyPathAny):
3332         (WebCore::LegacyObjectStore::transaction):
3333         (WebCore::LegacyObjectStore::createIndex):
3334         (WebCore::LegacyObjectStore::count):
3335         * Modules/indexeddb/legacy/LegacyRequest.cpp:
3336         (WebCore::LegacyRequest::result):
3337         (WebCore::LegacyRequest::error):
3338         (WebCore::LegacyRequest::source):
3339         (WebCore::LegacyRequest::transaction):
3340         (WebCore::LegacyRequest::onSuccess):
3341         * Modules/indexeddb/legacy/LegacyRequest.h:
3342         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
3343         (WebCore::LegacyTransaction::objectStore):
3344         * Modules/indexeddb/legacy/LegacyTransaction.h:
3345         * inspector/InspectorIndexedDBAgent.cpp:
3346
3347 2015-09-25  Per Arne Vollan  <peavo@outlook.com>
3348
3349         [WinCairo] Incorrect position for windowless plugins.
3350         https://bugs.webkit.org/show_bug.cgi?id=149524
3351
3352         Reviewed by Alex Christensen.
3353
3354         Added method to get graphics context HDC.
3355
3356         * platform/graphics/GraphicsContext.h:
3357         * platform/graphics/win/GraphicsContextWin.cpp:
3358         (WebCore::GraphicsContext::getWindowsContext):
3359         (WebCore::GraphicsContext::hdc):
3360         (WebCore::GraphicsContextPlatformPrivate::save):
3361
3362 2015-09-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3363
3364         Fix the broken !ENABLE(STREAM_API) build
3365         https://bugs.webkit.org/show_bug.cgi?id=149525
3366
3367         Reviewed by Darin Adler.
3368
3369         Removed some #ifdef ENABLE(STREAMS_API) to make build work when STREAMS_API is off.
3370         This is a temporary fix.
3371
3372         * bindings/js/WebCoreJSClientData.h:
3373         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
3374         (WebCore::initNormalWorldClientData):
3375
3376 2015-09-25  Chris Dumez  <cdumez@apple.com>
3377
3378         Unreviewed, nit fix after r190229.
3379
3380         * dom/Range.cpp:
3381         (WebCore::Range::insertNode):
3382
3383 2015-09-25  Commit Queue  <commit-queue@webkit.org>
3384
3385         Unreviewed, rolling out r190232 and r190236.
3386         https://bugs.webkit.org/show_bug.cgi?id=149555
3387
3388         "It did not help" (Requested by cdumez on #webkit).
3389
3390         Reverted changesets:
3391
3392         "Unreviewed, roll out r187615 as it seems to have caused a ~1%
3393         PLT regression."
3394         http://trac.webkit.org/changeset/190232
3395
3396         "This started failing after this rollout:"
3397         http://trac.webkit.org/changeset/190236
3398
3399 2015-09-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3400
3401         Remove the need for DOMClass in case of JSBuiltinConstructor WebIDL
3402         https://bugs.webkit.org/show_bug.cgi?id=149522
3403
3404         Reviewed by Darin Adler.
3405
3406         Adding generation of the dummy DOM class for JSBuiltinConstructor interfaces.
3407         This is applied to CountQueuingStrategy.
3408
3409         Covered by existing tests of CountQueuingStrategy.
3410
3411         * Modules/streams/CountQueuingStrategy.h: Removed.
3412         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3413         * WebCore.xcodeproj/project.pbxproj: Ditto.
3414         * bindings/scripts/CodeGeneratorJS.pm:
3415         (GenerateHeader): Removal of DOM class header include and generation of dummy class.
3416         (GenerateImplementation): Removal of DOM class header include.
3417         (UseDummyDOMClass): Helper routine.
3418         (GenerateDummyDOMClassForJSBuiltin): Ditto.
3419
3420 2015-09-24  Brent Fulgham  <bfulgham@apple.com>
3421
3422         [Win] Support composited content in WebView render-to-context methods
3423         https://bugs.webkit.org/show_bug.cgi?id=149516
3424         <rdar://problem/22635080>
3425
3426         Reviewed by Simon Fraser.
3427
3428         Extend the CACFLayerTreeHost implementation to render into a passed
3429         device context when requested. When no context is provided (the default
3430         case) paint as normal.
3431
3432         Will be tested by existing compositing tests in a future bug. DumpRenderTree
3433         has to be extended to do this painting properly.
3434
3435         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
3436         (WebCore::CACFLayerTreeHost::paint): Accept an optional HDC argument, and
3437         pass it to the render method.
3438         * platform/graphics/ca/win/CACFLayerTreeHost.h:
3439         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Add missing SOFT_LINK
3440         command for the WKCACFViewDrawIntoDC.
3441         (WebCore::WKCACFViewLayerTreeHost::paint): Accept optional HDC argument and
3442         pass it to the parent class.
3443         (WebCore::WKCACFViewLayerTreeHost::render): Accept new optional HDC argument.
3444         If provided, call WKCACFViewDrawIntoDC. Otherwise, call WKCACFVIewDraw.
3445         (WebCore::WKCACFViewLayerTreeHost::setShouldInvertColors):
3446         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
3447
3448 2015-09-24  Chris Dumez  <cdumez@apple.com>
3449
3450 &nb