REGRESSION(r53318): background-repeat: space with gradients doesn't render correctly
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
2
3         REGRESSION(r53318): background-repeat: space with gradients doesn't render correctly
4         https://bugs.webkit.org/show_bug.cgi?id=150068
5
6         Reviewed by Simon Fraser.
7
8         This is a regression of r53318 in which we were trying to make the pattern
9         of the gradient image as small as possible: 1-pixel wide or tall. But this
10         broke the rendering of the background image when container element has the
11         style background-repeat: space. The reason for this is tiling the gradient
12         image is done completely by CG. To do the tiling, we start by creating a
13         CGPattern by calling CGPatternCreate() which takes the rect of the pattern
14         and the step. If the width or the height of the pattern image is adjusted
15         to be 1-pixel wide or tall, that will force CG to leave a space after every
16         it draws the pattern image which is 1-pixel wide or tall which is wrong.
17         
18         The fix is to disable this optimization altogether if the container element
19         has the style background-repeat: space.
20
21         Test: fast/gradients/background-image-repeat-space.html
22
23         * platform/graphics/Gradient.cpp:
24         (WebCore::Gradient::adjustParametersForTiledDrawing):
25         * platform/graphics/Gradient.h:
26         * platform/graphics/GradientImage.cpp:
27         (WebCore::GradientImage::drawPattern):
28
29 2015-10-13  Simon Fraser  <simon.fraser@apple.com>
30
31         Add helper funtion for checking pointer equivalency and use it
32         https://bugs.webkit.org/show_bug.cgi?id=150022
33
34         Reviewed by Darin Adler.
35
36         A common pattern in WebCore code is to check for equivalency of two pointers,
37         either both null, or both non-null and with equal values. This was written in
38         several different ways in different places.
39         
40         Add arePointingToEqualData() to standardize this pattern.
41
42         This obviates the need for StyleImage::imagesEquivalent(), counterDataEquivalent()
43         etc.
44         
45         Also change some comparisons of DataRef<> which checked the pointer and then the
46         values to use DataRef<>::operator== which does the same thing. Comparisons of
47         m_grid and m_gridItem only checked pointer equality, so this is probably a bug fix there.
48
49         * page/animation/CSSPropertyAnimation.cpp: if ((!a && !b) || a == b) is redundant so fix,
50         and add checks for a and b RenderStyle* first.
51         (WebCore::PropertyWrapperGetter::equals):
52         (WebCore::StyleImagePropertyWrapper::equals):
53         (WebCore::PropertyWrapperShadow::equals):
54         (WebCore::PropertyWrapperMaybeInvalidColor::equals):
55         (WebCore::FillLayerPropertyWrapperGetter::equals):
56         (WebCore::FillLayerStyleImagePropertyWrapper::equals):
57         (WebCore::FillLayersPropertyWrapper::equals):
58         (WebCore::ShorthandPropertyWrapper::equals):
59         (WebCore::PropertyWrapperFlex::equals):
60         (WebCore::PropertyWrapperSVGPaint::equals):
61         * platform/network/ResourceRequestBase.cpp:
62         (WebCore::equalIgnoringHeaderFields):
63         * rendering/style/FillLayer.cpp:
64         (WebCore::FillLayer::operator==):
65         * rendering/style/NinePieceImage.cpp:
66         (WebCore::NinePieceImageData::operator==):
67         * rendering/style/RenderStyle.cpp: Some nullptr cleanup.
68         (WebCore::RenderStyle::getCachedPseudoStyle):
69         (WebCore::RenderStyle::addCachedPseudoStyle):
70         (WebCore::RenderStyle::changeAffectsVisualOverflow):
71         (WebCore::RenderStyle::changeRequiresLayout):
72         (WebCore::RenderStyle::changeRequiresLayerRepaint):
73         (WebCore::RenderStyle::setWillChange):
74         * rendering/style/SVGRenderStyleDefs.cpp:
75         (WebCore::StyleShadowSVGData::operator==):
76         * rendering/style/ShadowData.cpp:
77         (WebCore::ShadowData::operator==):
78         * rendering/style/StyleImage.h:
79         (WebCore::StyleImage::imagesEquivalent): Deleted.
80         * rendering/style/StyleRareInheritedData.cpp:
81         (WebCore::StyleRareInheritedData::operator==):
82         (WebCore::cursorDataEquivalent): Deleted.
83         (WebCore::quotesDataEquivalent): Deleted.
84         (WebCore::StyleRareInheritedData::shadowDataEquivalent): Deleted.
85         * rendering/style/StyleRareInheritedData.h:
86         * rendering/style/StyleRareNonInheritedData.cpp:
87         (WebCore::StyleRareNonInheritedData::operator==):
88         (WebCore::StyleRareNonInheritedData::counterDataEquivalent): Deleted.
89         (WebCore::StyleRareNonInheritedData::shadowDataEquivalent): Deleted.
90         (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent): Deleted.
91         (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent): Deleted.
92         (WebCore::StyleRareNonInheritedData::animationDataEquivalent): Deleted.
93         (WebCore::StyleRareNonInheritedData::transitionDataEquivalent): Deleted.
94         * rendering/style/StyleRareNonInheritedData.h:
95
96 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
97
98         Split TypesettingFeatures into kerning and ligatures bools
99         https://bugs.webkit.org/show_bug.cgi?id=150074
100
101         Reviewed by Simon Fraser.
102
103         Our TypesettingFeatures type represents whether kerning or ligatures are enabled
104         when laying out text. However, now that I have implemented font-feature-settings
105         and font-variant-*, this type is wildly inadequate. There are now multiple kinds
106         of ligatures, and many other features which are neither kerning nor ligatures.
107         Adding tons of information to this type doesn't make sense because 1) We already
108         have a FontVariantSettings struct which contains this information, and 2) None
109         of the users of TypesettingFeatures care about most of these new features.
110
111         In this new world of font features, the font-kerning property isn't changing.
112         Therefore, all the code which relies only on the Kerning value in
113         TypesettingFeatures doesn't need to change. The places which rely on Ligatures,
114         however, need to be updated to understand that there are many different kinds
115         of ligatures.
116
117         Indeed, after inspection, all of the places which inspect ligatures are more
118         interested in a high-level concept of whether or not we can trust some simple
119         computation. Therefore, we really have two things we care about: Kerning, and
120         this high-level concept.
121
122         This patch is the second step to update our view of the world to include
123         font-feature-settings and font-variant-*. In particular, this patch simply
124         splits TypesettingFeatures into two Booleans, one for Kerning, and one for
125         Ligatures (which has no behavior change). Then, once they are separated, I can
126         migrate the Ligatures Boolean to take on its new meaning.
127
128         This change is purely mechanical.
129
130         No new tests because there is no behavior change.
131
132         * WebCore.xcodeproj/project.pbxproj:
133         * css/CSSPrimitiveValueMappings.h:
134         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
135         (WebCore::CSSPrimitiveValue::operator FontCascadeDescription::Kerning):
136         * platform/graphics/Font.cpp:
137         (WebCore::Font::applyTransforms):
138         * platform/graphics/Font.h:
139         * platform/graphics/FontCascade.cpp:
140         (WebCore::FontCascade::FontCascade):
141         (WebCore::FontCascade::operator=):
142         (WebCore::FontCascade::update):
143         (WebCore::FontCascade::drawText):
144         (WebCore::FontCascade::drawEmphasisMarks):
145         (WebCore::FontCascade::width):
146         (WebCore::FontCascade::adjustSelectionRectForText):
147         (WebCore::FontCascade::offsetForPosition):
148         (WebCore::FontCascade::setDefaultKerning):
149         (WebCore::FontCascade::setDefaultLigatures):
150         (WebCore::FontCascade::codePath):
151         (WebCore::FontCascade::floatWidthForSimpleText):
152         (WebCore::FontCascade::setDefaultTypesettingFeatures): Deleted.
153         (WebCore::FontCascade::defaultTypesettingFeatures): Deleted.
154         * platform/graphics/FontCascade.h:
155         (WebCore::FontCascade::enableKerning):
156         (WebCore::FontCascade::enableLigatures):
157         (WebCore::FontCascade::computeEnableKerning):
158         (WebCore::FontCascade::computeEnableLigatures):
159         (WebCore::FontCascade::typesettingFeatures): Deleted.
160         (WebCore::FontCascade::computeTypesettingFeatures): Deleted.
161         * platform/graphics/FontDescription.cpp:
162         (WebCore::FontCascadeDescription::FontCascadeDescription):
163         * platform/graphics/FontDescription.h:
164         (WebCore::FontCascadeDescription::setKerning):
165         (WebCore::FontCascadeDescription::initialKerning):
166         * platform/graphics/TypesettingFeatures.h: Removed.
167         * platform/graphics/WidthIterator.cpp:
168         (WebCore::WidthIterator::WidthIterator):
169         (WebCore::WidthIterator::applyFontTransforms):
170         (WebCore::WidthIterator::advanceInternal):
171         * platform/graphics/WidthIterator.h:
172         * platform/graphics/cocoa/FontCocoa.mm:
173         (WebCore::Font::canRenderCombiningCharacterSequence):
174         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
175         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
176         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
177         (WebCore::Font::getCFStringAttributes):
178         * rendering/RenderBlockLineLayout.cpp:
179         (WebCore::setLogicalWidthForTextRun):
180         * rendering/line/BreakingContext.h:
181         (WebCore::WordTrailingSpace::width):
182         * svg/SVGFontData.h:
183
184 2015-10-13  Zalan Bujtas  <zalan@apple.com>
185
186         Anonymous table objects: inline parent box requires inline-table child.
187         https://bugs.webkit.org/show_bug.cgi?id=150090
188
189         Reviewed by David Hyatt.
190
191         According to the CSS2.1 specification, if a child needs anonymous table wrapper
192         and the child's parent is an inline box, the generated table needs to be inline-table.
193         (inline-block and block parents generate non-inline table) 
194
195         Import W3C CSS2.1 anonymous table tests.
196
197         * rendering/RenderElement.cpp:
198         (WebCore::RenderElement::childRequiresTable):
199         (WebCore::RenderElement::addChild):
200         * rendering/RenderElement.h:
201         * rendering/RenderInline.cpp:
202         (WebCore::RenderInline::newChildIsInline):
203         (WebCore::RenderInline::addChildIgnoringContinuation):
204         (WebCore::RenderInline::addChildToContinuation):
205         * rendering/RenderInline.h:
206         * rendering/RenderTable.cpp:
207         (WebCore::RenderTable::createAnonymousWithParentRenderer):
208
209 2015-10-13  Dean Jackson  <dino@apple.com>
210
211         Device motion and orientation should only be visible from the main frame's security origin
212         https://bugs.webkit.org/show_bug.cgi?id=150072
213         <rdar://problem/23082036>
214
215         Reviewed by Brent Fulgham.
216
217         There are reports that gyroscope and accelerometer information can
218         be used to detect keyboard entry. One initial step to reduce the
219         risk is to forbid device motion and orientation events from
220         being fired in frames that are a different security origin from the main page.
221
222         Manual test: deviceorientation-main-frame-only.html
223
224         * page/DOMWindow.cpp:
225         (WebCore::DOMWindow::isSameSecurityOriginAsMainFrame): New helper function.
226         (WebCore::DOMWindow::addEventListener): Check if we are the main frame, or the
227         same security origin as the main frame. If not, don't add the event
228         listeners.
229
230 2015-10-12  Dean Jackson  <dino@apple.com>
231
232         ASSERT(m_motionManager) on emgn.com page
233         https://bugs.webkit.org/show_bug.cgi?id=150070
234         <rdar://problem/18383732>
235
236         Reviewed by Simon Fraser.
237
238         In the WebCoreMotionManager init method, we call
239         into another setup method on the main thread.
240         However, if a listener was attached before that
241         ran, we'd ASSERT. This wasn't actually causing a bug
242         because the main thread initialization would
243         check the listeners once it got a chance to run.
244
245         The fix is to only check status when we've
246         actually initialized.
247
248         * platform/ios/WebCoreMotionManager.h: New m_initialized boolean.
249         * platform/ios/WebCoreMotionManager.mm: Check m_initialized before doing real work.
250         (-[WebCoreMotionManager init]):
251         (-[WebCoreMotionManager addMotionClient:]):
252         (-[WebCoreMotionManager removeMotionClient:]):
253         (-[WebCoreMotionManager addOrientationClient:]):
254         (-[WebCoreMotionManager removeOrientationClient:]):
255         (-[WebCoreMotionManager initializeOnMainThread]):
256
257 2015-10-13  Chris Dumez  <cdumez@apple.com>
258
259         Avoid useless copies in range-loops that are using 'auto'
260         https://bugs.webkit.org/show_bug.cgi?id=150091
261
262         Reviewed by Sam Weinig.
263
264         Avoid useless copies in range-loops that are using 'auto'. Also use
265         'auto*' instead of 'auto' when range values are pointers for clarity.
266
267 2015-10-13  Simon Fraser  <simon.fraser@apple.com>
268
269         Move Image::drawPattern for CG into GraphicsContext
270         https://bugs.webkit.org/show_bug.cgi?id=150077
271
272         Reviewed by Myles C. Maxfield.
273
274         In order to consolidate code that calls into Core Graphics inside
275         GraphicsContext, move the body of Image::drawPattern() into
276         GraphicsContextCG.cpp, and do the same for Cairo.
277
278         * platform/graphics/GraphicsContext.h:
279         * platform/graphics/cairo/GraphicsContextCairo.cpp:
280         (WebCore::GraphicsContext::drawPattern):
281         * platform/graphics/cairo/ImageCairo.cpp:
282         (WebCore::Image::drawPattern):
283         * platform/graphics/cg/GraphicsContextCG.cpp:
284         (WebCore::drawPatternCallback):
285         (WebCore::patternReleaseCallback):
286         (WebCore::GraphicsContext::drawPattern):
287         * platform/graphics/cg/ImageCG.cpp:
288         (WebCore::Image::drawPattern):
289         (WebCore::drawPatternCallback): Deleted.
290         (WebCore::patternReleaseCallback): Deleted.
291
292 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
293
294         Unprefix font-kerning
295         https://bugs.webkit.org/show_bug.cgi?id=150080
296
297         Reviewed by Sam Weinig.
298
299         This is the last property in CSS3 Fonts which is prefixed.
300
301         Test: fast/text/font-kerning.html
302
303         * css/CSSPropertyNames.in:
304
305 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
306
307         Add debug settings for using giant tiles (4096x4096)
308         https://bugs.webkit.org/show_bug.cgi?id=149977
309         <rdar://problem/23017093>
310
311         Reviewed by Tim Horton.
312
313         Instead of creating the GraphicsLayer with a fixed size 512x512, we need
314         to read the useGiantTiles setting. If its value is true, we set the layer
315         tileSize to 4096x4096.
316
317         * page/Settings.in:
318         Define the name of the setting and its default value.
319         
320         * platform/graphics/GraphicsLayerClient.h:
321         (WebCore::GraphicsLayerClient::tileSize):
322         Define tileSize() in the base class GraphicsLayerClient. This is going to
323         be overridden RenderLayerBacking.
324         
325         * platform/graphics/TiledBacking.h:
326         (WebCore::defaultTileSize):
327         Define the default tileSize which will depend on the useGiantTiles
328         setting.
329
330         * platform/graphics/ca/GraphicsLayerCA.cpp:
331         (WebCore::GraphicsLayerCA::platformCALayerTileSize):
332         Implement the virtual function GraphicsLayerCA::platformCALayerTileSize().
333         It passes the call to client GraphicsLayerClient which can be RenderLayerBacking
334         in our case.
335
336         * platform/graphics/ca/GraphicsLayerCA.h:
337         Override base class function PlatformCALayerClient::PlatformCALayerClient().
338
339         * platform/graphics/ca/PlatformCALayerClient.h:
340         (WebCore::PlatformCALayerClient::platformCALayerTileSize):
341         Define platformCALayerTileSize() in the base class PlatformCALayerClient.
342         This is going to be overridden GraphicsLayerCA.
343
344         * platform/graphics/ca/TileController.cpp:
345         (WebCore::TileController::TileController):
346         No need for the member m_tileSize.
347         
348         (WebCore::TileController::computeTileCoverageRect):
349         Use the function tileSize() instead of using the static values.
350         
351         (WebCore::TileController::tileSize):
352         The tileSize will be retrieved from the owning graphics layer.
353         
354         * platform/graphics/ca/TileController.h:
355         No need for the member m_tileSize. The tileSize will be retrieved from the owning graphics layer.
356
357         * rendering/RenderLayerBacking.cpp:
358         (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
359         Use the function tileSize() instead of using the static values.
360         
361         (WebCore::RenderLayerBacking::tileSize):
362         Override base class function GraphicsLayerClient::tileSize().
363         
364         * rendering/RenderLayerBacking.h:
365         Define the concrete method RenderLayerBacking::tilSize().
366
367 2015-10-13  Antti Koivisto  <antti@apple.com>
368
369         Try to fix ENABLE(DETAILS_ELEMENT) with SHADOW_DOM disabled.
370
371         * dom/Element.cpp:
372         (WebCore::Element::attributeChanged):
373         * dom/Node.cpp:
374         (WebCore::traverseStyleParent):
375
376 2015-10-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
377
378         Fix license and copyrights of WebCore js binding builtin files
379         https://bugs.webkit.org/show_bug.cgi?id=150027
380
381         Reviewed by Darin Adler.
382
383         Fixing copyright on all three files.
384         Moving to BSD-like license as they should have been in the first place.
385         Ordering lexicographically the builtin names in WebCoreBuiltinNames.h.
386
387         No change in behaviour.
388
389         * bindings/js/WebCoreBuiltinNames.h:
390         * bindings/js/WebCoreJSBuiltins.cpp:
391         * bindings/js/WebCoreJSBuiltins.h:
392         * bindings/js/WebCoreJSBuiltinInternals.h:
393
394 2015-10-12  Antti Koivisto  <antti@apple.com>
395
396         Implement iterator for traversing composed DOM
397         https://bugs.webkit.org/show_bug.cgi?id=149997
398
399         Reviewed by Ryosuke Niwa.
400
401         ComposedTreeIterator traverses the DOM in composed tree order. This means it enters
402         shadow trees and follows slots created by Shadow DOM API correctly.
403
404         auto children = composedTreeChildren(containerNode);
405         for (auto& composedChild : children)
406             ...
407
408         auto descendants = composedTreeDescendants(containerNode);
409         for (auto& composedDescendant : descendants)
410             ...
411
412         * WebCore.xcodeproj/project.pbxproj:
413         * dom/ComposedTreeIterator.cpp: Added.
414         (WebCore::ComposedTreeIterator::initializeShadowStack):
415         (WebCore::ComposedTreeIterator::traverseNextInShadowTree):
416         (WebCore::ComposedTreeIterator::traverseNextSiblingSlot):
417         (WebCore::ComposedTreeIterator::traversePreviousSiblingSlot):
418         (WebCore::ComposedTreeIterator::traverseParentInShadowTree):
419         * dom/ComposedTreeIterator.h: Added.
420         (WebCore::ComposedTreeIterator::operator*):
421         (WebCore::ComposedTreeIterator::operator->):
422         (WebCore::ComposedTreeIterator::operator==):
423         (WebCore::ComposedTreeIterator::operator!=):
424         (WebCore::ComposedTreeIterator::ShadowContext::ShadowContext):
425         (WebCore::ComposedTreeIterator::ComposedTreeIterator):
426         (WebCore::ComposedTreeIterator::traverseNext):
427         (WebCore::ComposedTreeIterator::traverseNextSibling):
428         (WebCore::ComposedTreeIterator::traversePreviousSibling):
429         (WebCore::ComposedTreeIterator::traverseParent):
430         (WebCore::ComposedTreeChildAdapter::Iterator::Iterator):
431         (WebCore::ComposedTreeChildAdapter::Iterator::operator++):
432         (WebCore::ComposedTreeChildAdapter::Iterator::operator--):
433         (WebCore::ComposedTreeChildAdapter::ComposedTreeChildAdapter):
434         (WebCore::ComposedTreeChildAdapter::begin):
435         (WebCore::ComposedTreeChildAdapter::end):
436         (WebCore::ComposedTreeChildAdapter::at):
437         (WebCore::composedTreeChildren):
438         * dom/NodeRenderingTraversal.cpp:
439         (WebCore::NodeRenderingTraversal::parentSlow):
440         (WebCore::NodeRenderingTraversal::nextInScope):
441         (WebCore::NodeRenderingTraversal::firstChildSlow): Deleted.
442         (WebCore::NodeRenderingTraversal::nextSiblingSlow): Deleted.
443         (WebCore::NodeRenderingTraversal::previousSiblingSlow): Deleted.
444         * dom/NodeRenderingTraversal.h:
445         (WebCore::NodeRenderingTraversal::parent):
446         (WebCore::NodeRenderingTraversal::firstChild): Deleted.
447         (WebCore::NodeRenderingTraversal::nextSibling): Deleted.
448         (WebCore::NodeRenderingTraversal::previousSibling): Deleted.
449         * style/RenderTreePosition.cpp:
450         (WebCore::RenderTreePosition::computeNextSibling):
451
452             Restore the full assert.
453
454         (WebCore::RenderTreePosition::invalidateNextSibling):
455         (WebCore::RenderTreePosition::previousSiblingRenderer):
456         (WebCore::RenderTreePosition::nextSiblingRenderer):
457
458             Make these member functions.
459             Use the iterator. This is fixes some bugs and allows enabling a test case.
460
461         * style/RenderTreePosition.h:
462         * style/StyleResolveTree.cpp:
463         (WebCore::Style::textRendererIsNeeded):
464
465 2015-10-13  ChangSeok Oh  <changseok.oh@collabora.com>
466
467         [GTK] Use GUniquePtr for GtkIconInfo
468         https://bugs.webkit.org/show_bug.cgi?id=150082
469
470         Reviewed by Carlos Garcia Campos.
471
472         GtkIconInfo cab be wrapped by a smart pointer, GUniqueptr.
473
474         No new test required since no functionality changed.
475
476         * rendering/RenderThemeGtk.cpp:
477         (WebCore::getStockSymbolicIconForWidgetType):
478
479 2015-10-12  Jaehun Lim  <ljaehun.lim@samsung.com>
480
481         Unreviewed, fix debug build warning.
482
483         %llu needs 'long long unsigned int'.
484
485         Type casting unit64_t to long long unsigned int.
486
487         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
488         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
489         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
490         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
491
492 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
493
494         Speculative Cairo build fixes after r190910.
495
496         * platform/graphics/cairo/ImageBufferCairo.cpp:
497         (WebCore::ImageBuffer::drawPattern):
498         * platform/graphics/cairo/ImageCairo.cpp:
499         (WebCore::Image::drawPattern):
500
501 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
502
503         Fix iOS and Efl builds.
504
505         * platform/graphics/NamedImageGeneratedImage.cpp:
506         (WebCore::NamedImageGeneratedImage::drawPattern):
507
508 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
509
510         Remove Image::spaceSize() and ImageBuffer::spaceSize()
511         https://bugs.webkit.org/show_bug.cgi?id=150064
512
513         Reviewed by Tim Horton.
514
515         Image spacing when tiled should not be a property of the image; but a description
516         of how it's drawn, like tile size. So remove spacing from Image and ImageBuffer,
517         and pass it in as an argument.
518
519         * platform/graphics/BitmapImage.cpp:
520         (WebCore::BitmapImage::drawPattern):
521         * platform/graphics/BitmapImage.h:
522         * platform/graphics/CrossfadeGeneratedImage.cpp:
523         (WebCore::CrossfadeGeneratedImage::drawPattern):
524         * platform/graphics/CrossfadeGeneratedImage.h:
525         * platform/graphics/GeneratedImage.h:
526         * platform/graphics/GradientImage.cpp:
527         (WebCore::GradientImage::drawPattern):
528         * platform/graphics/GradientImage.h:
529         * platform/graphics/GraphicsContext.cpp:
530         (WebCore::GraphicsContext::drawTiledImage):
531         * platform/graphics/GraphicsContext.h:
532         * platform/graphics/Image.cpp:
533         (WebCore::Image::drawTiled):
534         * platform/graphics/Image.h:
535         (WebCore::Image::spaceSize): Deleted.
536         (WebCore::Image::setSpaceSize): Deleted.
537         * platform/graphics/ImageBuffer.h:
538         (WebCore::ImageBuffer::spaceSize): Deleted.
539         (WebCore::ImageBuffer::setSpaceSize): Deleted.
540         * platform/graphics/NamedImageGeneratedImage.cpp:
541         (WebCore::NamedImageGeneratedImage::drawPattern):
542         * platform/graphics/NamedImageGeneratedImage.h:
543         * platform/graphics/cg/ImageBufferCG.cpp:
544         (WebCore::ImageBuffer::copyImage):
545         (WebCore::ImageBuffer::drawPattern):
546         * platform/graphics/cg/ImageCG.cpp:
547         (WebCore::Image::drawPattern):
548         * rendering/RenderBoxModelObject.cpp:
549         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
550         * svg/graphics/SVGImage.cpp:
551         (WebCore::SVGImage::drawPatternForContainer):
552         * svg/graphics/SVGImage.h:
553         * svg/graphics/SVGImageForContainer.cpp:
554         (WebCore::SVGImageForContainer::drawPattern):
555         * svg/graphics/SVGImageForContainer.h:
556
557 2015-10-12  Andreas Kling  <akling@apple.com>
558
559         Have TransformState::mappedSecondaryQuad() return an Optional<FloatQuad>.
560         <https://webkit.org/b/150057>
561
562         Reviewed by Simon Fraser.
563
564         Using Optional instead of std::unique_ptr allows us to signal the absence of a
565         secondary quad without incurring a heap allocation in cases where one is present.
566
567         This dodges ~132000 malloc/free pairs on loading thelocal.se
568
569         * platform/graphics/ca/GraphicsLayerCA.cpp:
570         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
571         * platform/graphics/transforms/TransformState.cpp:
572         (WebCore::TransformState::mappedSecondaryQuad):
573         * platform/graphics/transforms/TransformState.h:
574
575 2015-10-12  Brady Eidson  <beidson@apple.com>
576
577         Followup to:
578         Modern IDB: Start version change transaction for connections to new database.
579         https://bugs.webkit.org/show_bug.cgi?id=150033
580
581         Reviewed by NOBODY (Fixing existing test flakiness)
582
583         No new tests (Covered by existing tests)
584
585         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
586         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Early return if a version change transaction
587           is already in progress.
588
589 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
590
591         [Font Features] Tiny cleanup regarding FontCascade::typesettingFeatures()
592         https://bugs.webkit.org/show_bug.cgi?id=150051
593
594         Reviewed by Simon Fraser.
595
596         There are no typesetting features which aren't kerning nor ligatures.
597
598         No new tests because there is no behavior difference.
599
600         * platform/graphics/FontCascade.cpp:
601         (WebCore::FontCascade::codePath):
602         * platform/graphics/WidthIterator.h:
603         (WebCore::WidthIterator::supportsTypesettingFeatures): Deleted.
604
605 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
606
607         Add a CGContextStateSaver and use it
608         https://bugs.webkit.org/show_bug.cgi?id=150049
609
610         Reviewed by Tim Horton.
611
612         Add a stack-based graphics state save/restore class for CGContext,
613         like the one we have for GraphicsContext, and use it in GraphicsContextCG.
614         
615         * platform/graphics/cg/GraphicsContextCG.cpp:
616         (WebCore::GraphicsContext::drawNativeImage):
617         (WebCore::GraphicsContext::drawLine):
618         (WebCore::GraphicsContext::drawJoinedLines):
619         (WebCore::GraphicsContext::fillPath):
620         (WebCore::GraphicsContext::strokePath):
621         (WebCore::GraphicsContext::fillRect):
622         (WebCore::GraphicsContext::platformFillRoundedRect):
623         (WebCore::GraphicsContext::fillRectWithRoundedHole):
624         (WebCore::GraphicsContext::strokeRect):
625         * platform/graphics/cg/GraphicsContextCG.h:
626         (WebCore::CGContextStateSaver::CGContextStateSaver):
627         (WebCore::CGContextStateSaver::~CGContextStateSaver):
628         (WebCore::CGContextStateSaver::save):
629         (WebCore::CGContextStateSaver::restore):
630
631 2015-10-12  Zalan Bujtas  <zalan@apple.com>
632
633         display: table-cell; bug when resizing window
634         https://bugs.webkit.org/show_bug.cgi?id=138167
635
636         Reviewed by David Hyatt.
637
638         Clean up anonymous table wrappers all the way up to RenderTable.
639         This patch ensures that we don't keep the generated RenderTable/RenderSection/RenderCaption/RenderRow
640         objects around in the tree anymore when the last child is destroyed.
641
642         Import W3C CSS2.1 anonymous table tests.
643
644         * rendering/RenderObject.cpp:
645         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
646
647 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
648
649         REGRESSION(r182192): Ligatures do not interact correctly with SHY in some fonts
650         https://bugs.webkit.org/show_bug.cgi?id=150006
651
652         Reviewed by Simon Fraser.
653
654         When performing font transforms and we encounter kCGFontIndexInvalid, we filter it out of the
655         GlyphBuffer. However, this filter was only interacting with part of the GlyphBuffer instead
656         of the whole thing. This causes glyph IDs from one font to be rendered with other fonts,
657         thereby showing garbage glyphs.
658
659         However, now that <rdar://problem/20230073> is fixed, we don't need to perform this filter in
660         the first place.
661
662         Test: fast/text/undefined-glyph-with-ligature.html
663
664         * platform/graphics/GlyphBuffer.h:
665         (WebCore::GlyphBuffer::copyItem):
666         (WebCore::GlyphBuffer::swap):
667         * platform/graphics/WidthIterator.cpp:
668         (WebCore::WidthIterator::applyFontTransforms):
669
670 2015-10-12  Antoine Quint  <graouts@apple.com>
671
672         [SVG] Handle endEvent for svg animations
673         https://bugs.webkit.org/show_bug.cgi?id=121587
674
675         Reviewed by Dean Jackson.
676
677         Add support for the "endEvent" SVG event triggered when an animation completes, as
678         specified in http://www.w3.org/TR/SMIL3/smil-timing.html#q135. This event doesn't
679         bubble and can't be canceled. Added test coverage for the event through the DOM
680         Events API as well as the declarative SMIL Animation syntax.
681
682         Adapted from a Chromium patch by pavan.e@samsung.com
683         https://chromium.googlesource.com/chromium/blink/+/4d415ca0268231aa80e3552fe21bf3480a6978f8
684
685         Tests: svg/animations/end-event-declarative-expected.svg
686                svg/animations/end-event-declarative.svg
687                svg/animations/end-event-script-expected.svg
688                svg/animations/end-event-script.svg
689
690         * svg/animation/SMILTimeContainer.cpp:
691         (WebCore::SMILTimeContainer::updateAnimations):
692         * svg/animation/SVGSMILElement.cpp:
693         (WebCore::smilEndEventSender):
694         (WebCore::SVGSMILElement::~SVGSMILElement):
695         (WebCore::SVGSMILElement::progress):
696         (WebCore::SVGSMILElement::dispatchPendingEvent):
697         * svg/animation/SVGSMILElement.h:
698         (WebCore::SVGSMILElement::hasConditionsConnected):
699
700 2015-10-12  Per Arne Vollan  <peavo@outlook.com>
701
702         [Curl] Increase limit of parallel network requests.
703         https://bugs.webkit.org/show_bug.cgi?id=150035
704
705         Reviewed by Alex Christensen.
706
707         If the limit is too low, other network requests will often be blocked until
708         active requests finishes. This can affect performance in a negative way.
709
710         * platform/network/curl/ResourceHandleManager.cpp:
711
712 2015-10-12  Brady Eidson  <beidson@apple.com>
713
714         Modern IDB: Start version change transaction for connections to new database.
715         https://bugs.webkit.org/show_bug.cgi?id=150033
716
717         Reviewed by Alex Christensen.
718
719         No new tests (Covered by changes to existing tests).
720
721         * CMakeLists.txt:
722         * Modules/indexeddb/IDBDatabase.h:
723         
724         * Modules/indexeddb/client/IDBAnyImpl.cpp:
725         (WebCore::IDBClient::IDBAny::IDBAny):
726         (WebCore::IDBClient::IDBAny::~IDBAny):
727         (WebCore::IDBClient::IDBAny::idbDatabase):
728         (WebCore::IDBClient::IDBAny::domStringList):
729         (WebCore::IDBClient::IDBAny::idbCursor):
730         (WebCore::IDBClient::IDBAny::idbCursorWithValue):
731         (WebCore::IDBClient::IDBAny::idbFactory):
732         (WebCore::IDBClient::IDBAny::idbIndex):
733         (WebCore::IDBClient::IDBAny::idbObjectStore):
734         (WebCore::IDBClient::IDBAny::idbTransaction):
735         (WebCore::IDBClient::IDBAny::scriptValue):
736         (WebCore::IDBClient::IDBAny::integer):
737         (WebCore::IDBClient::IDBAny::string):
738         (WebCore::IDBClient::IDBAny::keyPath):
739         * Modules/indexeddb/client/IDBAnyImpl.h:
740         (WebCore::IDBClient::IDBAny::create):
741         
742         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
743         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
744         (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
745         (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
746         * Modules/indexeddb/client/IDBConnectionToServer.h:
747         
748         * Modules/indexeddb/client/IDBDatabaseImpl.cpp: Added.
749         (WebCore::IDBClient::IDBDatabase::create):
750         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
751         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
752         (WebCore::IDBClient::IDBDatabase::name):
753         (WebCore::IDBClient::IDBDatabase::version):
754         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
755         (WebCore::IDBClient::IDBDatabase::createObjectStore):
756         (WebCore::IDBClient::IDBDatabase::transaction):
757         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
758         (WebCore::IDBClient::IDBDatabase::close):
759         (WebCore::IDBClient::IDBDatabase::activeDOMObjectName):
760         (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache):
761         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
762         * Modules/indexeddb/client/IDBDatabaseImpl.h: Added.
763         (WebCore::IDBClient::IDBDatabase::info):
764         
765         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
766         (WebCore::IDBClient::IDBOpenDBRequest::onError):
767         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
768         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
769         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
770         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
771         
772         * Modules/indexeddb/client/IDBRequestImpl.cpp:
773         (WebCore::IDBClient::IDBRequest::IDBRequest):
774         (WebCore::IDBClient::IDBRequest::result):
775         (WebCore::IDBClient::IDBRequest::source):
776         (WebCore::IDBClient::IDBRequest::transaction):
777         * Modules/indexeddb/client/IDBRequestImpl.h:
778         (WebCore::IDBClient::IDBRequest::connection):
779         
780         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
781         (WebCore::IDBClient::IDBTransaction::create):
782         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
783         (WebCore::IDBClient::IDBTransaction::~IDBTransaction):
784         (WebCore::IDBClient::IDBTransaction::mode):
785         (WebCore::IDBClient::IDBTransaction::db):
786         (WebCore::IDBClient::IDBTransaction::error):
787         (WebCore::IDBClient::IDBTransaction::objectStore):
788         (WebCore::IDBClient::IDBTransaction::abort):
789         (WebCore::IDBClient::IDBTransaction::activeDOMObjectName):
790         (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache):
791         * Modules/indexeddb/client/IDBTransactionImpl.h:
792         (WebCore::IDBClient::IDBTransaction::info):
793         
794         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
795         (WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
796         (WebCore::IDBClient::IDBVersionChangeEvent::eventInterface):
797         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
798         (WebCore::IDBClient::IDBVersionChangeEvent::create):
799         
800         * Modules/indexeddb/legacy/LegacyDatabase.h:
801         
802         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
803         (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
804         * Modules/indexeddb/server/IDBConnectionToClient.h:
805         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
806         
807         * Modules/indexeddb/server/IDBServer.cpp:
808         (WebCore::IDBServer::IDBServer::registerDatabaseConnection):
809         (WebCore::IDBServer::IDBServer::unregisterDatabaseConnection):
810         (WebCore::IDBServer::IDBServer::deleteDatabase):
811         * Modules/indexeddb/server/IDBServer.h:
812         
813         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
814         (WebCore::IDBServer::UniqueIDBDatabase::info):
815         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
816         (WebCore::IDBServer::UniqueIDBDatabase::hasAnyOpenConnections):
817         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
818         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
819         (WebCore::IDBServer::UniqueIDBDatabase::addOpenDatabaseConnection):
820         * Modules/indexeddb/server/UniqueIDBDatabase.h:
821         
822         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 
823         (WebCore::IDBServer::nextDatabaseConnectionIdentifier):
824         (WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
825         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
826         (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
827         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
828
829         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
830         (WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier):
831         (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
832         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionToClient):
833         (WebCore::IDBServer::UniqueIDBDatabaseConnection::closePending):
834         
835         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
836         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
837         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
838         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
839         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
840         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::info):
841         
842         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
843         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
844         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
845         (WebCore::IDBDatabaseInfo::name):
846         (WebCore::IDBDatabaseInfo::version):
847         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo): Deleted.
848         
849         * Modules/indexeddb/shared/IDBError.h:
850         
851         * Modules/indexeddb/shared/IDBRequestData.cpp:
852         (WebCore::IDBRequestData::IDBRequestData):
853         (WebCore::IDBRequestData::requestedVersion):
854         * Modules/indexeddb/shared/IDBRequestData.h:
855         
856         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
857         (WebCore::nextClientResourceNumber):
858         (WebCore::nextServerResourceNumber):
859         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
860         (WebCore::IDBResourceIdentifier::emptyValue):
861         (WebCore::IDBResourceIdentifier::deletedValue):
862         (WebCore::nextResourceNumber): Deleted.
863         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
864         
865         * Modules/indexeddb/shared/IDBResultData.cpp:
866         (WebCore::IDBResultData::IDBResultData):
867         (WebCore::IDBResultData::error):
868         (WebCore::IDBResultData::openDatabaseSuccess):
869         (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
870         (WebCore::IDBResultData::databaseInfo):
871         (WebCore::IDBResultData::transactionInfo):
872         * Modules/indexeddb/shared/IDBResultData.h:
873         (WebCore::IDBResultData::type):
874         (WebCore::IDBResultData::databaseConnectionIdentifier):
875         
876         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
877         (WebCore::IDBTransactionInfo::IDBTransactionInfo):
878         (WebCore::IDBTransactionInfo::versionChange):
879         (WebCore::IDBTransactionInfo::isolatedCopy):
880         * Modules/indexeddb/shared/IDBTransactionInfo.h:
881         (WebCore::IDBTransactionInfo::identifier):
882         (WebCore::IDBTransactionInfo::mode):
883         (WebCore::IDBTransactionInfo::newVersion):
884         
885         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
886         (WebCore::InProcessIDBServer::fireVersionChangeEvent):
887         * Modules/indexeddb/shared/InProcessIDBServer.h:
888         
889         * WebCore.xcodeproj/project.pbxproj:
890         
891         * platform/CrossThreadCopier.cpp:
892         (WebCore::IDBTransactionInfo>::copy):
893         * platform/CrossThreadCopier.h:
894
895 2015-10-12  Said Abou-Hallawa  <sabouhallawa@apple.com>
896
897         REGRESSION(r184895): border-image should always slice the SVG image to nine pieces when drawing it in the container element
898         https://bugs.webkit.org/show_bug.cgi?id=149901
899         <rdar://problem/21995596>
900
901         Reviewed by Darin Adler.
902
903         The nine-pieces algorithm should be applied to the border-image regardless
904         whether the image has an intrinsic size or not. It is not guaranteed to have
905         a meaningful border-image in all the cases of non-intrinsic size images. But
906         it should work as expected in most of the cases. 
907
908         * rendering/RenderBoxModelObject.cpp:
909         * rendering/RenderBoxModelObject.h:
910         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
911         Revert the changes which were added to return whether the image has
912         intrinsic size or not.
913         
914         (WebCore::RenderBoxModelObject::calculateFillTileSize):
915         (WebCore::RenderBoxModelObject::paintNinePieceImage):
916         Size of the image is now the return value of calculateImageIntrinsicDimensions().
917         
918         * rendering/RenderListMarker.cpp:
919         (WebCore::RenderListMarker::updateContent):
920         * rendering/shapes/ShapeOutsideInfo.cpp:
921         (WebCore::ShapeOutsideInfo::createShapeForImage):
922         Size of the image is now the return value of calculateImageIntrinsicDimensions().
923         
924         * rendering/style/NinePieceImage.cpp:
925         * rendering/style/NinePieceImage.h:
926         (WebCore::NinePieceImage::paint):
927         Delete the logic for the non-intrinsic case. Both intrinsic and non-intrinsic
928         cases will be treated the same.
929
930         (WebCore::NinePieceImage::computeNineRects):
931         (WebCore::NinePieceImage::computeSideTileScale):
932         (WebCore::NinePieceImage::computeMiddleTileScale):
933         (WebCore::NinePieceImage::computeTileScales):
934         (WebCore::NinePieceImage::computeIntrinsicRects): Deleted.
935         (WebCore::NinePieceImage::computeIntrinsicSideTileScale): Deleted.
936         (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale): Deleted.
937         (WebCore::NinePieceImage::computeIntrinsicTileScales): Deleted.
938         Remove *Intrinsic* from the name of the functions.
939
940         (WebCore::NinePieceImage::computeNonIntrinsicRects): Deleted.
941         (WebCore::NinePieceImage::computeNonIntrinsicTileScales): Deleted.
942         Delete the *NonIntrinsic* functions.
943
944 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
945
946         Clip-path transitions sometimes trigger endless animation timers
947         https://bugs.webkit.org/show_bug.cgi?id=150018
948
949         Reviewed by Tim Horton.
950         
951         Transitioning -webkit-clip-path could trigger endless animation
952         timers, because when CompositeAnimation::updateTransitions() calls
953         isTargetPropertyEqual(), a false negative answer triggers canceling the
954         current transition and starting a new one over and over.
955         
956         This happened because StyleRareNonInheritedData simply tested pointer
957         equality for m_clipPath and m_shapeOutside. Both of these need to do deep
958         equality testing, requiring the implementation of operator== in BasicShapes
959         classes.
960         
961         In addition, the PropertyWrappers in CSSPropertyAnimation need equals()
962         implementations that also do more than pointer equality testing.
963
964         Tests: transitions/clip-path-transitions.html
965                transitions/shape-outside-transitions.html
966
967         * page/animation/CSSPropertyAnimation.cpp:
968         (WebCore::PropertyWrapperClipPath::equals):
969         (WebCore::PropertyWrapperShape::equals):
970         * rendering/ClipPathOperation.h:
971         * rendering/style/BasicShapes.cpp:
972         (WebCore::BasicShapeCircle::operator==):
973         (WebCore::BasicShapeEllipse::operator==):
974         (WebCore::BasicShapePolygon::operator==):
975         (WebCore::BasicShapeInset::operator==):
976         * rendering/style/BasicShapes.h:
977         (WebCore::BasicShapeCenterCoordinate::operator==):
978         (WebCore::BasicShapeRadius::operator==):
979         * rendering/style/ShapeValue.cpp:
980         (WebCore::pointersOrValuesEqual):
981         (WebCore::ShapeValue::operator==):
982         * rendering/style/ShapeValue.h:
983         (WebCore::ShapeValue::operator!=):
984         (WebCore::ShapeValue::operator==): Deleted.
985         (WebCore::ShapeValue::ShapeValue): Deleted.
986         * rendering/style/StyleRareNonInheritedData.cpp:
987         (WebCore::StyleRareNonInheritedData::operator==):
988         (WebCore::StyleRareNonInheritedData::clipPathOperationsEquivalent):
989         (WebCore::StyleRareNonInheritedData::shapeOutsideDataEquivalent):
990         * rendering/style/StyleRareNonInheritedData.h:
991
992 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
993
994         Test font-variant-* and font-feature-settings on Yosemite and Mavericks
995         https://bugs.webkit.org/show_bug.cgi?id=149778
996
997         Reviewed by Simon Fraser.
998
999         We can simply call the function which enables features on Yosemite and Mavericks.
1000
1001         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1002         (WebCore::platformFontLookupWithFamily):
1003         (WebCore::fontWithFamily):
1004
1005 2015-10-09  Anders Carlsson  <andersca@apple.com>
1006
1007         Don't allow plug-ins to override image types for <embed> elements
1008         https://bugs.webkit.org/show_bug.cgi?id=149979
1009
1010         Reviewed by Tim Horton.
1011
1012         Stop allowing plug-ins to take over image types for <embed> elements. We already do this
1013         for <object> elements, but had to make <embed> elements exempt because of webkit.org/b/49016.
1014         The QuickTime plug-in hasn't supported image types since Lion, so there's no point in keeping this code around.
1015
1016         * html/HTMLAppletElement.cpp:
1017         (WebCore::HTMLAppletElement::HTMLAppletElement):
1018         * html/HTMLEmbedElement.cpp:
1019         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
1020         * html/HTMLObjectElement.cpp:
1021         (WebCore::HTMLObjectElement::HTMLObjectElement):
1022         (WebCore::HTMLObjectElement::parametersForPlugin):
1023         * html/HTMLPlugInImageElement.cpp:
1024         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
1025         (WebCore::HTMLPlugInImageElement::isImageType):
1026         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
1027         * html/HTMLPlugInImageElement.h:
1028         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages): Deleted.
1029         * loader/EmptyClients.h:
1030         * loader/FrameLoaderClient.h:
1031         * loader/SubframeLoader.cpp:
1032         (WebCore::SubframeLoader::resourceWillUsePlugin):
1033         (WebCore::SubframeLoader::requestObject):
1034         (WebCore::SubframeLoader::shouldUsePlugin):
1035         * loader/SubframeLoader.h:
1036
1037 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
1038
1039         Unreviewed, fixing debug builds with Clang on Linux
1040         by including the stdio.h header where it's required
1041         under a debug configuration.
1042
1043         * page/scrolling/ScrollingStateTree.cpp:
1044         (WebCore::ScrollingStateTree::ScrollingStateTree):
1045         * rendering/SimpleLineLayoutFunctions.cpp:
1046
1047 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
1048
1049         Unreviewed, followup to r190643.
1050
1051         Inline the std::function<> constructor wrappings around lambdas
1052         into a single line, instead of spanning it across four lines.
1053
1054         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1055         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
1056         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
1057         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
1058         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1059         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
1060         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
1061         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1062         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
1063         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
1064         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
1065         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
1066         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1067         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
1068         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
1069         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
1070         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1071         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
1072         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1073         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
1074         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1075         (webkitVideoSinkRender):
1076         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1077         (webKitWebSrcChangeState):
1078         (webKitWebSrcNeedDataCb):
1079         (webKitWebSrcEnoughDataMainCb):
1080         (webKitWebSrcEnoughDataCb):
1081         (webKitWebSrcSeekMainCb):
1082         (webKitWebSrcSeekDataCb):
1083
1084 2015-10-11  Brian Burg  <bburg@apple.com>
1085
1086         Add missing builtins files to the Xcode projects
1087         https://bugs.webkit.org/show_bug.cgi?id=150015
1088
1089         Reviewed by Yusuke Suzuki.
1090
1091         * WebCore.xcodeproj/project.pbxproj:
1092
1093 2015-10-11  Simon Fraser  <simon.fraser@apple.com>
1094
1095         Cleanup and simplification of SVG path-related classes
1096         https://bugs.webkit.org/show_bug.cgi?id=150011
1097
1098         Reviewed by Zalan Bujtas.
1099
1100         Many SVG path-related subclasses were stateful, but only because code in
1101         SVGPathUtilities kept global copies around for no reason. A microbenchmark
1102         showed that there was no benefit to keeping global singletons of SVGPathBuilder,
1103         SVGPathSegListBuilder, SVGPathByteStreamBuilder, SVGPathStringBuilder,
1104         SVGPathTraversalStateBuilder, SVGPathParser and SVGPathBlender.
1105         
1106         Making these classes not be re-usable makes the code much simpler, allowing
1107         their SVGPathSources, SVGPathConsumers, SVGPathByteStream etc. to be stored
1108         by reference, and eliminating the cleanup() function which created annoying
1109         ordering issues.
1110         
1111         Code that uses SVGPathParser and SVGPathBlender is further simplified by having
1112         these classes expose only static functions, hiding any internal statefulness.
1113
1114         * svg/SVGPathBlender.cpp: Remove the m_progress member variable and instead
1115         pass progress to the various blend functions, as we do for other blend functions.
1116         Expose two only static functions. Pointers to references.
1117         (WebCore::SVGPathBlender::addAnimatedPath):
1118         (WebCore::SVGPathBlender::blendAnimatedPath):
1119         (WebCore::SVGPathBlender::SVGPathBlender):
1120         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
1121         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
1122         (WebCore::SVGPathBlender::blendMoveToSegment):
1123         (WebCore::SVGPathBlender::blendLineToSegment):
1124         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1125         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1126         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
1127         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
1128         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
1129         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
1130         (WebCore::SVGPathBlender::blendArcToSegment):
1131         (WebCore::SVGPathBlender::cleanup): Deleted.
1132         * svg/SVGPathBlender.h: Make the constructor take a ref to the destination Path,
1133         which is stored by reference.
1134         * svg/SVGPathBuilder.cpp:
1135         (WebCore::SVGPathBuilder::SVGPathBuilder):
1136         (WebCore::SVGPathBuilder::moveTo):
1137         (WebCore::SVGPathBuilder::lineTo):
1138         (WebCore::SVGPathBuilder::curveToCubic):
1139         (WebCore::SVGPathBuilder::closePath):
1140         * svg/SVGPathBuilder.h:
1141         (WebCore::SVGPathBuilder::setCurrentPath): Deleted.
1142         * svg/SVGPathByteStreamBuilder.cpp: References, assertions removed.
1143         (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
1144         * svg/SVGPathByteStreamBuilder.h:
1145         (WebCore::SVGPathByteStreamBuilder::writeType):
1146         (WebCore::SVGPathByteStreamBuilder::setCurrentByteStream): Deleted.
1147         * svg/SVGPathConsumer.h:
1148         * svg/SVGPathElement.cpp:
1149         * svg/SVGPathParser.cpp: Expose some static helper functions for parsing
1150         to byte streams and strings. References.
1151         (WebCore::SVGPathParser::parse):
1152         (WebCore::SVGPathParser::parseToByteStream):
1153         (WebCore::SVGPathParser::parseToString):
1154         (WebCore::SVGPathParser::SVGPathParser):
1155         (WebCore::SVGPathParser::parseClosePathSegment):
1156         (WebCore::SVGPathParser::parseMoveToSegment):
1157         (WebCore::SVGPathParser::parseLineToSegment):
1158         (WebCore::SVGPathParser::parseLineToHorizontalSegment):
1159         (WebCore::SVGPathParser::parseLineToVerticalSegment):
1160         (WebCore::SVGPathParser::parseCurveToCubicSegment):
1161         (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
1162         (WebCore::SVGPathParser::parseCurveToQuadraticSegment):
1163         (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
1164         (WebCore::SVGPathParser::parseArcToSegment):
1165         (WebCore::SVGPathParser::parsePathData):
1166         (WebCore::SVGPathParser::decomposeArcToCubic):
1167         (WebCore::SVGPathParser::parsePathDataFromSource): Deleted.
1168         (WebCore::SVGPathParser::cleanup): Deleted.
1169         * svg/SVGPathParser.h:
1170         (WebCore::SVGPathParser::setCurrentConsumer): Deleted.
1171         (WebCore::SVGPathParser::setCurrentSource): Deleted.
1172         * svg/SVGPathSegListBuilder.cpp:
1173         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
1174         (WebCore::SVGPathSegListBuilder::moveTo):
1175         (WebCore::SVGPathSegListBuilder::lineTo):
1176         (WebCore::SVGPathSegListBuilder::lineToHorizontal):
1177         (WebCore::SVGPathSegListBuilder::lineToVertical):
1178         (WebCore::SVGPathSegListBuilder::curveToCubic):
1179         (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
1180         (WebCore::SVGPathSegListBuilder::curveToQuadratic):
1181         (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
1182         (WebCore::SVGPathSegListBuilder::arcTo):
1183         (WebCore::SVGPathSegListBuilder::closePath):
1184         * svg/SVGPathSegListBuilder.h:
1185         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathElement): Deleted.
1186         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegList): Deleted.
1187         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegRole): Deleted.
1188         * svg/SVGPathStringBuilder.cpp:
1189         (WebCore::SVGPathStringBuilder::cleanup): Deleted.
1190         * svg/SVGPathStringBuilder.h:
1191         * svg/SVGPathTraversalStateBuilder.cpp:
1192         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
1193         (WebCore::SVGPathTraversalStateBuilder::moveTo):
1194         (WebCore::SVGPathTraversalStateBuilder::lineTo):
1195         (WebCore::SVGPathTraversalStateBuilder::curveToCubic):
1196         (WebCore::SVGPathTraversalStateBuilder::closePath):
1197         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
1198         (WebCore::SVGPathTraversalStateBuilder::totalLength):
1199         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
1200         (WebCore::SVGPathTraversalStateBuilder::setDesiredLength): Deleted.
1201         * svg/SVGPathTraversalStateBuilder.h:
1202         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
1203         (WebCore::SVGPathTraversalStateBuilder::setCurrentTraversalState): Deleted.
1204         * svg/SVGPathUtilities.cpp: Remove globals accessors, making things on the stack
1205         instead. Use SVGPathParser helper functions where possible.
1206         (WebCore::buildPathFromString):
1207         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
1208         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
1209         (WebCore::buildPathFromByteStream):
1210         (WebCore::buildSVGPathSegListFromByteStream):
1211         (WebCore::buildStringFromByteStream):
1212         (WebCore::buildStringFromSVGPathSegList):
1213         (WebCore::buildSVGPathByteStreamFromString):
1214         (WebCore::buildAnimatedSVGPathByteStream):
1215         (WebCore::addToSVGPathByteStream):
1216         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
1217         (WebCore::getTotalLengthOfSVGPathByteStream):
1218         (WebCore::getPointAtLengthOfSVGPathByteStream):
1219         (WebCore::buildStringFromPath):
1220         (WebCore::globalSVGPathBuilder): Deleted.
1221         (WebCore::globalSVGPathSegListBuilder): Deleted.
1222         (WebCore::globalSVGPathByteStreamBuilder): Deleted.
1223         (WebCore::globalSVGPathStringBuilder): Deleted.
1224         (WebCore::globalSVGPathTraversalStateBuilder): Deleted.
1225         (WebCore::globalSVGPathParser): Deleted.
1226         (WebCore::globalSVGPathBlender): Deleted.
1227         * svg/SVGPathUtilities.h:
1228         * svg/SVGToOTFFontConversion.cpp: CFFBuilder no longer inherits from SVGPathBuilder.
1229         It did nothing with the Path, re-implemented all the functions, and only made use of
1230         the m_current member var, so just make it inherit from SVGPathConsumer, and have
1231         its own m_current.
1232         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
1233
1234 2015-10-10  Antti Koivisto  <antti@apple.com>
1235
1236         Remove InsertionPoint and ContentDistributor
1237         https://bugs.webkit.org/show_bug.cgi?id=150004
1238
1239         Rubber-stamped by Sam Weinig.
1240
1241         Now that <details> is on top of the modern Shadow DOM remove the last vestiges of the V0 Shadow DOM API.
1242
1243         * CMakeLists.txt:
1244         * WebCore.vcxproj/WebCore.vcxproj:
1245         * WebCore.xcodeproj/project.pbxproj:
1246         * css/SelectorChecker.cpp:
1247         * css/StyleResolver.cpp:
1248         * dom/ContainerNode.cpp:
1249         * dom/Element.cpp:
1250         (WebCore::shouldUseNodeRenderingTraversalSlowPath):
1251         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
1252         * dom/Node.cpp:
1253         (WebCore::Node::parentOrShadowHostElement):
1254         (WebCore::Node::insertedInto):
1255         (WebCore::Node::insertionParentForBinding): Deleted.
1256         * dom/Node.h:
1257         (WebCore::Node::isCharacterDataNode):
1258         (WebCore::Node::isFrameOwnerElement):
1259         (WebCore::Node::isPluginElement):
1260         (WebCore::Node::isImageControlsRootElement):
1261         (WebCore::Node::isImageControlsButtonElement):
1262         (WebCore::Node::isDocumentFragment):
1263         (WebCore::Node::isShadowRoot):
1264         (WebCore::Node::isInsertionPointNode): Deleted.
1265         (WebCore::Node::isInsertionPoint): Deleted.
1266         * dom/NodeRenderingTraversal.cpp:
1267         (WebCore::NodeRenderingTraversal::traverseParent):
1268         (WebCore::NodeRenderingTraversal::traverseFirstChild):
1269         (WebCore::NodeRenderingTraversal::traverseLastChild):
1270         (WebCore::NodeRenderingTraversal::traverseNextSibling):
1271         (WebCore::NodeRenderingTraversal::traversePreviousSibling):
1272         (WebCore::NodeRenderingTraversal::parentSlow):
1273         (WebCore::NodeRenderingTraversal::nextInScope):
1274         (WebCore::NodeRenderingTraversal::previousInScope):
1275         (WebCore::NodeRenderingTraversal::parentInScope):
1276         (WebCore::NodeRenderingTraversal::lastChildInScope):
1277         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed): Deleted.
1278         (WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints): Deleted.
1279         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints): Deleted.
1280         (WebCore::NodeRenderingTraversal::findFirstFromDistributedNode): Deleted.
1281         (WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints): Deleted.
1282         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints): Deleted.
1283         (WebCore::NodeRenderingTraversal::findLastFromDistributedNode): Deleted.
1284         * dom/ShadowRoot.h:
1285         (WebCore::ShadowRoot::distributor): Deleted.
1286         * html/HTMLInputElement.cpp:
1287         * html/HTMLSlotElement.cpp:
1288         * html/HTMLSlotElement.h:
1289         * html/shadow/ContentDistributor.cpp: Removed.
1290         * html/shadow/ContentDistributor.h: Removed.
1291         * html/shadow/InsertionPoint.cpp: Removed.
1292         * html/shadow/InsertionPoint.h: Removed.
1293         * page/FocusController.cpp:
1294         (WebCore::FocusController::previousFocusableElement):
1295         * testing/Internals.cpp:
1296
1297 2015-10-10  Simon Fraser  <simon.fraser@apple.com>
1298
1299         Use references and more const in SVGPathUtilities
1300         https://bugs.webkit.org/show_bug.cgi?id=150007
1301
1302         Reviewed by Zalan Bujtas.
1303         
1304         SVGPathUtilities had lots of pointers whose non-nullness was asserted,
1305         little const, and was very trigger-happy with stack allocations. Clean
1306         that all up.
1307
1308         * svg/SVGAnimatedPath.cpp:
1309         (WebCore::SVGAnimatedPathAnimator::constructFromString):
1310         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
1311         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
1312         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
1313         * svg/SVGPathByteStream.h:
1314         (WebCore::SVGPathByteStream::begin):
1315         (WebCore::SVGPathByteStream::end):
1316         (WebCore::SVGPathByteStream::append):
1317         * svg/SVGPathByteStreamSource.cpp:
1318         (WebCore::SVGPathByteStreamSource::SVGPathByteStreamSource):
1319         * svg/SVGPathByteStreamSource.h:
1320         * svg/SVGPathElement.cpp:
1321         (WebCore::SVGPathElement::getTotalLength):
1322         (WebCore::SVGPathElement::getPointAtLength):
1323         (WebCore::SVGPathElement::getPathSegAtLength):
1324         (WebCore::SVGPathElement::parseAttribute):
1325         (WebCore::SVGPathElement::svgAttributeChanged):
1326         (WebCore::SVGPathElement::pathByteStream):
1327         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1328         (WebCore::SVGPathElement::pathSegListChanged):
1329         (WebCore::SVGPathElement::SVGPathElement): Deleted.
1330         * svg/SVGPathElement.h:
1331         * svg/SVGPathUtilities.cpp:
1332         (WebCore::globalSVGPathBuilder):
1333         (WebCore::globalSVGPathSegListBuilder):
1334         (WebCore::globalSVGPathByteStreamBuilder):
1335         (WebCore::globalSVGPathStringBuilder):
1336         (WebCore::globalSVGPathTraversalStateBuilder):
1337         (WebCore::globalSVGPathParser):
1338         (WebCore::globalSVGPathBlender):
1339         (WebCore::buildPathFromString):
1340         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
1341         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
1342         (WebCore::buildPathFromByteStream):
1343         (WebCore::buildSVGPathSegListFromByteStream):
1344         (WebCore::buildStringFromByteStream):
1345         (WebCore::buildStringFromSVGPathSegList):
1346         (WebCore::buildSVGPathByteStreamFromString):
1347         (WebCore::buildAnimatedSVGPathByteStream):
1348         (WebCore::addToSVGPathByteStream):
1349         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
1350         (WebCore::getTotalLengthOfSVGPathByteStream):
1351         (WebCore::getPointAtLengthOfSVGPathByteStream):
1352         (WebCore::buildStringFromPath):
1353         * svg/SVGPathUtilities.h:
1354         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1355         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
1356
1357 2015-10-10  Andreas Kling  <akling@apple.com>
1358
1359         Reduce pointless malloc traffic in ElementRuleCollector.
1360         <https://webkit.org/b/150003>
1361
1362         Reviewed by Antti Koivisto.
1363
1364         Don't use a unique_ptr for the m_matchedRules vector in ElementRuleCollector.
1365         This is one of our heaviest sources of transient allocations, with ~88000
1366         malloc/free pairs on loading theverge.com.
1367
1368         * css/ElementRuleCollector.cpp:
1369         (WebCore::ElementRuleCollector::addMatchedRule):
1370         (WebCore::ElementRuleCollector::clearMatchedRules):
1371         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1372         (WebCore::ElementRuleCollector::sortMatchedRules):
1373         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
1374         * css/ElementRuleCollector.h:
1375         (WebCore::ElementRuleCollector::hasMatchedRules):
1376
1377 2015-10-10  Dan Bernstein  <mitz@apple.com>
1378
1379         [iOS] Remove unnecessary iOS version checks
1380         https://bugs.webkit.org/show_bug.cgi?id=150002
1381
1382         Reviewed by Alexey Proskuryakov.
1383
1384         * loader/cache/CachedFont.cpp:
1385         (WebCore::CachedFont::ensureCustomFontData):
1386         * loader/cocoa/DiskCacheMonitorCocoa.h:
1387         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
1388         * page/mac/SettingsMac.mm:
1389         (WebCore::sansSerifTraditionalHanFontFamily):
1390         (WebCore::sansSerifSimplifiedHanFontFamily):
1391         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1392         (WebCore::appendOpenTypeFeature):
1393         * platform/graphics/ios/FontCacheIOS.mm:
1394         (WebCore::getSystemFontFallbackForCharacters):
1395         (WebCore::platformLookupFallbackFont):
1396         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1397         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1398         * platform/ios/WebCoreSystemInterfaceIOS.h:
1399         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1400         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1401         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1402         * platform/ios/wak/WAKWindow.mm:
1403         (+[WAKWindow hasLandscapeOrientation]):
1404         (-[WAKWindow hostLayer]):
1405         * platform/network/cf/CookieJarCFNet.cpp:
1406         (WebCore::copyCookiesForURLWithFirstPartyURL):
1407         (WebCore::createCookies):
1408         * platform/network/mac/CertificateInfoMac.mm:
1409         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
1410         * platform/spi/cf/CFNetworkSPI.h:
1411         * platform/spi/cocoa/AVKitSPI.h:
1412         * platform/spi/cocoa/CoreTextSPI.h:
1413         * platform/spi/cocoa/NEFilterSourceSPI.h:
1414         * platform/spi/cocoa/QuartzCoreSPI.h:
1415         * platform/spi/cocoa/SecuritySPI.h:
1416         * platform/spi/ios/LaunchServicesSPI.h:
1417         * platform/spi/mac/AVFoundationSPI.h:
1418         * platform/text/TextBreakIterator.cpp:
1419         * platform/text/TextFlags.h:
1420         * platform/text/ios/LocalizedDateCache.mm:
1421         (WebCore::LocalizedDateCache::calculateMaximumWidth):
1422         * platform/text/mac/LocaleMac.mm:
1423         (WebCore::LocaleMac::LocaleMac):
1424         * rendering/RenderThemeIOS.mm:
1425         (WebCore::RenderThemeIOS::cachedSystemFontDescription):
1426         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1427         * svg/SVGToOTFFontConversion.cpp:
1428         (WebCore::SVGToOTFFontConverter::appendKERNTable):
1429         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
1430
1431 2015-10-10  Antti Koivisto  <antti@apple.com>
1432
1433         Rewrite HTMLDetailsElement using HTMLSlotElement
1434         https://bugs.webkit.org/show_bug.cgi?id=149698
1435
1436         Reviewed by Andreas Kling.
1437
1438         Use the modern Shadow DOM to implement <details> element. After this the legacy InsertionPoint and
1439         related code can be removed.
1440
1441         Based on a patch by Ryosuke.
1442
1443         * dom/Element.cpp:
1444         (WebCore::Element::childrenChanged):
1445         * dom/EventDispatcher.cpp:
1446         (WebCore::EventPath::EventPath):
1447         * dom/ShadowRoot.cpp:
1448         (WebCore::ShadowRoot::ShadowRoot):
1449         (WebCore::ShadowRoot::~ShadowRoot):
1450         (WebCore::ShadowRoot::removeAllEventListeners):
1451         (WebCore::ShadowRoot::findAssignedSlot):
1452         (WebCore::ShadowRoot::addSlotElementByName):
1453         (WebCore::ShadowRoot::removeSlotElementByName):
1454         (WebCore::ShadowRoot::invalidateSlotAssignments):
1455         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments):
1456         (WebCore::ShadowRoot::assignedNodesForSlot):
1457         * dom/ShadowRoot.h:
1458         (WebCore::ShadowRoot::create):
1459         (WebCore::ShadowRoot::distributor):
1460         (WebCore::ShadowRoot::isOrphan):
1461         * dom/SlotAssignment.cpp:
1462         (WebCore::slotNameFromAttributeValue):
1463
1464             Rename for clarity.
1465
1466         (WebCore::slotNameFromSlotAttribute):
1467
1468             SlotAssignment can now be specialized by providing function that maps from node to slot name.
1469             This is the default function that gets the name from the slot attribute.
1470
1471         (WebCore::SlotAssignment::SlotAssignment):
1472         (WebCore::SlotAssignment::findAssignedSlot):
1473
1474             Use the name mapping function.
1475             Ensure that the slots are assigned.
1476
1477         (WebCore::SlotAssignment::addSlotElementByName):
1478         (WebCore::SlotAssignment::removeSlotElementByName):
1479         (WebCore::SlotAssignment::assignedNodesForSlot):
1480         (WebCore::SlotAssignment::invalidate):
1481         (WebCore::SlotAssignment::invalidateDefaultSlot):
1482         (WebCore::SlotAssignment::resolveAllSlotElements):
1483         (WebCore::SlotAssignment::assignSlots):
1484
1485             Use the name mapping function.
1486
1487         (WebCore::SlotAssignment::assignToSlot):
1488
1489             Factor into function.
1490
1491         (WebCore::treatNullAsEmpty): Deleted.
1492         * dom/SlotAssignment.h:
1493         (WebCore::SlotAssignment::~SlotAssignment):
1494         (WebCore::SlotAssignment::defaultSlotName):
1495
1496             Add static getter for emptyAtom for clarity.
1497
1498         (WebCore::SlotAssignment::SlotAssignment): Deleted.
1499         * html/HTMLDetailsElement.cpp:
1500         (WebCore::summarySlotName):
1501         (WebCore::slotNameFunction):
1502
1503             Slot name function for <details>. It assigns the first <summary> child to the summary slot and others
1504             to the default content slot if the element is open.
1505
1506         (WebCore::HTMLDetailsElement::create):
1507         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
1508         (WebCore::HTMLDetailsElement::isActiveSummary):
1509         (WebCore::HTMLDetailsElement::parseAttribute):
1510         (WebCore::HTMLDetailsElement::toggleOpen):
1511         (WebCore::summaryQuerySelector): Deleted.
1512         (WebCore::DetailsContentElement::create): Deleted.
1513         (WebCore::DetailsSummaryElement::create): Deleted.
1514         (WebCore::HTMLDetailsElement::findMainSummary): Deleted.
1515         (WebCore::HTMLDetailsElement::childShouldCreateRenderer): Deleted.
1516         * html/HTMLDetailsElement.h:
1517         * html/HTMLSummaryElement.cpp:
1518         (WebCore::HTMLSummaryElement::create):
1519         (WebCore::HTMLSummaryElement::createElementRenderer):
1520         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
1521         (WebCore::HTMLSummaryElement::detailsElement):
1522         (WebCore::HTMLSummaryElement::isActiveSummary):
1523         (WebCore::isClickableControl):
1524         (WebCore::HTMLSummaryElement::supportsFocus):
1525         (WebCore::HTMLSummaryElement::defaultEventHandler):
1526         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
1527         (WebCore::SummaryContentElement::create): Deleted.
1528         (WebCore::HTMLSummaryElement::childShouldCreateRenderer): Deleted.
1529         (WebCore::HTMLSummaryElement::isMainSummary): Deleted.
1530         * html/HTMLSummaryElement.h:
1531         * html/shadow/DetailsMarkerControl.cpp:
1532         (WebCore::DetailsMarkerControl::rendererIsNeeded):
1533         * style/RenderTreePosition.cpp:
1534         (WebCore::RenderTreePosition::computeNextSibling):
1535
1536             Skip the verification assert for shadow host children. Getting this right requires
1537             better shadow-aware traversal code.
1538
1539         * style/StyleResolveTree.cpp:
1540         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
1541         (WebCore::Style::attachChildren):
1542         (WebCore::Style::attachShadowRoot):
1543         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
1544         (WebCore::Style::attachSlotAssignees):
1545         (WebCore::Style::attachRenderTree):
1546         (WebCore::Style::detachChildren):
1547         (WebCore::Style::detachShadowRoot):
1548         (WebCore::Style::detachSlotAssignees):
1549         (WebCore::Style::detachRenderTree):
1550         (WebCore::Style::resolveChildren):
1551         (WebCore::Style::resolveSlotAssignees):
1552         (WebCore::Style::resolveTree):
1553         (WebCore::Style::attachDistributedChildren): Deleted.
1554         (WebCore::Style::detachDistributedChildren): Deleted.
1555
1556             Remove InsertionPoint related code paths.
1557
1558 2015-10-10  Andreas Kling  <akling@apple.com>
1559
1560         SerializedScriptValue should use a compact encoding for 8-bit strings.
1561         <https://webkit.org/b/149934>
1562
1563         Reviewed by Antti Koivisto.
1564
1565         We were encoding known 8-bit strings in a 16-bit format when serializing script values.
1566
1567         Extend the format to support 8-bit strings. The 8-bittiness is encoded in the highest bit
1568         of the string length. This is possible while supporting all older formats due to string
1569         lengths >= 0x7FFFFFFF being disallowed.
1570
1571         This patch knocks ~1 MB off of theverge.com, where some ad or tracker or whatever likes to
1572         do a ton of postMessage() business.
1573
1574         * bindings/js/SerializedScriptValue.cpp:
1575         (WebCore::CurrentVersion): Bump the serialization format version. Also updated the grammar
1576         comment to describe the new format. Artistic license applied in description of bitfield.
1577
1578         (WebCore::writeLittleEndianUInt16): Deleted.
1579
1580         (WebCore::CloneSerializer::serialize):
1581         (WebCore::CloneSerializer::write):
1582         (WebCore::CloneDeserializer::deserializeString):
1583         (WebCore::CloneDeserializer::readString):
1584         (WebCore::CloneDeserializer::readStringData): Support 8-bit strings. I kept the string
1585         length limit at UINT_MAX/sizeof(UChar) since the highest bit of the length is no longer
1586         available. Besides, it seems flimsy to support longer strings if they happen to have all
1587         8-bit characters.
1588
1589 2015-10-10  Dan Bernstein  <mitz@apple.com>
1590
1591         [iOS] Remove project support for iOS 8
1592         https://bugs.webkit.org/show_bug.cgi?id=149993
1593
1594         Reviewed by Alexey Proskuryakov.
1595
1596         * Configurations/WebCore.xcconfig:
1597         * Configurations/WebCoreTestSupport.xcconfig:
1598
1599 2015-10-09  Zalan Bujtas  <zalan@apple.com>
1600
1601         Check if start and end positions are still valid after updating them through VisibleSelection.
1602         https://bugs.webkit.org/show_bug.cgi?id=149982
1603
1604         Reviewed by Ryosuke Niwa.
1605
1606         This patch is required to be able to clean up anonymous tables structure.
1607         In certain edge cases, start/end positions could become nullptr after various text splitting
1608         operations. 
1609
1610         Covered by editing/execCommand/crash-137961.html
1611
1612         * editing/ApplyStyleCommand.cpp:
1613         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1614         (WebCore::ApplyStyleCommand::applyInlineStyle):
1615
1616 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1617
1618         Rename RenderObject::isRoot() to isDocumentElementRenderer()
1619         https://bugs.webkit.org/show_bug.cgi?id=149976
1620
1621         Reviewed by Zalan Bujtas.
1622
1623         RenderObject::isRoot() was confusingly named, because it returns true for
1624         the document element's renderer, not for the actual root (the RenderView).
1625         In this way it mismatched RenderLayer::isRootLayer(), which returned true
1626         for the RenderView's layer.
1627         
1628         Rename it to the more accurate isDocumentElementRenderer().
1629
1630         * dom/Node.cpp:
1631         (WebCore::Node::renderRect):
1632         * page/ios/FrameIOS.mm:
1633         (WebCore::Frame::renderRectForPoint):
1634         * rendering/RenderBlock.cpp:
1635         (WebCore::RenderBlock::paint):
1636         (WebCore::RenderBlock::isSelectionRoot):
1637         (WebCore::RenderBlock::selectionGaps):
1638         * rendering/RenderBlockFlow.cpp:
1639         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
1640         (WebCore::RenderBlockFlow::layoutBlock):
1641         (WebCore::RenderBlockFlow::requiresColumns):
1642         * rendering/RenderBox.cpp:
1643         (WebCore::RenderBox::styleWillChange):
1644         (WebCore::RenderBox::styleDidChange):
1645         (WebCore::RenderBox::updateFromStyle):
1646         (WebCore::RenderBox::paintBackground):
1647         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
1648         (WebCore::RenderBox::repaintLayerRectsForImage):
1649         (WebCore::RenderBox::computeLogicalHeight):
1650         (WebCore::RenderBox::computePercentageLogicalHeight):
1651         (WebCore::RenderBox::createsNewFormattingContext):
1652         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
1653         * rendering/RenderBox.h:
1654         (WebCore::RenderBox::stretchesToViewport):
1655         * rendering/RenderBoxModelObject.cpp:
1656         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1657         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
1658         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1659         * rendering/RenderBoxModelObject.h:
1660         * rendering/RenderDeprecatedFlexibleBox.cpp:
1661         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1662         * rendering/RenderElement.cpp:
1663         (WebCore::RenderElement::styleWillChange):
1664         (WebCore::RenderElement::rendererForRootBackground):
1665         (WebCore::shouldRepaintForImageAnimation):
1666         * rendering/RenderElement.h:
1667         * rendering/RenderFlexibleBox.cpp:
1668         (WebCore::RenderFlexibleBox::layoutBlock):
1669         * rendering/RenderGrid.cpp:
1670         (WebCore::RenderGrid::layoutBlock):
1671         * rendering/RenderLayer.cpp:
1672         (WebCore::shouldSuppressPaintingLayer):
1673         (WebCore::paintForFixedRootBackground):
1674         (WebCore::RenderLayer::paintLayerContents):
1675         (WebCore::RenderLayer::calculateClipRects):
1676         * rendering/RenderLayer.h:
1677         * rendering/RenderLayerBacking.cpp:
1678         (WebCore::RenderLayerBacking::rendererBackgroundColor):
1679         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1680         * rendering/RenderLayerModelObject.cpp:
1681         (WebCore::RenderLayerModelObject::styleDidChange):
1682         * rendering/RenderObject.cpp:
1683         (WebCore::RenderObject::repaintSlowRepaintObject):
1684         (WebCore::RenderObject::offsetParent):
1685         * rendering/RenderObject.h:
1686         (WebCore::RenderObject::isDocumentElementRenderer):
1687         (WebCore::RenderObject::isRoot): Deleted.
1688         * rendering/RenderTable.cpp:
1689         (WebCore::RenderTable::paint):
1690         * rendering/svg/RenderSVGRoot.cpp:
1691         (WebCore::RenderSVGRoot::layout):
1692         (WebCore::RenderSVGRoot::shouldApplyViewportClip):
1693         * rendering/svg/SVGRenderSupport.cpp:
1694         (WebCore::SVGRenderSupport::isOverflowHidden):
1695
1696 2015-10-09  Nan Wang  <n_wang@apple.com>
1697
1698         AX: ARIA 1.1 implement aria-colcount, aria-colindex, aria-colspan, aria-rowcount, aria-rowindex and aria-rowspan
1699         https://bugs.webkit.org/show_bug.cgi?id=148967
1700
1701         Reviewed by Chris Fleizach.
1702
1703         Added support for ARIA 1.1 table/grid related attributes. Created new attributes for mac, so
1704         VoiceOver can pick up the information and speak accordingly.
1705
1706         Test: accessibility/mac/aria-table-attributes.html
1707
1708         * accessibility/AccessibilityARIAGridCell.cpp:
1709         (WebCore::AccessibilityARIAGridCell::AccessibilityARIAGridCell):
1710         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1711         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
1712         (WebCore::AccessibilityARIAGridCell::parentRowGroup):
1713         * accessibility/AccessibilityARIAGridCell.h:
1714         * accessibility/AccessibilityObject.cpp:
1715         (WebCore::initializeRoleMap):
1716         * accessibility/AccessibilityObject.h:
1717         * accessibility/AccessibilityTable.cpp:
1718         (WebCore::AccessibilityTable::title):
1719         (WebCore::AccessibilityTable::ariaColumnCount):
1720         (WebCore::AccessibilityTable::ariaRowCount):
1721         * accessibility/AccessibilityTable.h:
1722         * accessibility/AccessibilityTableCell.cpp:
1723         (WebCore::AccessibilityTableCell::AccessibilityTableCell):
1724         (WebCore::AccessibilityTableCell::titleUIElement):
1725         (WebCore::AccessibilityTableCell::ariaColumnIndex):
1726         (WebCore::AccessibilityTableCell::ariaRowIndex):
1727         (WebCore::AccessibilityTableCell::ariaColumnSpan):
1728         (WebCore::AccessibilityTableCell::ariaRowSpan):
1729         * accessibility/AccessibilityTableCell.h:
1730         (WebCore::AccessibilityTableCell::setARIAColIndexFromRow):
1731         * accessibility/AccessibilityTableRow.cpp:
1732         (WebCore::AccessibilityTableRow::headerObject):
1733         (WebCore::AccessibilityTableRow::addChildren):
1734         (WebCore::AccessibilityTableRow::ariaColumnIndex):
1735         (WebCore::AccessibilityTableRow::ariaRowIndex):
1736         * accessibility/AccessibilityTableRow.h:
1737         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1738         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1739         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1740         * html/HTMLAttributeNames.in:
1741
1742 2015-10-09  Anders Carlsson  <andersca@apple.com>
1743
1744         Remove hack that allowed plug-ins to always take over certain image formats
1745         https://bugs.webkit.org/show_bug.cgi?id=149972
1746
1747         Reviewed by Tim Horton.
1748
1749         This hack was added 8 years ago to allow a certain plug-in to show multi-page TIFF images on uspto.gov. 
1750         We now support said TIFFs natively, and the plug-in has been discontinued so it's safe to get rid of this.
1751
1752         * loader/SubframeLoader.cpp:
1753         (WebCore::SubframeLoader::shouldUsePlugin): Deleted.
1754
1755 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1756
1757         Garbage texture data with composited table row
1758         https://bugs.webkit.org/show_bug.cgi?id=148984
1759
1760         Reviewed by Zalan Bujtas.
1761         
1762         Don't pretend to know if the layer for a table header, section or cell is
1763         opaque, since table painting is special.
1764
1765         Test: compositing/contents-opaque/table-parts.html
1766
1767         * rendering/RenderLayer.cpp:
1768         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
1769
1770 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1771
1772         Garbage pixels on enphaseenergy.com site
1773         https://bugs.webkit.org/show_bug.cgi?id=149915
1774         rdar://problem/22976184
1775
1776         Reviewed by Darin Adler.
1777         
1778         When the <html> gets a composited RenderLayer, and we ask whether its background
1779         is opaque, return false, since the document element's background propagates
1780         to the root, and is painted by the RenderView.
1781         
1782         Also improve the compositing logging to indicate when fore- and background layers
1783         are present.
1784
1785         Test: compositing/contents-opaque/negative-z-before-html.html
1786
1787         * rendering/RenderLayerBacking.cpp:
1788         (WebCore::RenderLayerBacking::updateGeometry):
1789         * rendering/RenderLayerCompositor.cpp:
1790         (WebCore::RenderLayerCompositor::logLayerInfo):
1791
1792 2015-10-09  Antoine Quint  <graouts@apple.com>
1793
1794         Dynamic background color changes do not update until a layout is forced
1795         https://bugs.webkit.org/show_bug.cgi?id=131623
1796
1797         Compute correct repaint rect for decorated RenderSVGRoots.
1798
1799         The current implementation of clippedOverflowRectForRepaint() uses the
1800         generic repaint-rect calculations in SVGRenderSupport. Those in turn make
1801         use of repaintRectInLocalCoordinates(), which for RenderSVGRoot is the
1802         union of the painted children (w/ some expansion). If there're no children,
1803         or they do not fill the entire content box, then a repaint would not
1804         repaint the correct parts.
1805         Fix by calculating the union of the border-box and the SVG content
1806         when the SVG root is decorated (has background/border/etc.)
1807
1808         Adapted from a Chromium patch by fs@opera.com
1809         https://src.chromium.org/viewvc/blink?revision=170890&view=revision
1810
1811         Reviewed by Darin Adler.
1812
1813         Tests: svg/repaint/add-background-property-on-root.html
1814                svg/repaint/add-border-property-on-root.html
1815                svg/repaint/add-outline-property-on-root.html
1816                svg/repaint/change-background-color.html
1817                svg/repaint/remove-background-property-on-root.html
1818                svg/repaint/remove-border-property-on-root.html
1819                svg/repaint/remove-outline-property-on-root.html
1820
1821         * rendering/svg/RenderSVGRoot.cpp:
1822         (WebCore::RenderSVGRoot::layout):
1823         (WebCore::RenderSVGRoot::styleDidChange):
1824         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
1825
1826 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1827
1828         [iOS WK2] Fix assertion in ViewportConfiguration::setDefaultConfiguration seen in testing
1829         https://bugs.webkit.org/show_bug.cgi?id=149959
1830
1831         Reviewed by Tim Horton.
1832
1833         When loading tests which set a flexible viewport, ViewportConfiguration::setDefaultConfiguration()
1834         is called first with testingParameters() and then with webpageParameters(). This
1835         would trigger the assertion that m_defaultConfiguration.initialScaleIsSet but
1836         the new initial scale is zero.
1837         
1838         The assertion seems wrong anyway; it's consulting m_defaultConfiguration.initialScaleIsSet
1839         but defaultConfiguration.initialScale, so fix it to test defaultConfiguration.initialScaleIsSet.
1840
1841         * page/ViewportConfiguration.cpp:
1842         (WebCore::ViewportConfiguration::setDefaultConfiguration):
1843
1844 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
1845
1846         Fix the !ENABLE(STREAM_API) build after r190794
1847         https://bugs.webkit.org/show_bug.cgi?id=149955
1848
1849         Reviewed by Darin Adler.
1850
1851         * bindings/js/WebCoreJSBuiltinInternals.h:
1852         (WebCore::JSBuiltinInternalFunctions::visit):
1853         (WebCore::JSBuiltinInternalFunctions::init):
1854
1855 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
1856
1857         Fix the binding generator after r190785
1858         https://bugs.webkit.org/show_bug.cgi?id=149956
1859
1860         Reviewed by Darin Adler.
1861
1862         * bindings/scripts/CodeGeneratorJS.pm:
1863         (GenerateConstructorHelperMethods):
1864         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1865         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
1866         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1867         (WebCore::JSTestEventConstructorConstructor::getConstructData):
1868         * bindings/scripts/test/JS/JSTestInterface.cpp:
1869         (WebCore::JSTestInterfaceConstructor::getConstructData):
1870         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1871         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
1872         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1873         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
1874         * bindings/scripts/test/JS/JSTestNode.cpp:
1875         (WebCore::JSTestNodeConstructor::getConstructData):
1876         * bindings/scripts/test/JS/JSTestObj.cpp:
1877         (WebCore::JSTestObjConstructor::getConstructData):
1878         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1879         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
1880         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1881         (WebCore::JSTestTypedefsConstructor::getConstructData):
1882
1883 2015-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1884
1885         Backgrounds bleed out of natively rendered text fields
1886         https://bugs.webkit.org/show_bug.cgi?id=149843
1887         <rdar://problem/22896977>
1888
1889         Reviewed by Darin Adler.
1890
1891         When natively rendering a text field with a background on Mac, the background bleeds out
1892         of the text field's border when the graphics context is scaled (as a result of a retina
1893         display or zoom/scale effects). This is because when we render the text field in bezeled
1894         style within a certain frame, AppKit adds 1 device pixel insets on all sides of the frame,
1895         which renders a text field that is slightly smaller than the frame. To adjust for this, we
1896         inflate the paint rect.
1897
1898         Test: fast/forms/hidpi-textfield-background-bleeding.html
1899
1900         * rendering/RenderThemeMac.mm:
1901         (WebCore::RenderThemeMac::paintTextField):
1902
1903 2015-10-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1904
1905         Refactor WebCore JS builtins to prepare for automatic generation
1906         https://bugs.webkit.org/show_bug.cgi?id=149751
1907
1908         Reviewed by Darin Adler.
1909
1910         Adding annotations to JS files to know whether they should be under a compilation flag and
1911         whether they are JS internals or JS tied to WebIDL.
1912         If a file is said as JS internals, all function names should be exported automatically.
1913         Added WebCoreJSBuiltins.h to simplify handling of builtins in JSVMClientData.
1914         Added WebCoreJSInternals.h to simplify handling of builtin private function in JSDOMWindowBase.
1915         Renamed WebCoreJSClientData to JSVMClientData.
1916
1917         Covered by existing tests.
1918
1919         * CMakeLists.txt:
1920         * Modules/streams/ByteLengthQueuingStrategy.js:
1921         * Modules/streams/CountQueuingStrategy.js:
1922         * Modules/streams/ReadableStream.js:
1923         * Modules/streams/ReadableStreamController.js:
1924         * Modules/streams/ReadableStreamInternals.js:
1925         * Modules/streams/ReadableStreamReader.js:
1926         * WebCore.order:
1927         * WebCore.xcodeproj/project.pbxproj:
1928         * bindings/js/DOMWrapperWorld.cpp:
1929         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1930         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
1931         (WebCore::normalWorld):
1932         * bindings/js/JSDOMWindowBase.cpp:
1933         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1934         (WebCore::JSDOMWindowBase::finishCreation):
1935         (WebCore::JSDOMWindowBase::visitChildren):
1936         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1937         (WebCore::JSDOMWindowBase::destroy): Deleted.
1938         * bindings/js/JSDOMWindowBase.h:
1939         * bindings/js/ScriptController.cpp:
1940         (WebCore::ScriptController::getAllWorlds):
1941         * bindings/js/SerializedScriptValue.cpp:
1942         (WebCore::SerializedScriptValue::transferArrayBuffers):
1943         * bindings/js/WebCoreJSBuiltinInternals.h: Added.
1944         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
1945         (WebCore::JSBuiltinInternalFunctions::readableStreamInternals):
1946         (WebCore::JSBuiltinInternalFunctions::visit):
1947         (WebCore::JSBuiltinInternalFunctions::init):
1948         * bindings/js/WebCoreJSBuiltins.cpp:
1949         * bindings/js/WebCoreJSBuiltins.h: Added.
1950         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
1951         (WebCore::JSBuiltinFunctions::byteLengthQueuingStrategyBuiltins):
1952         (WebCore::JSBuiltinFunctions::countQueuingStrategyBuiltins):
1953         (WebCore::JSBuiltinFunctions::readableStreamBuiltins):
1954         (WebCore::JSBuiltinFunctions::readableStreamControllerBuiltins):
1955         (WebCore::JSBuiltinFunctions::readableStreamInternalsBuiltins):
1956         (WebCore::JSBuiltinFunctions::readableStreamReaderBuiltins):
1957         * bindings/js/WebCoreJSClientData.h:
1958         (WebCore::JSVMClientData::JSVMClientData):
1959         (WebCore::JSVMClientData::~JSVMClientData):
1960         (WebCore::JSVMClientData::builtinFunctions):
1961         (WebCore::initNormalWorldClientData):
1962         (WebCore::JSVMClientData::normalWorld): Deleted.
1963         (WebCore::JSVMClientData::getAllWorlds): Deleted.
1964
1965 2015-10-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1966
1967         Rationalize JSXXConstructor class definition
1968         https://bugs.webkit.org/show_bug.cgi?id=149923
1969
1970         Reviewed by Darin Adler.
1971
1972         Declaration of JSXXConstructor::construct and JSXXConstructor::getConstructData
1973         as long as JSXX is constructable from JavaScript.
1974
1975         Previously, JSXXConstructor::construct was not generated in case of CustomConstructor.
1976         It is now generated and directly calls the custom constructor function.
1977
1978         getConstructData was declared conditionally with #if in case of ConstructorConditional.
1979         The #if are now within getConstructData body.
1980
1981         Covered by binding tests.
1982
1983         * bindings/scripts/CodeGeneratorJS.pm:
1984         (GenerateConstructorDeclaration):
1985         (GenerateOverloadedConstructorDefinition):
1986         (GenerateConstructorDefinition):
1987         (GenerateConstructorHelperMethods):
1988         (GenerateConstructorDefinitions):.
1989         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1990         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
1991         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
1992         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):.
1993         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1994         (WebCore::JSTestEventConstructorConstructor::construct):
1995         (WebCore::JSTestEventConstructorConstructor::getConstructData):
1996         * bindings/scripts/test/JS/JSTestInterface.cpp:
1997         (WebCore::JSTestInterfaceConstructor::construct):
1998         (WebCore::JSTestInterfaceConstructor::getConstructData):
1999         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2000         (WebCore::JSTestJSBuiltinConstructorConstructor::construct):
2001         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
2002         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2003         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
2004         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
2005         * bindings/scripts/test/JS/JSTestNode.cpp:
2006         (WebCore::JSTestNodeConstructor::construct):
2007         (WebCore::JSTestNodeConstructor::getConstructData):
2008         * bindings/scripts/test/JS/JSTestObj.cpp:
2009         (WebCore::JSTestObjConstructor::construct):
2010         (WebCore::JSTestObjConstructor::getConstructData):
2011         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2012         (WebCore::constructJSTestOverloadedConstructors1):
2013         (WebCore::constructJSTestOverloadedConstructors2):
2014         (WebCore::constructJSTestOverloadedConstructors3):
2015         (WebCore::constructJSTestOverloadedConstructors4):
2016         (WebCore::constructJSTestOverloadedConstructors5):
2017         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
2018         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
2019         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2020         (WebCore::JSTestTypedefsConstructor::construct):
2021         (WebCore::JSTestTypedefsConstructor::getConstructData):
2022
2023 2015-10-07  Sergio Villar Senin  <svillar@igalia.com>
2024
2025         [css-grid] Include freeSpace in GridSizingData struct
2026         https://bugs.webkit.org/show_bug.cgi?id=149876
2027
2028         Reviewed by Darin Adler.
2029
2030         During the layout process we keep the free space for rows and
2031         columns in two variables that are passed to a few methods
2032         along with the GridSizingData struct. Those two variables
2033         should clearly be part of GridSizingData as they're temporary
2034         values used just for the sake of the layout.
2035
2036         No new tests required as this is just a refactoring.
2037
2038         * rendering/RenderGrid.cpp:
2039         (WebCore::RenderGrid::GridSizingData::GridSizingData):
2040         (WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
2041         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2042         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2043         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
2044         (WebCore::RenderGrid::layoutGridItems):
2045         (WebCore::RenderGrid::populateGridPositions):
2046         (WebCore::contentDistributionOffset):
2047         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
2048         * rendering/RenderGrid.h:
2049
2050 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
2051
2052         [css-grid] Remove unneeded calls to compute(Content)LogicalWidth(Height)
2053         https://bugs.webkit.org/show_bug.cgi?id=149926
2054
2055         Reviewed by Darin Adler.
2056
2057         In order to resolve a Length to a LayoutUnit we need to
2058         provide a maximum value so that i.e. percentages are correctly
2059         computed. That maximum value was computeLogicalWidth() for
2060         columns and computeContentLogicalHeight() for rows. We were
2061         calling it for every single track with a definite size instead
2062         of computing it once and reusing it multiple times.
2063
2064         This brings some nice performance improvements:
2065         - 2.9%  in /Layout/fixed-grid-lots-of-data
2066         - 2.95% in /Layout/fixed-grid-lots-of-stretched-data
2067
2068         No new tests required as there is no change in functionality.
2069
2070         * rendering/RenderGrid.cpp:
2071         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2072         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
2073         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
2074         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
2075         * rendering/RenderGrid.h:
2076
2077 2015-10-08  Chris Dumez  <cdumez@apple.com>
2078
2079         Unreviewed, build fix for ENABLE(MEDIA_SESSION) after r190030.
2080
2081         * dom/Document.cpp:
2082         (WebCore::Document::updateIsPlayingMedia):
2083
2084 2015-10-08  Chris Dumez  <cdumez@apple.com>
2085
2086         Unreviewed, build fixes for ENABLE(MEDIA_SESSION) after r190030.
2087
2088         * Modules/mediasession/HTMLMediaElementMediaSession.cpp:
2089         (WebCore::HTMLMediaElementMediaSession::session):
2090         * Modules/mediasession/HTMLMediaElementMediaSession.h:
2091         * Modules/mediasession/MediaSession.cpp:
2092         (WebCore::MediaSession::controls):
2093         * Modules/mediasession/MediaSession.h:
2094
2095 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
2096
2097         Gracefully handle XMLDocumentParser being detached by mutation events.
2098         https://bugs.webkit.org/show_bug.cgi?id=149485
2099         <rdar://problem/22811489>
2100
2101         This is a merge of Blink change 200026,
2102         https://codereview.chromium.org/1267283002
2103
2104         Reviewed by Darin Adler.
2105
2106         Test: fast/parser/xhtml-dom-character-data-modified-crash.html
2107
2108         * xml/parser/XMLDocumentParser.cpp:
2109         (WebCore::XMLDocumentParser::createLeafTextNode):
2110         Renamed from enterText() to make it more descriptive. 
2111
2112         (WebCore::XMLDocumentParser::updateLeafTextNode):
2113         Renamed from exitText to firm up this stage.
2114
2115         (WebCore::XMLDocumentParser::end):
2116         Gracefully handle stopped states.
2117
2118         (WebCore::XMLDocumentParser::enterText): Deleted.
2119         (WebCore::XMLDocumentParser::exitText): Deleted.
2120
2121         * xml/parser/XMLDocumentParser.h:
2122         Rename enterText to createLeafTextNode.
2123         Rename exitText to updateLeafTextNode.
2124
2125         * xml/parser/XMLDocumentParserLibxml2.cpp:
2126         (WebCore::XMLDocumentParser::startElementNs):
2127         (WebCore::XMLDocumentParser::endElementNs):
2128         (WebCore::XMLDocumentParser::characters):
2129         (WebCore::XMLDocumentParser::processingInstruction):
2130         (WebCore::XMLDocumentParser::cdataBlock):
2131         (WebCore::XMLDocumentParser::comment):
2132         (WebCore::XMLDocumentParser::endDocument):
2133         Rename function calls and firm up updateLeafTextNode stage accordingly.
2134
2135 2015-10-08  Chris Dumez  <cdumez@apple.com>
2136
2137         data: URLs should not be preloaded
2138         https://bugs.webkit.org/show_bug.cgi?id=149829
2139
2140         Reviewed by Darin Adler.
2141
2142         Fix review comments after r190605:
2143         Use protocolIs() instead of String::startsWith().
2144
2145         * html/parser/HTMLPreloadScanner.cpp:
2146         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
2147
2148 2015-10-08  Chris Dumez  <cdumez@apple.com>
2149
2150         Revert r187626 (and r188025) as it caused a PLT regression
2151         https://bugs.webkit.org/show_bug.cgi?id=149898
2152         <rdar://problem/22657123>
2153
2154         Reviewed by Myles Maxfield.
2155
2156         * css/CSSPropertyNames.in:
2157         * css/StyleBuilderCustom.h:
2158         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
2159         * platform/graphics/Font.cpp:
2160         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2161         (WebCore::CharacterFallbackMapKey::operator==):
2162         (WebCore::CharacterFallbackMapKeyHash::hash):
2163         (WebCore::Font::systemFallbackFontForCharacter):
2164         * platform/graphics/FontCache.h:
2165         (WebCore::FontDescriptionKey::operator==):
2166         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
2167         (WebCore::FontDescriptionKey::computeHash): Deleted.
2168         * platform/graphics/FontDescription.cpp:
2169         (WebCore::FontDescription::FontDescription):
2170         (WebCore::FontDescription::traitsMask): Deleted.
2171         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
2172         * platform/graphics/FontDescription.h:
2173         (WebCore::FontDescription::setScript):
2174         (WebCore::FontDescription::operator==):
2175         (WebCore::FontDescription::setFeatureSettings): Deleted.
2176         (WebCore::FontCascadeDescription::initialVariantAlternates): Deleted.
2177         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2178         (WebCore::FontCache::systemFallbackForCharacters):
2179         * rendering/style/RenderStyle.cpp:
2180         (WebCore::RenderStyle::changeRequiresLayout):
2181         * rendering/style/RenderStyle.h:
2182         * rendering/style/StyleRareInheritedData.cpp:
2183         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2184         (WebCore::StyleRareInheritedData::operator==):
2185         * rendering/style/StyleRareInheritedData.h:
2186         * style/StyleResolveForDocument.cpp:
2187         (WebCore::Style::resolveForDocument):
2188
2189 2015-10-08  Andreas Kling  <akling@apple.com>
2190
2191         Generated frame tree names should be kept reasonably long.
2192         <https://webkit.org/b/149874>
2193
2194         Reviewed by Darin Adler.
2195
2196         Some clumsy advertising script is going around assigning JavaScript source code
2197         to the "name" attribute of iframes. This is causing WebKit to generate way too huge
2198         names for anonymous descendants of such iframes.
2199
2200         Previously, the generated name of an anonymous subframe would be its slash-separated
2201         path from the root frame, with the "name" attribute of each ancestor between the
2202         slashes, or "<!--frame${index in parent}-->" for anonymous ancestors.
2203
2204         These ad scripts are often over 100kB in size, with multiple subframes, so we'd end
2205         up with frame names looking like this:
2206
2207         "<!--framePath //<MONSTER BLOB OF JAVASCRIPT FROM HELL>/<!--frame0--><!--frame0-->-->"
2208
2209         While this is worth fixing for the memory usage alone, we've been making it way
2210         worse by also using these paths when recording the back/forward history parts of
2211         WebKit session state.
2212
2213         This patch makes generated paths always use index-in-parent as the "directory name"
2214         for ancestors of anonymous subframes. The above example path will now instead be:
2215
2216         "<!--framePath //<!--frame0-->/<!--frame0-->/<!--frame0-->-->"
2217
2218         Test: fast/frames/long-names-in-nested-subframes.html
2219
2220         * page/FrameTree.cpp:
2221         (WebCore::FrameTree::indexInParent):
2222         (WebCore::FrameTree::uniqueChildName):
2223         * page/FrameTree.h:
2224
2225 2015-10-08  Commit Queue  <commit-queue@webkit.org>
2226
2227         Unreviewed, rolling out r190701.
2228         https://bugs.webkit.org/show_bug.cgi?id=149937
2229
2230         "It did not help, will try a full roll out instead" (Requested
2231         by cdumez on #webkit).
2232
2233         Reverted changeset:
2234
2235         "Partial revert of r187626 as it caused a PLT regression"
2236         https://bugs.webkit.org/show_bug.cgi?id=149898
2237         http://trac.webkit.org/changeset/190701
2238
2239 2015-10-08  Zalan Bujtas  <zalan@apple.com>
2240
2241         Fallback to the RenderView when repaint container is null.
2242         https://bugs.webkit.org/show_bug.cgi?id=149903
2243
2244         Reviewed by Simon Fraser.
2245
2246         Reduces code complexity at the calling sites.
2247
2248         No change in functionality.
2249
2250         * rendering/RenderObject.cpp:
2251         (WebCore::RenderObject::repaintUsingContainer):
2252         (WebCore::RenderObject::repaint):
2253         (WebCore::RenderObject::repaintRectangle):
2254
2255 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
2256
2257         Add NULL check for renderBox::layer() on applying zoom level change
2258         https://bugs.webkit.org/show_bug.cgi?id=149302
2259         <rdar://problem/22747292>
2260
2261         Reviewed by Darin Adler.
2262
2263         Test: fast/css/zoom-on-nested-scroll-crash.html
2264
2265         This is a merge of Blink r158238:
2266         https://chromiumcodereview.appspot.com/23526081
2267
2268         * rendering/RenderBox.cpp:
2269         (WebCore::RenderBox::styleDidChange):
2270
2271 2015-10-08  Brady Eidson  <beidson@apple.com>
2272
2273         Update Inspector to only work with Legacy IDB (for now).
2274         https://bugs.webkit.org/show_bug.cgi?id=149928.
2275
2276         Reviewed by Tim Horton.
2277
2278         * Modules/indexeddb/IDBAny.h:
2279         (WebCore::IDBAny::isLegacy):
2280         
2281         * Modules/indexeddb/legacy/LegacyAny.h:
2282         * inspector/InspectorIndexedDBAgent.cpp:
2283
2284 2015-10-08  Antti Koivisto  <antti@apple.com>
2285
2286         CrashTracer: [USER] com.apple.WebKit.WebContent at …Core::SelectorChecker::checkScrollbarPseudoClass const + 217
2287         https://bugs.webkit.org/show_bug.cgi?id=149921
2288         rdar://problem/22731359
2289
2290         Reviewed by Andreas Kling.
2291
2292         Test: svg/css/use-window-inactive-crash.html
2293
2294         * css/SelectorCheckerTestFunctions.h:
2295         (WebCore::isWindowInactive):
2296
2297             Null check page.
2298
2299 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2300
2301         Format string issues in LegacyRequest.cpp
2302         https://bugs.webkit.org/show_bug.cgi?id=149866
2303
2304         Reviewed by Csaba Osztrogonác.
2305
2306         Cast enums to ints before printing them to placate GCC's -Wformat.
2307
2308         * Modules/indexeddb/legacy/LegacyRequest.cpp:
2309         (WebCore::LegacyRequest::dispatchEvent):
2310         (WebCore::LegacyRequest::enqueueEvent):
2311
2312 2015-10-08  Commit Queue  <commit-queue@webkit.org>
2313
2314         Unreviewed, rolling out r190716.
2315         https://bugs.webkit.org/show_bug.cgi?id=149924
2316
2317         broke mac build from time to time (Requested by youenn on
2318         #webkit).
2319
2320         Reverted changeset:
2321
2322         "Automate WebCore JS builtins generation and build system"
2323         https://bugs.webkit.org/show_bug.cgi?id=149751
2324         http://trac.webkit.org/changeset/190716
2325
2326 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
2327
2328         [css-grid] Percentages of indefinite sizes to be resolved as auto
2329         https://bugs.webkit.org/show_bug.cgi?id=149810
2330
2331         Reviewed by Darin Adler.
2332
2333         Specs mention that percentages in grid track sizes must be
2334         resolved as 'auto' if the grid container has an indefinite
2335         size in the corresponding axis.
2336
2337         The 'auto' keyword used to be resolved as
2338         minmax(min-content,max-content) but since r189911 it's
2339         resolved as minmax(auto,auto). Updated the implementation so
2340         we properly resolve those percentages.
2341
2342         No new tests as the behavior does not change at all. That's
2343         because 'auto' as min-track sizing function is the same as
2344         min-content (unless we have a specified value for
2345         min-{width|height}, but those cases were already handled in the
2346         code), and as a max sizing function is works as max-content.
2347
2348         * rendering/RenderGrid.cpp:
2349         (WebCore::RenderGrid::gridTrackSize):
2350
2351 2015-10-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2352
2353         Automate WebCore JS builtins generation and build system
2354         https://bugs.webkit.org/show_bug.cgi?id=149751
2355
2356         Reviewed by Darin Adler.
2357
2358         Adding annotations to JS files to know whether they should be under a compilation flag and
2359         whether they are JS internals or JS tied to WebIDL.
2360         If a file is said as JS internals, all function names are exported automatically.
2361         Added auto generation of WebCoreJSBuiltins.cpp
2362         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
2363         WebCoreJSClientData as wrapper for builtins.
2364         Added auto generation of WebCoreJSBuiltinInternals.h which contain a wrapper around all private functions, used by
2365         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
2366         Renamed WebCoreJSClientData to JSVMClientData.
2367
2368         The remaining manual part for private functions is the pairing between private identifiers and
2369         the private JS functions within JSDOMWindowBase::finishCreation.
2370
2371         Covered by existing tests.
2372
2373         * CMakeLists.txt:
2374         * DerivedSources.make:
2375         * Modules/streams/ByteLengthQueuingStrategy.js:
2376         * Modules/streams/CountQueuingStrategy.js:
2377         * Modules/streams/ReadableStream.js:
2378         * Modules/streams/ReadableStreamInternals.js:
2379         * WebCore.order:
2380         * WebCore.vcxproj/WebCore.vcxproj:
2381         * WebCore.xcodeproj/project.pbxproj:
2382         * bindings/js/DOMWrapperWorld.cpp:
2383         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
2384         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
2385         (WebCore::normalWorld):
2386         * bindings/js/JSDOMWindowBase.cpp:
2387         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2388         (WebCore::JSDOMWindowBase::finishCreation):
2389         (WebCore::JSDOMWindowBase::visitChildren):
2390         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
2391         * bindings/js/JSDOMWindowBase.h:
2392         * bindings/js/ScriptController.cpp:
2393         (WebCore::ScriptController::getAllWorlds):
2394         * bindings/js/SerializedScriptValue.cpp:
2395         (WebCore::SerializedScriptValue::transferArrayBuffers):
2396         * bindings/js/WebCoreJSClientData.h:
2397         (WebCore::JSClientData::JSClientData):
2398         (WebCore::JSClientData::~JSClientData):
2399         (WebCore::JSClientData::builtinFunctions):
2400         (WebCore::initNormalWorldClientData):
2401         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
2402         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
2403         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
2404         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
2405         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
2406         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
2407         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
2408         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
2409         * generate-js-builtins-allinone: Added.
2410         (retrieveGenerationParameters):
2411         (retrieveFilesWithParameters):
2412         (retrieveFilesWithParameters.FileInput):
2413         (writeConditional):
2414         (JSBuiltinFunctions):
2415         (Private):
2416         (JSBuiltinInternalFunctions):
2417         (copytempfile):
2418
2419 2015-10-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2420
2421         Binding generated JS constructors should use GlobalObject references
2422         https://bugs.webkit.org/show_bug.cgi?id=149872
2423
2424         Reviewed by Darin Adler.
2425
2426         Updated binding generator to generate JS DOM constructors code with JSDOMGlobalOBject references.
2427         Updated WebCore JS binding layer accordingly.
2428
2429         Covered by updated binding tests.
2430
2431         * bindings/js/DOMConstructorWithDocument.h:
2432         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
2433         (WebCore::DOMConstructorWithDocument::finishCreation):
2434         * bindings/js/JSDOMBinding.cpp:
2435         (WebCore::getCachedDOMStructure):
2436         (WebCore::cacheDOMStructure):
2437         * bindings/js/JSDOMBinding.h:
2438         (WebCore::DOMConstructorObject::DOMConstructorObject):
2439         (WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
2440         (WebCore::getDOMStructure):
2441         (WebCore::deprecatedGetDOMStructure):
2442         (WebCore::getDOMPrototype):
2443         (WebCore::createJSBuiltin):
2444         (WebCore::createWrapper):
2445         * bindings/js/JSDOMConstructor.h:
2446         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
2447         * bindings/js/JSDOMGlobalObject.h:
2448         (WebCore::getDOMConstructor):
2449         * bindings/js/JSDOMWindowCustom.cpp:
2450         (WebCore::JSDOMWindow::image):
2451         (WebCore::JSDOMWindow::touch):
2452         (WebCore::JSDOMWindow::touchList):
2453         * bindings/js/JSDOMWrapper.h:
2454         (WebCore::JSDOMWrapper::JSDOMWrapper):
2455         (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
2456         * bindings/js/JSImageConstructor.cpp:
2457         (WebCore::JSImageConstructor::JSImageConstructor):
2458         (WebCore::JSImageConstructor::finishCreation):
2459         * bindings/js/JSImageConstructor.h:
2460         (WebCore::JSImageConstructor::create):
2461         (WebCore::JSImageConstructor::createStructure):
2462         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2463         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject):
2464         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject):
2465         * bindings/scripts/CodeGeneratorJS.pm:
2466         (GenerateHeader):
2467         (GenerateImplementation):
2468         (GenerateCallbackImplementation):
2469         (GenerateConstructorDeclaration):
2470         (GenerateConstructorHelperMethods):
2471         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2472         (WebCore::JSTestActiveDOMObjectConstructor::create):
2473         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
2474         (WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
2475         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2476         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
2477         (WebCore::JSTestActiveDOMObject::getConstructor):
2478         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2479         (WebCore::JSTestActiveDOMObject::create):
2480         * bindings/scripts/test/JS/JSTestCallback.cpp:
2481         (WebCore::JSTestCallbackConstructor::create):
2482         (WebCore::JSTestCallbackConstructor::createStructure):
2483         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
2484         (WebCore::JSTestCallback::getConstructor):
2485         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2486         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
2487         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
2488         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
2489         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2490         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
2491         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
2492         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
2493         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::create):
2494         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2495         (WebCore::JSTestCustomNamedGetterConstructor::create):
2496         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
2497         (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
2498         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2499         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
2500         (WebCore::JSTestCustomNamedGetter::getConstructor):
2501         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2502         (WebCore::JSTestCustomNamedGetter::create):
2503         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2504         (WebCore::JSTestEventConstructorConstructor::create):
2505         (WebCore::JSTestEventConstructorConstructor::createStructure):
2506         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
2507         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2508         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
2509         (WebCore::JSTestEventConstructor::getConstructor):
2510         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2511         (WebCore::JSTestEventConstructor::create):
2512         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2513         (WebCore::JSTestEventTargetConstructor::create):
2514         (WebCore::JSTestEventTargetConstructor::createStructure):
2515         (WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
2516         (WebCore::JSTestEventTargetConstructor::finishCreation):
2517         (WebCore::JSTestEventTarget::JSTestEventTarget):
2518         (WebCore::JSTestEventTarget::getConstructor):
2519         * bindings/scripts/test/JS/JSTestEventTarget.h:
2520         (WebCore::JSTestEventTarget::create):
2521         * bindings/scripts/test/JS/JSTestException.cpp:
2522         (WebCore::JSTestExceptionConstructor::create):
2523         (WebCore::JSTestExceptionConstructor::createStructure):
2524         (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
2525         (WebCore::JSTestExceptionConstructor::finishCreation):
2526         (WebCore::JSTestException::JSTestException):
2527         (WebCore::JSTestException::getConstructor):
2528         * bindings/scripts/test/JS/JSTestException.h:
2529         (WebCore::JSTestException::create):
2530         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2531         (WebCore::JSTestGenerateIsReachableConstructor::create):
2532         (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
2533         (WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
2534         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2535         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
2536         (WebCore::JSTestGenerateIsReachable::getConstructor):
2537         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2538         (WebCore::JSTestGenerateIsReachable::create):
2539         * bindings/scripts/test/JS/JSTestInterface.cpp:
2540         (WebCore::JSTestInterfaceConstructor::create):
2541         (WebCore::JSTestInterfaceConstructor::createStructure):
2542         (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
2543         (WebCore::JSTestInterfaceConstructor::finishCreation):
2544         (WebCore::JSTestInterface::JSTestInterface):
2545         (WebCore::JSTestInterface::getConstructor):
2546         * bindings/scripts/test/JS/JSTestInterface.h:
2547         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2548         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
2549         (WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
2550         (WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
2551         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
2552         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
2553         (WebCore::JSTestJSBuiltinConstructor::getConstructor):
2554         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
2555         (WebCore::JSTestJSBuiltinConstructor::create):
2556         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2557         (WebCore::JSTestMediaQueryListListenerConstructor::create):
2558         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
2559         (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
2560         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2561         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
2562         (WebCore::JSTestMediaQueryListListener::getConstructor):
2563         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2564         (WebCore::JSTestMediaQueryListListener::create):
2565         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2566         (WebCore::JSTestNamedConstructorConstructor::create):
2567         (WebCore::JSTestNamedConstructorConstructor::createStructure):
2568         (WebCore::JSTestNamedConstructorNamedConstructor::create):
2569         (WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
2570         (WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
2571         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2572         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
2573         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2574         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
2575         (WebCore::JSTestNamedConstructor::getConstructor):
2576         (WebCore::JSTestNamedConstructor::getNamedConstructor):
2577         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2578         (WebCore::JSTestNamedConstructor::create):
2579         * bindings/scripts/test/JS/JSTestNode.cpp:
2580         (WebCore::JSTestNodeConstructor::create):
2581         (WebCore::JSTestNodeConstructor::createStructure):
2582         (WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
2583         (WebCore::JSTestNodeConstructor::finishCreation):
2584         (WebCore::JSTestNode::JSTestNode):
2585         (WebCore::JSTestNode::getConstructor):
2586         * bindings/scripts/test/JS/JSTestNode.h:
2587         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2588         (WebCore::JSTestNondeterministicConstructor::create):
2589         (WebCore::JSTestNondeterministicConstructor::createStructure):
2590         (WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
2591         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2592         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
2593         (WebCore::JSTestNondeterministic::getConstructor):
2594         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2595         (WebCore::JSTestNondeterministic::create):
2596         * bindings/scripts/test/JS/JSTestObj.cpp:
2597         (WebCore::JSTestObjConstructor::create):
2598         (WebCore::JSTestObjConstructor::createStructure):
2599         (WebCore::JSTestObjConstructor::JSTestObjConstructor):
2600         (WebCore::JSTestObjConstructor::finishCreation):
2601         (WebCore::JSTestObj::JSTestObj):
2602         (WebCore::JSTestObj::getConstructor):
2603         * bindings/scripts/test/JS/JSTestObj.h:
2604         (WebCore::JSTestObj::create):
2605         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2606         (WebCore::JSTestOverloadedConstructorsConstructor::create):
2607         (WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
2608         (WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
2609         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2610         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
2611         (WebCore::JSTestOverloadedConstructors::getConstructor):
2612         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2613         (WebCore::JSTestOverloadedConstructors::create):
2614         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2615         (WebCore::JSTestOverrideBuiltinsConstructor::create):
2616         (WebCore::JSTestOverrideBuiltinsConstructor::createStructure):
2617         (WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
2618         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
2619         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
2620         (WebCore::JSTestOverrideBuiltins::getConstructor):
2621         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2622         (WebCore::JSTestOverrideBuiltins::create):
2623         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2624         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
2625         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
2626         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
2627         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2628         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
2629         (WebCore::JSTestSerializedScriptValueInterface::getConstructor):
2630         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2631         (WebCore::JSTestSerializedScriptValueInterface::create):
2632         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2633         (WebCore::JSTestTypedefsConstructor::create):
2634         (WebCore::JSTestTypedefsConstructor::createStructure):
2635         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
2636         (WebCore::JSTestTypedefsConstructor::finishCreation):
2637         (WebCore::JSTestTypedefs::JSTestTypedefs):
2638         (WebCore::JSTestTypedefs::getConstructor):
2639         * bindings/scripts/test/JS/JSTestTypedefs.h:
2640         (WebCore::JSTestTypedefs::create):
2641         * bindings/scripts/test/JS/JSattribute.cpp:
2642         (WebCore::JSattributeConstructor::create):
2643         (WebCore::JSattributeConstructor::createStructure):
2644         (WebCore::JSattributeConstructor::JSattributeConstructor):
2645         (WebCore::JSattributeConstructor::finishCreation):
2646         (WebCore::JSattribute::JSattribute):
2647         (WebCore::JSattribute::getConstructor):
2648         * bindings/scripts/test/JS/JSattribute.h:
2649         (WebCore::JSattribute::create):
2650         * bindings/scripts/test/JS/JSreadonly.cpp:
2651         (WebCore::JSreadonlyConstructor::create):
2652         (WebCore::JSreadonlyConstructor::createStructure):
2653         (WebCore::JSreadonlyConstructor::JSreadonlyConstructor):
2654         (WebCore::JSreadonlyConstructor::finishCreation):
2655         (WebCore::JSreadonly::JSreadonly):
2656         (WebCore::JSreadonly::getConstructor):
2657         * bindings/scripts/test/JS/JSreadonly.h:
2658         (WebCore::JSreadonly::create):
2659
2660 2015-10-08  Philippe Normand  <pnormand@igalia.com>
2661
2662         WebRTC: Add event names needed by updated RTCPeerConnection
2663         https://bugs.webkit.org/show_bug.cgi?id=149875
2664
2665         Reviewed by Eric Carlson.
2666
2667         The track event name was recently added in the WebRTC spec. The
2668         icegatheringstatechange event has been part of the spec for a while but
2669         was not registered in our DOM events.
2670
2671         * dom/EventNames.h: Add track and icegatheringstatechange even names.
2672
2673 2015-10-07  Keith Rollin  <krollin@apple.com>
2674
2675         script.text shouldn't include text from non-direct children of the script element
2676         https://bugs.webkit.org/show_bug.cgi?id=148851
2677         <rdar://problem/22587759>
2678
2679         Reviewed by Chris Dumez.
2680
2681         Don't include text from non-direct children in script.text. Per:
2682         https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text
2683         Chrome and Firefox behavior match the spec.
2684
2685         Test: fast/dom/script-subtext-in-script-elements.html
2686
2687         * dom/ScriptElement.cpp:
2688         (WebCore::ScriptElement::scriptContent):
2689
2690 2015-10-07  Chris Dumez  <cdumez@apple.com>
2691
2692         Partial revert of r187626 as it caused a PLT regression
2693         https://bugs.webkit.org/show_bug.cgi?id=149898
2694
2695         Reviewed by Myles C. Maxfield.
2696
2697         Do a partial revert of r187626 as it caused a regression on PLT.
2698
2699         * platform/graphics/FontCache.h:
2700         (WebCore::FontDescriptionKey::operator==):
2701         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
2702         (WebCore::FontDescriptionKey::computeHash): Deleted.
2703
2704 2015-10-07  Zalan Bujtas  <zalan@apple.com>
2705
2706         RenderObject::computeRectForRepaint/computeFloatRectForRepaint should return the computed rectangle.
2707         https://bugs.webkit.org/show_bug.cgi?id=149883
2708
2709         Reviewed by Simon Fraser.
2710
2711         Reduces code complexity at the calling sites.
2712  
2713         No change in functionality.
2714
2715         * rendering/RenderBox.cpp:
2716         (WebCore::RenderBox::clippedOverflowRectForRepaint):
2717         (WebCore::RenderBox::computeRectForRepaint):
2718         * rendering/RenderBox.h:
2719         * rendering/RenderInline.cpp:
2720         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2721         (WebCore::RenderInline::computeRectForRepaint):
2722         * rendering/RenderInline.h:
2723         * rendering/RenderListMarker.cpp:
2724         (WebCore::RenderListMarker::selectionRectForRepaint):
2725         * rendering/RenderObject.cpp:
2726         (WebCore::RenderObject::repaintRectangle):
2727         (WebCore::RenderObject::computeRectForRepaint):
2728         (WebCore::RenderObject::computeFloatRectForRepaint):
2729         * rendering/RenderObject.h:
2730         (WebCore::RenderObject::computeAbsoluteRepaintRect):
2731         * rendering/RenderReplaced.cpp:
2732         (WebCore::RenderReplaced::selectionRectForRepaint):
2733         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
2734         * rendering/RenderTableCell.cpp:
2735         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
2736         (WebCore::RenderTableCell::computeRectForRepaint):
2737         * rendering/RenderTableCell.h:
2738         * rendering/RenderText.cpp:
2739         (WebCore::RenderText::collectSelectionRectsForLineBoxes):
2740         * rendering/RenderView.cpp:
2741         (WebCore::RenderView::computeRectForRepaint):
2742         * rendering/RenderView.h:
2743         * rendering/svg/RenderSVGForeignObject.cpp:
2744         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
2745         (WebCore::RenderSVGForeignObject::computeRectForRepaint):
2746         * rendering/svg/RenderSVGForeignObject.h:
2747         * rendering/svg/RenderSVGInline.cpp:
2748         (WebCore::RenderSVGInline::computeFloatRectForRepaint):
2749         * rendering/svg/RenderSVGInline.h:
2750         * rendering/svg/RenderSVGModelObject.cpp:
2751         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
2752         * rendering/svg/RenderSVGModelObject.h:
2753         * rendering/svg/RenderSVGRoot.cpp:
2754         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
2755         * rendering/svg/RenderSVGRoot.h:
2756         * rendering/svg/RenderSVGText.cpp:
2757         (WebCore::RenderSVGText::computeRectForRepaint):
2758         (WebCore::RenderSVGText::computeFloatRectForRepaint):
2759         * rendering/svg/RenderSVGText.h:
2760         * rendering/svg/SVGRenderSupport.cpp:
2761         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
2762         (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
2763         * rendering/svg/SVGRenderSupport.h:
2764
2765 2015-10-07  Antti Koivisto  <antti@apple.com>
2766
2767         Implement :host pseudo class
2768         https://bugs.webkit.org/show_bug.cgi?id=149440
2769         rdar://problem/22731953
2770
2771         Reviewed by Ryosuke Niwa.
2772
2773         This implements the basic non-function :host syntax.
2774
2775         * css/CSSSelector.cpp:
2776         (WebCore::CSSSelector::selectorText):
2777         * css/CSSSelector.h:
2778         * css/ElementRuleCollector.cpp:
2779         (WebCore::ElementRuleCollector::matchAuthorRules):
2780         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
2781         (WebCore::ElementRuleCollector::matchUserRules):
2782         * css/ElementRuleCollector.h:
2783         * css/RuleSet.cpp:
2784         (WebCore::computeMatchBasedOnRuleHash):
2785         (WebCore::RuleSet::addRule):
2786         * css/RuleSet.h:
2787         (WebCore::RuleSet::cuePseudoRules):
2788         (WebCore::RuleSet::hostPseudoClassRules):
2789         (WebCore::RuleSet::focusPseudoClassRules):
2790         (WebCore::RuleSet::universalRules):
2791         * css/SelectorChecker.cpp:
2792         (WebCore::SelectorChecker::checkOne):
2793         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2794         * cssjit/SelectorCompiler.cpp:
2795         (WebCore::SelectorCompiler::addPseudoClassType):
2796
2797 2015-10-07  Nan Wang  <n_wang@apple.com>
2798
2799         AX: ARIA 1.1 @aria-placeholder
2800         https://bugs.webkit.org/show_bug.cgi?id=148970
2801
2802         Reviewed by Chris Fleizach.
2803
2804         Added support for aria-placeholder attribute.
2805
2806         Modified accessibility/placeholder.html test.
2807
2808         * accessibility/AccessibilityObject.cpp:
2809         (WebCore::AccessibilityObject::placeholderValue):
2810         * html/HTMLAttributeNames.in:
2811
2812 2015-10-07  Commit Queue  <commit-queue@webkit.org>
2813
2814         Unreviewed, rolling out r190664.
2815         https://bugs.webkit.org/show_bug.cgi?id=149877
2816
2817         mac build is sometimes borken due to missing generated header
2818         file (Requested by youenn on #webkit).
2819
2820         Reverted changeset:
2821
2822         "Automate WebCore JS builtins generation and build system"
2823         https://bugs.webkit.org/show_bug.cgi?id=149751
2824         http://trac.webkit.org/changeset/190664
2825
2826 2015-10-06  Simon Fraser  <simon.fraser@apple.com>
2827
2828         will-change should trigger stacking context based purely on properties
2829         https://bugs.webkit.org/show_bug.cgi?id=148068
2830
2831         Reviewed by Zalan Bujtas.
2832
2833         Previously, our will-change implementation didn't trigger stacking context
2834         on an inline if the will-change property didn't apply to inlines (like 'transform').
2835         However, this doesn't agree with the CSS-WG consensus (https://lists.w3.org/Archives/Public/www-style/2015Sep/0112.html).
2836         
2837         Change behavior to have stacking context creation behavior for will-change be
2838         identical for inlines and blocks.
2839
2840         Test: fast/css/will-change/will-change-creates-stacking-context-inline.html
2841
2842         * rendering/RenderInline.cpp:
2843         (WebCore::inFlowPositionedInlineAncestor):
2844         * rendering/RenderInline.h:
2845         (WebCore::RenderInline::willChangeCreatesStackingContext):
2846         * rendering/style/WillChangeData.cpp:
2847         (WebCore::propertyCreatesStackingContext):
2848         (WebCore::WillChangeData::addFeature):
2849         (WebCore::propertyCreatesStackingContextOnBoxesOnly): Deleted.
2850         * rendering/style/WillChangeData.h:
2851         (WebCore::WillChangeData::canCreateStackingContextOnInline): Deleted.
2852
2853 2015-10-07  Javier Fernandez  <jfernandez@igalia.com>
2854
2855         [CSS Grid Layout] Modify grid item height doesn't work
2856         https://bugs.webkit.org/show_bug.cgi?id=149840
2857
2858         Reviewed by Sergio Villar Senin.
2859
2860         When computing the logical height of content-sized grid tracks we
2861         need to clear grid item's override height if it needs to be laid
2862         out again.
2863
2864         Currently we are doing so only in the case of percentage heights
2865         or when the grid track's width has changed; these situations would
2866         obviously mark grid items as needing layout.
2867
2868         However, there are other situations, like the one defined in this
2869         bug, which would imply a new layout of the grid items; hence we
2870         need to clear its override value if we want the layout logic to be
2871         computed correctly.
2872
2873         * rendering/RenderGrid.cpp:
2874         (WebCore::RenderGrid::logicalContentHeightForChild):
2875
2876 2015-10-07  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2877
2878         Automate WebCore JS builtins generation and build system
2879         https://bugs.webkit.org/show_bug.cgi?id=149751
2880
2881         Reviewed by Darin Adler.
2882
2883         Adding annotations to JS files to know whether they should be under a compilation flag and
2884         whether they are JS internals or JS tied to WebIDL.
2885         If a file is said as JS internals, all function names are exported automatically.
2886         Added auto generation of WebCoreJSBuiltins.cpp
2887         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
2888         WebCoreJSClientData as wrapper for builtins. Renamed WebCoreJSClientData to JSClientData.
2889         Added auto generation of PrivateWebCoreJSBuiltins that is a wrapper around all private functions, used by
2890         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
2891
2892         The remaining manual part for private functions is the pairing between private identifiers and
2893         the private JS functions within JSDOMWindowBase::finishCreation.
2894
2895         Covered by existing tests.
2896
2897         * CMakeLists.txt:
2898         * DerivedSources.make:
2899         * Modules/streams/ByteLengthQueuingStrategy.js:
2900         * Modules/streams/CountQueuingStrategy.js:
2901         * Modules/streams/ReadableStream.js:
2902         * Modules/streams/ReadableStreamInternals.js:
2903         * WebCore.order:
2904         * WebCore.vcxproj/WebCore.vcxproj:
2905         * WebCore.xcodeproj/project.pbxproj:
2906         * bindings/js/DOMWrapperWorld.cpp:
2907         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
2908         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
2909         (WebCore::normalWorld):
2910         * bindings/js/JSDOMWindowBase.cpp:
2911         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2912         (WebCore::JSDOMWindowBase::finishCreation):
2913         (WebCore::JSDOMWindowBase::visitChildren):
2914         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
2915         * bindings/js/JSDOMWindowBase.h:
2916         * bindings/js/ScriptController.cpp:
2917         (WebCore::ScriptController::getAllWorlds):
2918         * bindings/js/SerializedScriptValue.cpp:
2919         (WebCore::SerializedScriptValue::transferArrayBuffers):
2920         * bindings/js/WebCoreJSClientData.h:
2921         (WebCore::JSClientData::JSClientData):
2922         (WebCore::JSClientData::~JSClientData):
2923         (WebCore::JSClientData::builtinFunctions):
2924         (WebCore::initNormalWorldClientData):
2925         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
2926         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
2927         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
2928         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
2929         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
2930         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
2931         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
2932         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
2933         * generate-js-builtins-allinone: Added.
2934         (retrieveGenerationParameters):
2935         (retrieveFilesWithParameters):
2936         (retrieveFilesWithParameters.FileInput):
2937         (writeConditional):
2938         (JSBuiltinFunctions):
2939         (Private):
2940         (JSBuiltinInternalFunctions):
2941         (copytempfile):
2942
2943 2015-10-05  Sergio Villar Senin  <svillar@igalia.com>
2944
2945         [css-grid] Implement grid gutters
2946         https://bugs.webkit.org/show_bug.cgi?id=149800
2947
2948         Reviewed by Darin Adler.
2949
2950         Authors can now specify the gutters between grid lines, i.e.,
2951         the space between two consecutive grid lines. This can be done
2952         using the new '-webkit-grid-column-gap 'and
2953         '-webkit-grid-row-gap' properties (or the '-webkit-grid-gap'
2954         shorthand).
2955
2956         From the track sizing algorithm POV, gutters are treated as
2957         fixed size columns. The primary consequence is that grids are
2958         enlarged (depending on the number of tracks). Gutters also
2959         affect the sizing of content-sized tracks and fr tracks as
2960         long as the grid have spanning items. Those tracks will become
2961         smaller as gutters will consume part of the item's size, so
2962         the tracks won't need to grow as much as they used to.
2963
2964         Tests: fast/css-grid-layout/grid-gutters-and-alignment.html
2965                fast/css-grid-layout/grid-gutters-and-flex-content.html
2966                fast/css-grid-layout/grid-gutters-and-tracks.html
2967                fast/css-grid-layout/grid-gutters-get-set.html
2968
2969         * css/CSSComputedStyleDeclaration.cpp:
2970         (WebCore::valueForGridTrackList):
2971         (WebCore::ComputedStyleExtractor::propertyValue):
2972         * css/CSSParser.cpp:
2973         (WebCore::isSimpleLengthPropertyID):
2974         (WebCore::CSSParser::parseValue):
2975         (WebCore::CSSParser::parseGridGapShorthand):
2976         * css/CSSParser.h:
2977         * css/CSSPropertyNames.in:
2978         * rendering/RenderGrid.cpp:
2979         (WebCore::RenderGrid::guttersSize):
2980         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2981         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2982         (WebCore::RenderGrid::layoutGridItems):
2983         (WebCore::RenderGrid::gridAreaBreadthForChild):
2984         (WebCore::RenderGrid::populateGridPositions):
2985         (WebCore::RenderGrid::columnAxisOffsetForChild):
2986         (WebCore::RenderGrid::rowAxisOffsetForChild):
2987         * rendering/RenderGrid.h:
2988         * rendering/style/RenderStyle.h:
2989         * rendering/style/StyleGridData.cpp:
2990         (WebCore::StyleGridData::StyleGridData):
2991         * rendering/style/StyleGridData.h:
2992         (WebCore::StyleGridData::operator==):
2993
2994 2015-10-07  ChangSeok Oh  <changseok.oh@collabora.com>
2995
2996         [GTK] Progress bar is broken on recent GTK+
2997         https://bugs.webkit.org/show_bug.cgi?id=149831
2998
2999         Reviewed by Carlos Garcia Campos.
3000
3001         The gtk progress bar has been broken after bumping up to Gtk+-3.16. This is because
3002         the way of rendering progress bar changed after gtk+-3.13.7. See more
3003         https://mail.gnome.org/archives/commits-list/2014-August/msg03865.html
3004         gtk_render_activity is no longer valid to paint a progress bar on a newer gtk+.
3005         It should be done with gtk_render_background and gtk_render_frame.
3006
3007         Test: fast/dom/HTMLProgressElement/native-progress-bar.html
3008
3009         * rendering/RenderThemeGtk.cpp:
3010         (WebCore::RenderThemeGtk::paintProgressBar):
3011
3012 2015-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
3013
3014         [GTK] Add autocleanups
3015         https://bugs.webkit.org/show_bug.cgi?id=149588
3016
3017         Reviewed by Darin Adler.
3018
3019         * PlatformGTK.cmake:
3020         * bindings/scripts/gobject-generate-headers.pl:
3021
3022 2015-10-06  Zalan Bujtas  <zalan@apple.com>
3023
3024         Paint artifacts when hovering on http://jsfiddle.net/Sherbrow/T87Mn/
3025         https://bugs.webkit.org/show_bug.cgi?id=149535
3026         rdar://problem/22874920
3027
3028         Reviewed by Simon Fraser.
3029
3030         When due to some style change, a renderer's self-painting layer is getting destroyed 
3031         and the parent's overflow is no longer set to visible, we don't clean up the overflow part.
3032
3033         When a renderer has a self-painting layer, the parent stops tracking the child's 
3034         visual overflow rect. All overflow painting is delegated to the self-painting layer.
3035         However when this layer gets destroyed, no-one issues repaint to clean up
3036         the overflow bits.
3037         This patch ensures that we issue a repaint when the self-painting layer is destroyed
3038         and the triggering style change requires full repaint.
3039
3040         Test: fast/repaint/overflow-hidden-with-self-painting-child-layer.html
3041
3042         * rendering/RenderLayer.h:
3043         * rendering/RenderLayerModelObject.cpp:
3044         (WebCore::RenderLayerModelObject::styleDidChange):
3045
3046 2015-10-06  Jer Noble  <jer.noble@apple.com>
3047
3048         [Mac] REGRESSION(r173318): Seeks never complete for media loaded with QTKit.
3049         https://bugs.webkit.org/show_bug.cgi?id=149845
3050
3051         Reviewed by Darin Adler.
3052
3053         When converting from time-as-double to MediaTime, a regression was introduced
3054         when checking whether m_seekTo was set to a valid value or not. The clause
3055         `time != -1` should be translated to `time.isValid()`, not `!time.isValid()`.
3056
3057         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3058         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
3059
3060 2015-10-06  Brady Eidson  <beidson@apple.com>
3061
3062         Rename IDBRequestIdentifier to IDBResourceIdentifier.
3063         https://bugs.webkit.org/show_bug.cgi?id=149861
3064
3065         Reviewed by Alex Christensen.
3066
3067         No new tests (No change in behavior).
3068
3069         Turns out having an object representing a (connection ID + unique ID pair) is useful for more than just IDBRequests.
3070
3071         * CMakeLists.txt:
3072         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3073         (WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
3074         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
3075         * Modules/indexeddb/client/IDBConnectionToServer.h:
3076         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3077         (WebCore::IDBClient::IDBRequest::IDBRequest):
3078         * Modules/indexeddb/client/IDBRequestImpl.h:
3079         (WebCore::IDBClient::IDBRequest::resourceIdentifier):
3080         (WebCore::IDBClient::IDBRequest::requestIdentifier): Deleted.
3081         * Modules/indexeddb/shared/IDBRequestData.h:
3082         (WebCore::IDBRequestData::requestIdentifier):
3083         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.cpp.
3084         (WebCore::nextResourceNumber):
3085         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
3086         (WebCore::IDBResourceIdentifier::emptyValue):
3087         (WebCore::IDBResourceIdentifier::deletedValue):
3088         (WebCore::IDBResourceIdentifier::isHashTableDeletedValue):
3089         * Modules/indexeddb/shared/IDBResourceIdentifier.h: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.h.
3090         (WebCore::IDBResourceIdentifier::isEmpty):
3091         (WebCore::IDBResourceIdentifier::hash):
3092         (WebCore::IDBResourceIdentifier::operator==):
3093         (WebCore::IDBResourceIdentifier::connectionIdentifier):
3094         (WebCore::IDBResourceIdentifierHash::hash):
3095         (WebCore::IDBResourceIdentifierHash::equal):
3096         (WebCore::IDBResourceIdentifierHashTraits::emptyValue):
3097         (WebCore::IDBResourceIdentifierHashTraits::isEmptyValue):
3098         (WebCore::IDBResourceIdentifierHashTraits::constructDeletedValue):
3099         (WebCore::IDBResourceIdentifierHashTraits::isDeletedValue):
3100         * Modules/indexeddb/shared/IDBResultData.cpp:
3101         (WebCore::IDBResultData::IDBResultData):
3102         * Modules/indexeddb/shared/IDBResultData.h:
3103         (WebCore::IDBResultData::requestIdentifier):
3104         * WebCore.xcodeproj/project.pbxproj:
3105
3106 2015-10-06  Nan Wang  <n_wang@apple.com>
3107
3108         AX: ARIA 1.1: aria-orientation now defaults to undefined, supported on more elements, and role-specific defaults are defined.
3109         https://bugs.webkit.org/show_bug.cgi?id=132177
3110
3111         Reviewed by Chris Fleizach.
3112
3113         Added role-specific defaults and changed general default to undefined.
3114         Also added more elements to support aria-orientation on Mac.
3115
3116         Test: accessibility/mac/aria-orientation.html
3117
3118         * accessibility/AccessibilityObject.cpp:
3119         (WebCore::AccessibilityObject::orientation):
3120         (WebCore::AccessibilityObject::isDescendantOfObject):
3121         * accessibility/AccessibilityObject.h:
3122         (WebCore::AccessibilityObject::isColorWell):
3123         (WebCore::AccessibilityObject::isSplitter):
3124         (WebCore::AccessibilityObject::isToolbar):
3125         (WebCore::AccessibilityObject::isChecked):
3126         (WebCore::AccessibilityObject::isEnabled):
3127         * accessibility/AccessibilityRenderObject.cpp:
3128         (WebCore::AccessibilityRenderObject::orientation):
3129         * accessibility/AccessibilityScrollView.cpp:
3130         (WebCore::AccessibilityScrollView::scrollBar):
3131         * accessibility/AccessibilityScrollbar.cpp:
3132         (WebCore::AccessibilityScrollbar::orientation):
3133         (WebCore::AccessibilityScrollbar::isEnabled):
3134         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3135         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3136         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3137
3138 2015-10-06  Per Arne Vollan  <peavo@outlook.com>
3139
3140         [WinCairo] GStreamer compile errors.
3141         https://bugs.webkit.org/show_bug.cgi?id=149839
3142
3143         Reviewed by Alex Christensen.
3144
3145         Help MSVC to resolve ambiguous calls.
3146
3147         * platform/graphics/MediaPlayer.h:
3148         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3149         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3150         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
3151         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
3152         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3153         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
3154         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
3155         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
3156         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
3157         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
3158         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
3159         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
3160         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3161         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
3162         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
3163         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
3164         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3165         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
3166         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3167         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
3168         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3169         (webkitVideoSinkRender):
3170         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3171         (webKitWebSrcChangeState):
3172         (webKitWebSrcNeedDataCb):
3173         (webKitWebSrcEnoughDataMainCb):
3174         (webKitWebSrcEnoughDataCb):
3175         (webKitWebSrcSeekMainCb):
3176         (webKitWebSrcSeekDataCb):
3177
3178 2015-10-06  Chris Dumez  <cdumez@apple.com>
3179
3180         Refactor TokenPreloadScanner::StartTagScanner::processAttribute()
3181         https://bugs.webkit.org/show_bug.cgi?id=149847
3182
3183         Reviewed by Antti Koivisto.
3184
3185         Refactor TokenPreloadScanner::StartTagScanner::processAttribute() to only
3186         process attributes that make sense given the current tagId. In particular,
3187         - We only process the charset parameter if the tag is a link or a script.
3188         - We only process the sizes / srcset attributes if the tag is an img.
3189
3190         * html/parser/HTMLPreloadScanner.cpp:
3191         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
3192         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted.
3193
3194 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3195
3196         Binding generator XXConstructor::finishCreation should take references as parameters
3197         https://bugs.webkit.org/show_bug.cgi?id=149838
3198
3199         Reviewed by Darin Adler.
3200
3201         Updated the binding generator so that XXConstructor::finishCreation
3202         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
3203
3204         Covered by rebased binding tests.
3205
3206         * bindings/scripts/CodeGeneratorJS.pm:
3207         (GenerateConstructorDeclaration):
3208         (GenerateConstructorHelperMethods):
3209         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3210         (WebCore::JSTestActiveDOMObjectConstructor::create):
3211         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
3212         * bindings/scripts/test/JS/JSTestCallback.cpp:
3213         (WebCore::JSTestCallbackConstructor::create):
3214         (WebCore::JSTestCallbackConstructor::finishCreation):
3215         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3216         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
3217         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3218         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3219         (WebCore::JSTestCustomNamedGetterConstructor::create):
3220         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
3221         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3222         (WebCore::JSTestEventConstructorConstructor::create):
3223         (WebCore::JSTestEventConstructorConstructor::finishCreation):
3224         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3225         (WebCore::JSTestEventTargetConstructor::create):
3226         (WebCore::JSTestEventTargetConstructor::finishCreation):
3227         * bindings/scripts/test/JS/JSTestException.cpp:
3228         (WebCore::JSTestExceptionConstructor::create):
3229         (WebCore::JSTestExceptionConstructor::finishCreation):
3230         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3231         (WebCore::JSTestGenerateIsReachableConstructor::create):
3232         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
3233         * bindings/scripts/test/JS/JSTestInterface.cpp:
3234         (WebCore::JSTestInterfaceConstructor::create):
3235         (WebCore::JSTestInterfaceConstructor::finishCreation):
3236         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3237         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
3238         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
3239         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3240         (WebCore::JSTestMediaQueryListListenerConstructor::create):
3241         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
3242         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3243         (WebCore::JSTestNamedConstructorConstructor::create):
3244         (WebCore::JSTestNamedConstructorNamedConstructor::create):
3245         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
3246         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
3247         * bindings/scripts/test/JS/JSTestNode.cpp:
3248         (WebCore::JSTestNodeConstructor::create):
3249         (WebCore::JSTestNodeConstructor::finishCreation):
3250         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3251         (WebCore::JSTestNondeterministicConstructor::create):
3252         (WebCore::JSTestNondeterministicConstructor::finishCreation):
3253         * bindings/scripts/test/JS/JSTestObj.cpp:
3254         (WebCore::JSTestObjConstructor::create):
3255         (WebCore::JSTestObjConstructor::finishCreation):
3256         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3257         (WebCore::JSTestOverloadedConstructorsConstructor::create):
3258         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3259         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3260         (WebCore::JSTestOverrideBuiltinsConstructor::create):
3261         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
3262         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3263         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
3264         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
3265         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3266         (WebCore::JSTestTypedefsConstructor::create):
3267         (WebCore::JSTestTypedefsConstructor::finishCreation):
3268         * bindings/scripts/test/JS/JSattribute.cpp:
3269         (WebCore::JSattributeConstructor::create):
3270         (WebCore::JSattributeConstructor::finishCreation):
3271         * bindings/scripts/test/JS/JSreadonly.cpp:
3272         (WebCore::JSreadonlyConstructor::create):
3273         (WebCore::JSreadonlyConstructor::finishCreation):
3274
3275 2015-10-06  Jiewen Tan  <jiewen_tan@apple.com>
3276
3277         Fix crash in ApplyStyleCommand::applyRelativeFontStyleChange()
3278         https://bugs.webkit.org/show_bug.cgi?id=149300
3279         <rdar://problem/22747046>
3280
3281         Reviewed by Chris Dumez.
3282
3283         This is a merge of Blink r167845 and r194944:
3284         https://codereview.chromium.org/177093016
3285         https://codereview.chromium.org/1124863003
3286
3287         Test: editing/style/apply-style-crash2.html
3288               editing/style/apply-style-crash3.html
3289
3290         * editing/ApplyStyleCommand.cpp:
3291         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3292         The issue was that we would traverse the DOM tree past the beyondEnd 
3293         under some circumstances and thus NodeTraversal::next() would return 
3294         null unexpectedly. This CL adds a check to make sure startNode != beyondEnd 
3295         before traversing to avoid the problem.
3296
3297         Besides that, this CL hardens changing font style over unknown elements.
3298         When adjusting the start node position of where to apply a font style
3299         command, check that we haven't stepped off the end.
3300
3301         This CL also adds a few more assertions to catch similar issues 
3302         more easily in the future.
3303
3304 2015-10-06  Javier Fernandez  <jfernandez@igalia.com>
3305
3306         [CSS Grid Layout] Don't need to reset auto-margins during grid items layout
3307         https://bugs.webkit.org/show_bug.cgi?id=149764
3308
3309         Reviewed by Darin Adler.
3310
3311         This patch implements a refactoring of the auto-margin alignment code for grid
3312         items so it uses start/end and before/after margin logic terms.
3313
3314         I addition, it avoids resetting the auto-margin values, which requires an extra
3315         layout, before applying the alignment logic.
3316
3317         No new tests because there is no behavior change.
3318
3319         * rendering/RenderGrid.cpp:
3320         (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Computing margins if child needs layout.
3321         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
3322         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded): Using start/end logical margins.
3323         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded): Using before/after logical margins.
3324         (WebCore::RenderGrid::columnAxisOffsetForChild): Just added comment.
3325         (WebCore::RenderGrid::rowAxisOffsetForChild): Just added comment.
3326
3327 2015-10-06  Tim Horton  <timothy_horton@apple.com>
3328
3329         Tile map shows a green rect when threaded scrolling is disabled
3330         https://bugs.webkit.org/show_bug.cgi?id=149716
3331
3332         Reviewed by Darin Adler.
3333
3334         Green is supposed to indicate that we're using the fast path; if threaded
3335         scrolling is disabled, we're definitely not doing that.
3336
3337         * platform/graphics/TiledBacking.h:
3338         * platform/graphics/ca/TileController.cpp:
3339         (WebCore::TileController::TileController):
3340         * platform/graphics/ca/TileCoverageMap.cpp:
3341         (WebCore::TileCoverageMap::update):
3342         Default to the "we have no ScrollingCoordinator" purple indication;
3343         if a ScrollingCoordinator comes along it will setScrollingModeIndication
3344         and change it from this default.
3345
3346 2015-10-06  Zalan Bujtas  <zalan@apple.com>
3347
3348         Remove redundant isComposited() function and replace
3349         hasLayer() && layer()->isComposited() with RenderObject::isComposited().
3350         https://bugs.webkit.org/show_bug.cgi?id=149846
3351
3352         Reviewed by Simon Fraser.
3353
3354         No change in functionality.
3355
3356         * rendering/RenderLayerCompositor.cpp:
3357         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
3358         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
3359         * rendering/RenderObject.cpp:
3360         (WebCore::RenderObject::repaintUsingContainer):
3361         * rendering/RenderThemeMac.mm:
3362         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3363         * rendering/RenderView.cpp:
3364         (WebCore::rendererObscuresBackground):
3365         (WebCore::isComposited): Deleted.
3366         * rendering/RenderWidget.cpp:
3367         (WebCore::RenderWidget::setWidgetGeometry):
3368
3369 2015-10-06  Commit Queue  <commit-queue@webkit.org>
3370
3371         Unreviewed, rolling out r190619.
3372         https://bugs.webkit.org/show_bug.cgi?id=149849
3373
3374         borke the binding tests on iOS at least (Requested by youenn
3375         on #webkit).
3376
3377         Reverted changeset:
3378
3379         "Binding generator XXConstructor::finishCreation should take
3380         references as parameters"
3381         https://bugs.webkit.org/show_bug.cgi?id=149838
3382         http://trac.webkit.org/changeset/190619
3383
3384 2015-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
3385
3386         Slider knobs should scale when rendering while zoomed
3387         https://bugs.webkit.org/show_bug.cgi?id=149835
3388         <rdar://problem/22897080>
3389
3390         Reviewed by Darin Adler.
3391
3392         Make slider knobs follow suit with the rest of the unscaled form controls
3393         by rendering to an offscreen buffer when the page is zoomed or scaled and
3394         then rendering a scaled version of the offscreen buffer onto the page.
3395
3396         * platform/mac/ThemeMac.mm:
3397         (WebCore::drawCellOrFocusRingIntoRectWithView): Helper function for drawing
3398             cells and/or focus rings.
3399         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Refactored to
3400             handle drawing slider knobs as well.
3401         * rendering/RenderThemeMac.mm:
3402         (WebCore::RenderThemeMac::paintSliderThumb): Use scaled rendering when necessary.
3403
3404 2015-10-06  Chris Dumez  <cdumez@apple.com>
3405
3406         [Web IDL] 'length' property is wrong for variadic operations
3407         https://bugs.webkit.org/show_bug.cgi?id=149714
3408
3409         Reviewed by Darin Adler.
3410
3411         The value of the 'length' property was wrong for variadic operations:
3412         - https://heycam.github.io/webidl/#dfn-optional-argument
3413
3414         The final argument of a variadic operation is considered to be an
3415         optional argument. Therefore, we should not account for it when
3416         computing the value of the 'length' property. This patch fixes WebKit's
3417         behavior to match the specification.
3418
3419         Test: fast/dom/variadic-operations-length.html
3420
3421         * bindings/scripts/CodeGeneratorJS.pm:
3422         (GetFunctionLength):
3423         * bindings/scripts/test/JS/JSTestObj.cpp:
3424         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3425         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3426
3427 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3428
3429         Binding generator should add builtin header for JSBuiltin attributes
3430         https://bugs.webkit.org/show_bug.cgi?id=149837
3431
3432         Reviewed by Darin Adler.
3433
3434         Ensured XXBuiltins.h header is included for builtin attributes.
3435         Renamed AddIncludesForJSBuiltinMethods as AddJSBuiltinIncludesIfNeeded.
3436         Test loop is done through all functions and attributes to handle conditional correctly.
3437
3438         Covered by existing and added binding tests.
3439
3440         * bindings/scripts/CodeGeneratorJS.pm:
3441         (GenerateImplementation):
3442         (AddJSBuiltinIncludesIfNeeded):
3443         * bindings/scripts/test/JS/JSTestObj.cpp:
3444         * bindings/scripts/test/ObjC/DOMTestObj.h:
3445         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3446         * bindings/scripts/test/TestObj.idl:
3447
3448 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3449
3450         Binding generator XXConstructor::finishCreation should take references as parameters
3451         https://bugs.webkit.org/show_bug.cgi?id=149838
3452
3453         Reviewed by Darin Adler.
3454
3455         Updated the binding generator so that XXConstructor::finishCreation
3456         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
3457
3458         Covered by rebased binding tests.
3459
3460         * bindings/scripts/CodeGeneratorJS.pm:
3461         (GenerateConstructorDeclaration):
3462         (GenerateConstructorHelperMethods):
3463         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3464         (WebCore::JSTestActiveDOMObjectConstructor::create):
3465         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
3466         * bindings/scripts/test/JS/JSTestCallback.cpp:
3467         (WebCore::JSTestCallbackConstructor::create):
3468         (WebCore::JSTestCallbackConstructor::finishCreation):
3469         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3470         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
3471         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3472         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3473         (WebCore::JSTestCustomNamedGetterConstructor::create):
3474         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
3475         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3476         (WebCore::JSTestEventConstructorConstructor::create):
3477         (WebCore::JSTestEventConstructorConstructor::finishCreation):
3478         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3479         (WebCore::JSTestEventTargetConstructor::create):
3480         (WebCore::JSTestEventTargetConstructor::finishCreation):
3481         * bindings/scripts/test/JS/JSTestException.cpp:
3482         (WebCore::JSTestExceptionConstructor::create):
3483         (WebCore::JSTestExceptionConstructor::finishCreation):
3484         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3485         (WebCore::JSTestGenerateIsReachableConstructor::create):
3486         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
3487         * bindings/scripts/test/JS/JSTestInterface.cpp:
3488         (WebCore::JSTestInterfaceConstructor::create):
3489         (WebCore::JSTestInterfaceConstructor::finishCreation):
3490         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3491         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
3492         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
3493         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3494         (WebCore::JSTestMediaQueryListListenerConstructor::create):
3495         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
3496         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3497         (WebCore::JSTestNamedConstructorConstructor::create):
3498         (WebCore::JSTestNamedConstructorNamedConstructor::create):
3499         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
3500         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
3501         * bindings/scripts/test/JS/JSTestNode.cpp:
3502         (WebCore::JSTestNodeConstructor::create):
3503         (WebCore::JSTestNodeConstructor::finishCreation):
3504         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3505         (WebCore::JSTestNondeterministicConstructor::create):
3506         (WebCore::JSTestNondeterministicConstructor::finishCreation):
3507         * bindings/scripts/test/JS/JSTestObj.cpp:
3508         (WebCore::JSTestObjConstructor::create):
3509         (WebCore::JSTestObjConstructor::finishCreation):
3510         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3511         (WebCore::JSTestOverloadedConstructorsConstructor::create):
3512         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3513         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3514         (WebCore::JSTestOverrideBuiltinsConstructor::create):
3515         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
3516         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3517         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
3518         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
3519         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3520         (WebCore::JSTestTypedefsConstructor::create):
3521         (WebCore::JSTestTypedefsConstructor::finishCreation):
3522         * bindings/scripts/test/JS/JSattribute.cpp:
3523         (WebCore::JSattributeConstructor::create):
3524         (WebCore::JSattributeConstructor::finishCreation):
3525         * bindings/scripts/test/JS/JSreadonly.cpp:
3526         (WebCore::JSreadonlyConstructor::create):
3527         (WebCore::JSreadonlyConstructor::finishCreation):
3528
3529 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
3530
3531         [Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
3532         https://bugs.webkit.org/show_bug.cgi?id=149752
3533
3534         Reviewed by Carlos Garcia Campos.
3535
3536         CG's low interpolation quality setting is equivalent to most other browsers default or high settings.
3537
3538         * html/canvas/CanvasRenderingContext2D.cpp:
3539         (WebCore::CanvasRenderingContext2D::State::State):
3540
3541 2015-10-06  Daniel Bates  <dbates@webkit.org>
3542
3543         Enable XSLT when building WebKit for iOS using the public iOS SDK
3544         https://bugs.webkit.org/show_bug.cgi?id=149827
3545
3546         Reviewed by Alexey Proskuryakov.
3547
3548         * Configurations/FeatureDefines.xcconfig:
3549
3550 2015-10-06  Brent Fulgham  <bfulgham@apple.com>
3551
3552         [Win] Correct positioning error introduced in r190235
3553         https://bugs.webkit.org/show_bug.cgi?id=149631
3554         <rdar://problem/22635080>
3555
3556         Reviewed by Simon Fraser.
3557
3558         Covered by existing compositing tests:
3559           css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html
3560           fast/layers/no-clipping-overflow-hidden-added-after-transform.html
3561           fast/layers/no-clipping-overflow-hidden-added-after-transition.html
3562           fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
3563           transforms/2d/preserve3d-not-fixed-container.html
3564
3565         * platform/graphics/ca/TileGrid.cpp:
3566         (TileGrid::platformCALayerPaintContents): No need to do this extra flipping step
3567         on Windows.
3568         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3569         (PlatformCALayerWinInternal::displayCallback): We should always flip the
3570         coordinate system when drawing these layers on Windows.
3571         (shouldInvertBeforeDrawingContent): Deleted.
3572         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
3573         (WebTiledBackingLayerWin::displayCallback): We do not need to flip coordinates
3574         for these tiled layers; that's already accounted for in common tile drawing code.
3575
3576 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
3577
3578         Fix ENABLE_OPENGL=OFF builds
3579         https://bugs.webkit.org/show_bug.cgi?id=146511
3580
3581         Reviewed by Darin Adler.
3582
3583         * platform/graphics/texmap/BitmapTextureGL.h:
3584         * platform/graphics/texmap/BitmapTextureGL.cpp:
3585         * platform/graphics/texmap/TextureMapperGL.h:
3586         * platform/graphics/texmap/TextureMapperGL.cpp:
3587         * platform/graphics/texmap/TextureMapperShaderProgram.h:
3588         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
3589         Fix TEXTURE_MAPPER_GL vs. TEXTURE_MAPPER guards to make sure that
3590         ENABLE_OPENGL=OFF only disables the GL-related parts.
3591
3592 2015-10-06  Alex Christensen  <achristensen@webkit.org>
3593
3594         Fix Windows build after r190611.
3595
3596         * PlatformWin.cmake:
3597         Forward headers from contentextensions.
3598
3599 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
3600
3601         Use modern for-loops in WebCore/html.
3602         https://bugs.webkit.org/show_bug.cgi?id=149662
3603
3604         Reviewed by Darin Adler.
3605
3606         No new tests because there is no behavior change.
3607
3608         * html/DOMFormData.cpp:
3609         (WebCore::DOMFormData::DOMFormData):
3610         * html/EmailInputType.cpp:
3611         (WebCore::EmailInputType::typeMismatchFor):
3612         * html/FileInputType.cpp:
3613         (WebCore::FileInputType::receiveDroppedFiles):
3614         * html/FormController.cpp:
3615         (WebCore::FormControlState::serializeTo):
3616         (WebCore::FormControlState::deserialize):
3617         (WebCore::SavedFormState::serializeTo):
3618         (WebCore::SavedFormState::getReferencedFilePaths):
3619         (WebCore::FormController::createSavedFormStateMap):
3620         (WebCore::FormController::formElementsState):
3621         (WebCore::FormController::restoreControlStateIn):
3622         (WebCore::FormController::getReferencedFilePaths):
3623         * html/HTMLAnchorElement.cpp:
3624         (WebCore::hasNonEmptyBox):
3625         * html/HTMLCanvasElement.cpp:
3626         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
3627         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
3628         (WebCore::HTMLCanvasElement::reset):
3629         (WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer):
3630         * html/HTMLFieldSetElement.cpp:
3631         (WebCore::HTMLFieldSetElement::length):
3632         * html/HTMLFormControlsCollection.cpp:
3633         (WebCore::firstNamedItem):
3634         * html/HTMLFormElement.cpp:
3635         (WebCore::HTMLFormElement::~HTMLFormElement):
3636         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
3637         (WebCore::HTMLFormElement::removedFrom):
3638         (WebCore::HTMLFormElement::length):
3639         (WebCore::HTMLFormElement::submitImplicitly):
3640         (WebCore::HTMLFormElement::validateInteractively):
3641         (WebCore::HTMLFormElement::getTextFieldValues):
3642         (WebCore::HTMLFormElement::submit):
3643         (WebCore::HTMLFormElement::reset):
3644         (WebCore::HTMLFormElement::defaultButton):
3645         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
3646         (WebCore::HTMLFormElement::removeFromPastNamesMap):
3647         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
3648         * html/HTMLInputElement.cpp:
3649         (WebCore::parseAcceptAttribute):
3650         * html/HTMLKeygenElement.cpp:
3651         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3652         * html/HTMLMediaElement.cpp:
3653         (WebCore::HTMLMediaElement::setMediaGroup):
3654         * html/HTMLOptionElement.cpp:
3655         (WebCore::HTMLOptionElement::index):
3656         * html/HTMLSelectElement.cpp:
3657         (WebCore::HTMLSelectElement::saveLastSelection):
3658         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3659         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
3660         (WebCore::HTMLSelectElement::selectedIndex):
3661         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
3662         (WebCore::HTMLSelectElement::saveFormControlState):
3663         (WebCore::HTMLSelectElement::restoreFormControlState):
3664         (WebCore::HTMLSelectElement::appendFormData):
3665         (WebCore::HTMLSelectElement::reset):
3666         * html/HTMLTextAreaElement.cpp:
3667         (WebCore::HTMLTextAreaElement::setDefaultValue):
3668         * html/InputType.cpp:
3669         (WebCore::populateInputTypeFactoryMap):
3670         * html/MediaController.cpp:
3671         (MediaController::duration):
3672         (MediaController::setCurrentTime):
3673         (MediaController::play):
3674         (MediaController::setPlaybackRate):
3675         (MediaController::setVolume):
3676         (MediaController::setMuted):
3677         (playbackStateWaiting):
3678         (MediaController::updateMediaElements):
3679         (MediaController::bringElementUpToSpeed):
3680         (MediaController::isBlocked):
3681         (MediaController::hasEnded):
3682         (MediaController::asyncEventTimerFired):
3683         (MediaController::clearPositionTimerFired):
3684         (MediaController::hasAudio):
3685         (MediaController::hasVideo):
3686         (MediaController::hasClosedCaptions):
3687         (MediaController::setClosedCaptionsVisible):
3688         (MediaController::supportsScanning):
3689         (MediaController::beginScrubbing):
3690         (MediaController::endScrubbing):
3691         (MediaController::canPlay):
3692         (MediaController::isLiveStream):
3693         (MediaController::hasCurrentSrc):
3694         (MediaController::returnToRealtime):
3695         * html/MediaFragmentURIParser.cpp:
3696         (WebCore::MediaFragmentURIParser::parseTimeFragment):
3697         * html/PublicURLManager.cpp:
3698         (WebCore::PublicURLManager::revoke):
3699         (WebCore::PublicURLManager::stop):
3700         * html/canvas/WebGLBuffer.cpp:
3701         (WebCore::WebGLBuffer::getCachedMaxIndex):
3702         (WebCore::WebGLBuffer::setCachedMaxIndex):
3703         (WebCore::WebGLBuffer::setTarget):
3704         * html/canvas/WebGLContextGroup.cpp:
3705         (WebCore::WebGLContextGroup::loseContextGroup):
3706         * html/canvas/WebGLDrawBuffers.cpp:
3707         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
3708         * html/canvas/WebGLFramebuffer.cpp:
3709         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
3710         (WebCore::WebGLFramebuffer::checkStatus):
3711         (WebCore::WebGLFramebuffer::deleteObjectImpl):
3712         (WebCore::WebGLFramebuffer::initializeAttachments):
3713         (WebCore::WebGLFramebuffer::drawBuffers):
3714         * html/canvas/WebGLRenderingContextBase.cpp:
3715         (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
3716         (WebCore::WebGLRenderingContextBase::deleteTexture):
3717         * html/canvas/WebGLVertexArrayObject.cpp:
3718         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
3719         * html/canvas/WebGLVertexArrayObjectOES.cpp:
3720         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
3721         * html/parser/AtomicHTMLToken.h:
3722         (WebCore::AtomicHTMLToken::initializeAttributes):
3723         * html/parser/HTMLConstructionSite.cpp:
3724         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3725         * html/parser/HTMLFormattingElementList.cpp:
3726         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
3727         * html/parser/HTMLPreloadScanner.cpp:
3728         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3729         * html/parser/XSSAuditor.cpp:
3730         (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
3731         * html/shadow/ContentDistributor.cpp:
3732         (WebCore::ContentDistributor::distribute):
3733         (WebCore::ContentDistributor::invalidate):
3734         * html/shadow/MediaControlElements.cpp:
3735         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
3736         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
3737         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
3738         * html/track/AudioTrackList.cpp:
3739         (AudioTrackList::getTrackById):
3740         * html/track/LoadableTextTrack.cpp:
3741         (WebCore::LoadableTextTrack::newCuesAvailable):
3742         (WebCore::LoadableTextTrack::newRegionsAvailable):
3743         * html/track/TextTrackCueList.cpp:
3744         (WebCore::TextTrackCueList::getCueById):
3745         (WebCore::TextTrackCueList::activeCues):
3746         * html/track/TextTrackList.cpp:
3747         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
3748         (TextTrackList::invalidateTrackIndexesAfterTrack):
3749         * html/track/TrackListBase.cpp:
3750         (TrackListBase::isAnyTrackEnabled):
3751         * html/track/VideoTrackList.cpp:
3752         (VideoTrackList::getTrackById):
3753
3754 2015-10-06  Alex Christensen  <achristensen@webkit.org>
3755
3756         Report error when main resource is blocked by content blocker
3757         https://bugs.webkit.org/show_bug.cgi?id=149719
3758         rdar://problem/21970595
3759
3760         Reviewed by Brady Eidson.
3761
3762         Test: http/tests/contentextensions/main-resource.html
3763
3764         * English.lproj/Localizable.strings:
3765         * contentextensions/ContentExtensionActions.h:
3766         * contentextensions/ContentExtensionError.h:
3767         (WebCore::ContentExtensions::make_error_code):
3768         * contentextensions/ContentExtensionsBackend.cpp:
3769         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
3770         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
3771         Instead of nulling out the ResourceRequest, processContentExtensionRulesForLoad 
3772         now returns a status indicating whether the request should be blocked.
3773         This is needed because the DocumentLoader needs a CachedResource with an error representing the blocking
3774         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
3775         * contentextensions/ContentExtensionsBackend.h:
3776         * html/HTMLMediaElement.cpp:
3777         (WebCore::HTMLMediaElement::loadResource):
3778         * loader/DocumentLoader.cpp:
3779         (WebCore::DocumentLoader::startLoadingMainResource):
3780         Dispatch an error if the resource is blocked by a content blocker.
3781         * loader/EmptyClients.h:
3782         * loader/FrameLoader.cpp:
3783         (WebCore::FrameLoader::loadResourceSynchronously):
3784         (WebCore::FrameLoader::cancelledError):
3785         (WebCore::FrameLoader::blockedByContentBlockerError):
3786         (WebCore::FrameLoader::connectionProperties):
3787         * loader/FrameLoader.h:
3788         * loader/FrameLoaderClient.h:
3789         * loader/ResourceLoader.cpp:
3790         (WebCore::ResourceLoader::willSendRequestInternal):
3791         * loader/cache/CachedResourceLoader.cpp:
3792         (WebCore::CachedResourceLoader::requestResource):
3793         * page/UserContentController.cpp:
3794         (WebCore::UserContentController::removeAllUserContentExtensions):
3795         (WebCore::UserContentController::processContentExtensionRulesForLoad):
3796         (WebCore::UserContentController::actionsForResourceLoad):
3797         * page/UserContentController.h:
3798         * platform/efl/ErrorsEfl.cpp:
3799         (WebCore::blockedError):
3800         (WebCore::blockedByContentBlockerError):
3801         (WebCore::cannotShowURLError):
3802         * platform/efl/ErrorsEfl.h:
3803         * platform/gtk/ErrorsGtk.cpp:
3804         (WebCore::blockedError):
3805         (WebCore::blockedByContentBlockerError):
3806         (WebCore::cannotShowURLError):
3807         * platform/gtk/ErrorsGtk.h:
3808
3809 2015-10-06  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3810
3811         JSBuiltinConstructor must always add builtin header
3812         https://bugs.webkit.org/show_bug.cgi?id=149759
3813
3814         Reviewed by Darin Adler.
3815
3816         Covered by TestJSBuiltinConstructor.idl.
3817
3818         * bindings/scripts/CodeGeneratorJS.pm:
3819         (AddIncludesForJSBuiltinMethods): Forces adding the builtin header when the JSBuiltinConstructor is present.
3820         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Expectation.
3821
3822 2015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3823
3824         Migrate streams API to JS Builtins
3825         https://bugs.webkit.org/show_bug.cgi?id=147092
3826
3827         Reviewed by Darin Adler.
3828
3829         Moved ReadableStream implementation from C++ to JS Builtins.
3830         Created specific private constructors for ReadableStreamReader and ReadableStreamController.
3831         Added these constructors to  JSDOMWindowBase.
3832         Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
3833
3834         Covered by existing tests.
3835
3836         * CMakeLists.txt:
3837         * DerivedSources.make:
3838         * Modules/streams/ReadableStream.cpp: Removed.
3839         * Modules/streams/ReadableStream.h: Removed.
3840         * Modules/streams/ReadableStream.idl:
3841         * Modules/streams/ReadableStream.js:
3842         (strategy.size):
3843         (initializeReadableStream):
3844         (cancel):
3845         (getReader):
3846         (pipeTo):
3847         (tee):
3848         (locked):
3849         * Modules/streams/ReadableStreamController.h:
3850         * Modules/streams/ReadableStreamController.idl:
3851         * Modules/streams/ReadableStreamController.js: Added.
3852         (enqueue):
3853         (error):
3854         (close):
3855         (desiredSize):
3856         * Modules/streams/ReadableStreamInternals.js:
3857         (privateInitializeReadableStreamReader):
3858         (privateInitializeReadableStreamController):
3859         (isReadableStream):
3860         (isReadableStreamReader):
3861         (isReadableStreamController):
3862         (errorReadableStream):
3863         (requestReadableStreamPull):
3864         (getReadableStreamDesiredSize):
3865         (releaseReadableStreamReader):
3866         (cancelReadableStream):
3867         (finishClosingReadableStream):
3868         (closeReadableStream):
3869         (closeReadableStreamReader):
3870         (enqueueInReadableStream):
3871         (readFromReadableStreamReader):
3872         (invokeOrNoop):
3873         (promiseInvokeOrNoop):
3874         * Modules/streams/ReadableStreamReader.cpp: Removed.
3875         * Modules/streams/ReadableStreamReader.h:
3876         * Modules/streams/ReadableStreamReader.idl:
3877         * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
3878         (cancel):
3879         (read):
3880         (releaseLock):
3881         (closed):
3882         * WebCore.vcxproj/WebCore.vcxproj:
3883         * WebCore.vcxproj/WebCore.vcxproj.filters:
3884         * WebCore.xcodeproj/project.pbxproj:
3885         * bindings/js/JSBindingsAllInOne.cpp:
3886         * bindings/js/JSDOMConstructor.h: Added.
3887         (WebCore::JSBuiltinConstructor::create):
3888         (WebCore::JSBuiltinConstructor::createStructure):
3889         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
3890         (WebCore::JSBuiltinConstructor::initializeProperties):
3891         (WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
3892         (WebCore::JSBuiltinConstructor<JSClass>::construct):
3893         (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
3894         * bindings/js/JSDOMWindowBase.cpp:
3895         (WebCore::JSDOMWindowBase::finishCreation):
3896         * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
3897         * bindings/js/JSReadableStreamCustom.cpp: Removed.
3898         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
3899         (WebCore::constructJSReadableStreamController):
3900         (WebCore::constructJSReadableStreamReader):
3901         (WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
3902         (WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
3903         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
3904         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
3905         (WebCore::createReadableStreamReaderPrivateConstructor):
3906         (WebCore::createReadableStreamControllerPrivateConstructor):
3907         * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
3908         * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
3909         * bindings/js/ReadableJSStream.cpp: Removed.
3910         * bindings/js/ReadableJSStream.h: Removed.
3911         * bindings/js/WebCoreBuiltinNames.h: Added.
3912         (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
3913         * bindings/js/WebCoreJSBuiltins.cpp:
3914         * bindings/js/WebCoreJSClientData.h:
3915         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
3916         (WebCore::WebCoreJSClientData::builtinNames):
3917         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
3918         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
3919
3920 2015-10-05  Chris Dumez  <cdumez@apple.com>
3921
3922         data: URLs should not be preloaded
3923         https://bugs.webkit.org/show_bug.cgi?id=149829
3924
3925         Reviewed by Ryosuke Niwa.
3926
3927         Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
3928         There is no need as the data is already available.
3929
3930         Test: fast/preloader/image-data-url.html
3931
3932         * html/parser/HTMLPreloadScanner.cpp:
3933         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
3934
3935 2015-10-05  Jer Noble  <jer.noble@apple.com>
3936
3937         [iOS] REGRESSION(r190434): Media continues to play when locking screen
3938         https://bugs.webkit.org/show_bug.cgi?id=149822
3939
3940         Reviewed by Brent Fulgham.
3941
3942         In MediaSessionManagerIOS.mm, both -applicationWillEnterForeground: and
3943         -applicationDidBecomeActive: called
3944         PlatformMediaSessionManager::applicationWillEnterForeground(), leading to the
3945         PlatformMediaSession's m_interruptionCount becoming increasingly unbalanced.
3946
3947         Rename PlatformMediaSessionManager::applicationWillEnterForeground() to
3948         applicationDidEnterForeground() to more correctly reflect when this notification will be
3949         called. Add a new method, MediaSessionManagerIOS::applicationWillEnterForeground(bool),
3950         whose paramater is whether the screen was locked. This allows the beginInterruption() and
3951         endInterruption() methods to be correctly balanced.
3952
3953         Drive-by fix: remove the unimplemented declarations for application{will,did}Enter{Fore,Back}ground()
3954         from PlatformMediaSession.h.
3955
3956         * platform/audio/PlatformMediaSession.h:
3957         * platform/audio/PlatformMediaSessionManager.cpp:
3958         (WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
3959         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): Deleted.
3960         * platform/audio/PlatformMediaSessionManager.h:
3961         * platform/audio/ios/MediaSessionManagerIOS.h:
3962         * platform/audio/ios/MediaSessionManagerIOS.mm:
3963         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
3964         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
3965         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
3966         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
3967         * testing/Internals.cpp:
3968         (WebCore::Internals::applicationDidEnterForeground):
3969         (WebCore::Internals::applicationWillEnterForeground): Deleted.
3970         * testing/Internals.h:
3971         * testing/Internals.idl:
3972
3973 2015-10-05  Alex Christensen  <achristensen@webkit.org>
3974
3975         Invalid CSS Selector for Content Blockers invalidates others
3976         https://bugs.webkit.org/show_bug.cgi?id=148446
3977         rdar://problem/22918235
3978
3979         Reviewed by Benjamin Poulain.
3980
3981         Test: http/tests/contentextensions/invalid-selector.html
3982
3983         * contentextensions/ContentExtensionParser.cpp:
3984         (WebCore::ContentExtensions::loadTrigger):
3985         (WebCore::ContentExtensions::isValidSelector):
3986         (WebCore::ContentExtensions::loadAction):
3987         (WebCore::ContentExtensions::loadRule):
3988         Add a check to see if a selector is valid before adding it.
3989
3990 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
3991
3992         CSSGradientValue should check whether gradientLength is zero or not.
3993         https://bugs.webkit.org/show_bug.cgi?id=149373
3994         <rdar://problem/22771418>
3995
3996         Reviewed by Darin Adler.
3997
3998         This is a merge of Blink r158220,
3999         https://chromiumcodereview.appspot.com/24350008
4000
4001         Test: fast/gradients/css3-repeating-radial-gradients-crash.html
4002
4003         * css/CSSGradientValue.cpp:
4004         (WebCore::CSSGradientValue::addStops):
<