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