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