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