ed539abde134c30abb6176156b8ba11b100cc097
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
2
3         Remove ColorSpace argument to all the drawing calls
4         https://bugs.webkit.org/show_bug.cgi?id=150967
5
6         Reviewed by Darin Adler.
7
8         Since the -webkit-color-correction CSS property was removed in r188202, and ColorSpaceDeviceRGB
9         and ColorSpaceSRGB are functionally equivalent, we can remove all the ColorSpace arguments passed
10         to drawing functions, and remove RenderStyle::colorSpace(), which was hardcoded to return ColorSpaceSRGB.
11         
12         Fill and stroke ColorSpaces are also remove from graphics state, simplifying color save/restore.
13         
14         * bindings/scripts/CodeGeneratorObjC.pm:
15         (GenerateImplementation):
16         * css/CSSFilterImageValue.cpp:
17         (WebCore::CSSFilterImageValue::image):
18         * editing/FrameSelection.cpp:
19         (WebCore::CaretBase::paintCaret):
20         * editing/cocoa/HTMLConverter.mm:
21         (_platformColor):
22         * html/HTMLCanvasElement.cpp:
23         (WebCore::HTMLCanvasElement::paint):
24         * html/canvas/CanvasRenderingContext2D.cpp:
25         (WebCore::CanvasRenderingContext2D::clearRect):
26         (WebCore::CanvasRenderingContext2D::applyShadow):
27         (WebCore::CanvasRenderingContext2D::drawImage):
28         (WebCore::CanvasRenderingContext2D::compositeBuffer):
29         (WebCore::drawImageToContext):
30         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
31         (WebCore::CanvasRenderingContext2D::drawTextInternal):
32         * html/canvas/CanvasRenderingContext2D.h:
33         * html/canvas/CanvasStyle.cpp:
34         (WebCore::CanvasStyle::applyStrokeColor):
35         (WebCore::CanvasStyle::applyFillColor):
36         * html/canvas/WebGLRenderingContextBase.cpp:
37         (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
38         * page/DebugPageOverlays.cpp:
39         (WebCore::RegionOverlay::drawRect):
40         * page/FrameView.cpp:
41         (WebCore::FrameView::paintScrollCorner):
42         (WebCore::FrameView::paintScrollbar):
43         (WebCore::FrameView::paintContents):
44         * page/PrintContext.cpp:
45         (WebCore::PrintContext::spoolAllPagesWithBoundaries):
46         * platform/ScrollView.cpp:
47         (WebCore::ScrollView::paintPanScrollIcon):
48         * platform/ScrollbarTheme.h:
49         (WebCore::ScrollbarTheme::defaultPaintScrollCorner):
50         * platform/ScrollbarThemeComposite.cpp:
51         (WebCore::ScrollbarThemeComposite::paintScrollCorner):
52         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
53         * platform/Theme.cpp:
54         (WebCore::Theme::drawNamedImage):
55         * platform/cocoa/ThemeCocoa.cpp:
56         (WebCore::ThemeCocoa::drawNamedImage):
57         * platform/graphics/BitmapImage.cpp:
58         (WebCore::BitmapImage::drawPattern):
59         * platform/graphics/BitmapImage.h:
60         * platform/graphics/Color.h:
61         * platform/graphics/CrossfadeGeneratedImage.cpp:
62         (WebCore::drawCrossfadeSubimage):
63         (WebCore::CrossfadeGeneratedImage::draw):
64         (WebCore::CrossfadeGeneratedImage::drawPattern):
65         * platform/graphics/CrossfadeGeneratedImage.h:
66         * platform/graphics/GeneratedImage.h:
67         * platform/graphics/GradientImage.cpp:
68         (WebCore::GradientImage::draw):
69         (WebCore::GradientImage::drawPattern):
70         * platform/graphics/GradientImage.h:
71         * platform/graphics/GraphicsContext.cpp:
72         (WebCore::GraphicsContext::drawRaisedEllipse):
73         (WebCore::GraphicsContext::setStrokeColor):
74         (WebCore::GraphicsContext::setShadow):
75         (WebCore::GraphicsContext::setLegacyShadow):
76         (WebCore::GraphicsContext::getShadow):
77         (WebCore::GraphicsContext::setFillColor):
78         (WebCore::GraphicsContext::drawImage):
79         (WebCore::GraphicsContext::drawTiledImage):
80         (WebCore::GraphicsContext::drawImageBuffer):
81         (WebCore::GraphicsContext::fillRect):
82         (WebCore::GraphicsContext::fillRoundedRect):
83         (WebCore::GraphicsContext::fillRectWithRoundedHole):
84         (WebCore::GraphicsContext::clearShadow): Deleted.
85         * platform/graphics/GraphicsContext.h:
86         (WebCore::GraphicsContext::strokeColorSpace): Deleted.
87         (WebCore::GraphicsContext::fillColorSpace): Deleted.
88         * platform/graphics/Image.cpp:
89         (WebCore::Image::fillWithSolidColor):
90         (WebCore::Image::drawTiled):
91         * platform/graphics/Image.h:
92         (WebCore::Image::drawFrameMatchingSourceSize):
93         * platform/graphics/ImageBuffer.h:
94         (WebCore::ImageBuffer::create):
95         * platform/graphics/NamedImageGeneratedImage.cpp:
96         (WebCore::NamedImageGeneratedImage::draw):
97         (WebCore::NamedImageGeneratedImage::drawPattern):
98         * platform/graphics/NamedImageGeneratedImage.h:
99         * platform/graphics/ShadowBlur.cpp:
100         (WebCore::ScratchBuffer::setCachedShadowValues):
101         (WebCore::ScratchBuffer::setCachedInsetShadowValues):
102         (WebCore::ShadowBlur::ShadowBlur):
103         (WebCore::ShadowBlur::setShadowValues):
104         (WebCore::ShadowBlur::drawShadowBuffer):
105         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
106         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
107         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
108         (WebCore::ShadowBlur::drawRectShadowWithTiling):
109         (WebCore::ShadowBlur::drawLayerPieces):
110         (WebCore::ShadowBlur::blurAndColorShadowBuffer):
111         (WebCore::ShadowBlur::beginShadowLayer):
112         (WebCore::ShadowBlur::endShadowLayer):
113         * platform/graphics/ShadowBlur.h:
114         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
115         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
116         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
117         * platform/graphics/ca/GraphicsLayerCA.cpp:
118         (WebCore::GraphicsLayerCA::setContentsToImage): Deleted.
119         * platform/graphics/ca/TileGrid.cpp:
120         (WebCore::TileGrid::platformCALayerPaintContents):
121         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
122         (PlatformCALayerWinInternal::drawRepaintCounters):
123         * platform/graphics/cairo/BitmapImageCairo.cpp:
124         (WebCore::BitmapImage::draw):
125         * platform/graphics/cairo/GraphicsContextCairo.cpp:
126         (WebCore::GraphicsContext::fillRect):
127         (WebCore::GraphicsContext::setPlatformFillColor):
128         (WebCore::GraphicsContext::setPlatformStrokeColor):
129         (WebCore::GraphicsContext::setPlatformShadow):
130         (WebCore::GraphicsContext::platformFillRoundedRect):
131         (WebCore::GraphicsContext::fillRectWithRoundedHole):
132         (WebCore::GraphicsContext::drawPattern):
133         * platform/graphics/cairo/ImageBufferCairo.cpp:
134         (WebCore::ImageBuffer::draw):
135         (WebCore::ImageBuffer::drawPattern):
136         * platform/graphics/cairo/ImageCairo.cpp:
137         (WebCore::Image::drawPattern):
138         * platform/graphics/cg/BitmapImageCG.cpp:
139         (WebCore::BitmapImage::draw):
140         * platform/graphics/cg/ColorCG.cpp:
141         (WebCore::leakCGColor):
142         (WebCore::cachedCGColor):
143         * platform/graphics/cg/GraphicsContext3DCG.cpp:
144         (WebCore::GraphicsContext3D::paintToCanvas):
145         * platform/graphics/cg/GraphicsContextCG.cpp:
146         (WebCore::setCGFillColor):
147         (WebCore::setCGStrokeColor):
148         (WebCore::GraphicsContext::platformInit):
149         (WebCore::GraphicsContext::drawNativeImage):
150         (WebCore::GraphicsContext::drawPattern):
151         (WebCore::GraphicsContext::drawRect):
152         (WebCore::GraphicsContext::drawLine):
153         (WebCore::GraphicsContext::applyFillPattern):
154         (WebCore::GraphicsContext::fillRect):
155         (WebCore::GraphicsContext::platformFillRoundedRect):
156         (WebCore::GraphicsContext::fillRectWithRoundedHole):
157         (WebCore::GraphicsContext::setPlatformShadow):
158         (WebCore::GraphicsContext::drawLinesForText):
159         (WebCore::GraphicsContext::setPlatformStrokeColor):
160         (WebCore::GraphicsContext::setPlatformFillColor):
161         (WebCore::sRGBColorSpaceRef): Deleted.
162         * platform/graphics/cg/ImageBufferCG.cpp:
163         (WebCore::ImageBuffer::copyImage):
164         (WebCore::ImageBuffer::draw):
165         (WebCore::ImageBuffer::drawPattern):
166         * platform/graphics/cg/ImageCG.cpp:
167         (WebCore::Image::drawPattern):
168         (WebCore::Image::imageWithColorSpace): Deleted.
169         * platform/graphics/cg/PDFDocumentImage.cpp:
170         (WebCore::PDFDocumentImage::draw):
171         * platform/graphics/cg/PDFDocumentImage.h:
172         * platform/graphics/cocoa/FontCascadeCocoa.mm:
173         (WebCore::FontCascade::drawGlyphs):
174         * platform/graphics/filters/FEBlend.cpp:
175         (WebCore::FEBlend::platformApplySoftware):
176         * platform/graphics/filters/FEColorMatrix.cpp:
177         (WebCore::FEColorMatrix::platformApplySoftware):
178         * platform/graphics/filters/FEComposite.cpp:
179         (WebCore::FEComposite::platformApplySoftware):
180         * platform/graphics/filters/FEDropShadow.cpp:
181         (WebCore::FEDropShadow::platformApplySoftware):
182         * platform/graphics/filters/FEFlood.cpp:
183         (WebCore::FEFlood::platformApplySoftware):
184         * platform/graphics/filters/FEMerge.cpp:
185         (WebCore::FEMerge::platformApplySoftware):
186         * platform/graphics/filters/FEOffset.cpp:
187         (WebCore::FEOffset::platformApplySoftware):
188         * platform/graphics/filters/FETile.cpp:
189         (WebCore::FETile::platformApplySoftware):
190         * platform/graphics/filters/SourceAlpha.cpp:
191         (WebCore::SourceAlpha::platformApplySoftware):
192         * platform/graphics/filters/SourceGraphic.cpp:
193         (WebCore::SourceGraphic::platformApplySoftware):
194         * platform/graphics/ios/IconIOS.mm:
195         (WebCore::Icon::paint):
196         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
197         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
198         * platform/graphics/win/FontCGWin.cpp:
199         (WebCore::FontCascade::drawGlyphs):
200         * platform/graphics/win/GraphicsContextCGWin.cpp:
201         (WebCore::GraphicsContext::drawFocusRing):
202         * platform/graphics/win/ImageCGWin.cpp:
203         (WebCore::BitmapImage::getHBITMAPOfSize):
204         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
205         * platform/graphics/win/ImageCairoWin.cpp:
206         (WebCore::BitmapImage::getHBITMAPOfSize):
207         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
208         * platform/ios/LegacyTileCache.mm:
209         (WebCore::LegacyTileCache::drawLayer):
210         * platform/ios/LegacyTileGridTile.mm:
211         (WebCore::LegacyTileGridTile::showBorder):
212         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
213         (WebVideoFullscreenControllerContext::didSetupFullscreen):
214         * platform/mac/DragImageMac.mm:
215         (WebCore::drawAtPoint):
216         * platform/mac/ScrollbarThemeMac.mm:
217         (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
218         * platform/mac/ThemeMac.mm:
219         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
220         * platform/mediastream/MediaStreamPrivate.cpp:
221         (WebCore::MediaStreamPrivate::paintCurrentFrameInContext):
222         * platform/mock/ScrollbarThemeMock.cpp:
223         (WebCore::ScrollbarThemeMock::paintTrackBackground):
224         (WebCore::ScrollbarThemeMock::paintThumb):
225         * platform/win/DragImageWin.cpp:
226         (WebCore::createDragImageForLink):
227         * platform/win/PopupMenuWin.cpp:
228         (WebCore::PopupMenuWin::paint):
229         * platform/win/WebCoreTextRenderer.cpp:
230         (WebCore::doDrawTextAtPoint):
231         * rendering/EllipsisBox.cpp:
232         (WebCore::EllipsisBox::paint):
233         (WebCore::EllipsisBox::paintSelection):
234         * rendering/FilterEffectRenderer.cpp:
235         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
236         * rendering/InlineTextBox.cpp:
237         (WebCore::InlineTextBox::paintSelection):
238         (WebCore::InlineTextBox::paintCompositionBackground):
239         (WebCore::InlineTextBox::paintDecoration):
240         (WebCore::InlineTextBox::paintTextMatchMarker):
241         (WebCore::InlineTextBox::paintCompositionUnderline):
242         * rendering/RenderBlock.cpp:
243         (WebCore::RenderBlock::blockSelectionGap):
244         (WebCore::RenderBlock::logicalLeftSelectionGap):
245         (WebCore::RenderBlock::logicalRightSelectionGap):
246         * rendering/RenderBox.cpp:
247         (WebCore::RenderBox::paintClippingMask):
248         * rendering/RenderBoxModelObject.cpp:
249         (WebCore::applyBoxShadowForBackground):
250         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
251         (WebCore::RenderBoxModelObject::paintBorder):
252         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
253         (WebCore::RenderBoxModelObject::paintBoxShadow):
254         * rendering/RenderDetailsMarker.cpp:
255         (WebCore::RenderDetailsMarker::paint):
256         * rendering/RenderElement.cpp:
257         (WebCore::RenderElement::drawLineForBoxSide):
258         (WebCore::RenderElement::paintOutline):
259         * rendering/RenderEmbeddedObject.cpp:
260         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
261         (WebCore::RenderEmbeddedObject::paintReplaced):
262         * rendering/RenderFileUploadControl.cpp:
263         (WebCore::RenderFileUploadControl::paintObject):
264         * rendering/RenderFrameSet.cpp:
265         (WebCore::RenderFrameSet::paintColumnBorder):
266         (WebCore::RenderFrameSet::paintRowBorder):
267         * rendering/RenderImage.cpp:
268         (WebCore::RenderImage::paintReplaced):
269         (WebCore::RenderImage::paintIntoRect):
270         * rendering/RenderLayer.cpp:
271         (WebCore::RenderLayer::beginTransparencyLayers):
272         (WebCore::RenderLayer::paintScrollCorner):
273         (WebCore::RenderLayer::drawPlatformResizerImage):
274         (WebCore::RenderLayer::paintResizer):
275         * rendering/RenderListBox.cpp:
276         (WebCore::RenderListBox::paintItemForeground):
277         (WebCore::RenderListBox::paintItemBackground):
278         * rendering/RenderListMarker.cpp:
279         (WebCore::RenderListMarker::paint):
280         * rendering/RenderReplaced.cpp:
281         (WebCore::RenderReplaced::paint):
282         * rendering/RenderScrollbarTheme.cpp:
283         (WebCore::RenderScrollbarTheme::paintScrollCorner):
284         * rendering/RenderSnapshottedPlugIn.cpp:
285         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
286         * rendering/RenderTheme.cpp:
287         (WebCore::RenderTheme::paintSliderTicks):
288         * rendering/RenderThemeIOS.mm:
289         (WebCore::drawAxialGradient):
290         (WebCore::drawRadialGradient):
291         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
292         (WebCore::RenderThemeIOS::paintRadioDecorations):
293         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
294         (WebCore::RenderThemeIOS::paintSliderTrack):
295         (WebCore::RenderThemeIOS::paintProgressBar):
296         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
297         * rendering/RenderThemeMac.mm:
298         (WebCore::RenderThemeMac::paintProgressBar):
299         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
300         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
301         (WebCore::titleTextColorForAttachment):
302         (WebCore::AttachmentLayout::layOutSubtitle):
303         (WebCore::paintAttachmentIconBackground):
304         (WebCore::paintAttachmentTitleBackground):
305         (WebCore::paintAttachmentProgress):
306         * rendering/RenderView.cpp:
307         (WebCore::RenderView::paint):
308         (WebCore::RenderView::paintBoxDecorations):
309         * rendering/RenderWidget.cpp:
310         (WebCore::RenderWidget::paint):
311         * rendering/RootInlineBox.cpp:
312         (WebCore::RootInlineBox::lineSelectionGap):
313         * rendering/SimpleLineLayoutFunctions.cpp:
314         (WebCore::SimpleLineLayout::paintDebugBorders):
315         * rendering/TextPaintStyle.cpp:
316         (WebCore::TextPaintStyle::TextPaintStyle):
317         (WebCore::adjustColorForVisibilityOnBackground):
318         (WebCore::computeTextPaintStyle):
319         (WebCore::updateGraphicsContext):
320         * rendering/TextPaintStyle.h:
321         (WebCore::TextPaintStyle::TextPaintStyle):
322         * rendering/TextPainter.cpp:
323         (WebCore::ShadowApplier::ShadowApplier):
324         (WebCore::paintTextWithShadows):
325         * rendering/mathml/RenderMathMLBlock.cpp:
326         (WebCore::RenderMathMLBlock::paint):
327         * rendering/mathml/RenderMathMLFraction.cpp:
328         (WebCore::RenderMathMLFraction::paint):
329         * rendering/mathml/RenderMathMLMenclose.cpp:
330         (WebCore::RenderMathMLMenclose::paint):
331         * rendering/mathml/RenderMathMLOperator.cpp:
332         (WebCore::RenderMathMLOperator::paint):
333         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
334         (WebCore::RenderMathMLRadicalOperator::paint):
335         * rendering/mathml/RenderMathMLRoot.cpp:
336         (WebCore::RenderMathMLRoot::paint):
337         * rendering/shapes/Shape.cpp:
338         (WebCore::Shape::createRasterShape):
339         * rendering/style/NinePieceImage.cpp:
340         (WebCore::NinePieceImage::paint):
341         * rendering/style/RenderStyle.h:
342         * rendering/svg/RenderSVGImage.cpp:
343         (WebCore::RenderSVGImage::paintForeground):
344         * rendering/svg/RenderSVGPath.cpp:
345         (WebCore::useStrokeStyleToFill):
346         * rendering/svg/RenderSVGResourceFilter.cpp:
347         (WebCore::RenderSVGResourceFilter::postApplyResource):
348         * rendering/svg/RenderSVGResourceSolidColor.cpp:
349         (WebCore::RenderSVGResourceSolidColor::applyResource):
350         * rendering/svg/SVGInlineTextBox.cpp:
351         (WebCore::SVGInlineTextBox::paintSelectionBackground):
352         * rendering/svg/SVGRenderingContext.cpp:
353         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
354         (WebCore::SVGRenderingContext::bufferForeground):
355         * svg/SVGAnimatedColor.cpp:
356         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
357         * svg/graphics/SVGImage.cpp:
358         (WebCore::SVGImage::drawForContainer):
359         (WebCore::SVGImage::nativeImageForCurrentFrame):
360         (WebCore::SVGImage::drawPatternForContainer):
361         (WebCore::SVGImage::draw):
362         * svg/graphics/SVGImage.h:
363         * svg/graphics/SVGImageForContainer.cpp:
364         (WebCore::SVGImageForContainer::draw):
365         (WebCore::SVGImageForContainer::drawPattern):
366         * svg/graphics/SVGImageForContainer.h:
367         * svg/graphics/filters/SVGFEImage.cpp:
368         (WebCore::FEImage::platformApplySoftware):
369         * testing/MockPageOverlayClient.cpp:
370         (WebCore::MockPageOverlayClient::drawRect):
371
372 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
373
374         Use ColorSpaceSRGB for image buffers everywhere
375         https://bugs.webkit.org/show_bug.cgi?id=150990
376
377         Reviewed by Zalan Bujtas.
378
379         ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
380         code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
381
382         * platform/graphics/GraphicsContext.cpp:
383         (WebCore::GraphicsContext::createCompatibleBuffer):
384         * platform/graphics/ImageBuffer.h:
385         (WebCore::ImageBuffer::create):
386         * platform/graphics/cg/BitmapImageCG.cpp:
387         (WebCore::BitmapImage::checkForSolidColor):
388         * platform/graphics/cg/ColorCG.cpp:
389         (WebCore::Color::Color):
390         * platform/graphics/cg/GraphicsContextCG.cpp:
391         (WebCore::sRGBColorSpaceRef): Deleted.
392         * platform/graphics/cg/ImageBufferCG.cpp:
393         (WebCore::ImageBuffer::putByteArray):
394         * platform/graphics/cocoa/IOSurface.mm:
395         (IOSurface::createFromImage):
396         * platform/graphics/filters/FEFlood.h:
397         * platform/graphics/filters/FETile.cpp:
398         (WebCore::FETile::platformApplySoftware):
399         * platform/graphics/filters/FilterEffect.cpp:
400         (WebCore::FilterEffect::FilterEffect):
401         * platform/graphics/filters/SourceGraphic.h:
402         (WebCore::SourceGraphic::SourceGraphic):
403         * rendering/FilterEffectRenderer.cpp:
404         (WebCore::FilterEffectRenderer::build):
405         (WebCore::FilterEffectRenderer::apply):
406         * rendering/RenderThemeMac.mm:
407         (WebCore::RenderThemeMac::paintProgressBar):
408         * rendering/svg/RenderSVGResourceClipper.cpp:
409         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
410         * rendering/svg/RenderSVGResourceFilter.cpp:
411         (WebCore::RenderSVGResourceFilter::buildPrimitives):
412         * rendering/svg/RenderSVGResourceGradient.cpp:
413         (WebCore::createMaskAndSwapContextForTextGradient):
414         * rendering/svg/RenderSVGResourceMasker.cpp:
415         (WebCore::RenderSVGResourceMasker::applyResource):
416         * rendering/svg/RenderSVGResourcePattern.cpp:
417         (WebCore::RenderSVGResourcePattern::createTileImage):
418         * svg/graphics/SVGImage.cpp:
419         (WebCore::SVGImage::drawPatternForContainer):
420         * svg/graphics/filters/SVGFEImage.cpp:
421         (WebCore::FEImage::platformApplySoftware):
422
423 2015-11-07  Zalan Bujtas  <zalan@apple.com>
424
425         Crash when subtree layout is set on FrameView while auto size mode is enabled.
426         https://bugs.webkit.org/show_bug.cgi?id=150995
427         rdar://problem/22785262
428
429         Reviewed by Beth Dakin.
430
431         Autosizing initiates multiple synchronous layouts to calculate preferred view width for current content.
432         FrameView::autoSizeIfEnabled() is called from FrameView::layout() while we are in InPreLayout state.
433         It is safe to do during full layout.
434         However, since we setup the subtree state just before the autoSizeIfEnabled() call, reentering it with
435         a newly issued layout confuses SubtreeLayoutStateMaintainer.
436
437         This patch reverses the order of autoSizeIfEnabled() call and the subtree layout state setup.
438         It also ensures that the first layout requested by autoSizeIfEnabled() always runs on the whole tree.  
439
440         Test: fast/dynamic/crash-subtree-layout-when-auto-size-enabled.html
441
442         * page/FrameView.cpp:
443         (WebCore::FrameView::layout):
444         (WebCore::FrameView::convertSubtreeLayoutToFullLayout):
445         (WebCore::FrameView::scheduleRelayout):
446         (WebCore::FrameView::scheduleRelayoutOfSubtree):
447         (WebCore::FrameView::autoSizeIfEnabled):
448         * page/FrameView.h:
449         * testing/Internals.cpp:
450         (WebCore::Internals::enableAutoSizeMode):
451         * testing/Internals.h:
452         * testing/Internals.idl:
453
454 2015-11-07  Chris Dumez  <cdumez@apple.com>
455
456         embed element without src and type attributes should represent nothing
457         https://bugs.webkit.org/show_bug.cgi?id=148853
458         <rdar://problem/22588235>
459
460         Reviewed by Zalan Bujtas.
461
462         As per the HTML specification, an embed element without src and type
463         attributes should represent nothing:
464         https://html.spec.whatwg.org/multipage/embedded-content.html#the-embed-element
465
466         This patch fixes the issue by making sure we don't construct a
467         renderer for such embed elements.
468
469         The new behavior is consistent with Firefox but differs from Chrome.
470
471         No new tests, already covered by existing tests.
472
473         * html/HTMLEmbedElement.cpp:
474         (WebCore::HTMLEmbedElement::rendererIsNeeded):
475
476 2015-11-07  Michael Catanzaro  <mcatanzaro@igalia.com>
477
478         Node.h:392:12: warning: 'this' pointer cannot be null in well-defined C++ code
479         https://bugs.webkit.org/show_bug.cgi?id=150996
480
481         Reviewed by Andreas Kling.
482
483         Remove ASSERT(this) statement that is triggering hundreds of warnings from Clang.
484
485         * dom/Node.h:
486         (WebCore::Node::document):
487
488 2015-11-07  Michael Catanzaro  <mcatanzaro@igalia.com>
489
490         Unreviewed, fix GTK build after r191981
491
492         * html/HTMLFormControlElement.cpp:
493
494 2015-11-06  Scott Valentine  <svalentine@ikayzo.com>
495
496         Allow an optional hash algorithm to be passed to generateKey for RSA keys.
497         https://bugs.webkit.org/show_bug.cgi?id=144938
498
499         Reviewed by Alexey Proskuryakov.
500
501         Test: crypto/subtle/rsa-export-generated-keys.html
502
503         This changeset allows an optional hash parameter to be passed to the generate
504         key function for RSA type keys. Previously, there was no way to export generated
505         keys, as no hash function could be associated with the key (required for JWK).
506
507         The current WebCrypto API draft requires the hash function to be specified in the
508         algorithm object passed to generateKey (http://www.w3.org/TR/WebCryptoAPI 20.4),
509         however, they were made optional in this implementation to maintain compatiblity.
510
511         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
512         (WebCore::getHashAlgorithm):
513         (WebCore::createHmacParams):
514         (WebCore::createHmacKeyParams):
515         (WebCore::createRsaKeyGenParams):
516         (WebCore::createRsaOaepParams):
517         (WebCore::createRsaSsaParams):
518         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Deleted.
519         * bindings/js/SerializedScriptValue.cpp:
520         (WebCore::CloneDeserializer::readRSAKey):
521         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
522         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
523         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
524         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
525         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
526         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
527         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
528         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
529         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
530         * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
531         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
532         (WebCore::CryptoKeyRSA::create):
533         (WebCore::CryptoKeyRSA::generatePair):
534         (WebCore::CryptoKeyRSA::restrictToHash): Deleted.
535         * crypto/keys/CryptoKeyRSA.h:
536         * crypto/mac/CryptoKeyRSAMac.cpp:
537         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
538         (WebCore::CryptoKeyRSA::create):
539         (WebCore::CryptoKeyRSA::generatePair):
540         (WebCore::CryptoKeyRSA::restrictToHash): Deleted.
541         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
542
543 2015-11-06  Wenson Hsieh  <wenson_hsieh@apple.com>
544
545         Scrolling iframe inside scrollable div does not work with trackpad
546         https://bugs.webkit.org/show_bug.cgi?id=150168
547         <rdar://problem/23143931>
548
549         Reviewed by Brent Fulgham.
550
551         When scrolling in an iframe nested under an overflow scrolling region, EventHandler::platformPrepareForWheelEvents
552         fails to compute the correct scrollableArea, using the overflow div's scrollable area instead of the iframe's view.
553         This causes the latching algorithm to bail out of handling the wheel event. To avoid this, we special-case the
554         decision to compute the scrollableArea from the scrollableContainer if we are attempting to scroll in an iframe.
555
556         Test: fast/scrolling/latching/scroll-iframe-in-overflow.html
557
558         * page/mac/EventHandlerMac.mm:
559         (WebCore::EventHandler::platformPrepareForWheelEvents):
560
561 2015-11-06  Brady Eidson  <beidson@apple.com>
562
563         Modern IDB: Make the result data for a "get" request be an IDBGetResult.
564         https://bugs.webkit.org/show_bug.cgi?id=150985
565
566         Reviewed by Alex Christensen.
567
568         No new tests (Refactor, no change in behavior).
569
570         * Modules/indexeddb/IDBGetResult.h:
571         (WebCore::IDBGetResult::IDBGetResult):
572         (WebCore::IDBGetResult::dataFromBuffer):
573         (WebCore::IDBGetResult::isolatedCopy):
574         
575         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
576         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
577         
578         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
579         (WebCore::GetOperation::perform):
580         
581         * Modules/indexeddb/server/IDBBackingStore.h:
582         
583         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
584         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
585         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
586         
587         * Modules/indexeddb/server/MemoryIndex.cpp:
588         (WebCore::IDBServer::MemoryIndex::valueForKeyRange):
589         * Modules/indexeddb/server/MemoryIndex.h:
590         
591         * Modules/indexeddb/server/MemoryObjectStore.cpp:
592         (WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
593         * Modules/indexeddb/server/MemoryObjectStore.h:
594         
595         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
596         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
597         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
598         (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
599         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord):
600         (WebCore::IDBServer::UniqueIDBDatabase::performGetResultCallback):
601         (WebCore::IDBServer::UniqueIDBDatabase::performValueDataCallback): Deleted.
602         * Modules/indexeddb/server/UniqueIDBDatabase.h:
603         
604         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
605         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
606         
607         * Modules/indexeddb/shared/IDBResultData.cpp:
608         (WebCore::IDBResultData::IDBResultData):
609         (WebCore::IDBResultData::getRecordSuccess):
610         (WebCore::IDBResultData::getResult):
611         * Modules/indexeddb/shared/IDBResultData.h:
612         (WebCore::IDBResultData::resultData): Deleted.
613
614 2015-11-06  Chris Dumez  <cdumez@apple.com>
615
616         Remove unused HTMLFormControlsCollection::namedItem()
617         https://bugs.webkit.org/show_bug.cgi?id=150975
618
619         Reviewed by Andreas Kling.
620
621         Remove unused HTMLFormControlsCollection::namedItem().
622         JSHTMLFormControlsCollection::namedItem() calls namedItems() on the
623         implementation object, not namedItem() because it returns a
624         RadioNodeList when there are several matches.
625
626         * html/HTMLFormControlsCollection.cpp:
627         (WebCore::firstNamedItem): Deleted.
628         (WebCore::HTMLFormControlsCollection::namedItem): Deleted.
629         * html/HTMLFormControlsCollection.h:
630
631 2015-11-06  Myles C. Maxfield  <mmaxfield@apple.com>
632
633         REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
634         https://bugs.webkit.org/show_bug.cgi?id=150923
635
636         Reviewed by Zalan Bujtas.
637
638         Ever since r182286, expansion opportunities in justified ruby were moved to their neighboring
639         elements (thereby forbidding trailing nor leading expansions inside ruby). However, when the
640         neighboring element is tatechuyoko, we will erroneously honor the expansion opportunity inside
641         the tatechuyoko, thereby moving it horizontally.
642
643         Tatechuyoko should never have expansion opportunities inside it.
644
645         Test: fast/text/ruby-justify-tatechuyoko.html
646
647         * rendering/RenderBlockLineLayout.cpp:
648         (WebCore::expansionBehaviorForInlineTextBox):
649
650 2015-11-06  Mario Sanchez Prada  <mario@endlessm.com>
651
652         Layout Test accessibility/win/linked-elements.html is crashing on win debug
653         https://bugs.webkit.org/show_bug.cgi?id=150944
654
655         Reviewed by Chris Fleizach.
656
657         Be more precise ASSERTing on textUnderElement, only checking that the render
658         tree is stable before using TextIteraror when in 'IncludeAllChildren' mode.
659
660         * accessibility/AccessibilityRenderObject.cpp:
661         (WebCore::AccessibilityRenderObject::textUnderElement):
662
663 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
664
665         [GStreamer] Use MainThreadNotifier to send notifications to main thread in WebKitWebSourceGStreamer
666         https://bugs.webkit.org/show_bug.cgi?id=150890
667
668         Reviewed by Žan Doberšek.
669
670         Instead of the GThreadSafeMainLoopSources.
671
672         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
673         (webKitWebSrcStop):
674         (webKitWebSrcChangeState):
675         (webKitWebSrcNeedData):
676         (webKitWebSrcEnoughData):
677         (webKitWebSrcSeek):
678         (StreamingClient::handleResponseReceived):
679         (StreamingClient::handleDataReceived):
680         (StreamingClient::handleNotifyFinished):
681         (webKitWebSrcFinalize): Deleted.
682         (webKitWebSrcSetProperty): Deleted.
683         (webKitWebSrcGetProperty): Deleted.
684         (webKitWebSrcSetExtraHeader): Deleted.
685         (webKitWebSrcStart): Deleted.
686         (webKitWebSrcGetProtocols): Deleted.
687         (webKitWebSrcGetUri): Deleted.
688         (webKitWebSrcSetUri): Deleted.
689         (webKitWebSrcUriHandlerInit): Deleted.
690
691 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
692
693         [GStreamer] Use MainThreadNotifier to send notifications to main thread in TrackPrivateGStreamer
694         https://bugs.webkit.org/show_bug.cgi?id=150889
695
696         Reviewed by Žan Doberšek.
697
698         Instead of the GThreadSafeMainLoopSources.
699
700         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
701         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
702         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
703         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
704         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
705         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
706         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
707         (WebCore::TrackPrivateBaseGStreamer::disconnect):
708         (WebCore::TrackPrivateBaseGStreamer::activeChangedCallback):
709         (WebCore::TrackPrivateBaseGStreamer::tagsChangedCallback):
710         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
711         (WebCore::TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer): Deleted.
712         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged): Deleted.
713         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
714
715 2015-11-06  Csaba Osztrogonác  <ossy@webkit.org>
716
717         Suppress deprecated-declarations warning in WebCore/platform/URL.cpp
718         https://bugs.webkit.org/show_bug.cgi?id=150803
719
720         Reviewed by Alexey Proskuryakov.
721
722         * platform/URL.cpp:
723         (WebCore::appendEncodedHostname):
724
725 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
726
727         [GStreamer] Do not use GThreadSafeMainLoopSource to send notifications to the main thread in MediaPlayerPrivateGStreamer
728         https://bugs.webkit.org/show_bug.cgi?id=150888
729
730         Reviewed by Žan Doberšek.
731
732         Analyzing how the main loop sources were used in GST code I've
733         noticed that in most of the cases they are used to send
734         notifications to the main thread. The way it works in those cases
735         is that some state is updated in whatever thread and we notify the
736         main thread to use the new state. There's no data passed to the
737         main thread, they are just notifications. I've also noticed that
738         we are not doing this exactly as expected in several of those
739         cases. GThreadSafeMainLoopSource cancels the current source when a
740         new one is scheduled, and that was done this way because previous
741         code in GST using GSources directly did it that way. But that's
742         not what we want, if there's a notification pending, since the
743         state is updated, we can just wait for it to happen instead of
744         cancelling and scheduling a new one. I've also noticed that in
745         most of the cases where we schedule notifications to the main
746         thread, we can be already in the main thread, so we could avoid
747         the schedule entirely.
748         We can use RunLoop::dispatch() to send notifications to the main
749         thread, but there's no way to cancel those tasks. This patch adds
750         a new helper class MainThreadNotifier that uses an enum of flags to
751         handle different kind of notifications. It uses
752         RunLoop::dispatch() to send notifications to the main thread, but
753         only if there isn't one pending for the given type.
754         This patch also makes signal callbacks static members to be able
755         to make the private methods actually private.
756
757         * platform/graphics/gstreamer/MainThreadNotifier.h: Added.
758         (WebCore::MainThreadNotifier::MainThreadNotifier):
759         (WebCore::MainThreadNotifier::notify):
760         (WebCore::MainThreadNotifier::cancelPendingNotifications):
761         (WebCore::MainThreadNotifier::addPendingNotification):
762         (WebCore::MainThreadNotifier::removePendingNotification):
763         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
764         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamPropertiesCallback):
765         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
766         (WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
767         (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
768         (WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
769         (WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):
770         (WebCore::MediaPlayerPrivateGStreamer::newTextSampleCallback):
771         (WebCore::MediaPlayerPrivateGStreamer::sourceChangedCallback):
772         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
773         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
774         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Deleted.
775         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): Deleted.
776         (WebCore::initializeGStreamerAndRegisterWebKitElements): Deleted.
777         (WebCore::MediaPlayerPrivateGStreamer::load): Deleted.
778         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Deleted.
779         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Deleted.
780         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Deleted.
781         (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData): Deleted.
782         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
783         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
784         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
785         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
786         (WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
787         (WebCore::MediaPlayerPrivateGStreamerBase::repaintCallback):
788         (WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
789         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
790         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
791         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): Deleted.
792         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Deleted.
793         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): Deleted.
794         (WebCore::MediaPlayerPrivateGStreamerBase::muted): Deleted.
795         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Deleted.
796         (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount): Deleted.
797         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
798         (WebCore::MediaPlayerPrivateGStreamerBase::setVisible): Deleted.
799
800 2015-11-06  Yoav Weiss  <yoav@yoav.ws>
801
802         Expose HTMLImageElement sizes attribute in IDL
803         https://bugs.webkit.org/show_bug.cgi?id=150230
804
805         Reviewed by Darin Adler.
806
807         No new tests, but fixed test expectations for exposed interfaces.
808
809         * html/HTMLImageElement.idl: Make sure that `sizes` is exposed as an IDL attribute, to ensure proper feature detection of sizes support.
810
811 2015-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
812
813         [GStreamer] Use RunLoop::Timer instead of GMainLoopSource in video sink
814         https://bugs.webkit.org/show_bug.cgi?id=150807
815
816         Reviewed by Žan Doberšek.
817
818         Since we always wait until the sample is actually rendered we
819         don't really need either a thread safe main loop source, nor
820         cancelling if already requested and other things GMainLoopSource does.
821         This adds a helper class VideoRenderRequestScheduler to use the
822         RunLoop::Timer. All the logic to syncronize between threads has
823         been moved to this helper class too.
824
825         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
826         (VideoRenderRequestScheduler::VideoRenderRequestScheduler):
827         (VideoRenderRequestScheduler::start):
828         (VideoRenderRequestScheduler::stop):
829         (VideoRenderRequestScheduler::requestRender):
830         (VideoRenderRequestScheduler::isUnlocked):
831         (VideoRenderRequestScheduler::render):
832         (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate):
833         (webkitVideoSinkRepaintRequested):
834         (webkitVideoSinkRender):
835         (webkitVideoSinkUnlock):
836         (webkitVideoSinkUnlockStop):
837         (webkitVideoSinkStop):
838         (webkitVideoSinkStart):
839         (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Deleted.
840         (webkitVideoSinkTimeoutCallback): Deleted.
841         (unlockSampleMutex): Deleted.
842
843 2015-11-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
844
845         Add runtime and compile time flags for enabling Web Animations API and model.
846         https://bugs.webkit.org/show_bug.cgi?id=150914
847
848         Reviewed by Benjamin Poulain.
849
850         Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.
851
852         * Configurations/FeatureDefines.xcconfig:
853         * bindings/generic/RuntimeEnabledFeatures.cpp:
854         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
855         * bindings/generic/RuntimeEnabledFeatures.h:
856         (WebCore::RuntimeEnabledFeatures::setWebAnimationsEnabled):
857         (WebCore::RuntimeEnabledFeatures::webAnimationsEnabled):
858
859 2015-11-05  Commit Queue  <commit-queue@webkit.org>
860
861         Unreviewed, rolling out r192089.
862         https://bugs.webkit.org/show_bug.cgi?id=150966
863
864         This change broke an existing layout test on Yosemite and
865         Mavericks (Requested by ryanhaddad on #webkit).
866
867         Reverted changeset:
868
869         "Preview on apple.com/contact with all text selected shows a
870         map"
871         https://bugs.webkit.org/show_bug.cgi?id=150963
872         http://trac.webkit.org/changeset/192089
873
874 2015-11-05  Tim Horton  <timothy_horton@apple.com>
875
876         Preview on apple.com/contact with all text selected shows a map
877         https://bugs.webkit.org/show_bug.cgi?id=150963
878         <rdar://problem/23421750>
879
880         Reviewed by Beth Dakin.
881
882         * editing/mac/DictionaryLookup.h:
883         * editing/mac/DictionaryLookup.mm:
884         (WebCore::DictionaryLookup::rangeForSelection):
885         If the range that Lookup decides to use doesn't intersect the hit point,
886         just ignore Lookup.
887
888         (WebCore::DictionaryLookup::rangeAtHitTestResult):
889         If the selection-based Lookup fails to find a usable result, fall back
890         to looking around the hit point.
891
892 2015-11-05  Brady Eidson  <beidson@apple.com>
893
894         Modern IDB: Implement IDBIndex get/getKey/count requests.
895         https://bugs.webkit.org/show_bug.cgi?id=150910
896
897         Reviewed by Alex Christensen.
898
899         Tests: storage/indexeddb/modern/index-get-count-basic.html
900                storage/indexeddb/modern/index-get-count-failures.html
901
902         * Modules/indexeddb/IndexedDB.h:
903
904         * Modules/indexeddb/client/IDBAnyImpl.cpp:
905         (WebCore::IDBClient::IDBAny::IDBAny):
906         (WebCore::IDBClient::IDBAny::modernIDBIndex):
907         * Modules/indexeddb/client/IDBAnyImpl.h:
908         (WebCore::IDBClient::IDBAny::create):
909         (WebCore::IDBClient::IDBAny::createUndefined):
910
911         * Modules/indexeddb/client/IDBIndexImpl.cpp:
912         (WebCore::IDBClient::IDBIndex::count):
913         (WebCore::IDBClient::IDBIndex::doCount):
914         (WebCore::IDBClient::IDBIndex::get):
915         (WebCore::IDBClient::IDBIndex::doGet):
916         (WebCore::IDBClient::IDBIndex::getKey):
917         (WebCore::IDBClient::IDBIndex::doGetKey):
918         * Modules/indexeddb/client/IDBIndexImpl.h:
919         (WebCore::IDBClient::IDBIndex::info):
920         
921         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
922         (WebCore::IDBClient::IDBObjectStore::isDeleted):
923         (WebCore::IDBClient::IDBObjectStore::modernTransaction):
924         
925         * Modules/indexeddb/client/IDBRequestImpl.cpp:
926         (WebCore::IDBClient::IDBRequest::createCount):
927         (WebCore::IDBClient::IDBRequest::createGet):
928         (WebCore::IDBClient::IDBRequest::IDBRequest):
929         (WebCore::IDBClient::IDBRequest::sourceObjectStoreIdentifier):
930         (WebCore::IDBClient::IDBRequest::sourceIndexIdentifier):
931         (WebCore::IDBClient::IDBRequest::requestedIndexRecordType):
932         (WebCore::IDBClient::IDBRequest::setResultToUndefined):
933         * Modules/indexeddb/client/IDBRequestImpl.h:
934         
935         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
936         (WebCore::IDBClient::IDBTransaction::requestGetValue):
937         (WebCore::IDBClient::IDBTransaction::requestGetKey):
938         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
939         (WebCore::IDBClient::IDBTransaction::requestCount):
940         * Modules/indexeddb/client/IDBTransactionImpl.h:
941         
942         * Modules/indexeddb/client/TransactionOperation.cpp:
943         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
944         * Modules/indexeddb/client/TransactionOperation.h:
945         (WebCore::IDBClient::TransactionOperation::indexIdentifier):
946         (WebCore::IDBClient::TransactionOperation::indexRecordType):
947         
948         * Modules/indexeddb/server/IDBBackingStore.h:
949         
950         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
951         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
952         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
953         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
954         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
955         
956         * Modules/indexeddb/server/MemoryIndex.cpp:
957         (WebCore::IDBServer::MemoryIndex::valueForKeyRange):
958         (WebCore::IDBServer::MemoryIndex::countForKeyRange):
959         * Modules/indexeddb/server/MemoryIndex.h:
960         
961         * Modules/indexeddb/server/MemoryObjectStore.cpp:
962         (WebCore::IDBServer::MemoryObjectStore::createIndex):
963         (WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
964         (WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
965         * Modules/indexeddb/server/MemoryObjectStore.h:
966         
967         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
968         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
969         (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
970         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
971         (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
972         (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord): Deleted.
973         * Modules/indexeddb/server/UniqueIDBDatabase.h:
974         
975         * Modules/indexeddb/shared/IDBRequestData.cpp:
976         (WebCore::IDBRequestData::IDBRequestData):
977         (WebCore::IDBRequestData::objectStoreIdentifier):
978         (WebCore::IDBRequestData::indexIdentifier):
979         (WebCore::IDBRequestData::indexRecordType):
980         * Modules/indexeddb/shared/IDBRequestData.h:
981
982 2015-11-05  Zhuo Li  <zachli@apple.com>
983
984         Rename the variable to avoid conflict between the variable and the parameter.
985         https://bugs.webkit.org/show_bug.cgi?id=150019.
986
987         Reviewed by Dan Bernstein.
988
989         * platform/cocoa/SearchPopupMenuCocoa.mm:
990         (WebCore::typeCheckedRecentSearchesRemovingRecentSearchesAddedAfterDate): Rename `date`
991         to `dateAdded` so that it does not have the same name as the parameter passed in.
992
993 2015-11-05  Joseph Pecoraro  <pecoraro@apple.com>
994
995         Web Inspector: Clean up InjectedScript uses
996         https://bugs.webkit.org/show_bug.cgi?id=150921
997
998         Reviewed by Timothy Hatcher.
999
1000         * inspector/CommandLineAPIModule.cpp:
1001         (WebCore::CommandLineAPIModule::injectIfNeeded):
1002         (WebCore::CommandLineAPIModule::CommandLineAPIModule):
1003         * inspector/CommandLineAPIModule.h:
1004         * inspector/WebInjectedScriptManager.cpp:
1005         (WebCore::WebInjectedScriptManager::didCreateInjectedScript):
1006         * inspector/WebInjectedScriptManager.h:
1007
1008 2015-11-05  Joseph Pecoraro  <pecoraro@apple.com>
1009
1010         Web Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate references
1011         https://bugs.webkit.org/show_bug.cgi?id=150869
1012
1013         Reviewed by Brian Burg.
1014
1015         Refactoring covered by existing tests.
1016
1017         * WebCore.xcodeproj/project.pbxproj:
1018         Privately export PageScriptDebuggerAgent.h due to InspectorController.h needing it.
1019
1020         * inspector/InspectorController.h:
1021         * inspector/InspectorController.cpp:
1022         (WebCore::InspectorController::InspectorController):
1023         (WebCore::InspectorController::scriptDebugServer):
1024         Own the PageScriptDebugServer.
1025
1026         * inspector/WorkerInspectorController.h:
1027         * inspector/WorkerInspectorController.cpp:
1028         (WebCore::WorkerInspectorController::WorkerInspectorController):
1029         (WebCore::WorkerInspectorController::scriptDebugServer):
1030         Own the WorkerScriptDebugServer.
1031
1032         (WebCore::WorkerInspectorController::vm):
1033         Use the VM accessed through the worker global object.
1034
1035         * inspector/InspectorWebAgentBase.h:
1036         (WebCore::InspectorAgentBase::InspectorAgentBase):
1037         Given Web agents a m_environment convenience to access the InspectorEnvironment.
1038
1039         * inspector/InspectorNetworkAgent.cpp:
1040         (WebCore::InspectorNetworkAgent::timestamp):
1041         * inspector/InspectorPageAgent.cpp:
1042         (WebCore::InspectorPageAgent::timestamp):
1043         (WebCore::InspectorPageAgent::enable):
1044         (WebCore::InspectorPageAgent::frameStartedLoading):
1045         * inspector/InspectorTimelineAgent.cpp:
1046         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
1047         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1048         (WebCore::InspectorTimelineAgent::internalStart):
1049         (WebCore::InspectorTimelineAgent::internalStop):
1050         (WebCore::InspectorTimelineAgent::timestamp):
1051         (WebCore::InspectorTimelineAgent::startFromConsole):
1052         (WebCore::InspectorTimelineAgent::willCallFunction):
1053         (WebCore::InspectorTimelineAgent::willEvaluateScript):
1054         (WebCore::InspectorTimelineAgent::setPageScriptDebugServer): Deleted.
1055         * inspector/InspectorTimelineAgent.h:
1056         Use the InspectorEnvironment for VM / ScriptDebugServer.
1057
1058         * inspector/PageDebuggerAgent.cpp:
1059         (WebCore::PageDebuggerAgent::PageDebuggerAgent): Deleted.
1060         (WebCore::PageDebuggerAgent::scriptDebugServer): Deleted.
1061         * inspector/PageDebuggerAgent.h:
1062         * inspector/PageRuntimeAgent.cpp:
1063         (WebCore::PageRuntimeAgent::globalVM): Deleted.
1064         * inspector/PageRuntimeAgent.h:
1065         * inspector/WorkerDebuggerAgent.h:
1066         * inspector/WorkerRuntimeAgent.cpp:
1067         (WebCore::WorkerRuntimeAgent::globalVM): Deleted.
1068         * inspector/WorkerRuntimeAgent.h:
1069         * inspector/WorkerDebuggerAgent.cpp:
1070         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent): Deleted.
1071         (WebCore::WorkerDebuggerAgent::scriptDebugServer): Deleted.
1072         Remove now unnecessary subclass code.
1073
1074         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
1075         One more special case for accessing Worker properties from the ScriptDebugServer.
1076
1077 2015-11-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1078
1079         [Streams API] Shield implementation from user mangling Promise.reject and resolve methods
1080         https://bugs.webkit.org/show_bug.cgi?id=150895
1081
1082         Reviewed by Youenn Fablet.
1083
1084         Replace all calls to @Promise.resolve and @Promise.reject with their internal slot counterparts. This way we
1085         ensure that if the user replaces those constructor methods, our implementation still works.
1086
1087         Test: streams/streams-promises.html.
1088
1089         * Modules/streams/ReadableStream.js:
1090         (initializeReadableStream):
1091         (cancel):
1092         * Modules/streams/ReadableStreamInternals.js:
1093         (privateInitializeReadableStreamReader):
1094         (cancelReadableStream):
1095         (readFromReadableStreamReader):
1096         * Modules/streams/ReadableStreamReader.js:
1097         (cancel):
1098         (read):
1099         (closed):
1100         * Modules/streams/StreamInternals.js:
1101         (promiseInvokeOrNoop):
1102         (promiseInvokeOrFallbackOrNoop):
1103         * Modules/streams/WritableStream.js:
1104         (initializeWritableStream):
1105         (abort):
1106         (close):
1107         (write):
1108         (closed):
1109         (ready):
1110
1111 2015-11-05  Andreas Kling  <akling@apple.com>
1112
1113         Give ResourceUsageOverlay a stacked chart for dirty memory per category.
1114         <https://webkit.org/b/150905>
1115
1116         Reviewed by Antti Koivisto.
1117
1118         Refactored the data gathering to operate on "memory categories", a memory category is at
1119         the top level a VM tag, e.g the VM tag for our bmalloc allocator. It can in turn have
1120         sub-categories, e.g one for the GC heap, which allocates all of its blocks through bmalloc
1121         and thus end up in the same tag.
1122
1123         Each category also has a hard-coded color, which is used consistently in labels and charts.
1124
1125         Also went back to drawing everything with CGContext directly instead of GraphicsContext
1126         since the latter is not thread safe.
1127
1128         * page/ResourceUsageOverlay.h:
1129         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1130         (-[WebOverlayLayer drawInContext:]):
1131         (WebCore::RingBuffer::last):
1132         (WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
1133         (WebCore::ResourceUsageData::ResourceUsageData):
1134         (WebCore::showText):
1135         (WebCore::drawGraphLabel):
1136         (WebCore::drawCpuHistory):
1137         (WebCore::drawGCHistory):
1138         (WebCore::drawMemHistory):
1139         (WebCore::drawSlice):
1140         (WebCore::drawMemoryPie):
1141         (WebCore::ResourceUsageOverlay::platformDraw):
1142         (WebCore::categoryForVMTag):
1143         (WebCore::runSamplerThread):
1144         (WebCore::drawPlate): Deleted.
1145         (WebCore::fontCascade): Deleted.
1146         (WebCore::ResourceUsageOverlay::draw): Deleted.
1147
1148 2015-11-05  Simon Fraser  <simon.fraser@apple.com>
1149
1150         Having page overlays causes iframe to get composited
1151         https://bugs.webkit.org/show_bug.cgi?id=150920
1152
1153         Reviewed by Tim Horton.
1154         
1155         When deciding whether to enable compositing for a subframe, don't consult the
1156         main frame's overlay count. Only do that for the main frame.
1157
1158         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1159
1160 2015-11-05  Manuel Rego Casasnovas  <rego@igalia.com>
1161
1162         [css-grid] Support positioned grid children
1163         https://bugs.webkit.org/show_bug.cgi?id=150837
1164
1165         Reviewed by Darin Adler.
1166
1167         According to the spec positioned grid children have
1168         a special behavior described at:
1169         https://drafts.csswg.org/css-grid/#abspos
1170
1171         The idea is that for positioned children the containing block will
1172         correspond to the padding edges of the grid container, unless the
1173         grid placement properties are defined.
1174         This not only affects to positioned grid items (direct children) but
1175         also to any descendant where the containing block is the grid container.
1176
1177         In order to manage this special behavior, the patch is overriding
1178         RenderBlock::layoutPositionedObject() to calculate the position and size
1179         depending on the grid-placement properties.
1180
1181         RenderBox class has some changes to calculate the containing block width
1182         and height for positioned objects (using the override value). And also
1183         to compute their static position.
1184
1185         Finally, the positioned items are not taken into account in all the
1186         different grid methods, in order that they do not interfere the layout
1187         of the grid as stated in the spec.
1188
1189         Tests: fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html
1190                fast/css-grid-layout/absolute-positioning-grid-container-parent.html
1191                fast/css-grid-layout/grid-positioned-items-background.html
1192                fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html
1193                fast/css-grid-layout/grid-positioned-items-implicit-grid.html
1194                fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html
1195                fast/css-grid-layout/grid-sizing-positioned-items.html
1196                fast/css-grid-layout/positioned-grid-items-should-not-create-implicit-tracks.html
1197                fast/css-grid-layout/positioned-grid-items-should-not-take-up-space.html
1198
1199         * rendering/OrderIterator.cpp:
1200         (WebCore::OrderIterator::next): Fix method to avoid issues if no items
1201         are added to the iterator.
1202         * rendering/RenderBlock.h: Mark layoutPositionedObject() as virtual.
1203         * rendering/RenderBox.cpp: Add new maps for inline/block extra offsets.
1204         (WebCore::RenderBox::~RenderBox): Clear the new maps.
1205         (WebCore::RenderBox::extraInlineOffset): Extra offset that we need to
1206         apply to positioned grid children due to the grid placement properties.
1207         (WebCore::RenderBox::extraBlockOffset): Ditto.
1208         (WebCore::RenderBox::setExtraInlineOffset):
1209         (WebCore::RenderBox::setExtraBlockOffset):
1210         (WebCore::RenderBox::clearExtraInlineAndBlockOffests):
1211         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Use the
1212         override containing block if any.
1213         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): Ditto.
1214         (WebCore::RenderBox::computePositionedLogicalWidth): Add the extra
1215         offset if it's a positioned element.
1216         (WebCore::RenderBox::computePositionedLogicalHeight): Ditto.
1217         * rendering/RenderBox.h:
1218         (WebCore::RenderBox::scrollbarLogicalWidth): Add utility method.
1219         * rendering/RenderGrid.cpp:
1220         (WebCore::RenderGrid::layoutBlock): Clear grid after layout positioned
1221         objects instead of at the end of layoutGridItems().
1222         (WebCore::RenderGrid::placeItemsOnGrid): Ignore positioned items.
1223         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
1224         (WebCore::RenderGrid::layoutGridItems): Ditto.
1225         (WebCore::RenderGrid::prepareChildForPositionedLayout): Set static
1226         position for positioned items.
1227         (WebCore::RenderGrid::layoutPositionedObject): Calculate position and
1228         size for positioned children.
1229         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): Calculate
1230         extra offset and breadth for positioned children.
1231         * rendering/RenderGrid.h:
1232         * rendering/style/GridResolvedPosition.cpp:
1233         (WebCore::GridResolvedPosition::isNonExistentNamedLineOrArea): Make it a
1234         public static method.
1235         (WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle): Fix calls
1236         to isNonExistentNamedLineOrArea().
1237         (WebCore::resolveGridPositionFromStyle): Ditto.
1238         * rendering/style/GridResolvedPosition.h: Make
1239         isNonExistentNamedLineOrArea() public.
1240
1241 2015-11-04  Jiewen Tan  <jiewen_tan@apple.com>
1242
1243         Null dereference loading Blink layout test editing/execCommand/delete-hidden-crash.html
1244         https://bugs.webkit.org/show_bug.cgi?id=149289
1245         <rdar://problem/22746352>
1246
1247         Reviewed by Enrica Casucci.
1248
1249         This is a merge of Blink r176497:
1250         https://codereview.chromium.org/340713003
1251
1252         It ensures the start & end positions in DeleteSelectionCommand::initializePositionData
1253         are editable.
1254
1255         Test: editing/execCommand/delete-hidden-crash.html
1256
1257         * editing/DeleteSelectionCommand.cpp:
1258         (WebCore::DeleteSelectionCommand::initializePositionData):
1259         * editing/Editor.cpp:
1260         (WebCore::Editor::advanceToNextMisspelling):
1261         * editing/htmlediting.cpp:
1262         (WebCore::firstEditablePositionAfterPositionInRoot):
1263         (WebCore::lastEditablePositionBeforePositionInRoot):
1264         These two functions don't make any sense to return VisiblePosition. Change them
1265         to return Position instead. Since there is a viable conversion from Position to
1266         VisiblePosition. It should not change the behavior of any other components depending
1267         on it.
1268         * editing/htmlediting.h:
1269
1270 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
1271
1272         Ruby base ending in tatechuyoko forces a line break before the tatechuyoko
1273         https://bugs.webkit.org/show_bug.cgi?id=150883
1274
1275         Reviewed by Darin Adler.
1276
1277         Asking the width of a 0-length tatechuyoko should return 0.
1278
1279         Test: fast/text/ruby-tatechuyoko.html
1280
1281         * rendering/RenderCombineText.cpp:
1282         (WebCore::RenderCombineText::width):
1283
1284 2015-11-04  Tim Horton  <timothy_horton@apple.com>
1285
1286         Update the name of a Mail class that we hardcode
1287         https://bugs.webkit.org/show_bug.cgi?id=150879
1288         <rdar://problem/23384627>
1289
1290         Reviewed by Alexey Proskuryakov.
1291
1292         * editing/cocoa/HTMLConverter.mm:
1293         (_WebMessageDocumentClass):
1294
1295 2015-11-04  Eric Carlson  <eric.carlson@apple.com>
1296
1297         [MediaStream] A RealtimeMediaSource should begin producing data automatically
1298         https://bugs.webkit.org/show_bug.cgi?id=150851
1299         rdar://problem/23380636
1300
1301         A RealtimeMediaSource should be producing data unless it is muted, which is not under the 
1302         control of the application, so a local source should begin producing data as soon as it
1303         is added to a stream. Remove "producing data" and "enabled" observer callbacks because 
1304         they don't provide anything that the "muted" callback already provides.
1305         
1306         Reviewed by Jer Noble.
1307
1308         * Modules/mediastream/MediaStreamTrack.cpp:
1309         (WebCore::MediaStreamTrack::trackProducingDataChanged): Deleted.
1310         * Modules/mediastream/MediaStreamTrack.h:
1311
1312         * Modules/mediastream/UserMediaRequest.cpp:
1313         (WebCore::UserMediaRequest::didCreateStream): Tell sources to begin producing data.
1314
1315         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1316         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Don't call stream->startProducingData,
1317           it isn't necessary.
1318         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setReadyState): Call characteristicsChanged 
1319           when the readyState changes.
1320
1321         * platform/mediastream/MediaStreamPrivate.cpp:
1322         (WebCore::MediaStreamPrivate::trackProducingDataChanged): Deleted.
1323         * platform/mediastream/MediaStreamPrivate.h:
1324
1325         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1326         (WebCore::MediaStreamTrackPrivate::sourceProducingDataChanged): Deleted.
1327         (WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Deleted.
1328         * platform/mediastream/MediaStreamTrackPrivate.h:
1329
1330         * platform/mediastream/RealtimeMediaSource.cpp:
1331         (WebCore::RealtimeMediaSource::isProducingDataDidChange): Deleted.
1332         (WebCore::RealtimeMediaSource::setEnabled): Deleted.
1333         * platform/mediastream/RealtimeMediaSource.h:
1334
1335         * platform/mediastream/mac/AVAudioCaptureSource.mm:
1336         (WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): !enabled() -> muted().
1337
1338         * platform/mediastream/mac/AVMediaCaptureSource.mm:
1339         (WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Don't call isProducingDataDidChange..
1340
1341         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1342         (WebCore::AVVideoCaptureSource::processNewFrame): !enabled() -> muted().
1343
1344 2015-11-04  Jer Noble  <jer.noble@apple.com>
1345
1346         [iOS] <video> elements without audio tracks should not interrupt music
1347         https://bugs.webkit.org/show_bug.cgi?id=149888
1348
1349         Reviewed by Eric Carlson.
1350
1351         Tests: TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm
1352
1353         Only set the AVAudioSession category to "playback" when the video element in question has an
1354         audio track.
1355
1356         Add a new PlatformMediaSessionClient method called canProduceAudio(), overridden in HTMLMediaElement
1357         and AudioContext, which is checked when updating the AudioSession category in 
1358         PlatformMediaSessionManager::updateSessionState().
1359
1360         * Modules/webaudio/AudioContext.h:
1361         * html/HTMLMediaElement.cpp:
1362         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
1363         * html/HTMLMediaElement.h:
1364         * platform/audio/PlatformMediaSession.cpp:
1365         (WebCore::PlatformMediaSession::activeAudioSessionRequired):
1366         (WebCore::PlatformMediaSession::setCanProduceAudio):
1367         * platform/audio/PlatformMediaSession.h:
1368         (WebCore::PlatformMediaSession::canProduceAudio):
1369         * platform/audio/PlatformMediaSessionManager.cpp:
1370         (WebCore::PlatformMediaSessionManager::canProduceAudio):
1371         (WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged):
1372         (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
1373         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
1374         * platform/audio/PlatformMediaSessionManager.h:
1375         * platform/audio/mac/MediaSessionManagerMac.cpp:
1376         (PlatformMediaSessionManager::updateSessionState):
1377
1378 2015-11-03  Dean Jackson  <dino@apple.com>
1379
1380         Accept 8 and 4 value hex colors (#RRGGBBAA)
1381         https://bugs.webkit.org/show_bug.cgi?id=150853
1382         <rdar://problem/23380930>
1383
1384         Reviewed by Simon Fraser.
1385
1386         CSS Color Level 4 allows #RGBA and #RRGGBBAA values
1387         for colors.
1388
1389         Test: fast/css/hex-colors.html
1390
1391         * platform/graphics/Color.cpp:
1392         (WebCore::parseHexColorInternal): Update the color parsing for
1393         the new syntax.
1394
1395 2015-11-04  Mario Sanchez Prada  <mario@webkit.org>
1396
1397         [AX] WebProcess from WebKitGtk+ 2.10.0 compiled in Debug mode hits ASSERT on textUnderElement
1398         https://bugs.webkit.org/show_bug.cgi?id=150670
1399
1400         Reviewed by Chris Fleizach.
1401
1402         Move the ASSERTs stating that the render tree is stable before using the
1403         TextIterator to their right place, in AccessibilityRenderObject, so that
1404         we don't crash in debug builds in cases when this condition is irrelevant.
1405
1406         Test: accessibility/gtk/list-item-with-pseudo-element-crash.html
1407
1408         * accessibility/AccessibilityNodeObject.cpp:
1409         (WebCore::AccessibilityNodeObject::textUnderElement): Removed ASSERTs.
1410         * accessibility/AccessibilityRenderObject.cpp:
1411         (WebCore::AccessibilityRenderObject::textUnderElement): Added ASSERTs, but
1412         only before calling plainText and using the right document for the node.
1413
1414 2015-11-04  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1415
1416         [Streams API] Shield streams against user replacing the Promise constructor
1417         https://bugs.webkit.org/show_bug.cgi?id=150887
1418
1419         Reviewed by Youenn Fablet.
1420
1421         With this rework, we shield the Streams implementation against the user doing something like "Promise =
1422         function() { /* do garbage */ };".
1423
1424         Test: streams/streams-promises.html.
1425
1426         * Modules/streams/ReadableStream.js:
1427         (initializeReadableStream):
1428         (cancel):
1429         * Modules/streams/ReadableStreamInternals.js:
1430         (privateInitializeReadableStreamReader):
1431         (cancelReadableStream):
1432         (readFromReadableStreamReader):
1433         * Modules/streams/ReadableStreamReader.js:
1434         (cancel):
1435         (read):
1436         (closed):
1437         * Modules/streams/StreamInternals.js:
1438         (promiseInvokeOrNoop):
1439         (promiseInvokeOrFallbackOrNoop):
1440         * Modules/streams/WritableStream.js:
1441         (initializeWritableStream):
1442         (abort):
1443         (close):
1444         (write):
1445         (closed):
1446         (ready):
1447         * Modules/streams/WritableStreamInternals.js:
1448         (syncWritableStreamStateWithQueue):
1449
1450 2015-11-04  Antoine Quint  <graouts@apple.com>
1451
1452         SVG: hit testing region for <text> elements is incorrect
1453         https://bugs.webkit.org/show_bug.cgi?id=150838
1454
1455         Reviewed by Dean Jackson.
1456
1457         Hit testing for SVG <text> elements was using the same code as hit testing
1458         for CSS-rendered elements. However, in SVG, text elements should only hit
1459         test based on their character cells, not the rectangular bounds of the
1460         element, see section 16.6 of the SVG 1.1 specification:
1461         
1462         http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty
1463         
1464         So we now hit test each SVGTextFragment of each SVGInlineTextBox
1465         that is a child of an SVGRootInlineBox to correctly find whether the
1466         provided HitTestLocation is contained within a character cell. 
1467
1468         Tests: svg/hittest/text-dominant-baseline-hanging.svg
1469                svg/hittest/text-multiple-dx-values.svg
1470                svg/hittest/text-with-multiple-tspans.svg
1471                svg/hittest/text-with-text-node-and-content-elements.svg
1472                svg/hittest/text-with-text-node-only.svg
1473                svg/hittest/text-with-text-path.svg
1474
1475         * rendering/RootInlineBox.h:
1476         Remove the final keyword since nodeAtPoint() may now be subclassed as
1477         implemented in SVGRootInlineBox.
1478  
1479         * rendering/svg/SVGInlineTextBox.cpp:
1480         (WebCore::SVGInlineTextBox::nodeAtPoint):
1481         Iterate over the SVGTextFragments to look for a fragment containing the
1482         provided HitTestLocation.
1483  
1484         * rendering/svg/SVGRootInlineBox.cpp:
1485         (WebCore::SVGRootInlineBox::nodeAtPoint):
1486         * rendering/svg/SVGRootInlineBox.h:
1487         Override RootInlineBox::nodeAtPoint() to delegate hit testing to the
1488         children inline boxes.
1489
1490 2015-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1491
1492         [GStreamer] Use RunLoop::Timer for ready state timer in MediaPlayerPrivateGStreamer
1493         https://bugs.webkit.org/show_bug.cgi?id=150836
1494
1495         Reviewed by Philippe Normand.
1496
1497         We don't really need a GThreadSafeMainLoopSource for this simple timer.
1498
1499         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1500         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1501         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1502         (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
1503         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
1504         (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
1505         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1506
1507 2015-11-04  Frederic Wang  <fred.wang@free.fr>
1508
1509         Add support for the USE_TYPO_METRICS flag on iOS
1510         https://bugs.webkit.org/show_bug.cgi?id=131839
1511
1512         Reviewed by Darin Adler.
1513
1514         Make the iOS Font service use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
1515         The code shared by iOS, OS X and AppleWin is moved into a separate OpenTypeCG module.
1516
1517         No new tests because this is already tested by fonts/use-typo-metrics-1.html
1518
1519         * PlatformAppleWin.cmake: Add OpenTypeCG files.
1520         * PlatformMac.cmake: ditto.
1521         * WebCore.vcxproj/WebCore.vcxproj: ditto.
1522         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
1523         * WebCore.xcodeproj/project.pbxproj: ditto.
1524         * platform/graphics/cocoa/FontCocoa.mm:
1525         (WebCore::Font::platformInit): Use functions from OpenTypeCG.
1526         (WebCore::fontHasMathTable): Deleted.
1527         * platform/graphics/ios/FontServicesIOS.mm:
1528         (WebCore::FontServicesIOS::FontServicesIOS): Use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
1529         * platform/graphics/opentype/OpenTypeCG.h: Added.
1530         * platform/graphics/opentype/OpenTypeCG.cpp: Added.
1531         (WebCore::OpenType::fontHasMathTable): Move this code from FontCocoa.mm.
1532         (WebCore::OpenType::readShortFromTable): Inline function to read a 16-bit big endian integer from the OS/2 table and to cast it into a short integer.
1533         (WebCore::OpenType::tryGetTypoMetrics): Move this code from FontCocoa.mm.
1534         * platform/graphics/opentype/OpenTypeTypes.h: Add missing Glyph.h header needed by TableWithCoverage::getCoverageIndex.
1535         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1536         (WebCore::Font::platformInit): Use functions from OpenTypeCG.
1537
1538 2015-11-04  Chris Dumez  <cdumez@apple.com>
1539
1540         Regression(r191652): Colloquy doesn’t render any chat content
1541         https://bugs.webkit.org/show_bug.cgi?id=150861
1542         <rdar://problem/23381007>
1543
1544         Reviewed by Antti Koivisto.
1545
1546         Do a partial revert of r191652 as this web-exposed behavior change
1547         broke Colloquy app. This only reverts the code change, the tests
1548         are left as is so that they don't rely of the frame ID setting the
1549         Window name.
1550
1551         * html/HTMLFrameElementBase.cpp:
1552         (WebCore::HTMLFrameElementBase::parseAttribute):
1553         (WebCore::HTMLFrameElementBase::setNameAndOpenURL):
1554
1555 2015-11-03  Brady Eidson  <beidson@apple.com>
1556
1557         Modern IDB: Fill out IDBIndex, create MemoryIndex in backing store.
1558         https://bugs.webkit.org/show_bug.cgi?id=150868
1559
1560         Reviewed by Alex Christensen.
1561
1562         Tests: storage/indexeddb/modern/create-index-failures.html
1563                storage/indexeddb/modern/get-index-failures.html
1564                storage/indexeddb/modern/idbindex-properties-basic.html
1565
1566         Note: The MemoryIndex in the backing store doesn't actually do anything yet.
1567         
1568         That's coming next.
1569     
1570         * CMakeLists.txt:
1571         * WebCore.xcodeproj/project.pbxproj:
1572
1573         * Modules/indexeddb/IDBIndex.h:
1574
1575         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1576         (WebCore::IDBClient::IDBConnectionToServer::createIndex):
1577         (WebCore::IDBClient::IDBConnectionToServer::didCreateIndex):
1578         * Modules/indexeddb/client/IDBConnectionToServer.h:
1579         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1580
1581         * Modules/indexeddb/client/IDBCursorWithValueImpl.h:
1582
1583         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1584         (WebCore::IDBClient::IDBDatabase::didCreateIndexInfo):
1585         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1586
1587         * Modules/indexeddb/client/IDBIndexImpl.cpp:
1588         (WebCore::IDBClient::IDBIndex::create):
1589         (WebCore::IDBClient::IDBIndex::IDBIndex):
1590         (WebCore::IDBClient::IDBIndex::objectStore):
1591         (WebCore::IDBClient::IDBIndex::keyPathAny):
1592         (WebCore::IDBClient::IDBIndex::openCursor):
1593         (WebCore::IDBClient::IDBIndex::count):
1594         (WebCore::IDBClient::IDBIndex::openKeyCursor):
1595         (WebCore::IDBClient::IDBIndex::get):
1596         (WebCore::IDBClient::IDBIndex::getKey):
1597         * Modules/indexeddb/client/IDBIndexImpl.h:
1598
1599         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1600         (WebCore::IDBClient::IDBObjectStore::createIndex):
1601         (WebCore::IDBClient::IDBObjectStore::index):
1602         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1603
1604         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1605         (WebCore::IDBClient::IDBTransaction::createObjectStore):
1606         (WebCore::IDBClient::IDBTransaction::createIndex):
1607         (WebCore::IDBClient::IDBTransaction::createIndexOnServer):
1608         (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
1609         * Modules/indexeddb/client/IDBTransactionImpl.h:
1610
1611         * Modules/indexeddb/legacy/LegacyIndex.h:
1612
1613         * Modules/indexeddb/server/IDBBackingStore.h:
1614
1615         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1616         (WebCore::IDBServer::IDBConnectionToClient::didCreateIndex):
1617         * Modules/indexeddb/server/IDBConnectionToClient.h:
1618         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1619
1620         * Modules/indexeddb/server/IDBServer.cpp:
1621         (WebCore::IDBServer::IDBServer::createIndex):
1622         * Modules/indexeddb/server/IDBServer.h:
1623
1624         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1625         (WebCore::IDBServer::MemoryBackingStoreTransaction::addNewIndex):
1626         (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingIndex):
1627         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1628
1629         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1630         (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
1631         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1632
1633         * Modules/indexeddb/server/MemoryIndex.cpp: Added.
1634         (WebCore::IDBServer::MemoryIndex::create):
1635         (WebCore::IDBServer::MemoryIndex::MemoryIndex):
1636         (WebCore::IDBServer::MemoryIndex::~MemoryIndex):
1637         * Modules/indexeddb/server/MemoryIndex.h: Added.
1638         (WebCore::IDBServer::MemoryIndex::info):
1639
1640         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1641         (WebCore::IDBServer::MemoryObjectStore::createIndex):
1642         (WebCore::IDBServer::MemoryObjectStore::registerIndex):
1643         (WebCore::IDBServer::MemoryObjectStore::unregisterIndex):
1644         * Modules/indexeddb/server/MemoryObjectStore.h:
1645
1646         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1647         (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
1648         (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
1649         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
1650         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1651
1652         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1653         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateIndex):
1654         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1655
1656         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1657         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
1658         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1659
1660         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
1661         (WebCore::IDBDatabaseInfo::getInfoForExistingObjectStore):
1662         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
1663         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
1664
1665         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
1666         (WebCore::IDBIndexInfo::IDBIndexInfo):
1667         (WebCore::IDBIndexInfo::isolatedCopy):
1668         * Modules/indexeddb/shared/IDBIndexInfo.h:
1669         (WebCore::IDBIndexInfo::identifier):
1670         (WebCore::IDBIndexInfo::objectStoreIdentifier):
1671
1672         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
1673         (WebCore::IDBObjectStoreInfo::createNewIndex):
1674         (WebCore::IDBObjectStoreInfo::addExistingIndex):
1675         (WebCore::IDBObjectStoreInfo::hasIndex):
1676         (WebCore::IDBObjectStoreInfo::infoForExistingIndex):
1677         (WebCore::IDBObjectStoreInfo::isolatedCopy):
1678         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
1679
1680         * Modules/indexeddb/shared/IDBResultData.cpp:
1681         (WebCore::IDBResultData::createIndexSuccess):
1682         * Modules/indexeddb/shared/IDBResultData.h:
1683
1684         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1685         (WebCore::InProcessIDBServer::didCreateIndex):
1686         (WebCore::InProcessIDBServer::createIndex):
1687         * Modules/indexeddb/shared/InProcessIDBServer.h:
1688
1689         * bindings/js/JSIDBObjectStoreCustom.cpp:
1690         (WebCore::JSIDBObjectStore::createIndex):
1691
1692         * platform/CrossThreadCopier.cpp:
1693         (WebCore::IDBIndexInfo>::copy):
1694         * platform/CrossThreadCopier.h:
1695
1696 2015-11-03  Andy Estes  <aestes@apple.com>
1697
1698         [Cocoa] Only query for kMGQDeviceName on iOS
1699         https://bugs.webkit.org/show_bug.cgi?id=150858
1700
1701         Reviewed by Brent Fulgham.
1702
1703         * platform/ios/Device.cpp:
1704         (WebCore::deviceName): On non-iOS platorms, just return "iPhone" as the device name.
1705
1706 2015-11-03  Geoffrey Garen  <ggaren@apple.com>
1707
1708         Provide a way to turn off const in WebKit2.
1709
1710         Reviewed by Sam Weinig.
1711
1712         * bindings/js/JSDOMWindowBase.cpp:
1713         (WebCore::JSDOMWindowBase::commonVM):
1714         * page/Settings.h:
1715         (WebCore::Settings::shouldUseHighResolutionTimers):
1716         (WebCore::Settings::shouldRewriteConstAsVar):
1717         (WebCore::Settings::setShouldRewriteConstAsVar):
1718         (WebCore::Settings::backgroundShouldExtendBeyondPage):
1719
1720 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
1721
1722         Web Inspector: Remove duplication among ScriptDebugServer subclasses
1723         https://bugs.webkit.org/show_bug.cgi?id=150860
1724
1725         Reviewed by Timothy Hatcher.
1726
1727         Refactoring covered by existing tests.
1728
1729         * bindings/js/WorkerScriptDebugServer.cpp:
1730         (WebCore::WorkerScriptDebugServer::attachDebugger):
1731         (WebCore::WorkerScriptDebugServer::detachDebugger):
1732         (WebCore::WorkerScriptDebugServer::addListener): Deleted.
1733         (WebCore::WorkerScriptDebugServer::removeListener): Deleted.
1734         * bindings/js/WorkerScriptDebugServer.h:
1735         * inspector/PageDebuggerAgent.cpp:
1736         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer): Deleted.
1737         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer): Deleted.
1738         * inspector/PageDebuggerAgent.h:
1739         * inspector/PageScriptDebugServer.cpp:
1740         (WebCore::PageScriptDebugServer::attachDebugger):
1741         (WebCore::PageScriptDebugServer::detachDebugger):
1742         (WebCore::PageScriptDebugServer::addListener): Deleted.
1743         (WebCore::PageScriptDebugServer::removeListener): Deleted.
1744         * inspector/PageScriptDebugServer.h:
1745         * inspector/WorkerDebuggerAgent.cpp:
1746         (WebCore::WorkerDebuggerAgent::startListeningScriptDebugServer): Deleted.
1747         (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer): Deleted.
1748         * inspector/WorkerDebuggerAgent.h:
1749
1750 2015-11-03  Jiewen Tan  <jiewen_tan@apple.com>
1751
1752         Null dereference loading Blink layout test scrollbars/custom-scrollbar-appearance-property.html
1753         https://bugs.webkit.org/show_bug.cgi?id=149312
1754         <rdar://problem/22748910>
1755
1756         Reviewed by Darin Adler.
1757
1758         This is a merge from Blink r167503:
1759         https://codereview.chromium.org/173433002
1760
1761         Test: scrollbars/custom-scrollbar-appearance-property.html
1762
1763         * rendering/RenderThemeMac.mm:
1764         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1765         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
1766
1767 2015-11-03  Andreas Kling  <akling@apple.com>
1768
1769         ResourceUsageOverlay should show GC-owned malloc memory.
1770         <https://webkit.org/b/150846>
1771
1772         Reviewed by Anders Carlsson.
1773
1774         Add a memory category for GC-owned malloc memory. This carves a significant chunk off of
1775         the gigantic "bmalloc" mystery slice.
1776
1777         * page/ResourceUsageOverlay.h:
1778         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1779         (WebCore::drawMemoryPie):
1780         (WebCore::ResourceUsageOverlay::draw):
1781         (WebCore::runSamplerThread):
1782
1783 2015-11-03  Saam barati  <sbarati@apple.com>
1784
1785         Rewrite "const" as "var" for iTunes/iBooks on the Mac
1786         https://bugs.webkit.org/show_bug.cgi?id=150852
1787
1788         Reviewed by Geoffrey Garen.
1789
1790         * bindings/js/JSDOMWindowBase.cpp:
1791         (WebCore::JSDOMWindowBase::commonVM):
1792
1793 2015-10-30  Jon Honeycutt  <jhoneycutt@apple.com>
1794
1795         Implement support for the autocomplete attribute
1796         https://bugs.webkit.org/show_bug.cgi?id=150731
1797         rdar://problem/21078968
1798
1799         The autocomplete attribute is defined by
1800         https://html.spec.whatwg.org/multipage/forms.html#autofill.
1801
1802         Reviewed by Brent Fulgham.
1803
1804         Test: fast/forms/autocomplete-tokens.html
1805
1806         * html/HTMLFormControlElement.cpp:
1807         (WebCore::isContactToken):
1808         Return true if this is a contact token.
1809         (WebCore::categoryForAutofillFieldToken):
1810         Adds all of the autofill field tokens to a map, and returns the
1811         category for a given token.
1812         (WebCore::maxTokensForAutofillFieldCategory):
1813         Return the maximum number of tokens an autofill category supports.
1814         (WebCore::HTMLFormControlElement::parseAutocompleteAttribute):
1815         Implement the processing model defined in
1816         https://html.spec.whatwg.org/multipage/forms.html#processing-model-3
1817         with respect to the IDL-exposed autofill value.
1818         (WebCore::HTMLFormControlElement::setAutocomplete):
1819         Set the autocomplete attribute to the given string.
1820
1821         * html/HTMLFormControlElement.h:
1822         Declare setAutocomplete() and autocomplete().
1823
1824         * html/HTMLInputElement.idl:
1825         Remove the Reflect attribute. We now have custom processing for getting
1826         this attribute.
1827
1828         * html/HTMLSelectElement.idl:
1829         Declare the autocomplete attribute.
1830
1831         * html/HTMLTextAreaElement.idl:
1832         Ditto.
1833
1834 2015-11-03  Brady Eidson  <beidson@apple.com>
1835
1836         Modern IDB: Land empty IDBCursor/Index IDL implementations.
1837         https://bugs.webkit.org/show_bug.cgi?id=150839
1838
1839         Reviewed by Alex Christensen.
1840
1841         No new tests (No change in behavior).
1842
1843         * CMakeLists.txt:
1844         * WebCore.xcodeproj/project.pbxproj:
1845
1846         * Modules/indexeddb/IDBIndex.h:
1847         
1848         * Modules/indexeddb/client/IDBCursorImpl.cpp: Added.
1849         (WebCore::IDBClient::IDBCursor::~IDBCursor):
1850         (WebCore::IDBClient::IDBCursor::direction):
1851         (WebCore::IDBClient::IDBCursor::key):
1852         (WebCore::IDBClient::IDBCursor::primaryKey):
1853         (WebCore::IDBClient::IDBCursor::value):
1854         (WebCore::IDBClient::IDBCursor::source):
1855         (WebCore::IDBClient::IDBCursor::update):
1856         (WebCore::IDBClient::IDBCursor::advance):
1857         (WebCore::IDBClient::IDBCursor::continueFunction):
1858         (WebCore::IDBClient::IDBCursor::deleteFunction):
1859         * Modules/indexeddb/client/IDBCursorImpl.h: Added.
1860         
1861         * Modules/indexeddb/client/IDBCursorWithValueImpl.cpp: Added.
1862         * Modules/indexeddb/client/IDBCursorWithValueImpl.h: Added.
1863         
1864         * Modules/indexeddb/client/IDBIndexImpl.cpp: Added.
1865         (WebCore::IDBClient::IDBIndex::~IDBIndex):
1866         (WebCore::IDBClient::IDBIndex::name):
1867         (WebCore::IDBClient::IDBIndex::objectStore):
1868         (WebCore::IDBClient::IDBIndex::keyPathAny):
1869         (WebCore::IDBClient::IDBIndex::keyPath):
1870         (WebCore::IDBClient::IDBIndex::unique):
1871         (WebCore::IDBClient::IDBIndex::multiEntry):
1872         (WebCore::IDBClient::IDBIndex::openCursor):
1873         (WebCore::IDBClient::IDBIndex::count):
1874         (WebCore::IDBClient::IDBIndex::openKeyCursor):
1875         (WebCore::IDBClient::IDBIndex::get):
1876         (WebCore::IDBClient::IDBIndex::getKey):
1877         * Modules/indexeddb/client/IDBIndexImpl.h: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.h.
1878         
1879         * Modules/indexeddb/legacy/LegacyIndex.h:
1880         (WebCore::LegacyIndex::id):
1881         
1882         * Modules/indexeddb/shared/IDBIndexInfo.cpp: Added.
1883         * Modules/indexeddb/shared/IDBIndexInfo.h: Added.
1884         (WebCore::IDBIndexInfo::name):
1885         (WebCore::IDBIndexInfo::keyPath):
1886         (WebCore::IDBIndexInfo::unique):
1887         (WebCore::IDBIndexInfo::multiEntry):
1888
1889 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
1890
1891         Addressing post-review comments on r191934.
1892
1893         Unreviewed.
1894
1895         * platform/graphics/mac/FontCustomPlatformData.cpp:
1896         (WebCore::FontCustomPlatformData::supportsFormat):
1897
1898 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
1899
1900         Web Inspector: Move ScriptDebugServer::Task to WorkerScriptDebugServer where it is actually used
1901         https://bugs.webkit.org/show_bug.cgi?id=150847
1902
1903         Reviewed by Timothy Hatcher.
1904
1905         * bindings/js/WorkerScriptDebugServer.cpp:
1906         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
1907         * bindings/js/WorkerScriptDebugServer.h:
1908         * inspector/WorkerDebuggerAgent.cpp:
1909
1910 2015-11-03  Tim Horton  <timothy_horton@apple.com>
1911
1912         Fix the build.
1913
1914         * platform/Widget.h:
1915         (WebCore::Widget::boundsRect):
1916         (WebCore::Widget::resize):
1917
1918 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
1919
1920         font-variant-* properties in @font-face declarations should be honored
1921         https://bugs.webkit.org/show_bug.cgi?id=149771
1922
1923         Reviewed by Simon Fraser.
1924
1925         According to the CSS Fonts Level 3 spec, web authors are allowed to put
1926         font-feature-settings / font-variant-* inside @font-face blocks. These
1927         properties are supposed to be applied at a specific time during the
1928         font selection algorithm.
1929
1930         This patch gives a FontFeatureSettings object and a FontVariantSettings
1931         object to CSSFontFace, and moves common parsing logic from
1932         StyleBuilderCustom to a shared location. Then, once the two properties
1933         are parsed from the @font-face block, the relevant data structures are
1934         passed down into the font selection algorithm. This algorithm then
1935         consults with these values at the correct time (inside
1936         preparePlatformFont()).
1937
1938         Tests: css3/font-feature-settings-font-face-rendering.html
1939                css3/font-variant-font-face-all.html
1940                css3/font-variant-font-face-override.html
1941
1942         * WebCore.xcodeproj/project.pbxproj: Add a header for the common
1943         location of parsing font-variant-ligatures, font-variant-numeric,
1944         and font-variant-east-asian.
1945         * css/CSSFontFace.cpp:
1946         (WebCore::CSSFontFace::font): Pass the relevant data structures
1947         into the font selection algorithm.
1948         * css/CSSFontFace.h: Add FontFeatureSettings and FontVariantSettings
1949         member variables.
1950         (WebCore::CSSFontFace::insertFeature):
1951         (WebCore::CSSFontFace::setVariantCommonLigatures):
1952         (WebCore::CSSFontFace::setVariantDiscretionaryLigatures):
1953         (WebCore::CSSFontFace::setVariantHistoricalLigatures):
1954         (WebCore::CSSFontFace::setVariantContextualAlternates):
1955         (WebCore::CSSFontFace::setVariantPosition):
1956         (WebCore::CSSFontFace::setVariantCaps):
1957         (WebCore::CSSFontFace::setVariantNumericFigure):
1958         (WebCore::CSSFontFace::setVariantNumericSpacing):
1959         (WebCore::CSSFontFace::setVariantNumericFraction):
1960         (WebCore::CSSFontFace::setVariantNumericOrdinal):
1961         (WebCore::CSSFontFace::setVariantNumericSlashedZero):
1962         (WebCore::CSSFontFace::setVariantAlternates):
1963         (WebCore::CSSFontFace::setVariantEastAsianVariant):
1964         (WebCore::CSSFontFace::setVariantEastAsianWidth):
1965         (WebCore::CSSFontFace::setVariantEastAsianRuby):
1966         * css/CSSFontFaceSource.cpp:
1967         (WebCore::CSSFontFaceSource::font): Pass the relevant data
1968         structures into the font selection algorithm.
1969         * css/CSSFontFaceSource.h: Ditto.
1970         * css/CSSFontSelector.cpp:
1971         (WebCore::CSSFontSelector::addFontFaceRule): Call the shared
1972         parsing logic to populate the FontFeatureSettings and
1973         FontVariantSettings members.
1974         * css/FontVariantBuilder.h: Added. Destination for shared parsing
1975         logic.
1976         (WebCore::applyValueFontVariantLigatures):
1977         (WebCore::applyValueFontVariantNumeric):
1978         (WebCore::applyValueFontVariantEastAsian):
1979         * css/StyleBuilderCustom.h: Source for shared parsing logic.
1980         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
1981         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
1982         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
1983         * loader/cache/CachedFont.cpp: Pass the relevant data structures
1984         into the font selection algorithm.
1985         (WebCore::CachedFont::createFont):
1986         (WebCore::CachedFont::platformDataFromCustomData):
1987         * loader/cache/CachedFont.h: Ditto.
1988         * loader/cache/CachedSVGFont.cpp: Ditto.
1989         (WebCore::CachedSVGFont::createFont):
1990         (WebCore::CachedSVGFont::platformDataFromCustomData):
1991         * loader/cache/CachedSVGFont.h: Ditto.
1992         * platform/graphics/FontCache.h: Ditto.
1993         * platform/graphics/FontCascade.cpp:
1994         (WebCore::FontCascade::codePath): Adjust comment.
1995         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1996         (WebCore::preparePlatformFont): Consult with the newly parsed values.
1997         (WebCore::fontWithFamily): Pass the relevant data structures into the
1998         font selection algorithm.
1999         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
2000         * platform/graphics/mac/FontCustomPlatformData.cpp:
2001         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
2002         * platform/graphics/mac/FontCustomPlatformData.h: Ditto.
2003
2004 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
2005
2006         Web Inspector: Handle or Remove ParseHTML Timeline Event Records
2007         https://bugs.webkit.org/show_bug.cgi?id=150689
2008
2009         Reviewed by Timothy Hatcher.
2010
2011         Remove ParseHTML nesting recordings. We were not using them
2012         and for most pages their self-time is very small in comparison
2013         to other events. We may consider adding it back later for
2014         UI purposes but for now the frontend doesn't use the records
2015         so lets remove it.
2016
2017         * html/parser/HTMLDocumentParser.cpp:
2018         (WebCore::HTMLDocumentParser::pumpTokenizer): Deleted.
2019         * inspector/InspectorInstrumentation.cpp:
2020         (WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
2021         (WebCore::InspectorInstrumentation::didWriteHTMLImpl): Deleted.
2022         * inspector/InspectorInstrumentation.h:
2023         (WebCore::InspectorInstrumentation::willWriteHTML): Deleted.
2024         (WebCore::InspectorInstrumentation::didWriteHTML): Deleted.
2025         * inspector/InspectorTimelineAgent.cpp:
2026         (WebCore::InspectorTimelineAgent::willWriteHTML): Deleted.
2027         (WebCore::InspectorTimelineAgent::didWriteHTML): Deleted.
2028         (WebCore::toProtocol): Deleted.
2029         * inspector/InspectorTimelineAgent.h:
2030         * inspector/TimelineRecordFactory.cpp:
2031         (WebCore::TimelineRecordFactory::createParseHTMLData): Deleted.
2032         * inspector/TimelineRecordFactory.h:
2033
2034 2015-11-03  Keith Rollin  <krollin@apple.com>
2035
2036         HTMLOptionElement.text should never return the value of label
2037         https://bugs.webkit.org/show_bug.cgi?id=148862
2038         rdar://problem/22589226
2039
2040         Reviewed by Darin Adler.
2041
2042         According to the HTML spec, `option` elements should have the
2043         following behavior:
2044
2045             - the `text` property should return text contents of element
2046             - the `label` property should return value of label attribute if
2047               it exists, else return text property
2048             - the UI should display label property
2049
2050         12 years ago, in order to be compatibile with browsers of the time, we
2051         diverged from this behavior: the text property behaved like the label
2052         property, and the text property was used for display. This resulted in
2053         our UI incidentally conforming to the spec, but also in the text
2054         property *not* conforming to the spec. See <rdar://problem/3532519>
2055         for discussion on this change.
2056
2057         The behavior of the browsers we were conforming to has changed. In
2058         particular, the text property in Firefox now conforms to the spec
2059         instead of behaving as we did. Therefore, it's less important to
2060         retain our old behavior for the sake of compatibility. This check-in
2061         brings us into conformance with the spec. The result is that the UI
2062         stays the same, but the text property will return different values than
2063         it used to if the option element has a label attribute that used to
2064         hide it.
2065
2066         Updated tests:
2067         - fast/dom/HTMLOptionElement/option-text.html:
2068         - fast/forms/HTMLOptionElement_label01.html:
2069         - fast/forms/HTMLOptionElement_label02.html:
2070         - fast/forms/HTMLOptionElement_label03.html:
2071         - fast/forms/HTMLOptionElement_label04.html:
2072         - fast/forms/HTMLOptionElement_label05.html:
2073         - fast/forms/HTMLOptionElement_label06.html:
2074         - fast/forms/HTMLOptionElement_label07.html:
2075         - fast/forms/option-value-and-label.html:
2076
2077         * accessibility/AccessibilityListBoxOption.cpp:
2078         (WebCore::AccessibilityListBoxOption::stringValue):
2079         * accessibility/AccessibilityMenuListOption.cpp:
2080         (WebCore::AccessibilityMenuListOption::stringValue):
2081         * html/HTMLOptionElement.cpp:
2082         (WebCore::HTMLOptionElement::text):
2083         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
2084
2085 2015-11-03  Andreas Kling  <akling@apple.com>
2086
2087         ResourceUsageOverlay should draw itself using WebCore::GraphicsContext.
2088         <https://webkit.org/b/150841>
2089
2090         Reviewed by Antti Koivisto.
2091
2092         Use WebCore text drawing primitives instead of poking at the CGContext directly.
2093         And stop using deprecated CoreGraphics APIs, too.
2094
2095         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2096         (WebCore::drawCpuHistory):
2097         (WebCore::drawGCHistory):
2098
2099             Adjust for unflipped Y axis.
2100
2101         (WebCore::fontCascade):
2102         (WebCore::showText):
2103
2104             Draw using WebCore text drawing primitives.
2105
2106         (WebCore::ResourceUsageOverlay::draw):
2107
2108             Remove CGContext calls and stop flipping the Y axis.
2109
2110 2015-11-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2111
2112         [Streams API] Vended promise capabilities should not need @resolve/@reject fields
2113         https://bugs.webkit.org/show_bug.cgi?id=150835
2114
2115         Reviewed by Darin Adler.
2116
2117         No change in behavior, covered by existing tests.
2118
2119         * Modules/streams/ReadableStreamInternals.js:
2120         (privateInitializeReadableStreamReader): Removed @resolve/@reject fields from resolved/rejected @closedPromiseCapability.
2121         * Modules/streams/WritableStream.js:
2122         (initializeWritableStream): Removed @resolve/@reject fields from resolved readyPromiseCapability.
2123         * Modules/streams/WritableStreamInternals.js:
2124         (syncWritableStreamStateWithQueue): Updated code to be closer to spec and removing the need to resolve an already resolved promise.
2125
2126 2015-11-03  Hunseop Jeong  <hs85.jeong@samsung.com>
2127
2128         Replace 0 and NULL with nullptr in WebCore/dom.
2129         https://bugs.webkit.org/show_bug.cgi?id=150788
2130
2131         Reviewed by Darin Adler.
2132
2133         No new tests because there is no behavior change.
2134
2135         * dom/Attr.cpp:
2136         (WebCore::Attr::Attr):
2137         (WebCore::Attr::detachFromElementWithValue):
2138         (WebCore::Attr::attachToElement):
2139         * dom/Attr.h:
2140         * dom/CheckedRadioButtons.cpp:
2141         (WebCore::RadioButtonGroup::updateCheckedState):
2142         (WebCore::CheckedRadioButtons::checkedButtonForGroup):
2143         (WebCore::CheckedRadioButtons::isInRequiredGroup):
2144         * dom/ChildListMutationScope.cpp:
2145         (WebCore::ChildListMutationAccumulator::enqueueMutationRecord):
2146         * dom/ContainerNode.cpp:
2147         (WebCore::ContainerNode::removeBetween):
2148         * dom/ContainerNode.h:
2149         (WebCore::ContainerNode::ContainerNode):
2150         * dom/ContainerNodeAlgorithms.cpp:
2151         (WebCore::notifyNodeRemovedFromDocument):
2152         * dom/Document.h:
2153         (WebCore::Document::wellFormed):
2154         (WebCore::Document::scriptRunner):
2155         (WebCore::Document::moduleLoader):
2156         (WebCore::Document::currentScript):
2157         (WebCore::Document::webkitFullscreenElement):
2158         * dom/DocumentOrderedMap.h:
2159         (WebCore::DocumentOrderedMap::MapEntry::MapEntry):
2160         * dom/DocumentParser.cpp:
2161         (WebCore::DocumentParser::detach):
2162         (WebCore::DocumentParser::suspendScheduledTasks):
2163         * dom/Element.cpp:
2164         (WebCore::Element::setAttributeInternal):
2165         (WebCore::Element::shadowRoot):
2166         (WebCore::Element::blur):
2167         (WebCore::Element::beforePseudoElement):
2168         (WebCore::Element::afterPseudoElement):
2169         (WebCore::Element::setBeforePseudoElement):
2170         * dom/Event.cpp:
2171         (WebCore::Event::Event):
2172         * dom/Event.h:
2173         (WebCore::Event::legacyReturnValue):
2174         (WebCore::Event::setLegacyReturnValue):
2175         (WebCore::Event::clipboardData):
2176         * dom/EventContext.cpp:
2177         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):
2178         * dom/EventDispatcher.cpp:
2179         (WebCore::EventPath::lastContextIfExists):
2180         (WebCore::EventDispatcher::dispatchEvent):
2181         * dom/EventListenerMap.cpp:
2182         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
2183         (WebCore::EventListenerIterator::EventListenerIterator):
2184         * dom/EventListenerMap.h:
2185         * dom/EventTarget.cpp:
2186         (WebCore::EventTarget::fireEventListeners):
2187         * dom/FocusEvent.cpp:
2188         (WebCore::FocusEventInit::FocusEventInit):
2189         * dom/GenericEventQueue.cpp:
2190         (WebCore::GenericEventQueue::enqueueEvent):
2191         * dom/IdTargetObserverRegistry.h:
2192         (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
2193         (WebCore::IdTargetObserverRegistry::notifyObservers):
2194         * dom/IgnoreDestructiveWriteCountIncrementer.h:
2195         (WebCore::IgnoreDestructiveWriteCountIncrementer::IgnoreDestructiveWriteCountIncrementer):
2196         * dom/MessageEvent.cpp:
2197         (WebCore::MessageEvent::MessageEvent):
2198         * dom/MessageEvent.h:
2199         * dom/MessagePort.cpp:
2200         (WebCore::MessagePort::contextDestroyed):
2201         (WebCore::MessagePort::dispatchMessages):
2202         (WebCore::MessagePort::locallyEntangledPort):
2203         (WebCore::MessagePort::disentanglePorts):
2204         * dom/MouseEvent.cpp:
2205         (WebCore::MouseEventInit::MouseEventInit):
2206         (WebCore::MouseEvent::cloneFor):
2207         * dom/MouseEvent.h:
2208         (WebCore::MouseEvent::dataTransfer):
2209         * dom/MouseRelatedEvent.cpp:
2210         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
2211         (WebCore::MouseRelatedEvent::computeRelativePosition):
2212         * dom/MutationEvent.h:
2213         * dom/Node.cpp:
2214         (WebCore::Node::nodeLists):
2215         (WebCore::Node::clearNodeLists):
2216         (WebCore::Node::nonShadowBoundaryParentNode):
2217         (WebCore::Node::parentOrShadowHostElement):
2218         * dom/Node.h:
2219         * dom/NodeRareData.h:
2220         (WebCore::NodeListsNodeData::removeCachedCollection):
2221         (WebCore::NodeListsNodeData::isEmpty):
2222         * dom/PendingScript.cpp:
2223         (WebCore::PendingScript::releaseElementAndClear):
2224         * dom/PopStateEvent.cpp:
2225         (WebCore::PopStateEvent::PopStateEvent):
2226         * dom/Position.h:
2227         (WebCore::Position::deprecatedNode):
2228         (WebCore::Position::document):
2229         (WebCore::Position::rootEditableElement):
2230         * dom/PositionIterator.cpp:
2231         (WebCore::PositionIterator::decrement):
2232         * dom/PositionIterator.h:
2233         (WebCore::PositionIterator::PositionIterator):
2234         * dom/ProcessingInstruction.cpp:
2235         (WebCore::ProcessingInstruction::ProcessingInstruction):
2236         (WebCore::ProcessingInstruction::checkStyleSheet):
2237         (WebCore::ProcessingInstruction::parseStyleSheet):
2238         * dom/ProcessingInstruction.h:
2239         * dom/RangeBoundaryPoint.h:
2240         (WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
2241         * dom/ScriptElement.cpp:
2242         (WebCore::ScriptElement::ScriptElement):
2243         (WebCore::ScriptElement::stopLoadRequest):
2244         (WebCore::ScriptElement::notifyFinished):
2245         (WebCore::ScriptElement::ignoresLoadRequest):
2246         * dom/ScriptedAnimationController.h:
2247         (WebCore::ScriptedAnimationController::create):
2248         (WebCore::ScriptedAnimationController::clearDocumentPointer):
2249         * dom/StyledElement.cpp:
2250         (WebCore::PresentationAttributeCacheKey::PresentationAttributeCacheKey):
2251         (WebCore::StyledElement::addSubresourceAttributeURLs):
2252         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2253         * dom/StyledElement.h:
2254         (WebCore::StyledElement::additionalPresentationAttributeStyle):
2255         (WebCore::StyledElement::inlineStyle):
2256         * dom/TemplateContentDocumentFragment.h:
2257         * dom/TextEvent.cpp:
2258         (WebCore::TextEvent::TextEvent):
2259         * dom/UIEvent.cpp:
2260         (WebCore::UIEventInit::UIEventInit):
2261         * dom/UserTypingGestureIndicator.cpp:
2262         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
2263         (WebCore::UserTypingGestureIndicator::~UserTypingGestureIndicator):
2264         * dom/ViewportArguments.cpp:
2265         (WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable):
2266         (WebCore::numericPrefix):
2267         * dom/default/PlatformMessagePortChannel.cpp:
2268         (WebCore::MessagePortChannel::disentangle):
2269         (WebCore::MessagePortChannel::postMessageToRemote):
2270         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
2271         * dom/default/PlatformMessagePortChannel.h:
2272
2273 2015-11-02  Wenson Hsieh  <wenson_hsieh@apple.com>
2274
2275         Tapping *below* some <input>s can focus them in Mobile Safari
2276         https://bugs.webkit.org/show_bug.cgi?id=146244
2277         <rdar://problem/21509310>
2278
2279         Reviewed by Darin Adler.
2280
2281         Removes iOS-specific logic in positionForPointRespectingEditingBoundaries that was causing us to focus inputs by
2282         tapping on the document element. We believe this logic, which causes VisiblePosition finding to recurse from a non-
2283         editable element to an editable child, is not necessary to focus editable elements underneath non-editable elements,
2284         since hit-testing will already have selected the contentEditable element prior to searching for a suitable
2285         VisiblePosition. Further investigation shows that this logic was added to fix <rdar://problem/5545799>, in which the
2286         first character in a Notes document could not be selected. However, I have not been able to reproduce this bug after
2287         removing this logic.
2288
2289         As a result of this change, we can also enable a WK1 test, editing/selection/click-outside-editable-div.html, that
2290         had also been marked as failing due to positionForPointRespectingEditingBoundaries recursing into a contentEditable
2291         div.
2292
2293         Test: fast/events/ios/clicking-document-should-not-trigger-focus.html
2294
2295         * rendering/RenderBlock.cpp:
2296         (WebCore::positionForPointRespectingEditingBoundaries): Deleted.
2297
2298 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
2299
2300         Update to match text-orientation spec
2301         https://bugs.webkit.org/show_bug.cgi?id=150765
2302
2303         Reviewed by Darin Adler.
2304
2305         The CSS spec has removed the "sideways-right" value of text-orientation in favor
2306         of "sideways." This patch makes the parser treat "sideways-right" the same as
2307         "sideways."
2308
2309         Test: fast/text/orientation-sideways-right.html
2310
2311         * css/CSSPrimitiveValueMappings.h:
2312         (WebCore::CSSPrimitiveValue::operator TextOrientation):
2313         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
2314         * rendering/style/RenderStyle.cpp:
2315         (WebCore::RenderStyle::fontAndGlyphOrientation): Deleted.
2316         * rendering/style/RenderStyleConstants.h:
2317
2318 2015-11-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2319
2320         [Streams API] Rework promises to use @newPromiseCapability
2321         https://bugs.webkit.org/show_bug.cgi?id=150627
2322
2323         Reviewed by Youenn Fablet.
2324
2325         We are removing the stream promises functions in favor of @newPromiseCapabity which basically provides the same
2326         functionality (keeping the resolve and reject functions without external slots). Slots and variables were
2327         renamed as *PromiseCapability to show that they no longer hold just a promise, but a promise capability.
2328
2329         Internal rework, no new tests needed.
2330
2331         * Modules/streams/ReadableStreamInternals.js:
2332         (privateInitializeReadableStreamReader.this.closedPromiseCapability.resolve):
2333         (privateInitializeReadableStreamReader.this.closedPromiseCapability.reject):
2334         (privateInitializeReadableStreamReader):
2335         (teeReadableStream):
2336         (teeReadableStreamBranch2CancelFunction):
2337         (errorReadableStream):
2338         (closeReadableStreamReader):
2339         (enqueueInReadableStream):
2340         (readFromReadableStreamReader):
2341         * Modules/streams/ReadableStreamReader.js:
2342         (closed):
2343         * Modules/streams/StreamInternals.js:
2344         (createNewStreamsPromise): Deleted.
2345         (resolveStreamsPromise): Deleted.
2346         (rejectStreamsPromise): Deleted.
2347         * Modules/streams/WritableStream.js:
2348         (this.readyPromiseCapability.resolve):
2349         (this.readyPromiseCapability.reject):
2350         (initializeWritableStream):
2351         (close):
2352         (write):
2353         (closed):
2354         (ready):
2355         * Modules/streams/WritableStreamInternals.js:
2356         (syncWritableStreamStateWithQueue):
2357         (errorWritableStream):
2358         * bindings/js/WebCoreBuiltinNames.h:
2359
2360 2015-11-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2361
2362         Move webkitGetUserMedia to JS Builtin
2363         https://bugs.webkit.org/show_bug.cgi?id=149499
2364
2365         Reviewed by Darin Adler.
2366
2367         Implemented webkitGetUserMedia as a JSBuiltin wrapper around navigator.mediaDevices.getUserMedia.
2368
2369         Removed cpp based version.
2370
2371         The js builting implementation checks for argument but does not raise exception when the request is not supported.
2372         The error callback is called instead, in an asynchronous fashion.
2373         The js builtin implementation does not check first that it is called on navigator, contrary to the cpp implementation.
2374         This is done afterwards when calling navigator.MediaDevices.@getUserMedia.
2375
2376         Covered by existing and modified tests.
2377
2378         * CMakeLists.txt: Adding NavigatorUserMedia.js as built-in JS file.
2379         * DerivedSources.make: Ditto.
2380         * Modules/mediastream/NavigatorUserMedia.idl: Making webkitGetUserMedia JSBuiltin
2381         * Modules/mediastream/NavigatorUserMedia.js:
2382         (webkitGetUserMedia):
2383         * Modules/mediastream/NavigatorUserMediaErrorCallback.h: Removed.
2384         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl: Removed.
2385         * Modules/mediastream/NavigatorUserMediaSuccessCallback.h: Removed.
2386         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl: Removed.
2387         * Modules/mediastream/UserMediaRequest.cpp:
2388         * Modules/mediastream/UserMediaRequest.h:
2389         * WebCore.xcodeproj/project.pbxproj:
2390         * bindings/js/JSDOMWindowBase.cpp:
2391         (WebCore::JSDOMWindowBase::finishCreation): Style modifications.
2392         * bindings/js/JSNavigatorCustom.cpp: Removed.
2393         * bindings/js/WebCoreJSBuiltins.cpp: Adding support for NavigatorUserMedia.js built-in JS file.
2394         * bindings/js/WebCoreJSBuiltins.h: Ditto.
2395         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
2396         (WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):
2397
2398 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2399
2400         [GStreamer] Use GstBus sync message handler and schedule tasks to the main thread with RunLoop::dispatch
2401         https://bugs.webkit.org/show_bug.cgi?id=150800
2402
2403         Reviewed by Philippe Normand.
2404
2405         This way we would avoid all the GScource + polling mechanism that
2406         GST uses internally to handle messages asynchronously in the main thread.
2407
2408         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2409         (WTF::adoptGRef):
2410         (WTF::refGPtr<GstMessage>):
2411         (WTF::derefGPtr<GstMessage>):
2412         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2413         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2414         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2415         Initialize the WeakPtr factory.
2416         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2417         reset the GstBus sync handler.
2418         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Make it void.
2419         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
2420         GstBus sync message handler and schedule the messages to the main
2421         thread with RunLoop::main().dispatch().
2422         (WebCore::mediaPlayerPrivateMessageCallback): Deleted.
2423         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2424         (WebCore::MediaPlayerPrivateGStreamer::createWeakPtr): Create a WeakPtr.
2425         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2426         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
2427         Handle the need context message that needs to be handled in the
2428         caller thread.
2429         (WebCore::mediaPlayerPrivateNeedContextMessageCallback): Deleted.
2430         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2431         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Do not
2432         connect to sync-message signal, handleSyncMessage() will be called
2433         to handled messages synchronously.
2434         (WebCore::MediaPlayerPrivateGStreamerBase::handleNeedContextMessage): Deleted.
2435         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2436
2437 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2438
2439         [GStreamer] Cleanup the iradio properties
2440         https://bugs.webkit.org/show_bug.cgi?id=148522
2441
2442         Reviewed by Philippe Normand.
2443
2444         Remove unused icecast code.
2445
2446         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2447         (StreamingClient::handleResponseReceived):
2448         (webKitWebSrcGetProperty): Deleted.
2449         (webKitWebSrcStop): Deleted.
2450
2451 2015-11-02  Keith Rollin  <krollin@apple.com>
2452
2453         input[type=number] does not increment/decrement integers with trailing decimal characters
2454         https://bugs.webkit.org/show_bug.cgi?id=148867
2455         rdar://problem/22589693
2456
2457         Reviewed by Chris Dumez.
2458
2459         Support input[type=number].value attributes of the form "###." (that
2460         is, leading digits with a decimal but no trailing digits). This form
2461         was supported in the setting of the attribute, but not when changing
2462         it through stepUp/Down.
2463
2464         Testing turned up similarly incorrect processing of -.###, so
2465         addressed that, too.
2466
2467         Test: fast/forms/range/input-appearance-range-decimals.html
2468
2469         Updated the following tests:
2470         - fast/forms/number/number-stepup-stepdown-from-renderer.html
2471         - fast/forms/number/number-stepup-stepdown.html
2472         - fast/forms/range/range-stepup-stepdown-from-renderer.html
2473         - fast/forms/range/range-stepup-stepdown.html
2474
2475         * html/InputType.cpp:
2476         (WebCore::InputType::stepUpFromRenderer):
2477         * platform/Decimal.cpp:
2478         (WebCore::Decimal::fromString):
2479
2480 2015-11-02  Jiewen Tan  <jiewen_tan@apple.com>
2481
2482         Null dereference loading Blink layout test fast/css/background-repeat-null-y-crash.html
2483         https://bugs.webkit.org/show_bug.cgi?id=150211
2484         <rdar://problem/23137321>
2485
2486         Reviewed by Alex Christensen.
2487
2488         This is a merge of Blink r188842:
2489         https://codereview.chromium.org/846933002
2490
2491         By setting the backgroundRepeatY property to null it can
2492         happen that accessing that CSS value returns a null pointer.
2493         In that case simply bail out early.
2494
2495         Test: fast/css/background-repeat-null-y-crash.html
2496
2497         * css/StyleProperties.cpp:
2498         (WebCore::StyleProperties::getLayeredShorthandValue):
2499
2500 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
2501
2502         [Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
2503         https://bugs.webkit.org/show_bug.cgi?id=150766
2504
2505         Reviewed by Darin Adler.
2506
2507         The spec has changed the initial value of text-orientation from "vertical-right"
2508         to "mixed." This patch follows this movement, but also keeps the existing
2509         property working (the parser will treat both values the same).
2510
2511         Test: fast/text/vertical-mixed.html
2512
2513         * css/CSSParser.cpp:
2514         (WebCore::CSSParser::parseValue):
2515         * css/CSSPrimitiveValueMappings.h:
2516         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2517         (WebCore::CSSPrimitiveValue::operator TextOrientation):
2518         * css/CSSValueKeywords.in:
2519         * css/StyleResolver.cpp:
2520         (WebCore::checkForOrientationChange):
2521         * platform/graphics/FontCascadeFonts.cpp:
2522         (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
2523         * platform/graphics/FontDescription.cpp:
2524         (WebCore::FontDescription::FontDescription):
2525         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2526         (WebCore::FontCascade::fontForCombiningCharacterSequence):
2527         * platform/text/TextFlags.h:
2528         * rendering/style/RenderStyle.cpp:
2529         (WebCore::RenderStyle::getFontAndGlyphOrientation):
2530         * rendering/style/RenderStyle.h:
2531         * rendering/style/RenderStyleConstants.h:
2532         * rendering/style/StyleRareInheritedData.cpp:
2533         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2534         * style/StyleResolveForDocument.cpp:
2535         (WebCore::Style::resolveForDocument):
2536
2537 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
2538
2539         [Cocoa] Support WOFF2
2540         https://bugs.webkit.org/show_bug.cgi?id=150830
2541
2542         Reviewed by Zalan Bujtas.
2543
2544         On platforms which support it, WebKit only needs to recognize WOFF2.
2545
2546         Test: fast/text/woff2.html
2547
2548         * platform/graphics/mac/FontCustomPlatformData.cpp:
2549         (WebCore::FontCustomPlatformData::supportsFormat):
2550
2551 2015-11-02  Nan Wang  <n_wang@apple.com>
2552
2553         AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog
2554         https://bugs.webkit.org/show_bug.cgi?id=138566
2555
2556         Reviewed by Chris Fleizach.
2557
2558         Added support for aria-modal attribute on dialog/alertdialog roles.
2559         When modal dialog is displayed, all other contents will be unaccessible.
2560
2561         Tests: accessibility/aria-modal-multiple-dialogs.html
2562                accessibility/aria-modal.html
2563
2564         * accessibility/AXObjectCache.cpp:
2565         (WebCore::AXObjectCache::AXObjectCache):
2566         (WebCore::AXObjectCache::~AXObjectCache):
2567         (WebCore::AXObjectCache::findAriaModalNodes):
2568         (WebCore::AXObjectCache::updateCurrentAriaModalNode):
2569         (WebCore::AXObjectCache::isNodeVisible):
2570         (WebCore::AXObjectCache::ariaModalNode):
2571         (WebCore::AXObjectCache::focusedImageMapUIElement):
2572         (WebCore::AXObjectCache::remove):
2573         (WebCore::AXObjectCache::handleAttributeChanged):
2574         (WebCore::AXObjectCache::handleAriaModalChange):
2575         (WebCore::AXObjectCache::labelChanged):
2576         * accessibility/AXObjectCache.h:
2577         (WebCore::AXObjectCache::handleActiveDescendantChanged):
2578         (WebCore::AXObjectCache::handleAriaExpandedChange):
2579         (WebCore::AXObjectCache::handleAriaRoleChanged):
2580         (WebCore::AXObjectCache::handleAriaModalChange):
2581         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
2582         (WebCore::AXObjectCache::handleScrollbarUpdate):
2583         (WebCore::AXObjectCache::handleAttributeChanged):
2584         * accessibility/AccessibilityObject.cpp:
2585         (WebCore::AccessibilityObject::ariaCurrentState):
2586         (WebCore::AccessibilityObject::isAriaModalDescendant):
2587         (WebCore::AccessibilityObject::ignoredFromARIAModalPresence):
2588         (WebCore::AccessibilityObject::hasTagName):
2589         (WebCore::AccessibilityObject::defaultObjectInclusion):
2590         * accessibility/AccessibilityObject.h:
2591         * html/HTMLAttributeNames.in:
2592
2593 2015-11-02  Brady Eidson  <beidson@apple.com>
2594
2595         Modern IDB: IBDObjectStore.delete() support.
2596         https://bugs.webkit.org/show_bug.cgi?id=150784
2597
2598         Reviewed by Alex Christensen.
2599
2600         Tests: storage/indexeddb/modern/idbobjectstore-delete-1.html
2601                storage/indexeddb/modern/idbobjectstore-delete-2.html
2602                storage/indexeddb/modern/idbobjectstore-delete-failures.html
2603
2604         * Modules/indexeddb/IDBKeyRangeData.cpp:
2605         (WebCore::IDBKeyRangeData::isValid):
2606         * Modules/indexeddb/IDBKeyRangeData.h:
2607         
2608         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2609         (WebCore::IDBClient::IDBConnectionToServer::deleteRecord):
2610         (WebCore::IDBClient::IDBConnectionToServer::didDeleteRecord):
2611         * Modules/indexeddb/client/IDBConnectionToServer.h:
2612         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2613         
2614         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2615         (WebCore::IDBClient::IDBObjectStore::get):
2616         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
2617         
2618         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2619         (WebCore::IDBClient::IDBTransaction::requestDeleteRecord):
2620         (WebCore::IDBClient::IDBTransaction::deleteRecordOnServer):
2621         (WebCore::IDBClient::IDBTransaction::didDeleteRecordOnServer):
2622         * Modules/indexeddb/client/IDBTransactionImpl.h:
2623         
2624         * Modules/indexeddb/server/IDBBackingStore.h:
2625         
2626         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2627         (WebCore::IDBServer::IDBConnectionToClient::didDeleteRecord):
2628         * Modules/indexeddb/server/IDBConnectionToClient.h:
2629         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2630         
2631         * Modules/indexeddb/server/IDBServer.cpp:
2632         (WebCore::IDBServer::IDBServer::deleteRecord):
2633         * Modules/indexeddb/server/IDBServer.h:
2634         
2635         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2636         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
2637         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord): Deleted.
2638         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2639         
2640         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2641         (WebCore::IDBServer::MemoryObjectStore::deleteRange):
2642         * Modules/indexeddb/server/MemoryObjectStore.h:
2643         
2644         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2645         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2646         (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
2647         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord):
2648         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteRecord):
2649         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2650         
2651         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2652         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
2653         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
2654         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2655         
2656         * Modules/indexeddb/shared/IDBResultData.cpp:
2657         (WebCore::IDBResultData::deleteRecordSuccess):
2658         * Modules/indexeddb/shared/IDBResultData.h:
2659         
2660         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2661         (WebCore::InProcessIDBServer::didDeleteRecord):
2662         (WebCore::InProcessIDBServer::deleteRecord):
2663         * Modules/indexeddb/shared/InProcessIDBServer.h:
2664
2665 2015-11-02  Andy Estes  <aestes@apple.com>
2666
2667         Fix the iOS build again.
2668
2669         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: supportsPictureInPicture() needs to be declared even when
2670         AVKit is disabled.
2671
2672 2015-11-02  Tim Horton  <timothy_horton@apple.com>
2673
2674         PDFPlugin should take advantage of threaded scrolling
2675         https://bugs.webkit.org/show_bug.cgi?id=150037
2676
2677         Reviewed by Anders Carlsson.
2678
2679         * page/PageOverlay.cpp:
2680         (WebCore::PageOverlay::PageOverlay):
2681         (WebCore::PageOverlay::setNeedsDisplay):
2682         Don't reset the overlay layer's opacity if we're not animating,
2683         because it's possible the client wants to manage it.
2684
2685         * page/PageOverlayController.cpp:
2686         (WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
2687         Let the overlay itself determine whether it needes synchronous scrolling,
2688         and let PageOverlay clients override the default.
2689
2690         * platform/Widget.h:
2691         (WebCore::Widget::boundsRect):
2692         Export a few useful things.
2693
2694 2015-11-02  Chris Dumez  <cdumez@apple.com>
2695
2696         Regression(r191673): Crash in RunLoopTimer::schedule()
2697         https://bugs.webkit.org/show_bug.cgi?id=150816
2698         <rdar://problem/23335285>
2699
2700         Reviewed by Anders Carlsson.
2701
2702         The crash was happening when the RunLoopTimer would fire during the
2703         call to RunLoopTimer::schedule(), which can happen because we are
2704         calling schedule() from a background thread. In such case, the
2705         timerFired() callback execution would cause |this| to get destroyed.
2706
2707         To avoid this issue, DecodingResultDispatcher is now ref-counted. The
2708         object is ref'd while calling startTimer() so that the object cannot go
2709         away during the execution of this method. Also, we explicitly ref the
2710         object when starting the timer to keep the object alive until the
2711         RunLoopTimer has fired, at which point we explicitely de-ref.
2712
2713         This should handle correctly the cases where the RunLoopTimer fires
2714         during AND after the execution of startTimer().
2715
2716         * platform/network/DataURLDecoder.cpp:
2717         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
2718         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
2719         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
2720
2721 2015-11-02  Andy Estes  <aestes@apple.com>
2722
2723         [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
2724         https://bugs.webkit.org/show_bug.cgi?id=150819
2725
2726         Reviewed by Dan Bernstein.
2727
2728         This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
2729
2730         * Configurations/Base.xcconfig:
2731
2732 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
2733
2734         [Win] MiniBrowser unable to use WebInspector
2735         https://bugs.webkit.org/show_bug.cgi?id=150810
2736         <rdar://problem/23358514>
2737
2738         Reviewed by Timothy Hatcher.
2739
2740         The CMakeList rule for creating the InjectedScriptSource.min.js was improperly including
2741         the quote characters in the text prepended to InjectedScriptSource.min.js. This caused a
2742         parsing error in the JS file.
2743         
2744         The solution was to switch from using "COMMAND echo" to use the more cross-platform
2745         compatible command "COMMAND ${CMAKE_COMMAND} -E echo ...", which handles the string
2746         escaping properly on all platforms.
2747
2748         * CMakeLists.txt: Switch the 'echo' command syntax to be more cross-platform.
2749
2750 2015-11-02  Zalan Bujtas  <zalan@apple.com>
2751
2752         hasOverflowClip() does not necessarily mean valid layer().
2753         https://bugs.webkit.org/show_bug.cgi?id=150814
2754
2755         Reviewed by Simon Fraser.
2756
2757         Certain RenderLayerModelObject derived classes simply return false for ::requiresLayer(), which means
2758         that we end up not creating a layer for the overflow clipped content.   
2759
2760         No change in functionality.
2761
2762         * rendering/RenderBlock.cpp:
2763         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
2764         (WebCore::RenderBlock::paint):
2765         * rendering/RenderBox.cpp:
2766         (WebCore::RenderBox::styleDidChange):
2767         (WebCore::RenderBox::scrollWidth):
2768         (WebCore::RenderBox::scrollHeight):
2769         (WebCore::RenderBox::scrollLeft):
2770         (WebCore::RenderBox::scrollTop):
2771         (WebCore::RenderBox::setScrollLeft):
2772         (WebCore::RenderBox::setScrollTop):
2773         (WebCore::RenderBox::includeVerticalScrollbarSize):
2774         (WebCore::RenderBox::includeHorizontalScrollbarSize):
2775         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
2776         (WebCore::RenderBox::usesCompositedScrolling):
2777
2778 2015-11-02  Alex Christensen  <achristensen@webkit.org>
2779
2780         Fix Mac CMake build after r191904.
2781
2782         * PlatformMac.cmake:
2783         Move SettingsMac.mm to SettingsCocoa.mm.
2784
2785 2015-11-02  Eric Carlson  <eric.carlson@apple.com>
2786
2787         Add HTMLMediaElement behavior and attribute value restrictions for MediaStream
2788         https://bugs.webkit.org/show_bug.cgi?id=146853
2789
2790         Reviewed by Jer Noble.
2791
2792         * Modules/mediastream/MediaStream.cpp:
2793         (WebCore::MediaStream::scheduleActiveStateChange): Do nothing if the active state hasn't changed.
2794         (WebCore::MediaStream::activityEventTimerFired): Remove FIXME.
2795
2796         * Modules/mediastream/MediaStreamTrack.cpp:
2797         (WebCore::MediaStreamTrack::stopProducingData): Add comments. Notify observers that the track ended.
2798         (WebCore::MediaStreamTrack::trackEnded): Don't dispatch events after having been stopped.
2799         (WebCore::MediaStreamTrack::trackMutedChanged): Ditto.
2800
2801         * html/HTMLMediaElement.cpp:
2802         (WebCore::HTMLMediaElement::defaultPlaybackRate): Always return 1 when using a MediaStream.
2803         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Do nothing when using a MediaStream.
2804         (WebCore::HTMLMediaElement::playbackRate): Always return 1 when using a MediaStream.
2805         (WebCore::HTMLMediaElement::setPlaybackRate): Do nothing when using a MediaStream.
2806         (WebCore::HTMLMediaElement::ended): Ask the media engine when using a MediaStream.
2807         (WebCore::HTMLMediaElement::preload): Always return "none" when using a MediaStream.
2808         (WebCore::HTMLMediaElement::setPreload): Do nothing when using a MediaStream.
2809         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Avoid unnecessary comparisons when the duration
2810           is not definite. Send ended event when MediaStream says stream has ended.
2811
2812         * platform/graphics/MediaPlayer.cpp:
2813         (WebCore::MediaPlayer::ended): New, passthrough to engine.
2814         * platform/graphics/MediaPlayer.h:
2815         * platform/graphics/MediaPlayerPrivate.h:
2816
2817         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2818         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2819         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Set m_ended from stream.
2820         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Pause the stream if necessary.
2821         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Return early if ended or already playing.
2822         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Return early if ended or already paused.
2823         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Cleanup. Try to grab a paused
2824           image if the stream isn't active.
2825         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateReadyState): New.
2826         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Call updateReadyState.
2827         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Ditto.
2828
2829         * platform/mediastream/MediaStreamPrivate.cpp:
2830         (WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveState so the state will
2831           be updated if necessary.
2832
2833         * platform/mediastream/RealtimeMediaSource.cpp:
2834         (WebCore::RealtimeMediaSource::stop): Don't call reset, there is no need to tear everything down.
2835
2836 2015-10-31  Andy Estes  <aestes@apple.com>
2837
2838         Replace iOS-only WebKitSystemInterface calls with SPI
2839         https://bugs.webkit.org/show_bug.cgi?id=150763
2840
2841         Reviewed by Darin Adler.
2842
2843         * WebCore.xcodeproj/project.pbxproj:
2844         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
2845         * css/MediaQueryEvaluator.cpp:
2846         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
2847         * html/HTMLMediaElement.cpp:
2848         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2849         * html/HTMLObjectElement.cpp:
2850         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
2851         * html/HTMLVideoElement.cpp:
2852         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2853         * page/NavigatorBase.cpp:
2854         * page/Settings.h:
2855         * page/ViewportConfiguration.cpp:
2856         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
2857         * page/ios/UserAgentIOS.mm:
2858         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
2859         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
2860         (WebCore::deviceName): Ditto for wkGetDeviceName().
2861         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
2862         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
2863         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
2864         * platform/PlatformScreen.h:
2865         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
2866         (WebCore::deviceClass):
2867         (WebCore::deviceName):
2868         (WebCore::deviceHasIPadCapability):
2869         * platform/ios/Device.h:
2870         * platform/ios/PlatformScreenIOS.mm:
2871         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
2872         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
2873         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
2874         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
2875         (WebCore::mobileGestaltFloatValue): Deleted.
2876         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
2877         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
2878         (iosDeviceClass): Deleted.
2879         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2880         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2881         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2882         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2883         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
2884         * platform/ios/wak/WAKWindow.mm:
2885         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
2886         (-[WAKWindow initWithFrame:]): Ditto.
2887         * platform/ios/wak/WKGraphics.mm:
2888         (WKGraphicsCreateImageFromBundleWithName): Ditto.
2889         (WKDrawPatternBitmap): Ditto.
2890         * platform/mac/WebCoreSystemInterface.h:
2891         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
2892         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
2893         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
2894         * rendering/RenderThemeIOS.mm: Included UIKitSPI.h instead of UIColorSPI.h, and removed unnecessary forward declarations for the iOS public SDK build.
2895
2896 2015-11-02  Commit Queue  <commit-queue@webkit.org>
2897
2898         Unreviewed, rolling out r191902.
2899         https://bugs.webkit.org/show_bug.cgi?id=150811
2900
2901         This change broke iOS builders (Requested by ryanhaddad on
2902         #webkit).
2903
2904         Reverted changeset:
2905
2906         "Replace iOS-only WebKitSystemInterface calls with SPI"
2907         https://bugs.webkit.org/show_bug.cgi?id=150763
2908         http://trac.webkit.org/changeset/191902
2909
2910 2015-10-31  Andy Estes  <aestes@apple.com>
2911
2912         Replace iOS-only WebKitSystemInterface calls with SPI
2913         https://bugs.webkit.org/show_bug.cgi?id=150763
2914
2915         Reviewed by Darin Adler.
2916
2917         * WebCore.xcodeproj/project.pbxproj:
2918         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
2919         * css/MediaQueryEvaluator.cpp:
2920         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
2921         * html/HTMLMediaElement.cpp:
2922         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2923         * html/HTMLObjectElement.cpp:
2924         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
2925         * html/HTMLVideoElement.cpp:
2926         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2927         * page/NavigatorBase.cpp:
2928         * page/Settings.h:
2929         * page/ViewportConfiguration.cpp:
2930         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
2931         * page/ios/UserAgentIOS.mm:
2932         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
2933         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
2934         (WebCore::deviceName): Ditto for wkGetDeviceName().
2935         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
2936         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
2937         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
2938         * platform/PlatformScreen.h:
2939         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
2940         (WebCore::deviceClass):
2941         (WebCore::deviceName):
2942         (WebCore::deviceHasIPadCapability):
2943         * platform/ios/Device.h:
2944         * platform/ios/PlatformScreenIOS.mm:
2945         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
2946         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
2947         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
2948         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
2949         (WebCore::mobileGestaltFloatValue): Deleted.
2950         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
2951         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
2952         (iosDeviceClass): Deleted.
2953         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2954         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2955         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2956         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2957         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
2958         * platform/ios/wak/WAKWindow.mm:
2959         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
2960         (-[WAKWindow initWithFrame:]): Ditto.
2961         * platform/ios/wak/WKGraphics.mm:
2962         (WKGraphicsCreateImageFromBundleWithName): Ditto.
2963         (WKDrawPatternBitmap): Ditto.
2964         * platform/mac/WebCoreSystemInterface.h:
2965         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
2966         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
2967         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
2968         * rendering/RenderThemeIOS.mm:
2969
2970 2015-11-02  Frederic Wang  <fred.wang@free.fr>
2971
2972         [Win] Add support for the USE_TYPO_METRICS flag
2973         https://bugs.webkit.org/show_bug.cgi?id=150451
2974
2975         Reviewed by Darin Adler.
2976
2977         Make the Windows backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
2978
2979         No new tests because this is already tested by fonts/use-typo-metrics-1.html
2980
2981         * platform/graphics/win/SimpleFontDataCGWin.cpp:
2982         (WebCore::Font::platformInit):
2983         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2984         (WebCore::Font::platformInit):
2985         * platform/graphics/win/SimpleFontDataWin.cpp:
2986         (WebCore::Font::initGDIFont):
2987
2988 2015-11-02  Hyunduk Kim  <hyunduk.kim@samsung.com>
2989
2990         Enable MediaSource::isTypeSupported() to handle the upper-cased MIME type & Codec
2991         https://bugs.webkit.org/show_bug.cgi?id=150436
2992
2993         Reviewed by Darin Adler.
2994
2995         Got the new test case from
2996         https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html 
2997         Tests: http\tests\media\media-source\mediasource-is-type-supported.html
2998
2999         * Modules/mediasource/MediaSource.cpp:
3000         (WebCore::MediaSource::isTypeSupported):
3001
3002 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3003
3004         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
3005         https://bugs.webkit.org/show_bug.cgi?id=150613
3006
3007         Reviewed by Darin Adler.
3008
3009         Renaming impl to wrapped in classes and binding generated classes.
3010         No change in behavior.
3011
3012         * Modules/plugins/QuickTimePluginReplacement.mm:
3013         (WebCore::JSQuickTimePluginReplacement::timedMetaData):
3014         (WebCore::JSQuickTimePluginReplacement::accessLog):
3015         (WebCore::JSQuickTimePluginReplacement::errorLog):
3016         * bindings/js/JSAttrCustom.cpp:
3017         (WebCore::JSAttr::visitAdditionalChildren):
3018         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
3019         (WebCore::JSAudioBufferSourceNode::setBuffer):
3020         * bindings/js/JSAudioTrackCustom.cpp:
3021         (WebCore::JSAudioTrack::visitAdditionalChildren):
3022         (WebCore::JSAudioTrack::setKind):
3023         (WebCore::JSAudioTrack::setLanguage):
3024         * bindings/js/JSAudioTrackListCustom.cpp:
3025         (WebCore::JSAudioTrackList::visitAdditionalChildren):
3026         * bindings/js/JSBiquadFilterNodeCustom.cpp:
3027         (WebCore::JSBiquadFilterNode::setType):
3028         * bindings/js/JSCSSRuleCustom.cpp:
3029         (WebCore::JSCSSRule::visitAdditionalChildren):
3030         * bindings/js/JSCSSRuleListCustom.cpp:
3031         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
3032         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3033         (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren):
3034         (WebCore::getPropertyValueFallback):
3035         (WebCore::cssPropertyGetterPixelOrPosPrefix):
3036         (WebCore::cssPropertyGetter):
3037         (WebCore::JSCSSStyleDeclaration::putDelegate):
3038         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
3039         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
3040         * bindings/js/JSCSSValueCustom.cpp:
3041         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
3042         (WebCore::JSCSSValueOwner::finalize):
3043         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3044         (WebCore::toHTMLCanvasStyle):
3045         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
3046         (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
3047         (WebCore::JSCanvasRenderingContext2D::fillStyle):
3048         (WebCore::JSCanvasRenderingContext2D::setFillStyle):
3049         (WebCore::JSCanvasRenderingContext2D::webkitLineDash):
3050         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
3051         * bindings/js/JSCanvasRenderingContextCustom.cpp:
3052         (WebCore::JSCanvasRenderingContext::visitAdditionalChildren):
3053         * bindings/js/JSCharacterDataCustom.cpp:
3054         (WebCore::JSCharacterData::before):
3055         (WebCore::JSCharacterData::after):
3056         (WebCore::JSCharacterData::replaceWith):
3057         * bindings/js/JSCommandLineAPIHostCustom.cpp:
3058         (WebCore::JSCommandLineAPIHost::inspectedObject):
3059         (WebCore::JSCommandLineAPIHost::getEventListeners):
3060         (WebCore::JSCommandLineAPIHost::inspect):
3061         (WebCore::JSCommandLineAPIHost::databaseId):
3062         (WebCore::JSCommandLineAPIHost::storageId):
3063         * bindings/js/JSCryptoCustom.cpp:
3064         (WebCore::JSCrypto::getRandomValues):
3065         * bindings/js/JSCryptoKeyCustom.cpp:
3066         (WebCore::JSCryptoKey::algorithm):
3067         * bindings/js/JSCryptoKeyPairCustom.cpp:
3068         (WebCore::JSCryptoKeyPair::visitAdditionalChildren):
3069         * bindings/js/JSCustomEventCustom.cpp:
3070         (WebCore::JSCustomEvent::detail):
3071         * bindings/js/JSCustomXPathNSResolver.cpp:
3072         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3073         * bindings/js/JSDOMBinding.cpp:
3074         (WebCore::reportException):
3075         (WebCore::activeDOMWindow):
3076         (WebCore::firstDOMWindow):
3077         * bindings/js/JSDOMFormDataCustom.cpp:
3078         (WebCore::toHTMLFormElementOrNull):
3079         (WebCore::JSDOMFormData::append):
3080         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
3081         (WebCore::JSDOMMimeTypeArray::nameGetter):
3082         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
3083         (WebCore::JSDOMNamedFlowCollection::nameGetter):
3084         * bindings/js/JSDOMPluginArrayCustom.cpp:
3085         (WebCore::JSDOMPluginArray::nameGetter):
3086         * bindings/js/JSDOMPluginCustom.cpp:
3087         (WebCore::JSDOMPlugin::nameGetter):
3088         * bindings/js/JSDOMStringListCustom.cpp:
3089         (WebCore::JSDOMStringList::toWrapped):
3090         * bindings/js/JSDOMStringMapCustom.cpp:
3091         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
3092         (WebCore::JSDOMStringMap::getOwnPropertyNames):
3093         (WebCore::JSDOMStringMap::deleteProperty):
3094         (WebCore::JSDOMStringMap::putDelegate):
3095         * bindings/js/JSDOMTokenListCustom.cpp:
3096         (WebCore::JSDOMTokenList::toggle):
3097         * bindings/js/JSDOMWindowBase.cpp:
3098         (WebCore::shouldAllowAccessFrom):
3099         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3100         (WebCore::JSDOMWindowBase::updateDocument):
3101         (WebCore::JSDOMWindowBase::scriptExecutionContext):
3102         (WebCore::JSDOMWindowBase::printErrorMessage):
3103         (WebCore::JSDOMWindowBase::supportsProfiling):
3104         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
3105         (WebCore::JSDOMWindowBase::shouldInterruptScript):
3106         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
3107         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
3108         (WebCore::JSDOMWindowBase::moduleLoaderResolve):
3109         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
3110         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
3111         * bindings/js/JSDOMWindowBase.h:
3112         * bindings/js/JSDOMWindowCustom.cpp:
3113         (WebCore::JSDOMWindow::visitAdditionalChildren):
3114         (WebCore::childFrameGetter):
3115         (WebCore::namedItemGetter):
3116         (WebCore::jsDOMWindowWebKit):
3117         (WebCore::jsDOMWindowIndexedDB):
3118         (WebCore::JSDOMWindow::getOwnPropertySlot):
3119         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3120         (WebCore::JSDOMWindow::put):
3121         (WebCore::JSDOMWindow::putByIndex):
3122         (WebCore::JSDOMWindow::deleteProperty):
3123         (WebCore::JSDOMWindow::deletePropertyByIndex):
3124         (WebCore::JSDOMWindow::getEnumerableLength):
3125         (WebCore::JSDOMWindow::getStructurePropertyNames):
3126         (WebCore::JSDOMWindow::getGenericPropertyNames):
3127         (WebCore::JSDOMWindow::getPropertyNames):
3128         (WebCore::JSDOMWindow::getOwnPropertyNames):
3129         (WebCore::JSDOMWindow::defineOwnProperty):
3130         (WebCore::JSDOMWindow::setLocation):
3131         (WebCore::JSDOMWindow::open):
3132         (WebCore::JSDOMWindow::showModalDialog):
3133         (WebCore::JSDOMWindow::postMessage):
3134         (WebCore::JSDOMWindow::setTimeout):
3135         (WebCore::JSDOMWindow::setInterval):
3136         (WebCore::JSDOMWindow::addEventListener):
3137         (WebCore::JSDOMWindow::removeEventListener):
3138         (WebCore::JSDOMWindow::toWrapped):
3139         * bindings/js/JSDOMWindowShell.cpp:
3140         (WebCore::JSDOMWindowShell::setWindow):
3141         (WebCore::JSDOMWindowShell::wrapped):
3142         * bindings/js/JSDOMWindowShell.h:
3143         * bindings/js/JSDOMWrapper.h:
3144         (WebCore::JSDOMWrapper::wrapped):
3145         (WebCore::JSDOMWrapper::JSDOMWrapper):
3146         * bindings/js/JSDataCueCustom.cpp:
3147         (WebCore::JSDataCue::value):
3148         (WebCore::JSDataCue::setValue):
3149         * bindings/js/JSDataTransferCustom.cpp:
3150         (WebCore::JSDataTransfer::types):
3151         * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp:
3152         (WebCore::JSDedicatedWorkerGlobalScope::postMessage):
3153         * bindings/js/JSDeviceMotionEventCustom.cpp:
3154         (WebCore::JSDeviceMotionEvent::acceleration):
3155         (WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
3156         (WebCore::JSDeviceMotionEvent::rotationRate):
3157         (WebCore::JSDeviceMotionEvent::interval):
3158         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
3159         * bindings/js/JSDeviceOrientationEventCustom.cpp:
3160         (WebCore::JSDeviceOrientationEvent::alpha):
3161         (WebCore::JSDeviceOrientationEvent::beta):
3162         (WebCore::JSDeviceOrientationEvent::gamma):
3163         (WebCore::JSDeviceOrientationEvent::webkitCompassHeading):
3164         (WebCore::JSDeviceOrientationEvent::webkitCompassAccuracy):
3165         (WebCore::JSDeviceOrientationEvent::absolute):
3166         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
3167         * bindings/js/JSDocumentCustom.cpp:
3168         (WebCore::JSDocument::prepend):
3169         (WebCore::JSDocument::append):
3170         * bindings/js/JSDocumentFragmentCustom.cpp:
3171         (WebCore::JSDocumentFragment::prepend):
3172         (WebCore::JSDocumentFragment::append):
3173         * bindings/js/JSDocumentTypeCustom.cpp:
3174         (WebCore::JSDocumentType::before):
3175         (WebCore::JSDocumentType::after):
3176         (WebCore::JSDocumentType::replaceWith):
3177         * bindings/js/JSElementCustom.cpp:
3178         (WebCore::JSElement::before):
3179         (WebCore::JSElement::after):
3180         (WebCore::JSElement::replaceWith):
3181         (WebCore::JSElement::prepend):
3182         (WebCore::JSElement::append):
3183         * bindings/js/JSEventCustom.cpp:
3184         (WebCore::JSEvent::clipboardData):
3185         * bindings/js/JSEventListener.cpp:
3186         (WebCore::JSEventListener::handleEvent):
3187         * bindings/js/JSEventTargetCustom.cpp:
3188         * bindings/js/JSFileReaderCustom.cpp:
3189         (WebCore::JSFileReader::result):
3190         * bindings/js/JSGeolocationCustom.cpp:
3191         (WebCore::JSGeolocation::getCurrentPosition):
3192         (WebCore::JSGeolocation::watchPosition):
3193         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3194         (WebCore::namedItems):
3195         (WebCore::callHTMLAllCollection):
3196         (WebCore::JSHTMLAllCollection::item):
3197         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3198         (WebCore::JSHTMLCanvasElement::getContext):
3199         (WebCore::JSHTMLCanvasElement::probablySupportsContext):
3200         (WebCore::JSHTMLCanvasElement::toDataURL):
3201         * bindings/js/JSHTMLCollectionCustom.cpp:
3202         (WebCore::JSHTMLCollection::nameGetter):
3203         * bindings/js/JSHTMLDocumentCustom.cpp:
3204         (WebCore::JSHTMLDocument::nameGetter):
3205         (WebCore::JSHTMLDocument::all):
3206         (WebCore::findCallingDocument):
3207         (WebCore::JSHTMLDocument::open):
3208         (WebCore::documentWrite):
3209         * bindings/js/JSHTMLElementCustom.cpp:
3210         (WebCore::JSHTMLElement::pushEventHandlerScope):
3211         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
3212         (WebCore::namedItems):
3213         * bindings/js/JSHTMLFormElementCustom.cpp:
3214         (WebCore::JSHTMLFormElement::nameGetter):
3215         * bindings/js/JSHTMLFrameElementCustom.cpp:
3216         (WebCore::JSHTMLFrameElement::setLocation):
3217         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3218         (WebCore::JSHTMLFrameSetElement::nameGetter):
3219         * bindings/js/JSHTMLInputElementCustom.cpp:
3220         (WebCore::JSHTMLInputElement::selectionStart):
3221         (WebCore::JSHTMLInputElement::setSelectionStart):
3222         (WebCore::JSHTMLInputElement::selectionEnd):
3223         (WebCore::JSHTMLInputElement::setSelectionEnd):
3224         (WebCore::JSHTMLInputElement::selectionDirection):
3225         (WebCore::JSHTMLInputElement::setSelectionDirection):
3226         (WebCore::JSHTMLInputElement::setSelectionRange):
3227         * bindings/js/JSHTMLMediaElementCustom.cpp:
3228         (WebCore::JSHTMLMediaElement::setController):
3229         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
3230         (WebCore::JSHTMLOptionsCollection::nameGetter):
3231         (WebCore::JSHTMLOptionsCollection::setLength):
3232         (WebCore::JSHTMLOptionsCollection::indexSetter):
3233         (WebCore::JSHTMLOptionsCollection::remove):
3234         * bindings/js/JSHTMLSelectElementCustom.cpp:
3235         (WebCore::JSHTMLSelectElement::remove):
3236         (WebCore::JSHTMLSelectElement::indexSetter):
3237         * bindings/js/JSHTMLTemplateElementCustom.cpp:
3238         (WebCore::JSHTMLTemplateElement::content):
3239         * bindings/js/JSHistoryCustom.cpp:
3240         (WebCore::JSHistory::getOwnPropertySlotDelegate):
3241         (WebCore::JSHistory::putDelegate):
3242         (WebCore::JSHistory::deleteProperty):
3243         (WebCore::JSHistory::deletePropertyByIndex):
3244         (WebCore::JSHistory::getOwnPropertyNames):
3245         (WebCore::JSHistory::state):
3246         (WebCore::JSHistory::pushState):
3247         (WebCore::JSHistory::replaceState):
3248         * bindings/js/JSIDBDatabaseCustom.cpp:
3249         (WebCore::JSIDBDatabase::createObjectStore):
3250         * bindings/js/JSIDBObjectStoreCustom.cpp:
3251         (WebCore::JSIDBObjectStore::createIndex):
3252         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3253         (WebCore::JSInspectorFrontendHost::showContextMenu):
3254         * bindings/js/JSLocationCustom.cpp:
3255         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3256         (WebCore::JSLocation::putDelegate):
3257         (WebCore::JSLocation::deleteProperty):
3258         (WebCore::JSLocation::deletePropertyByIndex):
3259         (WebCore::JSLocation::getOwnPropertyNames):
3260         (WebCore::JSLocation::toStringFunction):
3261         * bindings/js/JSMediaSourceStatesCustom.cpp:
3262         (WebCore::JSMediaSourceStates::width):
3263         (WebCore::JSMediaSourceStates::height):
3264         (WebCore::JSMediaSourceStates::frameRate):
3265         (WebCore::JSMediaSourceStates::aspectRatio):
3266         (WebCore::JSMediaSourceStates::facingMode):
3267         (WebCore::JSMediaSourceStates::volume):
3268         * bindings/js/JSMessageChannelCustom.cpp:
3269         (WebCore::JSMessageChannel::visitAdditionalChildren):
3270         * bindings/js/JSMessageEventCustom.cpp:
3271         (WebCore::JSMessageEvent::data):
3272         (WebCore::handleInitMessageEvent):
3273         * bindings/js/JSMessagePortCustom.cpp:
3274         (WebCore::JSMessagePort::visitAdditionalChildren):
3275         (WebCore::JSMessagePort::postMessage):
3276         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
3277         (WebCore::JSMockContentFilterSettings::decisionPoint):
3278         (WebCore::JSMockContentFilterSettings::setDecisionPoint):
3279         (WebCore::JSMockContentFilterSettings::decision):
3280         (WebCore::JSMockContentFilterSettings::setDecision):
3281         (WebCore::JSMockContentFilterSettings::unblockRequestDecision):
3282         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision):
3283         * bindings/js/JSMutationObserverCustom.cpp:
3284         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
3285         * bindings/js/JSNamedNodeMapCustom.cpp:
3286         (WebCore::JSNamedNodeMap::nameGetter):
3287         * bindings/js/JSNavigatorCustom.cpp:
3288         (WebCore::JSNavigator::webkitGetUserMedia):
3289         * bindings/js/JSNodeCustom.cpp:
3290         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
3291         (WebCore::JSNode::insertBefore):
3292         (WebCore::JSNode::replaceChild):
3293         (WebCore::JSNode::removeChild):
3294         (WebCore::JSNode::appendChild):
3295         (WebCore::JSNode::visitAdditionalChildren):
3296         * bindings/js/JSNodeIteratorCustom.cpp:
3297         (WebCore::JSNodeIterator::visitAdditionalChildren):
3298         * bindings/js/JSNodeListCustom.cpp:
3299         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3300         * bindings/js/JSNodeOrString.cpp:
3301         (WebCore::toNodeOrStringVector):
3302         * bindings/js/JSOscillatorNodeCustom.cpp:
3303         (WebCore::JSOscillatorNode::setType):
3304         * bindings/js/JSPannerNodeCustom.cpp:
3305         (WebCore::JSPannerNode::setPanningModel):
3306         (WebCore::JSPannerNode::setDistanceModel):
3307         * bindings/js/JSPluginElementFunctions.cpp:
3308         (WebCore::pluginScriptObjectFromPluginViewBase):
3309         (WebCore::pluginScriptObject):
3310         (WebCore::pluginElementGetCallData):
3311         * bindings/js/JSPopStateEventCustom.cpp:
3312         (WebCore::JSPopStateEvent::state):
3313         * bindings/js/JSRTCStatsResponseCustom.cpp:
3314         (WebCore::JSRTCStatsResponse::nameGetter):
3315         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3316         (WebCore::JSSQLResultSetRowList::item):
3317         * bindings/js/JSSQLTransactionCustom.cpp:
3318         (WebCore::JSSQLTransaction::executeSql):
3319         * bindings/js/JSSVGLengthCustom.cpp:
3320         (WebCore::JSSVGLength::value):
3321         (WebCore::JSSVGLength::setValue):
3322         (WebCore::JSSVGLength::convertToSpecifiedUnits):
3323         * bindings/js/JSStorageCustom.cpp:
3324         (WebCore::JSStorage::nameGetter):
3325         (WebCore::JSStorage::deleteProperty):
3326         (WebCore::JSStorage::getOwnPropertyNames):
3327         (WebCore::JSStorage::putDelegate):
3328         * bindings/js/JSStyleSheetCustom.cpp:
3329         (WebCore::JSStyleSheet::visitAdditionalChildren):
3330         * bindings/js/JSStyleSheetListCustom.cpp:
3331         (WebCore::JSStyleSheetList::nameGetter):
3332         * bindings/js/JSSubtleCryptoCustom.cpp:
3333         (WebCore::JSSubtleCrypto::encrypt):
3334         (WebCore::JSSubtleCrypto::decrypt):
3335         (WebCore::JSSubtleCrypto::sign):
3336         (WebCore::JSSubtleCrypto::verify):
3337         (WebCore::JSSubtleCrypto::wrapKey):
3338         (WebCore::JSSubtleCrypto::unwrapKey):
3339         * bindings/js/JSTextTrackCueCustom.cpp:
3340         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
3341         (WebCore::JSTextTrackCue::visitAdditionalChildren):
3342         * bindings/js/JSTextTrackCustom.cpp:
3343         (WebCore::JSTextTrack::visitAdditionalChildren):
3344         (WebCore::JSTextTrack::setKind):
3345         (WebCore::JSTextTrack::setLanguage):
3346         * bindings/js/JSTextTrackListCustom.cpp:
3347         (WebCore::JSTextTrackList::visitAdditionalChildren):
3348         * bindings/js/JSTrackCustom.cpp:
3349         (WebCore::toTrack):
3350         * bindings/js/JSTrackEventCustom.cpp:
3351         (WebCore::JSTrackEvent::track):
3352         * bindings/js/JSTreeWalkerCustom.cpp:
3353         (WebCore::JSTreeWalker::visitAdditionalChildren):
3354         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
3355         (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
3356         * bindings/js/JSVideoTrackCustom.cpp:
3357         (WebCore::JSVideoTrack::visitAdditionalChildren):
3358         (WebCore::JSVideoTrack::setKind):
3359         (WebCore::JSVideoTrack::setLanguage):
3360         * bindings/js/JSVideoTrackListCustom.cpp:
3361         (WebCore::JSVideoTrackList::visitAdditionalChildren):
3362         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
3363         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
3364         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
3365         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
3366         (WebCore::getObjectParameter):
3367         (WebCore::JSWebGLRenderingContextBase::visitAdditionalChildren):
3368         (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
3369         (WebCore::JSWebGLRenderingContextBase::getExtension):
3370         (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter):
3371         (WebCore::JSWebGLRenderingContextBase::getParameter):
3372         (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
3373         (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
3374         (WebCore::JSWebGLRenderingContextBase::getSupportedExtensions):
3375         (WebCore::JSWebGLRenderingContextBase::getUniform):
3376         (WebCore::JSWebGLRenderingContextBase::uniform1fv):
3377         (WebCore::JSWebGLRenderingContextBase::uniform1iv):
3378         (WebCore::JSWebGLRenderingContextBase::uniform2fv):
3379         (WebCore::JSWebGLRenderingContextBase::uniform2iv):
3380         (WebCore::JSWebGLRenderingContextBase::uniform3fv):
3381         (WebCore::JSWebGLRenderingContextBase::uniform3iv):
3382         (WebCore::JSWebGLRenderingContextBase::uniform4fv):
3383         (WebCore::JSWebGLRenderingContextBase::uniform4iv):
3384         (WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv):
3385         (WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv):
3386         (WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv):
3387         (WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv):
3388         (WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv):
3389         (WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv):
3390         (WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv):
3391         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3392         (WebCore::JSWebGLRenderingContext::visitAdditionalChildren):
3393         * bindings/js/JSWorkerCustom.cpp:
3394         (WebCore::JSWorker::postMessage):
3395         (WebCore::constructJSWorker):
3396         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3397         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
3398         (WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
3399         * bindings/js/JSWorkerGlobalScopeBase.h:
3400         (WebCore::JSWorkerGlobalScopeBase::wrapped):
3401         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3402         (WebCore::JSWorkerGlobalScope::visitAdditionalChildren):
3403         (WebCore::JSWorkerGlobalScope::importScripts):
3404         (WebCore::JSWorkerGlobalScope::setTimeout):
3405         (WebCore::JSWorkerGlobalScope::setInterval):
3406         * bindings/js/JSXMLHttpRequestCustom.cpp:
3407         (WebCore::JSXMLHttpRequest::visitAdditionalChildren):
3408         (WebCore::JSXMLHttpRequest::open):
3409         (WebCore::JSXMLHttpRequest::send):
3410         (WebCore::JSXMLHttpRequest::responseText):
3411         (WebCore::JSXMLHttpRequest::response):
3412         * bindings/js/JSXPathResultCustom.cpp:
3413         (WebCore::JSXPathResult::visitAdditionalChildren):
3414         * bindings/js/JSXSLTProcessorCustom.cpp:
3415         (WebCore::JSXSLTProcessor::setParameter):
3416         (WebCore::JSXSLTProcessor::getParameter):
3417         (WebCore::JSXSLTProcessor::removeParameter):
3418         * bindings/js/ScheduledAction.cpp:
3419         (WebCore::ScheduledAction::execute):
3420         * bindings/js/ScriptCachedFrameData.cpp:
3421         (WebCore::ScriptCachedFrameData::restore):
3422         * bindings/js/ScriptController.cpp:
3423         (WebCore::ScriptController::clearWindowShell):
3424         (WebCore::ScriptController::collectIsolatedContexts):
3425         * bindings/js/ScriptState.cpp:
3426         (WebCore::domWindowFromExecState):
3427         * bindings/objc/DOM.mm:
3428         (+[DOMNode _nodeFromJSWrapper:]):
3429         * bindings/objc/DOMUtility.mm:
3430         (JSC::createDOMWrapper):
3431         * bindings/objc/WebScriptObject.mm:
3432         (-[WebScriptObject _isSafeScript]):
3433         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
3434         * bindings/scripts/CodeGeneratorJS.pm:
3435         (GenerateGetOwnPropertySlotBody):
3436         (GenerateHeader):
3437         (GetIndexedGetterExpression):
3438         (GenerateImplementation):
3439         (NativeToJSValue):
3440         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3441         (WebCore::jsTestActiveDOMObjectExcitingAttr):
3442         (WebCore::jsTestActiveDOMObjectConstructor):
3443         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
3444         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
3445         (WebCore::JSTestActiveDOMObjectOwner::finalize):
3446         (WebCore::JSTestActiveDOMObject::toWrapped):
3447         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3448         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
3449         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
3450         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3451         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
3452         (WebCore::JSTestCustomNamedGetterOwner::finalize):
3453         (WebCore::JSTestCustomNamedGetter::toWrapped):
3454         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3455         (WebCore::jsTestEventConstructorAttr1):
3456         (WebCore::jsTestEventConstructorAttr2):
3457         (WebCore::JSTestEventConstructorOwner::finalize):
3458         (WebCore::JSTestEventConstructor::toWrapped):
3459         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3460         (WebCore::JSTestEventTarget::getOwnPropertySlot):
3461         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
3462         (WebCore::JSTestEventTarget::getOwnPropertyNames):
3463         (WebCore::jsTestEventTargetPrototypeFunctionItem):
3464         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
3465         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
3466         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
3467         (WebCore::JSTestEventTarget::visitChildren):
3468         (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
3469         (WebCore::JSTestEventTargetOwner::finalize):
3470         (WebCore::JSTestEventTarget::toWrapped):
3471         * bindings/scripts/test/JS/JSTestException.cpp:
3472         (WebCore::jsTestExceptionName):
3473         (WebCore::JSTestExceptionOwner::finalize):
3474         (WebCore::JSTestException::toWrapped):
3475         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3476         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
3477         (WebCore::JSTestGenerateIsReachableOwner::finalize):
3478         (WebCore::JSTestGenerateIsReachable::toWrapped):
3479         * bindings/scripts/test/JS/JSTestInterface.cpp:
3480         (WebCore::jsTestInterfaceImplementsStr1):
3481         (WebCore::jsTestInterfaceImplementsStr2):
3482         (WebCore::jsTestInterfaceImplementsNode):
3483         (WebCore::jsTestInterfaceSupplementalStr1):
3484         (WebCore::jsTestInterfaceSupplementalStr2):
3485         (WebCore::jsTestInterfaceSupplementalNode):
3486         (WebCore::setJSTestInterfaceImplementsStr2):
3487         (WebCore::setJSTestInterfaceImplementsNode):
3488         (WebCore::setJSTestInterfaceSupplementalStr2):
3489         (WebCore::setJSTestInterfaceSupplementalNode):
3490         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
3491         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
3492         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
3493         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
3494         (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
3495         (WebCore::JSTestInterfaceOwner::finalize):
3496         (WebCore::JSTestInterface::toWrapped):
3497         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3498         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
3499         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
3500         (WebCore::JSTestMediaQueryListListener::toWrapped):
3501         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3502         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
3503         (WebCore::JSTestNamedConstructorOwner::finalize):
3504         (WebCore::JSTestNamedConstructor::toWrapped):
3505         * bindings/scripts/test/JS/JSTestNode.cpp:
3506         (WebCore::jsTestNodeName):
3507         (WebCore::setJSTestNodeName):
3508         (WebCore::JSTestNode::visitChildren):
3509         * bindings/scripts/test/JS/JSTestNode.h:
3510         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3511         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr):
3512         (WebCore::jsTestNondeterministicNondeterministicWriteableAttr):
3513         (WebCore::jsTestNondeterministicNondeterministicExceptionAttr):
3514         (WebCore::jsTestNondeterministicNondeterministicGetterExceptionAttr):
3515         (WebCore::jsTestNondeterministicNondeterministicSetterExceptionAttr):
3516         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
3517         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
3518         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
3519         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
3520         (WebCore::jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction):
3521         (WebCore::JSTestNondeterministicOwner::finalize):
3522         (WebCore::JSTestNondeterministic::toWrapped):
3523         * bindings/scripts/test/JS/JSTestObj.cpp:
3524         (WebCore::jsTestObjReadOnlyLongAttr):
3525         (WebCore::jsTestObjReadOnlyStringAttr):
3526         (WebCore::jsTestObjReadOnlyTestObjAttr):
3527         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
3528         (WebCore::jsTestObjEnumAttr):
3529         (WebCore::jsTestObjByteAttr):
3530         (WebCore::jsTestObjOctetAttr):
3531         (WebCore::jsTestObjShortAttr):
3532         (WebCore::jsTestObjUnsignedShortAttr):
3533         (WebCore::jsTestObjLongAttr):
3534         (WebCore::jsTestObjLongLongAttr):
3535         (WebCore::jsTestObjUnsignedLongLongAttr):
3536         (WebCore::jsTestObjStringAttr):
3537         (WebCore::jsTestObjTestObjAttr):
3538         (WebCore::jsTestObjXMLObjAttr):
3539         (WebCore::jsTestObjCreate):
3540         (WebCore::jsTestObjReflectedStringAttr):
3541         (WebCore::jsTestObjReflectedIntegralAttr):
3542         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
3543         (WebCore::jsTestObjReflectedBooleanAttr):
3544         (WebCore::jsTestObjReflectedURLAttr):
3545         (WebCore::jsTestObjReflectedCustomIntegralAttr):
3546         (WebCore::jsTestObjReflectedCustomBooleanAttr):
3547         (WebCore::jsTestObjReflectedCustomURLAttr):
3548         (WebCore::jsTestObjTypedArrayAttr):
3549         (WebCore::jsTestObjAttrWithGetterException):
3550         (WebCore::jsTestObjAttrWithSetterException):
3551         (WebCore::jsTestObjStringAttrWithGetterException):
3552         (WebCore::jsTestObjStringAttrWithSetterException):
3553         (WebCore::jsTestObjStrictTypeCheckingAttribute):
3554         (WebCore::jsTestObjOnfoo):
3555         (WebCore::jsTestObjWithScriptStateAttribute):
3556         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
3557         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
3558         (WebCore::jsTestObjWithScriptStateAttributeRaises):
3559         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3560         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
3561         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3562         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3563         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
3564         (WebCore::jsTestObjConditionalAttr1):
3565         (WebCore::jsTestObjConditionalAttr2):
3566         (WebCore::jsTestObjConditionalAttr3):
3567         (WebCore::jsTestObjCachedAttribute1):
3568         (WebCore::jsTestObjCachedAttribute2):
3569         (WebCore::jsTestObjAnyAttribute):
3570         (WebCore::jsTestObjContentDocument):
3571         (WebCore::jsTestObjMutablePoint):
3572         (WebCore::jsTestObjImmutablePoint):
3573         (WebCore::jsTestObjStrawberry):
3574         (WebCore::jsTestObjStrictFloat):
3575         (WebCore::jsTestObjDescription):
3576         (WebCore::jsTestObjId):
3577         (WebCore::jsTestObjHash):
3578         (WebCore::jsTestObjReplaceableAttribute):
3579         (WebCore::jsTestObjNullableDoubleAttribute):
3580         (WebCore::jsTestObjNullableLongAttribute):
3581         (WebCore::jsTestObjNullableBooleanAttribute):
3582         (WebCore::jsTestObjNullableStringAttribute):
3583         (WebCore::jsTestObjNullableLongSettableAttribute):
3584         (WebCore::jsTestObjNullableStringValue):
3585         (WebCore::jsTestObjAttribute):
3586         (WebCore::jsTestObjAttributeWithReservedEnumType):
3587         (WebCore::jsTestObjPutForwardsAttribute):
3588         (WebCore::jsTestObjPutForwardsNullableAttribute):
3589         (WebCore::setJSTestObjEnumAttr):
3590         (WebCore::setJSTestObjByteAttr):
3591         (WebCore::setJSTestObjOctetAttr):
3592         (WebCore::setJSTestObjShortAttr):
3593         (WebCore::setJSTestObjUnsignedShortAttr):
3594         (WebCore::setJSTestObjLongAttr):
3595         (WebCore::setJSTestObjLongLongAttr):
3596         (WebCore::setJSTestObjUnsignedLongLongAttr):
3597         (WebCore::setJSTestObjStringAttr):
3598         (WebCore::setJSTestObjTestObjAttr):
3599         (WebCore::setJSTestObjXMLObjAttr):
3600         (WebCore::setJSTestObjCreate):
3601         (WebCore::setJSTestObjReflectedStringAttr):
3602         (WebCore::setJSTestObjReflectedIntegralAttr):
3603         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
3604         (WebCore::setJSTestObjReflectedBooleanAttr):
3605         (WebCore::setJSTestObjReflectedURLAttr):
3606         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
3607         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
3608         (WebCore::setJSTestObjReflectedCustomURLAttr):
3609         (WebCore::setJSTestObjTypedArrayAttr):
3610         (WebCore::setJSTestObjAttrWithGetterException):
3611         (WebCore::setJSTestObjAttrWithSetterException):
3612         (WebCore::setJSTestObjStringAttrWithGetterException):
3613         (WebCore::setJSTestObjStringAttrWithSetterException):
3614         (WebCore::setJSTestObjStrictTypeCheckingAttribute):
3615         (WebCore::setJSTestObjOnfoo):
3616         (WebCore::setJSTestObjWithScriptStateAttribute):
3617         (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
3618         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3619         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
3620         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3621         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3622         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3623         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3624         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
3625         (WebCore::setJSTestObjConditionalAttr1):
3626         (WebCore::setJSTestObjConditionalAttr2):
3627         (WebCore::setJSTestObjConditionalAttr3):
3628         (WebCore::setJSTestObjAnyAttribute):
3629         (WebCore::setJSTestObjMutablePoint):
3630         (WebCore::setJSTestObjImmutablePoint):
3631         (WebCore::setJSTestObjStrawberry):
3632         (WebCore::setJSTestObjStrictFloat):
3633         (WebCore::setJSTestObjId):
3634         (WebCore::setJSTestObjNullableLongSettableAttribute):
3635         (WebCore::setJSTestObjNullableStringValue):
3636         (WebCore::setJSTestObjAttributeWithReservedEnumType):
3637         (WebCore::setJSTestObjPutForwardsAttribute):
3638         (WebCore::setJSTestObjPutForwardsNullableAttribute):
3639         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
3640         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
3641         (WebCore::jsTestObjPrototypeFunctionByteMethod):
3642         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
3643         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
3644         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
3645         (WebCore::jsTestObjPrototypeFunctionLongMethod):
3646         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
3647         (WebCore::jsTestObjPrototypeFunctionObjMethod):
3648         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
3649         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
3650         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
3651         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
3652         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
3653         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
3654         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
3655         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
3656         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
3657         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
3658         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
3659         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
3660         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
3661         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
3662         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
3663         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
3664         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
3665         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
3666         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
3667         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
3668         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
3669         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
3670         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
3671         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
3672         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
3673         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
3674         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
3675         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
3676         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
3677         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
3678         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
3679         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
3680         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
3681         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
3682         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
3683         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
3684         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
3685         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
3686         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
3687         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
3688         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
3689         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
3690         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
3691         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
3692         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
3693         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
3694         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
3695         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
3696         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
3697         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
3698         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
3699         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
3700         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
3701         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
3702         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
3703         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
3704         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
3705         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
3706         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
3707         (WebCore::jsTestObjPrototypeFunctionConvert1):
3708         (WebCore::jsTestObjPrototypeFunctionConvert2):
3709         (WebCore::jsTestObjPrototypeFunctionConvert4):
3710         (WebCore::jsTestObjPrototypeFunctionConvert5):
3711         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
3712         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
3713         (WebCore::jsTestObjPrototypeFunctionOrange):
3714         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
3715         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
3716         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
3717         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
3718         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
3719         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
3720         (WebCore::jsTestObjPrototypeFunctionAny):
3721         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
3722         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
3723         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
3724         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
3725         (WebCore::JSTestObjOwner::finalize):
3726         (WebCore::JSTestObj::toWrapped):
3727         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3728         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
3729         (WebCore::JSTestOverloadedConstructors::toWrapped):
3730         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3731         (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
3732         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
3733         (WebCore::JSTestOverrideBuiltinsOwner::finalize):
3734         (WebCore::JSTestOverrideBuiltins::toWrapped):
3735         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3736         (WebCore::jsTestSerializedScriptValueInterfaceValue):
3737         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
3738         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
3739         (WebCore::jsTestSerializedScriptValueInterfacePorts):
3740         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
3741         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
3742         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
3743         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
3744         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
3745         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3746         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
3747         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
3748         (WebCore::jsTestTypedefsAttrWithGetterException):
3749         (WebCore::jsTestTypedefsAttrWithSetterException):
3750         (WebCore::jsTestTypedefsStringAttrWithGetterException):
3751         (WebCore::jsTestTypedefsStringAttrWithSetterException):
3752         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
3753         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
3754         (WebCore::setJSTestTypedefsAttrWithGetterException):
3755         (WebCore::setJSTestTypedefsAttrWithSetterException):
3756         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
3757         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
3758         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
3759         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
3760         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
3761         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
3762         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
3763         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
3764         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
3765         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
3766         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
3767         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
3768         (WebCore::JSTestTypedefsOwner::finalize):
3769         (WebCore::JSTestTypedefs::toWrapped):
3770         * bindings/scripts/test/JS/JSattribute.cpp:
3771         (WebCore::jsattributeReadonly):
3772         (WebCore::JSattributeOwner::finalize):
3773         (WebCore::JSattribute::toWrapped):
3774         * bindings/scripts/test/JS/JSreadonly.cpp:
3775         (WebCore::JSreadonlyOwner::finalize):
3776         (WebCore::JSreadonly::toWrapped):
3777         * bridge/runtime_method.cpp:
3778         (JSC::callRuntimeMethod):
3779         * inspector/InspectorController.cpp:
3780         (WebCore::InspectorController::canAccessInspectedScriptState):
3781
3782 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3783
3784         IDL functions and attributes should be JSBuiltin by default if interface is marked as JSBuiltinConstructor
3785         https://bugs.webkit.org/show_bug.cgi?id=150438
3786
3787         Reviewed by Darin Adler.
3788
3789         Binding generator is now deducing that function/attribute is JSBuiltin if the interface is marked as JSBuiltin.
3790         One exception is custom setters, getters or functions which remain C++ handled.
3791         Updated streams API IDLs accordingly.
3792
3793         Binding generator knows whether class needs a DOM class by checking whether the interface is marked as JSBuiltin.
3794         Binding generator knows that class uses a JS built-in constructor if marked as JSBuiltin+Constructor.
3795         In particular, JSBuiltIn+CustomConstructor means that a DOM class is not needed and constructor is not JS built-in.
3796
3797         Applied JSBuiltin+CustomConstructor to ReadableStreamReader and ReadableStreamController.
3798         Removing ReadableStreamReader and ReadableStreamController classes.
3799
3800         Removed unneeded "Default" keyword for cancel function in WebIDL.
3801
3802         Added a binding test case.
3803         No change in behavior.
3804
3805         * Modules/streams/ByteLengthQueuingStrategy.idl: Marking interface as JSBuiltin and Constructable.
3806         * Modules/streams/CountQueuingStrategy.idl: Ditto.
3807         * Modules/streams/ReadableStream.idl: Ditto.
3808         * Modules/streams/ReadableStreamController.h: Removed.
3809         * Modules/streams/ReadableStreamController.idl: Marking interface as JSBuiltin and Constructable.
3810         * Modules/streams/ReadableStreamReader.h: Removed.
3811         * Modules/streams/ReadableStreamReader.idl: Marking interface as JSBuiltin and Constructable.
3812         * Modules/streams/WritableStream.idl: Ditto.
3813         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
3814         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject): Updated according new constructor.
3815         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject): Ditto.
3816         * bindings/scripts/CodeGeneratorJS.pm:
3817         (NeedsImplementationClass):
3818         (GetAttributeGetterName):
3819         (GetAttributeSetterName):
3820         (GetFunctionName):
3821         (InstanceNeedsVisitChildren):
3822         (GenerateHeader):
3823         (GenerateAttributesHashTable):
3824         (GenerateImplementation):
3825         (GetConstructorTemplateClassName):
3826         (GenerateConstructorDefinition):
3827         (GenerateConstructorHelperMethods):
3828         (IsConstructable):
3829         (ComputeFunctionSpecial):
3830         (IsJSBuiltin):
3831         (IsJSBuiltinConstructor):
3832         (AddJSBuiltinIncludesIfNeeded):
3833         (GetJSBuiltinFunctionName): Deleted.
3834         (GetJSBuiltinFunctionNameFromString): Deleted.
3835         (GetJSBuiltinScopeName): Deleted.
3836         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp:
3837         (webkit_dom_test_js_builtin_constructor_set_property):
3838         (webkit_dom_test_js_builtin_constructor_get_property):
3839         (webkit_dom_test_js_builtin_constructor_class_init):
3840         (webkit_dom_test_js_builtin_constructor_test_function):
3841         (webkit_dom_test_js_builtin_constructor_get_test_attribute):
3842         (webkit_dom_test_js_builtin_constructor_set_test_attribute):
3843         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h:
3844         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3845         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
3846         (WebCore::JSTestJSBuiltinConstructor::getOwnPropertySlot):
3847         (WebCore::jsTestJSBuiltinConstructorTestAttribute):
3848         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
3849         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
3850         (WebCore::setJSTestJSBuiltinConstructorTestAttribute):
3851         (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
3852         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestFunction):
3853         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
3854         (WebCore::JSTestJSBuiltinConstructorOwner::isReachableFromOpaqueRoots):
3855         (WebCore::JSTestJSBuiltinConstructorOwner::finalize):
3856         (WebCore::toJSNewlyCreated):
3857         (WebCore::toJS):
3858         (WebCore::JSTestJSBuiltinConstructor::toWrapped):
3859         (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
3860         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): Deleted.
3861         (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
3862         (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
3863         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
3864         (WebCore::JSTestJSBuiltinConstructor::create):
3865         (WebCore::JSTestJSBuiltinConstructor::finishCreation):
3866         (WebCore::wrapperOwner):
3867         (WebCore::toJS):
3868         (WebCore::JSTestJSBuiltinConstructor::createStructure): Deleted.
3869         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h:
3870         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
3871         (-[DOMTestJSBuiltinConstructor testAttribute]):
3872         (-[DOMTestJSBuiltinConstructor setTestAttribute:]):
3873         (-[DOMTestJSBuiltinConstructor testAttributeCustom]):
3874         (-[DOMTestJSBuiltinConstructor testAttributeRWCustom]):
3875         (-[DOMTestJSBuiltinConstructor setTestAttributeRWCustom:]):
3876         (-[DOMTestJSBuiltinConstructor testFunction]):
3877         (-[DOMTestJSBuiltinConstructor testCustomFunction]):
3878         * bindings/scripts/test/TestJSBuiltinConstructor.idl:
3879
3880 2015-10-29  Sergio Villar Senin  <svillar@igalia.com>
3881
3882         [CSS Grid Layout] min-content row does not always shrink
3883         https://bugs.webkit.org/show_bug.cgi?id=144581
3884
3885         Reviewed by Zalan Bujtas.
3886
3887         Grid items height must be recomputed whenever the grid tracks
3888         change if the items had been previously stretched. In those
3889         cases we have to clear the override height and layout the item
3890         with the new row size.
3891
3892         Tests: fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html
3893                fast/css-grid-layout/relayout-indefinite-heights.html
3894
3895         * rendering/RenderGrid.cpp:
3896         (WebCore::RenderGrid::logicalContentHeightForChild):
3897
3898 2015-11-01  Brady Eidson  <beidson@apple.com>
3899
3900         Modern IDB: IBDObjectStore.count() support.
3901         https://bugs.webkit.org/show_bug.cgi?id=150785
3902
3903         Reviewed by Darin Adler.
3904
3905         Tests: storage/indexeddb/modern/idbobjectstore-count-1.html
3906                storage/indexeddb/modern/idbobjectstore-count-failures.html
3907
3908         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3909         (WebCore::IDBClient::IDBConnectionToServer::getCount):
3910         (WebCore::IDBClient::IDBConnectionToServer::didGetCount):
3911         * Modules/indexeddb/client/IDBConnectionToServer.h:
3912         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3913         
3914         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3915         (WebCore::IDBClient::IDBObjectStore::count):
3916         (WebCore::IDBClient::IDBObjectStore::doCount):
3917         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
3918         
3919         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3920         (WebCore::IDBClient::IDBRequest::setResult):
3921         * Modules/indexeddb/client/IDBRequestImpl.h:
3922         
3923         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3924         (WebCore::IDBClient::IDBTransaction::requestCount):
3925         (WebCore::IDBClient::IDBTransaction::getCountOnServer):
3926         (WebCore::IDBClient::IDBTransaction::didGetCountOnServer):
3927         * Modules/indexeddb/client/IDBTransactionImpl.h:
3928         
3929         * Modules/indexeddb/server/IDBBackingStore.h:
3930         
3931         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3932         (WebCore::IDBServer::IDBConnectionToClient::didGetCount):
3933         * Modules/indexeddb/server/IDBConnectionToClient.h:
3934         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3935         
3936         * Modules/indexeddb/server/IDBServer.cpp:
3937         (WebCore::IDBServer::IDBServer::getCount):
3938         * Modules/indexeddb/server/IDBServer.h:
3939         
3940         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3941         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
3942         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3943         
3944         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3945         (WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
3946         (WebCore::IDBServer::MemoryObjectStore::valueForKeyRange):
3947         (WebCore::IDBServer::MemoryObjectStore::lowestKeyWithRecordInRange):
3948         * Modules/indexeddb/server/MemoryObjectStore.h:
3949         
3950         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3951         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
3952         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
3953         (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
3954         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetCount):
3955         (WebCore::IDBServer::UniqueIDBDatabase::performCountCallback):
3956         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3957         
3958         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3959         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
3960         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
3961         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3962         
3963         * Modules/indexeddb/shared/IDBResultData.cpp:
3964         (WebCore::IDBResultData::IDBResultData):
3965         (WebCore::IDBResultData::getCountSuccess):
3966         * Modules/indexeddb/shared/IDBResultData.h:
3967         (WebCore::IDBResultData::resultInteger):
3968         
3969         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3970         (WebCore::InProcessIDBServer::didGetCount):
3971         (WebCore::InProcessIDBServer::getCount):
3972         * Modules/indexeddb/shared/InProcessIDBServer.h:
3973
3974 2015-11-01  Darin Adler  <darin@apple.com>
3975
3976         Tidy handling of type=color in HTMLInputElement a bit
3977         https://bugs.webkit.org/show_bug.cgi?id=150786
3978
3979         Reviewed by Andreas Kling.
3980
3981         * html/ColorInputType.cpp: Fix formatting.
3982         (WebCore::ColorInputType::fallbackValue): Use ASCIILiteral for slightly
3983         better performance.
3984         (WebCore::ColorInputType::sanitizeValue): Use convertToASCIILowercase,
3985         since there is no need for the general purpose Unicode lowercasing here;
3986         those non-ASCII characters aren't allowed by isValidColorString.
3987         (WebCore::ColorInputType::suggestions): Rewrote data list code to remove
3988         peculiarities such as using a null check to terminate the loop instead of
3989         the collection length, calling back to HTMLInputElement just to get the
3990         isValidColorString function called. Also used reserveInitialCapacity and
3991         uncheckedAppend for better memory use&n