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