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