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