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