183f2b04aba90583e37b3071b32a1ef09026da89
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-31  Enrica Casucci  <enrica@apple.com>
2
3         Incorrect cursor movement for U+26F9, U+1F3CB with variations.
4         https://bugs.webkit.org/show_bug.cgi?id=148629
5         rdar://problem/22492366
6
7         Reviewed by Ryosuke Niwa.
8
9         Updating text break iterator rules to correctly handle those two emoji with variations.
10
11         * platform/text/TextBreakIterator.cpp:
12         (WebCore::cursorMovementIterator):
13
14 2015-07-31  Sergio Villar Senin  <svillar@igalia.com>
15
16         [css-grid] Grid containers reporting wrong preferred widths
17         https://bugs.webkit.org/show_bug.cgi?id=147486
18
19         Reviewed by Darin Adler.
20
21         RenderGrid used to have its own overwritten version of
22         computePreferredLogicalWidths() because we didn't have an
23         implementation of computeIntrinsicLogicalWidths(). That
24         implementation was not as complete as RenderBlock's because it
25         was not taking into account min/max-width restrictions.
26
27         Provided that computeIntrinsicLogicalWidths() has been there
28         for some time we can safelly kill our overwrite and use
29         RenderBlock's version which addresses all the FIXMEs we had in
30         our code.
31
32         * rendering/RenderGrid.cpp:
33         * rendering/RenderGrid.h:
34
35 2015-08-31  Sungmann Cho  <sungmann.cho@navercorp.com>
36
37         Fix the WinCairo build after landing of webkit.org/b/148561.
38         https://bugs.webkit.org/show_bug.cgi?id=148627
39
40         Reviewed by Myles C. Maxfield.
41
42         No new tests, no behavior change.
43
44         * platform/graphics/win/ImageCairoWin.cpp:
45         (WebCore::BitmapImage::getHBITMAPOfSize):
46         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
47         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
48         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
49
50 2015-08-31  Antti Koivisto  <antti@apple.com>
51
52         REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky
53         https://bugs.webkit.org/show_bug.cgi?id=148533
54
55         Reviewed by Chris Dumez.
56
57         <object> element may cause document load event fire too early. By making data URL
58         loading faster r188820 made this condition more likely to trigger in this test.
59
60         * loader/SubframeLoader.cpp:
61         (WebCore::SubframeLoader::loadSubframe):
62
63             Post-parsing style recalc may trigger loads for <object> elements. If all other loads have already
64             completed this may cause load event to fire synchronously from the initial empty document construction.
65
66             Fix by preventing load events during subframe initialization. They will be fired if needed by the
67             subsequent explicit call to FrameLoader::checkCompleted.
68
69 2015-08-30  Ryuan Choi  <ryuan.choi@navercorp.com>
70
71         [CoordinatedGraphics] Remove unnecessary two virtual methods from TiledBackingStoreClient
72         https://bugs.webkit.org/show_bug.cgi?id=147137
73
74         Reviewed by Gyuyoung Kim.
75
76         tiledBackingStoreContentsRect() and tiledBackingStoreVisibleRect() are not
77         necessary because CoordinatedGraphicsLayer can pass them directly if needed.
78         This patch removes them in order to simplify code flow between TiledBackingStore
79         and CoordinatedGraphicsLayer.
80
81         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
82         (WebCore::CoordinatedGraphicsLayer::imageBackingVisible):
83         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
84         (WebCore::clampToContentsRectIfRectIsInfinite):
85         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
86         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
87         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreContentsRect): Deleted.
88         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect): Deleted.
89         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
90         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
91         (WebCore::TiledBackingStore::createTilesIfNeeded):
92         (WebCore::TiledBackingStore::coverageRatio):
93         (WebCore::TiledBackingStore::visibleAreaIsCovered):
94         Used TiledBackingStore's m_visibleRect and m_rect, cached and scaled values for
95         visibleRect, contentsRect.
96         (WebCore::TiledBackingStore::createTiles):
97         (WebCore::TiledBackingStore::removeAllNonVisibleTiles):
98         (WebCore::TiledBackingStore::coverWithTilesIfNeeded): Renamed to createTilesIfNeeded.
99         (WebCore::TiledBackingStore::visibleRect): Deleted. nobody used.
100         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
101         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
102         (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
103         Removed default implementation.
104
105 2015-08-29  Jessie Berlin  <berlin@apple.com>
106
107         El Capitan build fix.
108
109         * platform/graphics/cocoa/FontCascadeCocoa.mm:
110         (WebCore::FontCascade::drawGlyphs):
111
112 2015-08-29  Chris Fleizach  <cfleizach@apple.com>
113
114         AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change
115         https://bugs.webkit.org/show_bug.cgi?id=125720
116
117         Reviewed by Daniel Bates.
118
119         The scrollToVisible code did not account for scrollable elements that are larger than their viewports.
120         First, we need to pass the sub-focus up the scroll chain (otherwise we'll scroll some parent to y=0).
121         Second, we should try to center the focus within the viewport, rather than positioning at the bottom for a 
122         better experience.
123
124         This change was adapted from Blink r183926:
125         https://src.chromium.org/viewvc/blink?view=rev&revision=183926
126
127         Tests: accessibility/scroll-to-global-point-iframe-nested.html
128                accessibility/scroll-to-global-point-iframe.html
129                accessibility/scroll-to-global-point-main-window.html
130                accessibility/scroll-to-global-point-nested.html
131                accessibility/scroll-to-make-visible-div-overflow.html
132                accessibility/scroll-to-make-visible-iframe.html
133                accessibility/scroll-to-make-visible-nested-2.html
134                accessibility/scroll-to-make-visible-nested.html
135                accessibility/scroll-to-make-visible-with-subfocus.html
136
137         * accessibility/AccessibilityObject.cpp:
138         (WebCore::computeBestScrollOffset):
139         (WebCore::AccessibilityObject::isOnscreen):
140         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
141         (WebCore::AccessibilityObject::scrollToGlobalPoint):
142         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
143         (-[WebAccessibilityObjectWrapper accessibilityScrollToVisible]):
144         (-[WebAccessibilityObjectWrapper _accessibilityScrollToMakeVisibleWithSubFocus:]):
145         (-[WebAccessibilityObjectWrapper _accessibilityScrollToGlobalPoint:]):
146         (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
147
148 2015-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
149
150         Migrate GraphicsContexts from pointers to references
151         https://bugs.webkit.org/show_bug.cgi?id=148561
152
153         Reviewed by Tim Horton.
154
155         We were using GraphicsContext*s throughout our rendering code. However,
156         these contexts can't be nullptr. This patch migrates users to
157         GraphicsContext&s.
158
159         This is a purely mechanical change.
160
161         No new tests because there is no behavior change.
162
163         * css/CSSFilterImageValue.cpp:
164         (WebCore::CSSFilterImageValue::image):
165         * editing/Editor.cpp:
166         (WebCore::Editor::countMatchesForText):
167         * editing/FrameSelection.cpp:
168         (WebCore::FrameSelection::paintCaret):
169         (WebCore::CaretBase::paintCaret):
170         (WebCore::DragCaretController::paintDragCaret):
171         * editing/FrameSelection.h:
172         * html/HTMLCanvasElement.cpp:
173         (WebCore::HTMLCanvasElement::paint):
174         (WebCore::HTMLCanvasElement::createImageBuffer):
175         (WebCore::HTMLCanvasElement::drawingContext):
176         * html/HTMLCanvasElement.h:
177         * html/HTMLVideoElement.cpp:
178         (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
179         * html/HTMLVideoElement.h:
180         * html/canvas/CanvasRenderingContext2D.cpp:
181         (WebCore::CanvasRenderingContext2D::drawImage):
182         (WebCore::drawImageToContext):
183         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
184         (WebCore::CanvasRenderingContext2D::drawTextInternal):
185         * html/canvas/WebGLRenderingContextBase.cpp:
186         (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
187         * inspector/InspectorOverlay.cpp:
188         (WebCore::InspectorOverlay::paint):
189         * page/FrameSnapshotting.cpp:
190         (WebCore::snapshotFrameRect):
191         * page/FrameView.cpp:
192         (WebCore::FrameView::paintScrollCorner):
193         (WebCore::FrameView::paintScrollbar):
194         (WebCore::FrameView::paintControlTints):
195         (WebCore::FrameView::willPaintContents):
196         (WebCore::FrameView::didPaintContents):
197         (WebCore::FrameView::paintContents):
198         (WebCore::FrameView::paintContentsForSnapshot):
199         (WebCore::FrameView::paintOverhangAreas):
200         (WebCore::FrameView::adjustPageHeightDeprecated):
201         * page/FrameView.h:
202         * page/PrintContext.cpp:
203         (WebCore::PrintContext::spoolPage):
204         (WebCore::PrintContext::spoolRect):
205         * page/win/FrameCGWin.cpp:
206         (WebCore::drawRectIntoContext):
207         (WebCore::imageFromRect):
208         * platform/ScrollView.cpp:
209         (WebCore::ScrollView::paintScrollCorner):
210         (WebCore::ScrollView::paintScrollbar):
211         (WebCore::ScrollView::paintScrollbars):
212         (WebCore::ScrollView::paintPanScrollIcon):
213         (WebCore::ScrollView::paint):
214         (WebCore::ScrollView::paintOverhangAreas):
215         (WebCore::ScrollView::calculateAndPaintOverhangAreas):
216         * platform/ScrollView.h:
217         * platform/Scrollbar.cpp:
218         (WebCore::Scrollbar::paint):
219         * platform/Scrollbar.h:
220         * platform/ScrollbarTheme.h:
221         (WebCore::ScrollbarTheme::paintScrollCorner):
222         (WebCore::ScrollbarTheme::defaultPaintScrollCorner):
223         (WebCore::ScrollbarTheme::paintOverhangAreas):
224         * platform/ScrollbarThemeComposite.cpp:
225         (WebCore::ScrollbarThemeComposite::paintScrollCorner):
226         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
227         * platform/ScrollbarThemeComposite.h:
228         * platform/Theme.cpp:
229         (WebCore::Theme::drawNamedImage):
230         * platform/Theme.h:
231         (WebCore::Theme::paint):
232         * platform/Widget.h:
233         * platform/cocoa/ThemeCocoa.cpp:
234         (WebCore::fitContextToBox):
235         (WebCore::ThemeCocoa::drawNamedImage):
236         * platform/cocoa/ThemeCocoa.h:
237         * platform/efl/WidgetEfl.cpp:
238         (WebCore::Widget::paint):
239         * platform/graphics/BitmapImage.cpp:
240         (WebCore::BitmapImage::drawPattern):
241         * platform/graphics/BitmapImage.h:
242         * platform/graphics/CrossfadeGeneratedImage.cpp:
243         (WebCore::drawCrossfadeSubimage):
244         (WebCore::CrossfadeGeneratedImage::drawCrossfade):
245         (WebCore::CrossfadeGeneratedImage::draw):
246         (WebCore::CrossfadeGeneratedImage::drawPattern):
247         * platform/graphics/CrossfadeGeneratedImage.h:
248         * platform/graphics/FontCascade.cpp:
249         (WebCore::FontCascade::drawText):
250         (WebCore::FontCascade::drawEmphasisMarks):
251         (WebCore::FontCascade::drawSimpleText):
252         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
253         (WebCore::FontCascade::drawGlyphBuffer):
254         * platform/graphics/FontCascade.h:
255         * platform/graphics/GeneratedImage.h:
256         * platform/graphics/GradientImage.cpp:
257         (WebCore::GradientImage::draw):
258         (WebCore::GradientImage::drawPattern):
259         * platform/graphics/GradientImage.h:
260         * platform/graphics/GraphicsContext.cpp:
261         (WebCore::GraphicsContext::drawText):
262         (WebCore::GraphicsContext::drawGlyphs):
263         (WebCore::GraphicsContext::drawEmphasisMarks):
264         (WebCore::GraphicsContext::drawBidiText):
265         (WebCore::GraphicsContext::drawImage):
266         (WebCore::GraphicsContext::drawTiledImage):
267         (WebCore::GraphicsContext::drawImageBuffer):
268         (WebCore::GraphicsContext::clipToImageBuffer):
269         (WebCore::GraphicsContext::createCompatibleBuffer):
270         (WebCore::GraphicsContext::isCompatibleWithBuffer):
271         * platform/graphics/GraphicsContext.h:
272         * platform/graphics/GraphicsContext3D.h:
273         * platform/graphics/Image.cpp:
274         (WebCore::Image::fillWithSolidColor):
275         (WebCore::Image::draw):
276         (WebCore::Image::drawTiled):
277         * platform/graphics/Image.h:
278         (WebCore::Image::drawFrameMatchingSourceSize):
279         * platform/graphics/ImageBuffer.cpp:
280         (WebCore::ImageBuffer::createCompatibleBuffer):
281         * platform/graphics/ImageBuffer.h:
282         * platform/graphics/MediaPlayer.cpp:
283         (WebCore::MediaPlayer::paint):
284         (WebCore::MediaPlayer::paintCurrentFrameInContext):
285         * platform/graphics/MediaPlayer.h:
286         * platform/graphics/MediaPlayerPrivate.h:
287         (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
288         * platform/graphics/NamedImageGeneratedImage.cpp:
289         (WebCore::NamedImageGeneratedImage::draw):
290         (WebCore::NamedImageGeneratedImage::drawPattern):
291         * platform/graphics/NamedImageGeneratedImage.h:
292         * platform/graphics/ShadowBlur.cpp:
293         (WebCore::ShadowBlur::adjustBlurRadius):
294         (WebCore::ShadowBlur::calculateLayerBoundingRect):
295         (WebCore::ShadowBlur::drawShadowBuffer):
296         (WebCore::ShadowBlur::drawRectShadow):
297         (WebCore::ShadowBlur::drawInsetShadow):
298         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
299         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
300         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
301         (WebCore::ShadowBlur::drawRectShadowWithTiling):
302         (WebCore::ShadowBlur::drawLayerPieces):
303         (WebCore::ShadowBlur::blurAndColorShadowBuffer):
304         (WebCore::ShadowBlur::beginShadowLayer):
305         (WebCore::ShadowBlur::endShadowLayer):
306         * platform/graphics/ShadowBlur.h:
307         * platform/graphics/TextRun.h:
308         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
309         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
310         (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext):
311         (WebCore::MediaPlayerPrivateAVFoundationCF::paint):
312         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
313         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
314         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
315         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
316         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
317         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
318         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
319         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
320         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
321         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
322         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
323         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
324         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
325         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paint):
326         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
327         * platform/graphics/cairo/BitmapImageCairo.cpp:
328         (WebCore::BitmapImage::draw):
329         * platform/graphics/cairo/FontCairo.cpp:
330         (WebCore::drawGlyphsToContext):
331         (WebCore::drawGlyphsShadow):
332         (WebCore::FontCascade::drawGlyphs):
333         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
334         (WebCore::FontCascade::drawComplexText):
335         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
336         * platform/graphics/cairo/GraphicsContextCairo.cpp:
337         (WebCore::drawPathShadow):
338         (WebCore::fillCurrentCairoPath):
339         (WebCore::shadowAndFillCurrentCairoPath):
340         (WebCore::shadowAndStrokeCurrentCairoPath):
341         (WebCore::GraphicsContext::fillPath):
342         (WebCore::GraphicsContext::strokePath):
343         (WebCore::GraphicsContext::fillRect):
344         (WebCore::GraphicsContext::strokeRect):
345         (WebCore::GraphicsContext::platformFillRoundedRect):
346         (WebCore::GraphicsContext::fillRectWithRoundedHole):
347         * platform/graphics/cairo/ImageBufferCairo.cpp:
348         (WebCore::ImageBuffer::context):
349         (WebCore::ImageBuffer::clip):
350         (WebCore::ImageBuffer::draw):
351         (WebCore::ImageBuffer::drawPattern):
352         (WebCore::ImageBuffer::toDataURL):
353         * platform/graphics/cairo/ImageCairo.cpp:
354         (WebCore::Image::drawPattern):
355         * platform/graphics/cairo/PlatformContextCairo.cpp:
356         (WebCore::PlatformContextCairo::drawSurfaceToContext):
357         * platform/graphics/cairo/PlatformContextCairo.h:
358         * platform/graphics/cg/BitmapImageCG.cpp:
359         (WebCore::BitmapImage::draw):
360         * platform/graphics/cg/GraphicsContext3DCG.cpp:
361         (WebCore::GraphicsContext3D::paintToCanvas):
362         * platform/graphics/cg/GraphicsContextCG.cpp:
363         (WebCore::GraphicsContext::fillRect):
364         (WebCore::GraphicsContext::platformFillRoundedRect):
365         (WebCore::GraphicsContext::fillRectWithRoundedHole):
366         * platform/graphics/cg/ImageBufferCG.cpp:
367         (WebCore::ImageBuffer::ImageBuffer):
368         (WebCore::ImageBuffer::context):
369         (WebCore::ImageBuffer::flushContext):
370         (WebCore::ImageBuffer::copyNativeImage):
371         (WebCore::ImageBuffer::draw):
372         (WebCore::ImageBuffer::drawPattern):
373         (WebCore::ImageBuffer::clip):
374         (WebCore::ImageBuffer::getUnmultipliedImageData):
375         (WebCore::ImageBuffer::getPremultipliedImageData):
376         (WebCore::ImageBuffer::putByteArray):
377         (WebCore::ImageBuffer::toDataURL):
378         * platform/graphics/cg/ImageCG.cpp:
379         (WebCore::Image::drawPattern):
380         * platform/graphics/cg/PDFDocumentImage.cpp:
381         (WebCore::PDFDocumentImage::cacheParametersMatch):
382         (WebCore::transformContextForPainting):
383         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
384         (WebCore::PDFDocumentImage::draw):
385         (WebCore::applyRotationForPainting):
386         (WebCore::PDFDocumentImage::drawPDFPage):
387         * platform/graphics/cg/PDFDocumentImage.h:
388         * platform/graphics/cocoa/FontCascadeCocoa.mm:
389         (WebCore::showLetterpressedGlyphsWithAdvances):
390         (WebCore::showGlyphsWithAdvances):
391         (WebCore::FontCascade::drawGlyphs):
392         (WebCore::FontCascade::drawComplexText):
393         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
394         * platform/graphics/efl/ImageBufferEfl.cpp:
395         (WebCore::ImageBuffer::toDataURL):
396         * platform/graphics/filters/FEBlend.cpp:
397         (WebCore::FEBlend::platformApplySoftware):
398         * platform/graphics/filters/FEColorMatrix.cpp:
399         (WebCore::FEColorMatrix::platformApplySoftware):
400         * platform/graphics/filters/FEComposite.cpp:
401         (WebCore::FEComposite::platformApplySoftware):
402         * platform/graphics/filters/FEDropShadow.cpp:
403         (WebCore::FEDropShadow::platformApplySoftware):
404         * platform/graphics/filters/FEFlood.cpp:
405         (WebCore::FEFlood::platformApplySoftware):
406         * platform/graphics/filters/FEMerge.cpp:
407         (WebCore::FEMerge::platformApplySoftware):
408         * platform/graphics/filters/FEOffset.cpp:
409         (WebCore::FEOffset::platformApplySoftware):
410         * platform/graphics/filters/FETile.cpp:
411         (WebCore::FETile::platformApplySoftware):
412         * platform/graphics/filters/FilterEffect.cpp:
413         (WebCore::FilterEffect::createImageBufferResult): Deleted.
414         * platform/graphics/filters/SourceAlpha.cpp:
415         (WebCore::SourceAlpha::platformApplySoftware):
416         * platform/graphics/filters/SourceGraphic.cpp:
417         (WebCore::SourceGraphic::platformApplySoftware):
418         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
419         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
420         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
421         * platform/graphics/mac/GraphicsContextMac.mm:
422         (WebCore::GraphicsContext::drawLineForDocumentMarker):
423         * platform/graphics/mac/IconMac.mm:
424         (WebCore::Icon::paint):
425         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
426         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
427         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
428         (WebCore::MediaPlayerPrivateQTKit::paint):
429         * platform/graphics/mac/PDFDocumentImageMac.mm:
430         (WebCore::PDFDocumentImage::drawPDFPage):
431         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
432         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
433         * platform/graphics/texmap/BitmapTexture.cpp:
434         (WebCore::BitmapTexture::updateContents):
435         * platform/graphics/win/FontCGWin.cpp:
436         (WebCore::FontCascade::drawGlyphs):
437         * platform/graphics/win/FontWin.cpp:
438         (WebCore::FontCascade::drawComplexText):
439         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
440         * platform/graphics/win/IconWin.cpp:
441         (WebCore::Icon::paint):
442         * platform/graphics/win/ImageCGWin.cpp:
443         (WebCore::BitmapImage::getHBITMAPOfSize):
444         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
445         * platform/graphics/win/ImageCairoWin.cpp:
446         (WebCore::BitmapImage::getHBITMAPOfSize):
447         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
448         * platform/graphics/win/LocalWindowsContext.h:
449         (WebCore::LocalWindowsContext::LocalWindowsContext):
450         (WebCore::LocalWindowsContext::~LocalWindowsContext):
451         * platform/gtk/WidgetGtk.cpp:
452         (WebCore::Widget::paint):
453         * platform/ios/WidgetIOS.mm:
454         (WebCore::Widget::paint):
455         * platform/mac/DragImageMac.mm:
456         (WebCore::drawAtPoint):
457         * platform/mac/LocalCurrentGraphicsContext.h:
458         (WebCore::ContextContainer::ContextContainer):
459         * platform/mac/LocalCurrentGraphicsContext.mm:
460         (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
461         (WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):
462         (WebCore::LocalCurrentGraphicsContext::cgContext):
463         * platform/mac/ScrollbarThemeMac.mm:
464         (WebCore::ScrollbarThemeMac::paint):
465         * platform/mac/ThemeMac.h:
466         * platform/mac/ThemeMac.mm:
467         (WebCore::paintToggleButton):
468         (WebCore::paintButton):
469         (WebCore::paintStepper):
470         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
471         (WebCore::ThemeMac::paint):
472         * platform/mac/WidgetMac.mm:
473         (WebCore::Widget::paint):
474         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
475         (WebCore::MockMediaPlayerMediaSource::paint):
476         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
477         * platform/win/PopupMenuWin.cpp:
478         (WebCore::PopupMenuWin::paint):
479         * platform/win/ScrollbarThemeWin.cpp:
480         (WebCore::ScrollbarThemeWin::paintTrackPiece):
481         (WebCore::ScrollbarThemeWin::paintButton):
482         (WebCore::ScrollbarThemeWin::paintThumb):
483         * platform/win/WebCoreTextRenderer.cpp:
484         (WebCore::doDrawTextAtPoint):
485         * platform/win/WidgetWin.cpp:
486         (WebCore::Widget::paint):
487         * rendering/EllipsisBox.cpp:
488         (WebCore::EllipsisBox::paint):
489         (WebCore::EllipsisBox::paintSelection):
490         * rendering/EllipsisBox.h:
491         * rendering/FilterEffectRenderer.cpp:
492         (WebCore::FilterEffectRenderer::inputContext):
493         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
494         * rendering/FilterEffectRenderer.h:
495         * rendering/ImageQualityController.cpp:
496         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
497         * rendering/ImageQualityController.h:
498         * rendering/InlineFlowBox.cpp:
499         (WebCore::InlineFlowBox::paintFillLayer):
500         (WebCore::InlineFlowBox::paintBoxDecorations):
501         (WebCore::InlineFlowBox::paintMask):
502         * rendering/InlineTextBox.cpp:
503         (WebCore::InlineTextBox::paint):
504         * rendering/PaintInfo.h:
505         (WebCore::PaintInfo::PaintInfo):
506         (WebCore::PaintInfo::context):
507         (WebCore::PaintInfo::setContext):
508         (WebCore::PaintInfo::applyTransform):
509         * rendering/RenderBlock.cpp:
510         (WebCore::RenderBlock::paint):
511         (WebCore::RenderBlock::paintCaret):
512         (WebCore::RenderBlock::paintObject):
513         (WebCore::RenderBlock::paintSelection):
514         (WebCore::clipOutPositionedObjects):
515         (WebCore::RenderBlock::blockSelectionGap):
516         (WebCore::RenderBlock::logicalLeftSelectionGap):
517         (WebCore::RenderBlock::logicalRightSelectionGap):
518         * rendering/RenderBlockFlow.cpp:
519         (WebCore::RenderBlockFlow::paintColumnRules):
520         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
521         * rendering/RenderBox.cpp:
522         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
523         (WebCore::RenderBox::paintBoxDecorations):
524         (WebCore::RenderBox::paintMask):
525         (WebCore::RenderBox::paintClippingMask):
526         (WebCore::RenderBox::paintMaskImages):
527         (WebCore::RenderBox::paintFillLayers):
528         (WebCore::RenderBox::pushContentsClip):
529         (WebCore::RenderBox::popContentsClip):
530         * rendering/RenderBox.h:
531         * rendering/RenderBoxModelObject.cpp:
532         (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality):
533         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
534         (WebCore::applyBoxShadowForBackground):
535         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
536         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
537         (WebCore::RenderBoxModelObject::paintNinePieceImage):
538         (WebCore::RenderBoxModelObject::paintOneBorderSide):
539         (WebCore::RenderBoxModelObject::paintBorderSides):
540         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
541         (WebCore::RenderBoxModelObject::paintBorder):
542         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
543         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
544         (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
545         (WebCore::RenderBoxModelObject::paintBoxShadow):
546         (WebCore::RenderBoxModelObject::shouldAntialiasLines):
547         * rendering/RenderBoxModelObject.h:
548         * rendering/RenderDetailsMarker.cpp:
549         (WebCore::RenderDetailsMarker::paint):
550         * rendering/RenderElement.cpp:
551         (WebCore::RenderElement::paintFocusRing):
552         (WebCore::RenderElement::paintOutline):
553         * rendering/RenderEmbeddedObject.cpp:
554         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
555         (WebCore::drawReplacementArrow):
556         (WebCore::RenderEmbeddedObject::paintReplaced):
557         * rendering/RenderFieldset.cpp:
558         (WebCore::RenderFieldset::paintBoxDecorations):
559         * rendering/RenderFileUploadControl.cpp:
560         (WebCore::RenderFileUploadControl::paintObject):
561         * rendering/RenderFrameSet.cpp:
562         (WebCore::RenderFrameSet::paintColumnBorder):
563         (WebCore::RenderFrameSet::paintRowBorder):
564         * rendering/RenderHTMLCanvas.cpp:
565         (WebCore::RenderHTMLCanvas::paintReplaced):
566         * rendering/RenderImage.cpp:
567         (WebCore::RenderImage::paintReplaced):
568         (WebCore::RenderImage::paintAreaElementFocusRing):
569         (WebCore::RenderImage::paintIntoRect):
570         * rendering/RenderImage.h:
571         * rendering/RenderInline.cpp:
572         (WebCore::RenderInline::paintOutline):
573         (WebCore::RenderInline::paintOutlineForLine):
574         * rendering/RenderInline.h:
575         * rendering/RenderLayer.cpp:
576         (WebCore::RenderLayer::beginTransparencyLayers):
577         (WebCore::RenderLayer::paintOverflowControls):
578         (WebCore::RenderLayer::paintScrollCorner):
579         (WebCore::RenderLayer::drawPlatformResizerImage):
580         (WebCore::RenderLayer::paintResizer):
581         (WebCore::RenderLayer::paint):
582         (WebCore::RenderLayer::paintOverlayScrollbars):
583         (WebCore::RenderLayer::clipToRect):
584         (WebCore::RenderLayer::restoreClip):
585         (WebCore::RenderLayer::paintLayer):
586         (WebCore::RenderLayer::paintLayerContentsAndReflection):
587         (WebCore::RenderLayer::setupFontSubpixelQuantization):
588         (WebCore::RenderLayer::setupClipPath):
589         (WebCore::RenderLayer::hasFilterThatIsPainting):
590         (WebCore::RenderLayer::setupFilters):
591         (WebCore::RenderLayer::applyFilters):
592         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
593         (WebCore::RenderLayer::paintLayerContents):
594         (WebCore::RenderLayer::paintLayerByApplyingTransform):
595         (WebCore::RenderLayer::paintList):
596         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
597         (WebCore::RenderLayer::paintBackgroundForFragments):
598         (WebCore::RenderLayer::paintForegroundForFragments):
599         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
600         (WebCore::RenderLayer::paintOutlineForFragments):
601         (WebCore::RenderLayer::paintMaskForFragments):
602         (WebCore::RenderLayer::paintChildClippingMaskForFragments):
603         (WebCore::RenderLayer::paintOverflowControlsForFragments):
604         (WebCore::RenderLayer::calculateClipRects):
605         * rendering/RenderLayer.h:
606         * rendering/RenderLayerBacking.cpp:
607         (WebCore::RenderLayerBacking::paintIntoLayer):
608         (WebCore::RenderLayerBacking::paintContents):
609         * rendering/RenderLayerBacking.h:
610         * rendering/RenderLayerCompositor.cpp:
611         (WebCore::paintScrollbar):
612         (WebCore::RenderLayerCompositor::paintContents):
613         * rendering/RenderListBox.cpp:
614         (WebCore::RenderListBox::paintScrollbar):
615         (WebCore::RenderListBox::paintItemForeground):
616         (WebCore::RenderListBox::paintItemBackground):
617         * rendering/RenderListMarker.cpp:
618         (WebCore::RenderListMarker::paint):
619         * rendering/RenderMediaControls.cpp:
620         (WebCore::getUnzoomedRectAndAdjustCurrentContext):
621         (WebCore::RenderMediaControls::paintMediaControlsPart):
622         * rendering/RenderMultiColumnSet.cpp:
623         (WebCore::RenderMultiColumnSet::paintColumnRules):
624         * rendering/RenderObject.cpp:
625         (WebCore::RenderObject::addPDFURLRect):
626         * rendering/RenderReplaced.cpp:
627         (WebCore::RenderReplaced::paint):
628         * rendering/RenderReplica.cpp:
629         (WebCore::RenderReplica::paint):
630         * rendering/RenderScrollbar.cpp:
631         (WebCore::RenderScrollbar::paint):
632         (WebCore::RenderScrollbar::paintPart):
633         * rendering/RenderScrollbar.h:
634         * rendering/RenderScrollbarPart.cpp:
635         (WebCore::RenderScrollbarPart::paintIntoRect):
636         * rendering/RenderScrollbarPart.h:
637         * rendering/RenderScrollbarTheme.cpp:
638         (WebCore::RenderScrollbarTheme::paintScrollCorner):
639         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
640         (WebCore::RenderScrollbarTheme::paintTrackBackground):
641         (WebCore::RenderScrollbarTheme::paintTrackPiece):
642         (WebCore::RenderScrollbarTheme::paintButton):
643         (WebCore::RenderScrollbarTheme::paintThumb):
644         * rendering/RenderScrollbarTheme.h:
645         * rendering/RenderSnapshottedPlugIn.cpp:
646         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
647         * rendering/RenderTable.cpp:
648         (WebCore::RenderTable::paintBoxDecorations):
649         * rendering/RenderTableCell.cpp:
650         (WebCore::RenderTableCell::paintCollapsedBorders):
651         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
652         * rendering/RenderTableSection.cpp:
653         (WebCore::RenderTableSection::paintRowGroupBorder):
654         (WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
655         * rendering/RenderTheme.cpp:
656         (WebCore::RenderTheme::paint):
657         (WebCore::RenderTheme::paintBorderOnly):
658         (WebCore::RenderTheme::paintDecorations):
659         (WebCore::RenderTheme::paintSliderTicks):
660         * rendering/RenderThemeEfl.cpp:
661         (WebCore::RenderThemeEfl::paintThemePart):
662         * rendering/RenderThemeGtk.cpp:
663         (WebCore::paintToggle):
664         (WebCore::renderButton):
665         (WebCore::RenderThemeGtk::paintMenuList):
666         (WebCore::RenderThemeGtk::paintTextField):
667         (WebCore::paintGdkPixbuf):
668         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
669         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
670         (WebCore::RenderThemeGtk::paintCapsLockIndicator):
671         (WebCore::RenderThemeGtk::paintSliderTrack):
672         (WebCore::RenderThemeGtk::paintSliderThumb):
673         (WebCore::RenderThemeGtk::paintProgressBar):
674         (WebCore::paintSpinArrowButton):
675         (WebCore::RenderThemeGtk::paintMediaButton):
676         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
677         (WebCore::RenderThemeGtk::paintMediaMuteButton):
678         (WebCore::RenderThemeGtk::paintMediaPlayButton):
679         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
680         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
681         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
682         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
683         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
684         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
685         * rendering/RenderThemeGtk.h:
686         * rendering/RenderThemeIOS.h:
687         * rendering/RenderThemeIOS.mm:
688         (WebCore::RenderThemeIOS::addRoundedBorderClip):
689         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
690         (WebCore::RenderThemeIOS::paintRadioDecorations):
691         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
692         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
693         (WebCore::RenderThemeIOS::paintSliderTrack):
694         (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
695         (WebCore::RenderThemeIOS::paintProgressBar):
696         (WebCore::RenderThemeIOS::paintPushButtonDecorations):
697         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
698         * rendering/RenderThemeMac.mm:
699         (WebCore::RenderThemeMac::paintTextField):
700         (WebCore::RenderThemeMac::paintTextArea):
701         (WebCore::RenderThemeMac::paintMenuList):
702         (WebCore::RenderThemeMac::paintMeter):
703         (WebCore::RenderThemeMac::paintProgressBar):
704         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
705         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
706         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
707         (WebCore::RenderThemeMac::paintSliderTrack):
708         (WebCore::RenderThemeMac::paintSliderThumb):
709         (WebCore::RenderThemeMac::paintSearchField):
710         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
711         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
712         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
713         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
714         (WebCore::RenderThemeMac::paintImageControlsButton):
715         (WebCore::RenderThemeMac::paintAttachment):
716         * rendering/RenderThemeSafari.cpp:
717         (WebCore::RenderThemeSafari::paintCheckbox):
718         (WebCore::RenderThemeSafari::paintRadio):
719         (WebCore::RenderThemeSafari::paintButton):
720         (WebCore::RenderThemeSafari::paintTextField):
721         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
722         (WebCore::RenderThemeSafari::paintTextArea):
723         (WebCore::RenderThemeSafari::paintMenuList):
724         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
725         (WebCore::RenderThemeSafari::paintMenuListButtonDecorations):
726         (WebCore::RenderThemeSafari::paintSliderTrack):
727         (WebCore::RenderThemeSafari::paintSliderThumb):
728         (WebCore::RenderThemeSafari::paintSearchField):
729         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
730         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecorationPart):
731         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
732         * rendering/RenderThemeWin.cpp:
733         (WebCore::drawControl):
734         (WebCore::RenderThemeWin::paintButton):
735         (WebCore::RenderThemeWin::paintInnerSpinButton):
736         (WebCore::RenderThemeWin::paintTextField):
737         (WebCore::RenderThemeWin::paintMenuList):
738         (WebCore::RenderThemeWin::paintMenuListButtonDecorations):
739         (WebCore::RenderThemeWin::paintSliderTrack):
740         (WebCore::RenderThemeWin::paintSliderThumb):
741         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
742         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
743         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
744         (WebCore::RenderThemeWin::paintMeter):
745         * rendering/RenderVideo.cpp:
746         (WebCore::RenderVideo::paintReplaced):
747         * rendering/RenderView.cpp:
748         (WebCore::RenderView::paint):
749         (WebCore::RenderView::paintBoxDecorations):
750         * rendering/RenderWidget.cpp:
751         (WebCore::RenderWidget::paintContents):
752         (WebCore::RenderWidget::paint):
753         * rendering/RootInlineBox.cpp:
754         (WebCore::RootInlineBox::lineSelectionGap):
755         * rendering/SimpleLineLayoutFunctions.cpp:
756         (WebCore::SimpleLineLayout::paintFlow):
757         * rendering/mathml/RenderMathMLBlock.cpp:
758         (WebCore::RenderMathMLBlock::paint):
759         * rendering/mathml/RenderMathMLFraction.cpp:
760         (WebCore::RenderMathMLFraction::paint):
761         * rendering/mathml/RenderMathMLMenclose.cpp:
762         (WebCore::RenderMathMLMenclose::paint):
763         * rendering/mathml/RenderMathMLOperator.cpp:
764         (WebCore::RenderMathMLOperator::paintGlyph):
765         (WebCore::RenderMathMLOperator::fillWithVerticalExtensionGlyph):
766         (WebCore::RenderMathMLOperator::fillWithHorizontalExtensionGlyph):
767         (WebCore::RenderMathMLOperator::paint):
768         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
769         (WebCore::RenderMathMLRadicalOperator::paint):
770         * rendering/mathml/RenderMathMLRoot.cpp:
771         (WebCore::RenderMathMLRoot::paint):
772         * rendering/shapes/Shape.cpp:
773         (WebCore::Shape::createRasterShape):
774         * rendering/style/NinePieceImage.cpp:
775         (WebCore::NinePieceImage::paint):
776         * rendering/style/NinePieceImage.h:
777         * rendering/svg/RenderSVGContainer.cpp:
778         (WebCore::RenderSVGContainer::paint):
779         * rendering/svg/RenderSVGEllipse.cpp:
780         (WebCore::RenderSVGEllipse::fillShape):
781         (WebCore::RenderSVGEllipse::strokeShape):
782         * rendering/svg/RenderSVGEllipse.h:
783         * rendering/svg/RenderSVGForeignObject.cpp:
784         (WebCore::RenderSVGForeignObject::paint):
785         * rendering/svg/RenderSVGImage.cpp:
786         (WebCore::RenderSVGImage::paint):
787         (WebCore::RenderSVGImage::paintForeground):
788         * rendering/svg/RenderSVGPath.cpp:
789         (WebCore::useStrokeStyleToFill):
790         (WebCore::RenderSVGPath::strokeShape):
791         * rendering/svg/RenderSVGPath.h:
792         * rendering/svg/RenderSVGRect.cpp:
793         (WebCore::RenderSVGRect::fillShape):
794         (WebCore::RenderSVGRect::strokeShape):
795         * rendering/svg/RenderSVGRect.h:
796         * rendering/svg/RenderSVGResourceClipper.cpp:
797         (WebCore::RenderSVGResourceClipper::applyResource):
798         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
799         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
800         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
801         * rendering/svg/RenderSVGResourceClipper.h:
802         * rendering/svg/RenderSVGResourceFilter.cpp:
803         (WebCore::RenderSVGResourceFilter::applyResource):
804         * rendering/svg/RenderSVGResourceGradient.cpp:
805         (WebCore::createMaskAndSwapContextForTextGradient):
806         (WebCore::clipToTextMask):
807         (WebCore::RenderSVGResourceGradient::applyResource):
808         * rendering/svg/RenderSVGResourceMarker.cpp:
809         (WebCore::RenderSVGResourceMarker::applyViewportClip):
810         (WebCore::RenderSVGResourceMarker::draw):
811         * rendering/svg/RenderSVGResourceMasker.cpp:
812         (WebCore::RenderSVGResourceMasker::applyResource):
813         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
814         * rendering/svg/RenderSVGResourcePattern.cpp:
815         (WebCore::RenderSVGResourcePattern::postApplyResource):
816         (WebCore::RenderSVGResourcePattern::createTileImage):
817         * rendering/svg/RenderSVGResourceSolidColor.cpp:
818         (WebCore::RenderSVGResourceSolidColor::postApplyResource):
819         * rendering/svg/RenderSVGRoot.cpp:
820         (WebCore::RenderSVGRoot::paintReplaced):
821         * rendering/svg/RenderSVGShape.cpp:
822         (WebCore::RenderSVGShape::fillShape):
823         (WebCore::RenderSVGShape::strokeShape):
824         (WebCore::RenderSVGShape::fillStrokeMarkers):
825         (WebCore::RenderSVGShape::paint):
826         * rendering/svg/RenderSVGShape.h:
827         * rendering/svg/RenderSVGText.cpp:
828         (WebCore::RenderSVGText::paint):
829         * rendering/svg/RenderSVGViewportContainer.cpp:
830         (WebCore::RenderSVGViewportContainer::applyViewportClip):
831         * rendering/svg/SVGInlineFlowBox.cpp:
832         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
833         (WebCore::SVGInlineFlowBox::paint):
834         * rendering/svg/SVGInlineTextBox.cpp:
835         (WebCore::SVGInlineTextBox::paintSelectionBackground):
836         (WebCore::SVGInlineTextBox::paint):
837         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
838         (WebCore::SVGInlineTextBox::paintDecoration):
839         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
840         (WebCore::SVGInlineTextBox::paintTextWithShadows):
841         (WebCore::SVGInlineTextBox::paintText):
842         * rendering/svg/SVGInlineTextBox.h:
843         * rendering/svg/SVGRenderingContext.cpp:
844         (WebCore::SVGRenderingContext::~SVGRenderingContext):
845         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
846         (WebCore::SVGRenderingContext::createImageBuffer):
847         (WebCore::SVGRenderingContext::clipToImageBuffer):
848         (WebCore::SVGRenderingContext::bufferForeground):
849         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): Deleted.
850         * rendering/svg/SVGRenderingContext.h:
851         * rendering/svg/SVGRootInlineBox.cpp:
852         (WebCore::SVGRootInlineBox::paint):
853         * rendering/svg/SVGTextRunRenderingContext.cpp:
854         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
855         * rendering/svg/SVGTextRunRenderingContext.h:
856         * svg/graphics/SVGImage.cpp:
857         (WebCore::SVGImage::drawForContainer):
858         (WebCore::SVGImage::drawPatternForContainer):
859         (WebCore::SVGImage::draw):
860         * svg/graphics/SVGImage.h:
861         * svg/graphics/SVGImageForContainer.cpp:
862         (WebCore::SVGImageForContainer::draw):
863         (WebCore::SVGImageForContainer::drawPattern):
864         * svg/graphics/SVGImageForContainer.h:
865         * svg/graphics/filters/SVGFEImage.cpp:
866         (WebCore::FEImage::platformApplySoftware):
867
868 2015-08-28  Alexey Proskuryakov  <ap@apple.com>
869
870         Update bindings test results after
871         https://bugs.webkit.org/show_bug.cgi?id=148591
872
873         JSCallbackData::invokeCallback() should return the Exception to the caller
874
875         * bindings/scripts/test/JS/JSTestCallback.cpp:
876         (WebCore::JSTestCallback::callbackWithNoParam):
877         (WebCore::JSTestCallback::callbackWithArrayParam):
878         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
879         (WebCore::JSTestCallback::callbackWithStringList):
880         (WebCore::JSTestCallback::callbackWithBoolean):
881         (WebCore::JSTestCallback::callbackRequiresThisToPass):
882         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
883         (WebCore::JSTestCallbackFunction::callbackWithNoParam):
884         (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
885         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
886         (WebCore::JSTestCallbackFunction::callbackWithStringList):
887         (WebCore::JSTestCallbackFunction::callbackWithBoolean):
888         (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
889
890 2015-08-28  Chris Dumez  <cdumez@apple.com>
891
892         JSCallbackData::invokeCallback() should return the Exception to the caller
893         https://bugs.webkit.org/show_bug.cgi?id=148591
894
895         Reviewed by Mark Lam.
896
897         JSCallbackData::invokeCallback() calls a callback function. If this
898         function throws an exception, it will report it and clear it on the VM.
899         However, in the case of NodeFilter, the DOM specification clearly states
900         that we are supposed to rethrow the exception [1].
901
902         Once way to support this is to have JSCallbackData::invokeCallback()
903         return the Exception to the caller and let the caller decide what to do
904         with it (i.e. report it or rethrow it).
905
906         There is no actual behavior change in this patch. This slight
907         refactoring is in preparation for Bug 148415.
908
909         [1] https://dom.spec.whatwg.org/#traversal
910
911         Some more context at:
912         https://www.w3.org/Bugs/Public/show_bug.cgi?id=17713#c16
913
914         * bindings/js/JSCallbackData.cpp:
915         (WebCore::JSCallbackData::invokeCallback):
916         * bindings/js/JSCallbackData.h:
917         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
918         (WebCore::JSSQLStatementErrorCallback::handleEvent):
919         * bindings/scripts/CodeGeneratorJS.pm:
920         (GenerateCallbackImplementation):
921
922 2015-08-28  Bem Jones-Bey  <bjonesbe@adobe.com>
923
924         [CSS Shapes] Remove unused CSSBasicShape::m_referenceBox
925         https://bugs.webkit.org/show_bug.cgi?id=148588
926
927         Reviewed by Zoltan Horvath.
928
929         At some point, the code was refactored to no longer store the
930         referenceBox in CSSBasicShape; however, it looks like this code
931         wasn't cleaned up. This patch rectifies this.
932
933         This is based on a Blink patch by Timothy Loh.
934
935         No new tests, removing unused code.
936
937         * css/CSSBasicShapes.cpp:
938         (WebCore::buildCircleString):
939         (WebCore::CSSBasicShapeCircle::cssText):
940         (WebCore::CSSBasicShapeCircle::equals):
941         (WebCore::buildEllipseString):
942         (WebCore::CSSBasicShapeEllipse::cssText):
943         (WebCore::CSSBasicShapeEllipse::equals):
944         (WebCore::buildPolygonString):
945         (WebCore::CSSBasicShapePolygon::cssText):
946         (WebCore::CSSBasicShapePolygon::equals):
947         (WebCore::buildInsetString):
948         (WebCore::CSSBasicShapeInset::cssText):
949         * css/CSSBasicShapes.h:
950         (WebCore::CSSBasicShape::referenceBox): Deleted.
951         (WebCore::CSSBasicShape::setReferenceBox): Deleted.
952
953 2015-08-28  Eric Carlson  <eric.carlson@apple.com>
954
955         [Mac] Restructure WebMediaSessionManager for testing
956         https://bugs.webkit.org/show_bug.cgi?id=148593
957
958         Reviewed by Jer Noble.
959
960         No new tests, no functional change.
961
962         * Modules/mediasession/WebMediaSessionManager.cpp:
963         (WebCore::mediaProducerStateString): Add some missing states.
964         (WebCore::webMediaSessionManagerOverride): New.
965         (WebCore::WebMediaSessionManager::singleton): New.
966         (WebCore::WebMediaSessionManager::setWebMediaSessionManagerOverride): New, will allow runtime
967           registration of a mock manager.
968         * Modules/mediasession/WebMediaSessionManager.h:
969
970         * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
971         (WebCore::WebMediaSessionManager::platformManager): Renamed from singleton.
972         (WebCore::WebMediaSessionManagerMac::singleton): Deleted.
973         * platform/graphics/avfoundation/WebMediaSessionManagerMac.h:
974
975 2015-08-28  Jer Noble  <jer.noble@apple.com>
976
977         [iOS] Add WebKit/WebKit2 settings to control automatic data loading
978         https://bugs.webkit.org/show_bug.cgi?id=148579
979
980         Reviewed by Anders Carlsson.
981
982         Move the automatic and metadata restrictions from PlatformMediaSessionManager (where access
983         to Settings is unavailable) to MediaElementSession (where it is available). Add properties
984         to Settings so that clients can control this behavior at runtime. Move these restrictions
985         between the two Internals functions which can set them for testing purposes.
986
987         * html/HTMLMediaElement.cpp:
988         (WebCore::HTMLMediaElement::HTMLMediaElement):
989         * html/MediaElementSession.cpp:
990         (WebCore::MediaElementSession::effectivePreloadForElement):
991         * html/MediaElementSession.h:
992         * platform/audio/PlatformMediaSessionManager.h:
993         * platform/audio/ios/MediaSessionManagerIOS.mm:
994         (WebCore::MediaSessionManageriOS::resetRestrictions): Deleted.
995         * testing/Internals.cpp:
996         (WebCore::Internals::setMediaElementRestrictions):
997         (WebCore::Internals::setMediaSessionRestrictions): Deleted.
998
999 2015-08-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1000
1001         Move std::function from JSFunction into NativeStdFunctionCell to correctly destroy the heap allocated std::function
1002         https://bugs.webkit.org/show_bug.cgi?id=148262
1003
1004         Reviewed by Filip Pizlo.
1005
1006         No behavior change.
1007
1008         Change JSFunction::create to JSNativeStdFunction::create to explicitly create the JSNativeStdFunction with the C++ lambda.
1009
1010         * ForwardingHeaders/runtime/JSNativeStdFunction.h: Added.
1011         * bindings/js/ReadableJSStream.cpp:
1012         (WebCore::createStartResultFulfilledFunction):
1013         (WebCore::createPullResultFulfilledFunction):
1014         (WebCore::createCancelResultFulfilledFunction):
1015         (WebCore::createCancelResultRejectedFunction):
1016         (WebCore::ReadableJSStream::ReadableJSStream):
1017
1018 2015-08-28  Sukolsak Sakshuwong  <sukolsak@gmail.com>
1019
1020         Create WebAssembly functions
1021         https://bugs.webkit.org/show_bug.cgi?id=148373
1022
1023         Reviewed by Filip Pizlo.
1024
1025         No new tests, because it is a function rename.
1026
1027         * testing/Internals.cpp:
1028         (WebCore::Internals::parserMetaData):
1029
1030 2015-08-28  Jer Noble  <jer.noble@apple.com>
1031
1032         [iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
1033         https://bugs.webkit.org/show_bug.cgi?id=147512
1034
1035         Reviewed by Anders Carlsson.
1036
1037         Updated existing tests to use the Setting rather than the Behavior Restriction.
1038
1039         Get rid of the sessionRestrictsInlineVideoPlayback() method and the InlineVideoPlaybackRestricted
1040         restriction. Instead, just use the allowsInlineMediaPlayback() setting, and require
1041         WebKit and WebKitLegacy clients to initialize the setting appropriately.
1042
1043         * html/MediaElementSession.cpp:
1044         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): Deleted.
1045         * page/Settings.cpp: Add a new inlineMediaPlaybackRequiresPlaysInlineAttribute setting.
1046         * page/Settings.in: Ditto.
1047         * platform/audio/PlatformMediaSessionManager.cpp:
1048         (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback): Deleted.
1049         * platform/audio/PlatformMediaSessionManager.h:
1050         * platform/audio/ios/MediaSessionManagerIOS.mm:
1051         (WebCore::MediaSessionManageriOS::resetRestrictions): Deleted.
1052         * testing/InternalSettings.cpp:
1053         (WebCore::InternalSettings::Backup::Backup): Backup the allowsInlineMediaPlayback() setting value.
1054         (WebCore::InternalSettings::Backup::restoreTo): Restore same.
1055         (WebCore::InternalSettings::setAllowsInlineMediaPlayback): Set allowsInlineMediaPlayback().
1056         * testing/InternalSettings.h:
1057         * testing/InternalSettings.idl:
1058         * testing/Internals.cpp:
1059         (WebCore::Internals::setMediaSessionRestrictions): Deleted.
1060
1061 2015-08-28  Eric Carlson  <eric.carlson@apple.com>
1062
1063         Media Session: MediaSession.releaseSession() renamed to deactivate()
1064         https://bugs.webkit.org/show_bug.cgi?id=148578
1065
1066         Reviewed by Jer Noble.
1067
1068         No new tests, media/session/releasing-sessions.html was updated for the change.
1069
1070         * Modules/mediasession/MediaSession.cpp:
1071         (WebCore::MediaSession::deactivate): Renamed from releaseSession.
1072         (WebCore::MediaSession::releaseSession): Deleted.
1073         * Modules/mediasession/MediaSession.h:
1074         * Modules/mediasession/MediaSession.idl:
1075
1076         * html/HTMLMediaElement.cpp:
1077         (WebCore::HTMLMediaElement::setSession): releaseSession -> deactivate.
1078
1079 2015-08-28  Joseph Pecoraro  <pecoraro@apple.com>
1080
1081         Web Inspector: Separate creating a style sheet from adding a new rule in the protocol
1082         https://bugs.webkit.org/show_bug.cgi?id=148502
1083
1084         Reviewed by Timothy Hatcher.
1085
1086         Tests: inspector/css/createStyleSheet.html
1087                inspector/css/manager-preferredInspectorStyleSheetForFrame.html
1088
1089         * inspector/InspectorCSSAgent.h:
1090         Allow for multiple inspector style sheets per document.
1091
1092         * inspector/InspectorCSSAgent.cpp:
1093         (WebCore::InspectorCSSAgent::createStyleSheet):
1094         (WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Added.
1095         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): Deleted.
1096         Extract and generalize creating a via-inspector stylesheet here.
1097
1098         (WebCore::InspectorCSSAgent::addRule):
1099         Lookup stylesheet to add a rule to via the provided stylesheet id.
1100
1101         (WebCore::InspectorCSSAgent::bindStyleSheet):
1102         (WebCore::InspectorCSSAgent::detectOrigin):
1103         Update to account for a list of stylesheets per document instead of one.
1104
1105         * inspector/InspectorStyleSheet.cpp:
1106         (WebCore::InspectorStyleSheet::addRule):
1107         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText):
1108
1109 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
1110
1111         [Mac] Right-clicking on GIFs spins the UI process for a while
1112         https://bugs.webkit.org/show_bug.cgi?id=148566
1113         <rdar://problem/22460854>
1114
1115         Reviewed by Brady Eidson.
1116
1117         * platform/ContextMenuItem.h:
1118         Properly mark this as Mac-only. It's only implemented in ContextMenuItemMac.
1119
1120         * platform/mac/ContextMenuItemMac.mm:
1121         (WebCore::ContextMenuItem::shareMenuItem):
1122         Take a NSImage directly, so we don't have to round-trip through BitmapImage,
1123         which can be lossy and expensive.
1124
1125 2015-08-28  Brady Eidson  <beidson@apple.com>
1126
1127         Use new CFNetwork cookie jar SPI only on El Capitan.
1128         https://bugs.webkit.org/show_bug.cgi?id=148574 and rdar://problem/22460752
1129
1130         Reviewed by David Kilzer.
1131
1132         * platform/network/mac/CookieJarMac.mm:
1133         (WebCore::setCookiesFromDOM): Use OS X version to decide which API/SPI to use.
1134         * platform/spi/cf/CFNetworkSPI.h: Forward declare the SPI
1135
1136 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
1137
1138         [Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
1139         https://bugs.webkit.org/show_bug.cgi?id=146045
1140
1141         Reviewed by Darin Adler.
1142
1143         In his WWDC talk[1], Antonio Cavedoni describes how painting a font at a particular point size
1144         may yield different visual results than painting a font at a 1pt size into a scaled context.
1145         However, this is something that we currently do in WebKit. This patch migrates from this
1146         behavior to instead drawing text at the appropriate point size.
1147
1148         [1] https://developer.apple.com/videos/wwdc/2015/?id=804
1149
1150         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1151         (WebCore::FontCascade::drawGlyphs):
1152
1153 2015-08-27  Zalan Bujtas  <zalan@apple.com>
1154
1155         Tiny cleanup in RenderLayer::enclosingCompositingLayerForRepaint()
1156         https://bugs.webkit.org/show_bug.cgi?id=148541
1157
1158         Reviewed by Tim Horton.
1159
1160         No change in functionality.
1161
1162         * rendering/RenderLayer.cpp:
1163         (WebCore::compositingContainer):
1164         (WebCore::compositedWithOwnBackingStore):
1165         (WebCore::RenderLayer::enclosingCompositingLayer):
1166         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
1167         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
1168         (WebCore::RenderLayer::clippingRootForPainting):
1169         * rendering/RenderLayer.h:
1170         * rendering/RenderLayerBacking.cpp:
1171         (WebCore::descendantLayerPaintsIntoAncestor):
1172
1173 2015-08-27  Commit Queue  <commit-queue@webkit.org>
1174
1175         Unreviewed, rolling out r189079.
1176         https://bugs.webkit.org/show_bug.cgi?id=148555
1177
1178         broke the build (Requested by jessieberlin on #webkit).
1179
1180         Reverted changeset:
1181
1182         "Create WebAssembly functions"
1183         https://bugs.webkit.org/show_bug.cgi?id=148373
1184         http://trac.webkit.org/changeset/189079
1185
1186 2015-08-27  Sukolsak Sakshuwong  <sukolsak@gmail.com>
1187
1188         Create WebAssembly functions
1189         https://bugs.webkit.org/show_bug.cgi?id=148373
1190
1191         Reviewed by Geoffrey Garen.
1192
1193         No new tests because it's a function rename.
1194
1195         * testing/Internals.cpp:
1196         (WebCore::Internals::parserMetaData):
1197
1198 2015-08-27  Chris Dumez  <cdumez@apple.com>
1199
1200         A WebIDL callback interface is allowed to have constants
1201         https://bugs.webkit.org/show_bug.cgi?id=148449
1202
1203         Reviewed by Geoffrey Garen.
1204
1205         Our JS bindings generator is now able to:
1206         1. Handle IDL constants [1] on a callback interfaces [2] and generate
1207            a DOMConstructorObject subclass with static properties for
1208            these constants [3].
1209         2. Generate a property on the global object for callback interfaces
1210            that have constants and do not have the [NoInterfaceObject] IDL
1211            extended attribute [4].
1212
1213         This is a pre-requirement for Bug 148415 as NodeFilter [5] has constants
1214         and should be a callback interface. Once NodeFilter is ported to be
1215         a callback interface, the JS still needs to be able to access
1216         window.NodeFilter.SHOW_ALL for e.g.
1217
1218         [1] https://heycam.github.io/webidl/#dfn-constant
1219         [2] https://heycam.github.io/webidl/#dfn-callback-interface
1220         [3] https://heycam.github.io/webidl/#NoInterfaceObject
1221         [4] https://heycam.github.io/webidl/#es-interfaces
1222         [5] https://dom.spec.whatwg.org/#interface-nodefilter
1223
1224         * bindings/scripts/CodeGeneratorJS.pm:
1225         (GenerateCallbackHeader):
1226         (GenerateCallbackImplementation):
1227         (GenerateConstructorHelperMethods):
1228         (ConstructorHasProperties): Deleted.
1229         * bindings/scripts/preprocess-idls.pl:
1230         (getInterfaceExtendedAttributesFromIDL):
1231         (interfaceHasConstantAttribute):
1232         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1233         * bindings/scripts/test/JS/JSTestCallback.cpp:
1234         (WebCore::JSTestCallbackConstructor::create):
1235         (WebCore::JSTestCallbackConstructor::createStructure):
1236         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
1237         (WebCore::JSTestCallbackConstructor::finishCreation):
1238         (WebCore::JSTestCallback::getConstructor):
1239         * bindings/scripts/test/JS/JSTestCallback.h:
1240         * bindings/scripts/test/ObjC/DOMTestCallback.h:
1241         * bindings/scripts/test/TestCallback.idl:
1242
1243 2015-08-27  Chris Dumez  <cdumez@apple.com>
1244
1245         Range.compareBoundaryPoints() should throw a NotSupportedError for invalid compareHow values
1246         https://bugs.webkit.org/show_bug.cgi?id=148483
1247
1248         Reviewed by Geoffrey Garen.
1249
1250         Range.compareBoundaryPoints() should throw a NotSupportedError for
1251         invalid compareHow values:
1252         https://dom.spec.whatwg.org/#dom-range-compareboundarypoints (step 1)
1253
1254         Firefox and Chrome conform to the specification already.
1255
1256         Previously, WebKit would not throw and simply cast the value to our
1257         internal CompareHow enum type. This patch aligns WebKit's behavior with
1258         the DOM specificaiton and other browsers.
1259
1260         W3C test suite:
1261         http://w3c-test.org/dom/ranges/Range-compareBoundaryPoints.html
1262
1263         Test: fast/dom/Range/compareBoundaryPoints-compareHow-exception.html
1264
1265         * bindings/scripts/CodeGenerator.pm:
1266         * bindings/scripts/CodeGeneratorGObject.pm:
1267         * bindings/scripts/CodeGeneratorJS.pm:
1268         * bindings/scripts/CodeGeneratorObjC.pm:
1269         Drop CompareHow special casing from bindings generator as we now use
1270         unsigned short instead in the IDL.
1271
1272         * dom/Range.cpp:
1273         (WebCore::Range::compareBoundaryPointsForBindings):
1274         * dom/Range.h:
1275         * dom/Range.idl:
1276         Use "unsigned short" type instead of WebCore's CompareHow for the
1277         parameter, as per the specification. On implementation side, we
1278         now validate the compareHow value before casting it to a CompareHow
1279         enum type. If the value is not value, we throw and abort early.
1280
1281 2015-08-27  Joseph Pecoraro  <pecoraro@apple.com>
1282
1283         Page does not update when <link> media attribute changes to no longer apply to page
1284         https://bugs.webkit.org/show_bug.cgi?id=148392
1285
1286         Reviewed by Antti Koivisto.
1287
1288         Test: fast/css/link-media-attr.html
1289
1290         * html/HTMLLinkElement.cpp:
1291         (WebCore::HTMLLinkElement::parseAttribute):
1292         When the media attribute changes, recalculate styles if the link is not disabled.
1293
1294 2015-08-27  Zalan Bujtas  <zalan@apple.com>
1295
1296         Simple line layout: Text jumps sometimes on naughty strings page
1297         https://bugs.webkit.org/show_bug.cgi?id=148399
1298         rdar://problem/22212568
1299
1300         Reviewed by Antti Koivisto.
1301
1302         The x position we set for tab characters during painting should
1303         be the same as if it was set by the inline box tree painting.
1304
1305         Inline box tree computes the distance from the rootbox for each line
1306         and sets this value as the xPos for the TextRun.
1307         Currently simple line layout does not support cases where a line
1308         would have an offset, so this value is always 0.
1309
1310         Test: fast/text/whitespace/simple-line-layout-tab-position.html
1311
1312         * rendering/SimpleLineLayoutFunctions.cpp:
1313         (WebCore::SimpleLineLayout::paintFlow):
1314
1315 2015-08-27  Alex Christensen  <achristensen@webkit.org>
1316
1317         Isolate Source directories in CMake build
1318         https://bugs.webkit.org/show_bug.cgi?id=148389
1319
1320         Reviewed by Brent Fulgham.
1321
1322         * CMakeLists.txt:
1323         Use the forwarding header copy of the inspector scripts to avoid requiring JavaScriptCore directory to exist.
1324         * PlatformAppleWin.cmake:
1325         Add AVFoundation sources to build.
1326         * PlatformEFL.cmake:
1327         Moved WebKitVersion.h generating from CMakeLists.txt because it is now only used in WebCore by EFL.
1328         * PlatformWin.cmake:
1329         Include ../include/private to find forwarding headers in internal build.
1330
1331 2015-08-27  Alex Christensen  <achristensen@webkit.org>
1332
1333         [Win CMake] Fix incremental build after r188673
1334         https://bugs.webkit.org/show_bug.cgi?id=148539
1335
1336         Reviewed by Brent Fulgham.
1337
1338         * CMakeLists.txt:
1339         * PlatformWin.cmake:
1340         Use xcopy as a build step instead of file(COPY ...) to copy updated headers.
1341
1342 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
1343
1344         Factor out Lookup invocation
1345         https://bugs.webkit.org/show_bug.cgi?id=148509
1346
1347         Reviewed by Anders Carlsson.
1348
1349         There's a ton of duplicated code in legacy and modern WebKit to talk to
1350         Lookup. And, it's pretty messy. As a first step to making it less messy,
1351         make it so we only have it in one place instead of four (or two).
1352
1353         * editing/DictionaryPopupInfo.h:
1354         Move DictionaryPopupInfo into WebCore. This was duplicated
1355         in both legacy and modern WebKit.
1356
1357         * editing/mac/DictionaryLookup.h:
1358         * editing/mac/DictionaryLookup.mm:
1359         (WebCore::DictionaryLookup::rangeForSelection):
1360         (WebCore::DictionaryLookup::rangeAtHitTestResult):
1361         (WebCore::DictionaryLookup::stringForPDFSelection):
1362         (WebCore::showPopupOrCreateAnimationController):
1363         (WebCore::DictionaryLookup::showPopup):
1364         (WebCore::DictionaryLookup::hidePopup):
1365         (WebCore::DictionaryLookup::animationControllerForPopup):
1366         (WebCore::rangeForDictionaryLookupForSelection): Deleted.
1367         (WebCore::rangeForDictionaryLookupAtHitTestResult): Deleted.
1368         (WebCore::dictionaryLookupForPDFSelection): Deleted.
1369         Move DictionaryLookup stuff into a class for better names.
1370
1371         Move showPopup, hidePopup, and animationControllerForPopup here.
1372         showPopup and animationControllerForPopup both bottleneck through
1373         a single function, where previously we duplicated all of the code
1374         for both of them, and in both legacy and modern WebKit.
1375
1376         showPopup and animationControllerForPopup take a block that they *may*
1377         call if we have support for overriding Lookup's indicator with TextIndicator,
1378         because the installation process is different per WebKit.
1379
1380         * page/mac/EventHandlerMac.mm:
1381         (WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
1382         * testing/Internals.cpp:
1383         (WebCore::Internals::rangeForDictionaryLookupAtLocation):
1384         Adjust to the new naming.
1385
1386 2015-08-27  Jon Davis  <jond@apple.com>
1387
1388         Add IndexedDB to the feature status page.
1389         https://bugs.webkit.org/show_bug.cgi?id=148094
1390
1391         Reviewed by Timothy Hatcher.
1392
1393         * features.json:
1394
1395 2015-08-27  Anders Carlsson  <andersca@apple.com>
1396
1397         REGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
1398         https://bugs.webkit.org/show_bug.cgi?id=148497
1399         <rdar://problem/22459541>
1400
1401         Reviewed by Andy Estes.
1402
1403         Don't return early if iterations is 0.
1404
1405         * platform/graphics/filters/FEConvolveMatrix.cpp:
1406         (WebCore::FEConvolveMatrix::platformApplySoftware):
1407
1408 2015-08-27  Antti Koivisto  <antti@apple.com>
1409
1410         Decode redirected data URLs in web process
1411         https://bugs.webkit.org/show_bug.cgi?id=148386
1412
1413         Reviewed by Zalan Bujtas.
1414
1415         Redirected data URLs still end up to networking layer for decoding. Handle them locally as well.
1416
1417         Covered by existing tests.
1418
1419         * loader/ResourceLoader.cpp:
1420         (WebCore::ResourceLoader::~ResourceLoader):
1421         (WebCore::ResourceLoader::finishNetworkLoad):
1422
1423             Factor to a function.
1424
1425         (WebCore::ResourceLoader::releaseResources):
1426         (WebCore::ResourceLoader::willSendRequestInternal):
1427
1428             When receiving redirect to a data URL end the network load and decode it locally.
1429
1430         (WebCore::ResourceLoader::willSendRequest):
1431         * loader/ResourceLoader.h:
1432
1433 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
1434
1435         [Cocoa] Generic font families do not consult with the user's preferred language
1436         https://bugs.webkit.org/show_bug.cgi?id=148499
1437         <rdar://problem/22407296>
1438
1439         Reviewed by Antti Koivisto.
1440
1441         When WebKit encounters markup like lang="zh" style="font-family: sans-serif;"
1442         we currently always use Simplified Chinese fonts. However, the user may
1443         have specifically selected Traditional Chinese in their user preferences.
1444         In this absence of other signals, we should consult with the user
1445         preferences when determining which font to pick.
1446
1447         Tests: fast/text/international/generic-font-family-language-simplified.html
1448                fast/text/international/generic-font-family-language-traditional.html
1449
1450         * platform/Language.cpp:
1451         (WebCore::observerMap):
1452         (WebCore::overrideUserPreferredLanguages):
1453         * platform/graphics/FontGenericFamilies.cpp:
1454         (WebCore::computeUserPrefersSimplified):
1455         (WebCore::cachedUserPrefersSimplified):
1456         (WebCore::languageChanged):
1457         (WebCore::genericFontFamilyForScript):
1458         (WebCore::FontGenericFamilies::FontGenericFamilies):
1459         * platform/text/LocaleToScriptMappingDefault.cpp:
1460         (WebCore::scriptNameToCode):
1461
1462 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
1463
1464         Update Grid Layout to use fewer magic -1s
1465         https://bugs.webkit.org/show_bug.cgi?id=148505
1466
1467         Reviewed by Javier Fernandez.
1468
1469         After r188873, there were still some -1s left in Grid Layout code. This patch cleans them
1470         up after consulting with Javier Fernandez.
1471
1472         No new tests because there is no behavior change.
1473
1474         * rendering/RenderBox.cpp:
1475         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
1476         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
1477         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
1478         * rendering/RenderGrid.cpp:
1479         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1480
1481 2015-08-27  Brian Burg  <bburg@apple.com>
1482
1483         Web Inspector: FrontendChannel should know its own connection type
1484         https://bugs.webkit.org/show_bug.cgi?id=148482
1485
1486         Reviewed by Joseph Pecoraro.
1487
1488         To prepare for multiple attached frontends, the frontend connection should
1489         be able to report its type rather than explicitly setting connection type
1490         via a getter.
1491
1492         No behavior change, no new tests.
1493
1494         * inspector/InspectorController.cpp:
1495         (WebCore::InspectorController::hasLocalFrontend): Ask the channel what it is.
1496         (WebCore::InspectorController::hasRemoteFrontend): Ask the channel what it is.
1497         (WebCore::InspectorController::connectFrontend): Use hasRemoteFrotend().
1498         (WebCore::InspectorController::disconnectFrontend): Use hasRemoteFrontend().
1499         (WebCore::InspectorController::InspectorController): Deleted.
1500         * inspector/InspectorController.h: Initialize a few members here.
1501         (WebCore::InspectorController::hasFrontend): Deleted, it was unused.
1502         (WebCore::InspectorController::setHasRemoteFrontend): Deleted.
1503         * inspector/WorkerInspectorController.cpp:
1504         * page/PageDebuggable.cpp:
1505         (WebCore::PageDebuggable::connect):
1506         (WebCore::PageDebuggable::disconnect):
1507         * testing/Internals.cpp: Add connectionType().
1508
1509 2015-08-27  Eric Carlson  <eric.carlson@apple.com>
1510
1511         Media Session: MediaSession constructor 'kind' argument optional
1512         https://bugs.webkit.org/show_bug.cgi?id=148527
1513
1514         Reviewed by Jer Noble.
1515
1516         No new tests, updated media/session/session-creation.html.
1517
1518         * Modules/mediasession/MediaSession.cpp:
1519         (WebCore::MediaSession::parseKind): Treat null kind "content".
1520         (WebCore::MediaSession::MediaSession): Delete Document* version.
1521         * Modules/mediasession/MediaSession.h: Make constructor private.
1522         * Modules/mediasession/MediaSession.idl:
1523
1524         * WebCore.xcodeproj/project.pbxproj: Add JSMediaSessionCustom.cpp.
1525
1526         * bindings/js/JSMediaSessionCustom.cpp: Added.
1527         (WebCore::constructJSMediaSession):
1528
1529         * dom/Document.cpp:
1530         (WebCore::Document::defaultMediaSession): Call MediaSession::create.
1531
1532         * html/HTMLMediaElement.cpp:
1533         (WebCore::HTMLMediaElement::session): Compare session with document.defaultMediaSession, not
1534           its kind.
1535         (WebCore::HTMLMediaElement::setSession): Update comments.
1536
1537 2015-08-27  Zalan Bujtas  <zalan@apple.com>
1538
1539         Simple line layout: Use float types wherever possible to match line tree.
1540         https://bugs.webkit.org/show_bug.cgi?id=148444
1541
1542         Reviewed by Antti Koivisto.
1543
1544         To match inline tree output, we should try to match the data types as far as precision goes.
1545
1546         This patch also fixes the confusing mismatch between Run::baseline().x() and Run::rect().x(). 
1547         They are both supposed to return the left edge of the run. However Run::rect().x() returns a rounded
1548         LayoutUnit of the logical left, while Run::baseline().x() returns the correct logical left.          
1549         With this patch 
1550           1. baseline position does not include logical left anymore.
1551           2. Run::rect().x() does not round the logical left coordinate anymore.
1552
1553         * rendering/RenderTreeAsText.cpp:
1554         (WebCore::writeSimpleLine):
1555         * rendering/SimpleLineLayoutFunctions.cpp:
1556         (WebCore::SimpleLineLayout::paintFlow):
1557         (WebCore::SimpleLineLayout::collectFlowOverflow):
1558         (WebCore::SimpleLineLayout::collectAbsoluteRects):
1559         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
1560         * rendering/SimpleLineLayoutResolver.cpp:
1561         (WebCore::SimpleLineLayout::linePosition):
1562         (WebCore::SimpleLineLayout::lineSize):
1563         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
1564         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
1565         (WebCore::SimpleLineLayout::baselinePosition): Deleted.
1566         (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
1567         * rendering/SimpleLineLayoutResolver.h:
1568         (WebCore::SimpleLineLayout::RunResolver::Run::baselinePosition):
1569         (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):
1570
1571 2015-08-27  Zalan Bujtas  <zalan@apple.com>
1572
1573         Subpixel positioned iframe's repaint area calculation problem.
1574         https://bugs.webkit.org/show_bug.cgi?id=148422
1575
1576         When the repaint rect position is floored for iframes, we need
1577         to expand the size so that it still covers the content.
1578
1579         Reviewed by Simon Fraser.
1580
1581         Test: fast/repaint/content-inside-subpixel-positioned-iframe.html
1582
1583         * rendering/RenderBox.cpp:
1584         (WebCore::RenderBox::computeRectForRepaint):
1585
1586 2015-08-27  Enrica Casucci  <enrica@apple.com>
1587
1588         Add some new emoji with modifiers and new sequence.
1589         https://bugs.webkit.org/show_bug.cgi?id=148202
1590         rdar://problem/21849857
1591
1592         Reviewed by Sam Weinig.
1593
1594         Adding support for some new emoji with modifiers and
1595         one new emoji sequence.
1596
1597         * platform/graphics/FontCascade.cpp:
1598         (WebCore::FontCascade::characterRangeCodePath):
1599         * platform/text/CharacterProperties.h:
1600         (WebCore::isEmojiGroupCandidate):
1601         (WebCore::isEmojiModifier):
1602         * platform/text/TextBreakIterator.cpp:
1603         (WebCore::cursorMovementIterator):
1604
1605 2015-08-27  Dean Jackson  <dino@apple.com>
1606
1607         Initial infrastructure of media controls testing
1608         https://bugs.webkit.org/show_bug.cgi?id=148426
1609         <rdar://problem/22417286>
1610
1611         Reviewed by Eric Carlson.
1612
1613         Expose a JS API from Internals that allows a layout test
1614         to ask the controls instance what it thinks it is
1615         doing.
1616
1617         Test: media/controls/basic.html
1618
1619         * Modules/mediacontrols/mediaControlsApple.js:
1620         (Controller.prototype.getCurrentControlsStatus): New method. Currently
1621         returns a simple JSON string.
1622         * html/HTMLMediaElement.cpp:
1623         (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): Call into
1624         the controls instance.
1625         * html/HTMLMediaElement.h:
1626         * testing/Internals.cpp:
1627         (WebCore::Internals::getCurrentMediaControlsStatusForElement): Link
1628         between the Internals API and the HTMLMediaElement.
1629         * testing/Internals.h:
1630         * testing/Internals.idl:
1631
1632 2015-08-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1633
1634         [EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
1635         https://bugs.webkit.org/show_bug.cgi?id=148511
1636
1637         Reviewed by Csaba Osztrogonác.
1638
1639         To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.
1640
1641         Additionally this patch fixes style errors in RenderThemeEfl.cpp
1642
1643         * PlatformEfl.cmake:
1644         * rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
1645         (WebCore::toEdjeGroup):
1646         (WebCore::setSourceGroupForEdjeObject):
1647         (WebCore::RenderThemeEfl::adjustSizeConstraints):
1648         (WebCore::isFormElementTooLargeToDisplay):
1649         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
1650         (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
1651         (WebCore::RenderThemeEfl::getThemePartFromCache):
1652         (WebCore::RenderThemeEfl::clearThemePartCache):
1653         (WebCore::RenderThemeEfl::applyEdjeStateFromForm):
1654         (WebCore::RenderThemeEfl::applyEdjeRTLState):
1655         (WebCore::RenderThemeEfl::isControlStyled):
1656         (WebCore::RenderThemeEfl::paintThemePart):
1657         (WebCore::RenderThemeEfl::create):
1658         (WebCore::RenderTheme::themeForPage):
1659         (WebCore::applyColorCallback):
1660         (WebCore::fillColorsFromEdjeClass):
1661         (WebCore::RenderThemeEfl::setColorFromThemeClass):
1662         (WebCore::RenderThemeEfl::setThemePath):
1663         (WebCore::RenderThemeEfl::themePath):
1664         (WebCore::RenderThemeEfl::loadTheme):
1665         (WebCore::RenderThemeEfl::applyPartDescriptionFallback):
1666         (WebCore::RenderThemeEfl::applyPartDescription):
1667         (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
1668         (WebCore::RenderThemeEfl::RenderThemeEfl):
1669         (WebCore::RenderThemeEfl::~RenderThemeEfl):
1670         (WebCore::supportsFocus):
1671         (WebCore::RenderThemeEfl::supportsFocusRing):
1672         (WebCore::RenderThemeEfl::controlSupportsTints):
1673         (WebCore::RenderThemeEfl::baselinePosition):
1674         (WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
1675         (WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
1676         (WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
1677         (WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
1678         (WebCore::RenderThemeEfl::platformFocusRingColor):
1679         (WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
1680         (WebCore::RenderThemeEfl::paintSliderTrack):
1681         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
1682         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
1683         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
1684         (WebCore::RenderThemeEfl::sliderTickSize):
1685         (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
1686         (WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
1687         (WebCore::RenderThemeEfl::supportsDataListUI):
1688         (WebCore::RenderThemeEfl::paintSliderThumb):
1689         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
1690         (WebCore::RenderThemeEfl::paintCheckbox):
1691         (WebCore::RenderThemeEfl::adjustRadioStyle):
1692         (WebCore::RenderThemeEfl::paintRadio):
1693         (WebCore::RenderThemeEfl::adjustButtonStyle):
1694         (WebCore::RenderThemeEfl::paintButton):
1695         (WebCore::RenderThemeEfl::adjustMenuListStyle):
1696         (WebCore::RenderThemeEfl::paintMenuList):
1697         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
1698         (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
1699         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
1700         (WebCore::RenderThemeEfl::paintTextField):
1701         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
1702         (WebCore::RenderThemeEfl::paintTextArea):
1703         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
1704         (WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
1705         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
1706         (WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
1707         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
1708         (WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
1709         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
1710         (WebCore::RenderThemeEfl::paintSearchField):
1711         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
1712         (WebCore::RenderThemeEfl::paintInnerSpinButton):
1713         (WebCore::RenderThemeEfl::setDefaultFontSize):
1714         (WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
1715         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
1716         (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
1717         (WebCore::RenderThemeEfl::animationDurationForProgressBar):
1718         (WebCore::RenderThemeEfl::paintProgressBar):
1719         (WebCore::RenderThemeEfl::mediaControlsStyleSheet):
1720         (WebCore::RenderThemeEfl::mediaControlsScript):
1721         * rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.
1722
1723 2015-08-26  Mark Lam  <mark.lam@apple.com>
1724
1725         watchdog m_didFire state erroneously retained.
1726         https://bugs.webkit.org/show_bug.cgi?id=131082
1727
1728         Reviewed by Geoffrey Garen.
1729
1730         No new tests.  The new code is covered by the JSC API tests and an existing test:
1731         fast/workers/worker-terminate-forever.html
1732
1733         * bindings/js/JSEventListener.cpp:
1734         (WebCore::JSEventListener::handleEvent):
1735         * bindings/js/WorkerScriptController.cpp:
1736         (WebCore::WorkerScriptController::WorkerScriptController):
1737         - Always create a watchdog for the Web Worker's VM.  We need this in order to support
1738           Worker.terminate().
1739         (WebCore::WorkerScriptController::evaluate):
1740         (WebCore::WorkerScriptController::scheduleExecutionTermination):
1741         (WebCore::WorkerScriptController::isTerminatingExecution):
1742         (WebCore::WorkerScriptController::forbidExecution):
1743         (WebCore::WorkerScriptController::isExecutionTerminating): Deleted.
1744         * bindings/js/WorkerScriptController.h:
1745
1746 2015-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
1747
1748         [Cocoa] PerformanceTest Layout/RegionsShapes.html is failing
1749         https://bugs.webkit.org/show_bug.cgi?id=148464
1750
1751         Reviewed by Andy Estes.
1752
1753         The test is failing because Core Text emits a warning message when you use CTFontCreateWithName()
1754         and it cannot find the name you provide. However, this is exactly the situation we are creating
1755         (by attempting to auto-activate a font if we could not otherwise find it). The fix is to simply
1756         not use that API function in favor of using CTFontCreateWithFontDescriptor(), which does not emit
1757         a warning message..
1758
1759         No new tests because there is no behavior change.
1760
1761         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1762         (WebCore::autoActivateFont):
1763         (WebCore::FontCache::createFontPlatformData):
1764
1765 2015-08-26  Joseph Pecoraro  <pecoraro@apple.com>
1766
1767         Web Inspector: Implement tracking of active stylesheets in the frontend
1768         https://bugs.webkit.org/show_bug.cgi?id=105828
1769
1770         Reviewed by Timothy Hatcher.
1771
1772         Tests: inspector/css/stylesheet-events-basic.html
1773                inspector/css/stylesheet-events-imports.html
1774                inspector/css/stylesheet-events-inspector-stylesheet.html
1775
1776         * inspector/InspectorInstrumentation.cpp:
1777         (WebCore::InspectorInstrumentation::documentDetachedImpl):
1778         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdatedImpl):
1779         * inspector/InspectorInstrumentation.h:
1780         (WebCore::InspectorInstrumentation::documentDetached):
1781         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdated):
1782         New hooks for when a document is detached or a document's style sheets are updated.
1783
1784         * dom/Document.cpp:
1785         (WebCore::Document::prepareForDestruction):
1786         Inform the inspector so the CSSAgent can remove document related data.
1787
1788         * dom/DocumentStyleSheetCollection.h:
1789         * dom/DocumentStyleSheetCollection.cpp:
1790         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1791         Inform the inspector so the CSSAgent can push stylesheet related events.
1792
1793         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsForInspector): Added.
1794         CSSStyleSheets for the inspector include non-disabled author stylesheets
1795         even if they are empty.
1796
1797         * inspector/InspectorCSSAgent.h:
1798         * inspector/InspectorCSSAgent.cpp:
1799         (WebCore::InspectorCSSAgent::reset):
1800         (WebCore::InspectorCSSAgent::documentDetached):
1801         Handling for the new list of known document to CSSStyleSheets map.
1802
1803         (WebCore::InspectorCSSAgent::enable):
1804         When the CSS domain is enabled, tell the frontend about known stylesheets.
1805
1806         (WebCore::InspectorCSSAgent::activeStyleSheetsUpdated):
1807         (WebCore::InspectorCSSAgent::setActiveStyleSheetsForDocument):
1808         Diff the old list of known stylesheets to the new list of stylesheets
1809         for an individual document. Then send appropriate added/removed events.
1810
1811         (WebCore::InspectorCSSAgent::collectAllStyleSheets):
1812         (WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
1813         (WebCore::InspectorCSSAgent::collectStyleSheets):
1814         Collect stylesheets recursively. A stylesheet may link to other stylesheets
1815         through @import statements.
1816
1817         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1818         Use the new methods, this command should go away as it will no longer be useful.
1819
1820         (WebCore::InspectorCSSAgent::unbindStyleSheet):
1821         (WebCore::InspectorCSSAgent::bindStyleSheet):
1822         Create an InspectorStyleSheet from a CSSStyleSheet and add to the appropriate lists.
1823         Likewise, unbinding will remove from the appropriate lists.
1824
1825         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1826         (WebCore::InspectorCSSAgent::detectOrigin):
1827         When creating the inspector stylesheet, which is a <style> element,
1828         it will push a StyleSheetAdded event. In the process of binding this
1829         new stylesheet use the m_creatingViaInspectorStyleSheet to add it to
1830         out list of Inspector Stylesheets.
1831
1832 2015-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
1833
1834         Add comment to LocaleToScriptMappingDefault.cpp
1835         <rdar://problem/22407296>
1836
1837         Unreviewed.
1838
1839         We currently map lang="zh" to USCRIPT_SIMPLIFIED_HAN, which is incorrect.
1840         Instead, we should consult with an external source, such as the user's
1841         language preferences.
1842
1843         * platform/text/LocaleToScriptMappingDefault.cpp:
1844
1845 2015-08-26  Chris Dumez  <cdumez@apple.com>
1846
1847         Distinguish Web IDL callback interfaces from Web IDL callback functions
1848         https://bugs.webkit.org/show_bug.cgi?id=148434
1849
1850         Reviewed by Geoffrey Garen.
1851
1852         Distinguish Web IDL callback interfaces [1] from Web IDL callback
1853         functions [2].
1854
1855         One Web-exposed difference is that when using a callback interface,
1856         the user can pass either a function / callable object or a non-callable
1857         object that has a method with the same name as the callback interface
1858         operation:
1859         https://heycam.github.io/webidl/#es-user-objects
1860
1861         When using a callback function, the user needs to pass a function /
1862         callable object:
1863         https://heycam.github.io/webidl/#es-callback-function
1864
1865         This patch adds a new [Callback=FunctionOnly] IDL extended attribute to
1866         indicate that a callback interface should be function-only (i.e. a callback
1867         function in the latest Web IDL specification). Without this IDL extended
1868         attribute, the callback interface will be treated as a regular callback
1869         interface. This will be needed for Bug 148415, as NodeFilter should be
1870         an actual callback interface.
1871
1872         Note that longer term, we should really drop the old-style
1873         [Callback=FunctionOnly] extendd attribute and use actual IDL callback
1874         functions as per the latest Web IDL specification. However, I did not
1875         do this in this patch to minimize patch size.
1876
1877         This patch adds Callback=FunctionOnly] IDL extended attribute to all
1878         our pre-existing callback interfaces so that there is no behavior
1879         change.
1880
1881        [1] https://heycam.github.io/webidl/#dfn-callback-interface
1882        [2] https://heycam.github.io/webidl/#idl-callback-functions
1883
1884         * Modules/geolocation/PositionCallback.idl:
1885         * Modules/geolocation/PositionErrorCallback.idl:
1886         * Modules/mediastream/MediaStreamTrackSourcesCallback.idl:
1887         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
1888         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
1889         * Modules/mediastream/RTCPeerConnectionErrorCallback.idl:
1890         * Modules/mediastream/RTCSessionDescriptionCallback.idl:
1891         * Modules/mediastream/RTCStatsCallback.idl:
1892         * Modules/notifications/NotificationPermissionCallback.idl:
1893         * Modules/quota/StorageErrorCallback.idl:
1894         * Modules/quota/StorageQuotaCallback.idl:
1895         * Modules/quota/StorageUsageCallback.idl:
1896         * Modules/webaudio/AudioBufferCallback.idl:
1897         * Modules/webdatabase/DatabaseCallback.idl:
1898         * Modules/webdatabase/SQLStatementCallback.idl:
1899         * Modules/webdatabase/SQLStatementErrorCallback.idl:
1900         * Modules/webdatabase/SQLTransactionCallback.idl:
1901         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
1902         * bindings/js/JSCallbackData.cpp:
1903         (WebCore::JSCallbackData::invokeCallback):
1904         * bindings/js/JSCallbackData.h:
1905         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1906         (WebCore::JSSQLStatementErrorCallback::handleEvent):
1907         * bindings/scripts/CodeGenerator.pm:
1908         (trim):
1909         (IsFunctionOnlyCallbackInterface):
1910         * bindings/scripts/CodeGeneratorJS.pm:
1911         (GenerateParametersCheckExpression):
1912         (GenerateParametersCheck):
1913         (GenerateCallbackImplementation):
1914         * bindings/scripts/IDLAttributes.txt:
1915         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp: Added.
1916         (WebKit::kit):
1917         (WebKit::core):
1918         (WebKit::wrapTestCallbackFunction):
1919         (webkit_dom_test_callback_function_finalize):
1920         (webkit_dom_test_callback_function_constructor):
1921         (webkit_dom_test_callback_function_class_init):
1922         (webkit_dom_test_callback_function_init):
1923         (webkit_dom_test_callback_function_callback_with_no_param):
1924         (webkit_dom_test_callback_function_callback_with_array_param):
1925         (webkit_dom_test_callback_function_callback_with_serialized_script_value_param):
1926         (webkit_dom_test_callback_function_callback_with_non_bool_return_type):
1927         (webkit_dom_test_callback_function_callback_with_string_list):
1928         (webkit_dom_test_callback_function_callback_with_boolean):
1929         (webkit_dom_test_callback_function_callback_requires_this_to_pass):
1930         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h: Added.
1931         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h: Copied from Source/WebCore/css/MediaQueryListListener.idl.
1932         * bindings/scripts/test/JS/JSTestCallback.cpp:
1933         (WebCore::JSTestCallback::callbackWithNoParam):
1934         (WebCore::JSTestCallback::callbackWithArrayParam):
1935         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
1936         (WebCore::JSTestCallback::callbackWithStringList):
1937         (WebCore::JSTestCallback::callbackWithBoolean):
1938         (WebCore::JSTestCallback::callbackRequiresThisToPass):
1939         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
1940         (WebCore::JSTestCallbackFunction::JSTestCallbackFunction):
1941         (WebCore::JSTestCallbackFunction::~JSTestCallbackFunction):
1942         (WebCore::JSTestCallbackFunction::callbackWithNoParam):
1943         (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
1944         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
1945         (WebCore::JSTestCallbackFunction::callbackWithStringList):
1946         (WebCore::JSTestCallbackFunction::callbackWithBoolean):
1947         (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
1948         * bindings/scripts/test/JS/JSTestCallbackFunction.h: Added.
1949         (WebCore::JSTestCallbackFunction::create):
1950         (WebCore::JSTestCallbackFunction::scriptExecutionContext):
1951         * bindings/scripts/test/JS/JSTestObj.cpp:
1952         (WebCore::JSTestObjConstructor::constructJSTestObj):
1953         (WebCore::JSTestObjConstructor::finishCreation):
1954         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1955         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1956         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
1957         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
1958         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
1959         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
1960         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
1961         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
1962         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1963         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
1964         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): Deleted.
1965         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): Deleted.
1966         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1967         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
1968         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Copied from Source/WebCore/html/VoidCallback.idl.
1969         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Added.
1970         (-[DOMTestCallbackFunction dealloc]):
1971         (-[DOMTestCallbackFunction finalize]):
1972         (-[DOMTestCallbackFunction callbackWithNoParam]):
1973         (-[DOMTestCallbackFunction callbackWithArrayParam:]):
1974         (-[DOMTestCallbackFunction callbackWithSerializedScriptValueParam:strArg:]):
1975         (-[DOMTestCallbackFunction callbackWithNonBoolReturnType:]):
1976         (-[DOMTestCallbackFunction customCallback:class6Param:]):
1977         (-[DOMTestCallbackFunction callbackWithStringList:]):
1978         (-[DOMTestCallbackFunction callbackWithBoolean:]):
1979         (-[DOMTestCallbackFunction callbackRequiresThisToPass:testNodeParam:]):
1980         (core):
1981         (kit):
1982         * bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Copied from Source/WebCore/html/VoidCallback.idl.
1983         * bindings/scripts/test/TestCallbackFunction.idl: Copied from Source/WebCore/Modules/webdatabase/DatabaseCallback.idl.
1984         * bindings/scripts/test/TestObj.idl:
1985         * css/MediaQueryListListener.idl:
1986         * dom/RequestAnimationFrameCallback.idl:
1987         * dom/StringCallback.idl:
1988         * html/VoidCallback.idl:
1989
1990 2015-08-26  Beth Dakin  <bdakin@apple.com>
1991
1992         REGRESSION: Safari navigates after a cancelled force click
1993         https://bugs.webkit.org/show_bug.cgi?id=148491
1994         -and corresponding-
1995         rdar://problem/22394323
1996
1997         Reviewed by Tim Horton.
1998
1999         This regression was introduced on El Capitan because AppKit sends ‘cancel’ to 
2000         gesture recognizer BEFORE it sends the mouseUp. So the ImmediateActionStage needs 
2001         to track whether a cancel happened after updates or without any updates since they 
2002         signify different things. 
2003
2004         Don’t perform default behaviors when the stage is ActionCancelledAfterUpdate.
2005         * page/EventHandler.cpp:
2006         (WebCore::EventHandler::handleMouseReleaseEvent):
2007
2008         New possible stages, and new getter for the current stage.
2009         * page/EventHandler.h:
2010         (WebCore::EventHandler::immediateActionStage):
2011
2012 2015-08-26  Anders Carlsson  <andersca@apple.com>
2013
2014         Fix failing tests.
2015
2016         Add fallback code for the case when iterations is 0.
2017
2018         * platform/graphics/filters/FEConvolveMatrix.cpp:
2019         (WebCore::FEConvolveMatrix::platformApplySoftware):
2020
2021 2015-08-26  Anders Carlsson  <andersca@apple.com>
2022
2023         Use WorkQueue::concurrentApply in FEConvolveMatrix
2024         https://bugs.webkit.org/show_bug.cgi?id=148490
2025
2026         Reviewed by Tim Horton.
2027
2028         Using WorkQueue::concurrentApply lets us simplify the code a lot, and measurements show
2029         no difference in performance. The striding has been slightly tweaked to make more sense
2030         (we no longer divide up the remainder across some of the iterations, instead we just process 
2031         it separately last).
2032
2033         * platform/graphics/filters/FEConvolveMatrix.cpp:
2034         (WebCore::FEConvolveMatrix::platformApplySoftware):
2035         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker): Deleted.
2036         * platform/graphics/filters/FEConvolveMatrix.h:
2037
2038 2015-08-26  Eric Carlson  <eric.carlson@apple.com>
2039
2040         Media Session: make MediaSessionMetadata a class
2041         https://bugs.webkit.org/show_bug.cgi?id=148486
2042
2043         Reviewed by Jer Noble.
2044
2045         No new tests, no observable changes.
2046
2047         * Modules/mediasession/MediaSessionMetadata.h: Make it a class.
2048         * page/ChromeClient.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
2049
2050 2015-08-26  Per Arne Vollan  <peavo@outlook.com>
2051
2052         [Curl] Deadlock when downloading.
2053         https://bugs.webkit.org/show_bug.cgi?id=148438
2054
2055         Reviewed by Alex Christensen.
2056
2057         A thread should not try locking when it already has got the lock,
2058         this will create a deadlock.
2059
2060         * platform/network/curl/CurlDownload.cpp:
2061         (WebCore::CurlDownloadManager::startThreadIfNeeded):
2062         (WebCore::CurlDownloadManager::stopThread):
2063         (WebCore::CurlDownloadManager::stopThreadIfIdle):
2064         (WebCore::CurlDownload::~CurlDownload):
2065         (WebCore::CurlDownload::moveFileToDestination):
2066         (WebCore::CurlDownload::didFail):
2067         * platform/network/curl/CurlDownload.h:
2068         (WebCore::CurlDownloadManager::getMultiHandle):
2069         (WebCore::CurlDownloadManager::runThread):
2070         (WebCore::CurlDownloadManager::setRunThread):
2071
2072 2015-08-26  Jinyoung Hur  <hur.ims@navercorp.com>
2073
2074         [Cairo] Accelerated canvas should fall back to non-accelerated canvas on creation failure
2075         https://bugs.webkit.org/show_bug.cgi?id=148476
2076
2077         Reviewed by Brent Fulgham.
2078
2079         Cairo-gl backed surface might fail to be created with large dimensions, e.g., 50x32000, depending on 
2080         the gl implementations. In case of Mac port, ImageBufferCG falls back to a software surface when it fails to create
2081         IOSurface, an accelerated surface. Though the unaccelerated surface could be slower, it would be better
2082         to create a working surface than nothing.
2083
2084         Because the max dimensions of gl texture might vary among the OpenGL implementations, below test can't guarantee
2085         the verification of behavior difference depending on the running platform.
2086
2087         Test: fast/canvas/canvas-large-dimensions.html
2088
2089         * platform/graphics/cairo/ImageBufferCairo.cpp:
2090         (WebCore::ImageBuffer::ImageBuffer):
2091
2092 2015-08-26  Commit Queue  <commit-queue@webkit.org>
2093
2094         Unreviewed, rolling out r188960.
2095         https://bugs.webkit.org/show_bug.cgi?id=148479
2096
2097         Broke all the tests (Requested by ap on #webkit).
2098
2099         Reverted changeset:
2100
2101         "Add some new emoji with modifiers and new sequence."
2102         https://bugs.webkit.org/show_bug.cgi?id=148202
2103         http://trac.webkit.org/changeset/188960
2104
2105 2015-08-25  Philippe Normand  <pnormand@igalia.com>
2106
2107         [GStreamer] "method" property for the webkitwebsrc element
2108         https://bugs.webkit.org/show_bug.cgi?id=148433
2109
2110         Reviewed by Carlos Garcia Campos.
2111
2112         This new property is sometimes used by the GStreamer uridownloader
2113         when time synchronization is required for DASH. The same property
2114         was added to the souphttpsrc element.
2115
2116         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2117         (webKitWebSrcSetProperty):
2118         (webKitWebSrcGetProperty):
2119         (webKitWebSrcStart):
2120
2121 2015-08-26  Enrica Casucci  <enrica@apple.com>
2122
2123         Add some new emoji with modifiers and new sequence.
2124         https://bugs.webkit.org/show_bug.cgi?id=148202
2125         rdar://problem/21849857
2126
2127         Reviewed by Sam Weinig.
2128
2129         Adding support for some new emoji with modifiers and
2130         one new emoji sequence.
2131
2132         * platform/graphics/FontCascade.cpp:
2133         (WebCore::FontCascade::characterRangeCodePath):
2134         * platform/text/CharacterProperties.h:
2135         (WebCore::isEmojiGroupCandidate):
2136         (WebCore::isEmojiModifier):
2137         * platform/text/TextBreakIterator.cpp:
2138         (WebCore::cursorMovementIterator):
2139
2140 2015-08-25  Nan Wang  <n_wang@apple.com>
2141
2142         AX: Enable accessibility/aria-controls.html test for mac
2143         https://bugs.webkit.org/show_bug.cgi?id=148458
2144
2145         Reviewed by Chris Fleizach.
2146
2147         Re-enabled accessibility/aria-controls.html test for mac.
2148
2149         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2150         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2151
2152 2015-08-25  Zalan Bujtas  <zalan@apple.com>
2153
2154         Using the filter functional notation for background images results in wrong background-size rendering
2155         https://bugs.webkit.org/show_bug.cgi?id=148221
2156         rdar://problem/22379518
2157
2158         Reviewed by Daniel Bates.
2159
2160         Do not ignore the size argument, when the filter image is being drawn onto the context.
2161         When the size is ignored, we end up painting the image with its native size while the filter
2162         is applied on the size of the generated image.
2163
2164         Test: fast/filter-image/background-filter-image.html
2165
2166         * css/CSSFilterImageValue.cpp:
2167         (WebCore::CSSFilterImageValue::image):
2168
2169 2015-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2170
2171         IconDatabase: syncThreadMainLoop() is unlocking m_syncLock twice when thread termination is requested
2172         https://bugs.webkit.org/show_bug.cgi?id=148429
2173
2174         Reviewed by Filip Pizlo.
2175
2176         The lock is released an locked on every loop iteration, and then
2177         unlocked again after the loop. There's an early break in the loop
2178         when thread termination is requested that happens after the lock
2179         is released but before is locked again, so that the unlock after
2180         the loop is trying to unlock the lock again. This was not a
2181         problem before, but the new Lock has an assertion to ensure that a
2182         lock is not released twice.
2183
2184         * loader/icon/IconDatabase.cpp:
2185         (WebCore::IconDatabase::syncThreadMainLoop): Clean up the thread
2186         and return instead of breaking the loop when thread termination is
2187         requested.
2188
2189 2015-08-25  Nan Wang  <n_wang@apple.com>
2190
2191         [Mac] accessibility/document-attributes.html fails
2192         https://bugs.webkit.org/show_bug.cgi?id=116636
2193
2194         Reviewed by Chris Fleizach.
2195
2196         Re-enabled accessibility/document-attributes.html test.
2197
2198         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2199         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2200
2201 2015-08-25  Csaba Osztrogonác  <ossy@webkit.org>
2202
2203         Fix the !ENABLE(VIDEO) build after r188693
2204         https://bugs.webkit.org/show_bug.cgi?id=148424
2205
2206         Reviewed by Tim Horton.
2207
2208         * page/ChromeClient.h:
2209
2210 2015-08-25  Eric Carlson  <eric.carlson@apple.com>
2211
2212         [iOS] Don't clear AVPlayerItem when pausing if AirPlay is active
2213         https://bugs.webkit.org/show_bug.cgi?id=148319
2214
2215         Reviewed by Jer Noble.
2216
2217         * html/HTMLMediaElement.cpp:
2218         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible): Do nothing if the session
2219           is allowed to load data when in the background and we are not under memory pressure.
2220
2221         * platform/audio/ios/MediaSessionManagerIOS.mm:
2222         (WebCore::MediaSessionManageriOS::sessionCanLoadMedia): Call base class.
2223
2224 2015-08-25  Csaba Osztrogonác  <ossy@webkit.org>
2225
2226         Fix the !ENABLE(CSS_REGIONS) build after r188663
2227         https://bugs.webkit.org/show_bug.cgi?id=148425
2228
2229         Reviewed by Chris Dumez.
2230
2231         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
2232
2233 2015-08-24  Brent Fulgham  <bfulgham@apple.com>
2234
2235         Wheel events stop propagating when target element is removed from DOM
2236         https://bugs.webkit.org/show_bug.cgi?id=148384
2237         <rdar://problem/19732211>
2238
2239         Reviewed by David Hyatt.
2240
2241         Tested by tiled-drawing/scrolling/latched-to-deleted-node.html
2242
2243         We need to reset our latching state if the targeted node is removed from the DOM.
2244         Add a check in 'platformPrepareForWheelEvents' that checks if the expected latching
2245         target node was already removed from the DOM. If it was, we should not send events
2246         to it, and should reset latching state so we can attach to the next relevant node.
2247
2248         * dom/Element.cpp:
2249         (WebCore::Element::removedFrom): Remove any latched wheel event state objects that
2250         match the current element.
2251         * page/MainFrame.cpp:
2252         (WebCore::MainFrame::removeLatchingStateForTarget): Remove any latched wheel event
2253         state structures that match the passed wheel event target.
2254         * page/MainFrame.h:
2255
2256 2015-08-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2257
2258         Fix crash due to search field disappearing when showing results menu
2259         https://bugs.webkit.org/show_bug.cgi?id=148410
2260         <rdar://problem/22399850>
2261
2262         Reviewed by Brent Fulgham.
2263
2264         When clicking on the results button of a search field that hides upon being focused, WebKit will crash because we
2265         attempt to toggle the results menu using the search field's renderer which is null. This is addressed by adding a null
2266         check to make sure the search field has not been hidden before toggling the menu.
2267
2268         Test: fast/forms/search/search-results-hidden-crash.html
2269
2270         * html/shadow/TextControlInnerElements.cpp:
2271         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Add a null check for the search field's renderer.
2272
2273 2015-08-25  Chris Dumez  <cdumez@apple.com>
2274
2275         compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
2276         https://bugs.webkit.org/show_bug.cgi?id=119316
2277
2278         Reviewed by Darin Adler.
2279
2280         As the latest DOM specification, compareDocumentPosition() should report
2281         PRECEDING or FOLLOWING information even if nodes are disconnected:
2282         - http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
2283
2284         This behavior is consistent with both IE10, Firefox and Chrome.
2285
2286         The implementation relies on the comparison of cryptographic hashes
2287         (SHA1) of the Node pointers so that the results returned by the function
2288         are consistent. We don't compare Node pointers directly as it was done
2289         previously in r153660 to avoid leaking information about our memory
2290         model to the Web.
2291
2292         Test: fast/dom/compare-document-position-disconnected-nodes.html
2293         W3C Test suite: http://w3c-test.org/dom/nodes/Node-compareDocumentPosition.html
2294
2295         * dom/Node.cpp:
2296         (WebCore::hashPointer):
2297         (WebCore::compareDetachedElementsPosition):
2298         (WebCore::Node::compareDocumentPosition):
2299
2300 2015-08-25  Chris Dumez  <cdumez@apple.com>
2301
2302         Add support for callback interfaces using other callback names than "handleEvent"
2303         https://bugs.webkit.org/show_bug.cgi?id=148418
2304
2305         Reviewed by Ryosuke Niwa.
2306
2307         Add support for callback interfaces using other callback names than
2308         "handleEvent" [1].
2309
2310         This is a pre-requirement for Bug 148415, as NodeFilter's callback
2311         function name is "acceptNode":
2312         - https://dom.spec.whatwg.org/#interface-nodefilter
2313
2314         [1] https://heycam.github.io/webidl/#es-user-objects
2315
2316         * bindings/js/JSCallbackData.cpp:
2317         (WebCore::JSCallbackData::invokeCallback):
2318         * bindings/js/JSCallbackData.h:
2319         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2320         (WebCore::JSSQLStatementErrorCallback::handleEvent):
2321         * bindings/scripts/CodeGeneratorJS.pm:
2322         (GenerateCallbackImplementation):
2323         * bindings/scripts/test/JS/JSTestCallback.cpp:
2324         (WebCore::JSTestCallback::callbackWithNoParam):
2325         (WebCore::JSTestCallback::callbackWithArrayParam):
2326         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2327         (WebCore::JSTestCallback::callbackWithStringList):
2328         (WebCore::JSTestCallback::callbackWithBoolean):
2329         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2330
2331 2015-08-25  Chris Dumez  <cdumez@apple.com>
2332
2333         Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
2334         https://bugs.webkit.org/show_bug.cgi?id=148417
2335
2336         Reviewed by Sam Weinig.
2337
2338         Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
2339         by improving the bindings generator. In this case, the problem was that the
2340         bindings generator did not know how to convert a double parameter into a
2341         JSValue. The new code leverages the pre-existing NativeToJSValue subroutine
2342         to do the conversion instead of duplicating complex support here.
2343
2344         * WebCore.xcodeproj/project.pbxproj:
2345         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: Removed.
2346         * bindings/scripts/CodeGeneratorJS.pm:
2347         (GenerateCallbackImplementation):
2348         * bindings/scripts/test/JS/JSTestCallback.cpp:
2349         (WebCore::JSTestCallback::callbackWithArrayParam):
2350         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2351         (WebCore::JSTestCallback::callbackWithStringList):
2352         (WebCore::JSTestCallback::callbackWithBoolean):
2353         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2354         * dom/RequestAnimationFrameCallback.idl:
2355
2356 2015-08-24  Jinyoung Hur  <hur.ims@navercorp.com>
2357
2358         Clear cairo-gl surface for initialization
2359         https://bugs.webkit.org/show_bug.cgi?id=148307
2360
2361         Reviewed by Martin Robinson.
2362
2363         A cairo-gl surface that is created from an uninitialized texture, should be cleared before use.
2364         A texture memory created by calling glTexImage2D with null data parameter, is uninitialized.
2365         And cairo_gl_surface_create_for_texture doesn't clear the provided texture for initialization.
2366         So it seems safe to clear the surface explicitly.
2367
2368         It is hard to verify this behavior change because the texture memory status is undefined. Undefined means
2369         it can be either initialized or not, though mostly initialized in my experiences.
2370
2371         * platform/graphics/cairo/ImageBufferCairo.cpp:
2372         (WebCore::clearSurface):
2373         (WebCore::createCairoGLSurface):
2374
2375 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
2376
2377         Fix the build fixes in r188875 and r188874
2378
2379         Unreviewed.
2380
2381         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2382         (WebCore::FontCache::createFontPlatformData):
2383         * platform/graphics/mac/FontCacheMac.mm:
2384         (WebCore::toNSFontTraits):
2385
2386 2015-08-24  Tim Horton  <timothy_horton@apple.com>
2387
2388         Try to fix the build.
2389
2390         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2391         (WebCore::FontCache::createFontPlatformData):
2392
2393 2015-08-24  Tim Horton  <timothy_horton@apple.com>
2394
2395         Fix the build.
2396
2397         * platform/graphics/mac/FontCacheMac.mm:
2398         (WebCore::toNSFontWeight):
2399         (WebCore::toNSFontTraits):
2400         (WebCore::platformFontWithFamilySpecialCase):
2401
2402 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
2403
2404         Use Optionals in RenderBox height computations
2405         https://bugs.webkit.org/show_bug.cgi?id=147253
2406
2407         Reviewed by David Hyatt.
2408
2409         No new tests because there is no behavior change.
2410
2411         * rendering/RenderBox.cpp:
2412         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
2413         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
2414         (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth):
2415         (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight):
2416         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
2417         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
2418         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
2419         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
2420         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
2421         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2422         (WebCore::RenderBox::computeLogicalHeight):
2423         (WebCore::RenderBox::computeLogicalHeightUsing):
2424         (WebCore::RenderBox::computeContentLogicalHeight):
2425         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
2426         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
2427         (WebCore::RenderBox::computePercentageLogicalHeight):
2428         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2429         (WebCore::RenderBox::availableLogicalHeight):
2430         (WebCore::RenderBox::availableLogicalHeightUsing):
2431         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2432         (WebCore::logicalWidthIsResolvable):
2433         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
2434         (WebCore::RenderBox::hasDefiniteLogicalHeight):
2435         * rendering/RenderBox.h:
2436         * rendering/RenderFlexibleBox.cpp:
2437         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
2438         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
2439         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2440         * rendering/RenderFlexibleBox.h:
2441         * rendering/RenderFlowThread.cpp:
2442         (WebCore::RenderFlowThread::addForcedRegionBreak):
2443         * rendering/RenderGrid.cpp:
2444         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
2445         (WebCore::RenderGrid::logicalContentHeightForChild):
2446         (WebCore::RenderGrid::minContentForChild):
2447         (WebCore::RenderGrid::maxContentForChild):
2448         (WebCore::RenderGrid::layoutGridItems):
2449         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2450         * rendering/RenderMultiColumnSet.cpp:
2451         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
2452         * rendering/RenderTable.cpp:
2453         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2454
2455 2015-08-24  Anders Carlsson  <andersca@apple.com>
2456
2457         Fix failing tests.
2458         
2459         It's OK to call runStateMachine with an idle state. Just bail early when that happens.
2460
2461         * Modules/webdatabase/SQLTransactionStateMachine.h:
2462         (WebCore::SQLTransactionStateMachine<T>::runStateMachine):
2463
2464 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
2465
2466         [Cocoa] Unify FontCache
2467         https://bugs.webkit.org/show_bug.cgi?id=148358
2468
2469         Reviewed by Antti Koivisto.
2470
2471         Move all the duplicate code to FontCacheCoreText.
2472
2473         No new tests because there is no behavior change.
2474
2475         * platform/graphics/FontCache.h:
2476         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2477         (WebCore::fontWeightFromCoreText):
2478         (WebCore::toTraitsMask):
2479         (WebCore::isFontWeightBold):
2480         (WebCore::toCoreTextFontWeight):
2481         (WebCore::invalidateFontCache):
2482         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
2483         (WebCore::FontCache::platformInit):
2484         (WebCore::FontCache::systemFontFamilies):
2485         (WebCore::computeTraits):
2486         (WebCore::computeNecessarySynthesis):
2487         (WebCore::fontWhitelist):
2488         (WebCore::FontCache::setFontWhitelist):
2489         (WebCore::platformFontLookupWithFamily):
2490         (WebCore::fontWithFamily):
2491         (WebCore::shouldAutoActivateFontIfNeeded):
2492         (WebCore::FontCache::createFontPlatformData):
2493         (WebCore::fallbackDedupSet):
2494         (WebCore::FontCache::platformPurgeInactiveFontData):
2495         (WebCore::FontCache::systemFallbackForCharacters):
2496         * platform/graphics/ios/FontCacheIOS.mm:
2497         (WebCore::platformInvalidateFontCache):
2498         (WebCore::getSystemFontFallbackForCharacters):
2499         (WebCore::platformLookupFallbackFont):
2500         (WebCore::FontCache::lastResortFallbackFont):
2501         (WebCore::FontCache::weightOfCTFont):
2502         (WebCore::platformFontWithFamilySpecialCase):
2503         (WebCore::FontCache::platformInit): Deleted.
2504         (WebCore::isFontWeightBold): Deleted.
2505         (WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
2506         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
2507         (WebCore::FontCache::systemFontFamilies): Deleted.
2508         (WebCore::createCTFontWithTextStyle): Deleted.
2509         (WebCore::createCTFontWithFamilyNameAndWeight): Deleted.
2510         (WebCore::toCTFontWeight): Deleted.
2511         (WebCore::FontCache::createFontPlatformData): Deleted.
2512         * platform/graphics/mac/FontCacheMac.mm:
2513         (WebCore::appkitWeightToFontWeight):
2514         (WebCore::toNSFontTraits):
2515         (WebCore::platformFontWithFamilySpecialCase):
2516         (WebCore::platformFontWithFamily):
2517         (WebCore::platformInvalidateFontCache):
2518         (WebCore::platformLookupFallbackFont):
2519         (WebCore::FontCache::lastResortFallbackFont):
2520         (WebCore::toCoreTextFontWeight): Deleted.
2521         (WebCore::fontWhitelist): Deleted.
2522         (WebCore::FontCache::setFontWhitelist): Deleted.
2523         (WebCore::fontWithFamilySpecialCase): Deleted.
2524         (WebCore::fontWithFamily): Deleted.
2525         (WebCore::invalidateFontCache): Deleted.
2526         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Deleted.
2527         (WebCore::FontCache::platformInit): Deleted.
2528         (WebCore::isAppKitFontWeightBold): Deleted.
2529         (WebCore::shouldAutoActivateFontIfNeeded): Deleted.
2530         (WebCore::fallbackDedupSet): Deleted.
2531         (WebCore::FontCache::platformPurgeInactiveFontData): Deleted.
2532         (WebCore::lookupCTFont): Deleted.
2533         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
2534         (WebCore::FontCache::systemFontFamilies): Deleted.
2535         (WebCore::FontCache::createFontPlatformData): Deleted.
2536         * rendering/RenderThemeIOS.mm:
2537         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2538         (WebCore::fromCTFontWeight): Deleted.
2539
2540 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
2541
2542         Unreviewed, attempt to fix iOS build after r188860
2543
2544         * page/WheelEventDeltaFilter.cpp:
2545         (WebCore::WheelEventDeltaFilter::isFilteringDeltas): Moved implementation out of header.
2546         (WebCore::WheelEventDeltaFilter::filteredDelta): Moved implementation out of header.
2547         * page/WheelEventDeltaFilter.h:
2548         (WebCore::WheelEventDeltaFilter::isFilteringDeltas): Deleted.
2549         (WebCore::WheelEventDeltaFilter::filteredDelta): Deleted.
2550
2551 2015-08-21  Anders Carlsson  <andersca@apple.com>
2552
2553         Remove unused return values from SQLTransaction state functions
2554         https://bugs.webkit.org/show_bug.cgi?id=148344
2555
2556         Reviewed by Tim Horton.
2557
2558         * Modules/webdatabase/SQLTransaction.cpp:
2559         (WebCore::SQLTransaction::deliverTransactionCallback):
2560         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
2561         (WebCore::SQLTransaction::deliverStatementCallback):
2562         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
2563         (WebCore::SQLTransaction::deliverSuccessCallback):
2564         (WebCore::SQLTransaction::unreachableState):
2565         * Modules/webdatabase/SQLTransaction.h:
2566         * Modules/webdatabase/SQLTransactionBackend.cpp:
2567         (WebCore::SQLTransactionBackend::acquireLock):
2568         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
2569         (WebCore::SQLTransactionBackend::runStatements):
2570         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
2571         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
2572         (WebCore::SQLTransactionBackend::unreachableState):
2573         * Modules/webdatabase/SQLTransactionBackend.h:
2574         * Modules/webdatabase/SQLTransactionStateMachine.h:
2575         (WebCore::SQLTransactionStateMachine<T>::runStateMachine):
2576
2577 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
2578
2579         Unreviewed, fix build after r188860
2580
2581         * page/mac/WheelEventDeltaFilterMac.mm:
2582         (WebCore::WheelEventDeltaFilterMac::updateFromDelta): Convert argument explicitly to an NSPoint.
2583
2584 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
2585
2586         Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
2587         https://bugs.webkit.org/show_bug.cgi?id=147320
2588
2589         Reviewed by Simon Fraser.
2590
2591         Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
2592         employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
2593         as a fallback. Here, we refactor EventHandler to use the new filters for overflow scrolling and replace
2594         the MainFrame's WheelEventDeltaTracker with an appropriate type of WheelEventDeltaFilter.
2595
2596         In the case where an _NSScrollingPredominantAxisFilter is unavailable, the platform-invariant wheel
2597         event delta filter simply uses the existing wheel event delta tracker to compute the current predominant
2598         axis. It uses the predominant axis to determine which axis (if any) should have its delta zeroed out.
2599
2600         This patch also introduces NSScrollingInputFilterSPI.h, which either imports the internal input filter
2601         header from AppKit or declares relevant interfaces and functions.
2602
2603         No new tests, since this change does not add new functionality.
2604
2605         * CMakeLists.txt: Add page/WheelEventDeltaFilter.cpp.
2606         * WebCore.vcxproj/WebCore.vcxproj: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
2607         * WebCore.vcxproj/WebCore.vcxproj.filters: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
2608         * WebCore.xcodeproj/project.pbxproj: Add WheelEventDeltaFilter.cpp, WheelEventDeltaFilter.h, and their Mac counterparts.
2609         * page/EventHandler.cpp:
2610         (WebCore::didScrollInScrollableArea): Refactored to no longer handle axes separately.
2611         (WebCore::handleWheelEventInAppropriateEnclosingBox): Ditto.
2612         (WebCore::EventHandler::platformRecordWheelEvent): Refactored to update the wheel delta filter.
2613         (WebCore::EventHandler::clearLatchedState): Ditto.
2614         (WebCore::EventHandler::defaultWheelEventHandler): Refactored to use wheel delta filters. No longer splits wheel events
2615                 and handles them on separate axes.
2616         (WebCore::didScrollInScrollableAreaForSingleAxis): Deleted.
2617         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Deleted.
2618         * page/EventHandler.h:
2619         * page/MainFrame.cpp:
2620         (WebCore::MainFrame::MainFrame): Initializes the appropriate type of WheelEventDeltaFilter.
2621         * page/MainFrame.h:
2622         * page/WheelEventDeltaFilter.cpp: Added.
2623         (WebCore::WheelEventDeltaFilter::WheelEventDeltaFilter):
2624         (WebCore::WheelEventDeltaFilter::~WheelEventDeltaFilter):
2625         (WebCore::WheelEventDeltaFilter::create):
2626         (WebCore::BasicWheelEventDeltaFilter::BasicWheelEventDeltaFilter):
2627         (WebCore::BasicWheelEventDeltaFilter::updateFromDelta):
2628         (WebCore::BasicWheelEventDeltaFilter::beginFilteringDeltas):
2629         (WebCore::BasicWheelEventDeltaFilter::endFilteringDeltas):
2630         (WebCore::deltaIsPredominantlyVertical):
2631         (WebCore::BasicWheelEventDeltaFilter::dominantScrollGestureDirection):
2632         * page/WheelEventDeltaFilter.h: Refactored WheelEventDeltaTracker logic to work as a filter instead.
2633         * page/mac/EventHandlerMac.mm:
2634         (WebCore::EventHandler::platformPrepareForWheelEvents): Refactored to use wheel delta filters.
2635         (WebCore::EventHandler::platformRecordWheelEvent): Ditto.
2636         * page/mac/WheelEventDeltaFilterMac.h: Wraps the new _NSScrollingPredominantAxisFilter.
2637         * page/mac/WheelEventDeltaFilterMac.mm: Added.
2638         (WebCore::WheelEventDeltaFilterMac::WheelEventDeltaFilterMac):
2639         (WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
2640         (WebCore::WheelEventDeltaFilterMac::updateFromDelta):
2641         (WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):
2642         * platform/PlatformWheelEvent.h:
2643         (WebCore::PlatformWheelEvent::copyWithDeltas): Used to create a copy of the platform wheel event with filtered deltas.
2644         (WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta): Deleted. No longer necessary, since we won't be handling wheel
2645                 events on separate axes.
2646         (WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta): Ditto.
2647         * platform/spi/mac/NSScrollingInputFilterSPI.h: Added.
2648
2649 2015-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2650
2651         Unreviewed, fix typo in a comment ("unsused" -> "unused")
2652
2653         * bindings/scripts/CodeGeneratorGObject.pm:
2654         (GenerateFunction):
2655
2656 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2657
2658         Unreviewed. Fix cairo performance regression introduced in r188379.
2659
2660         A missing break in a switch was making us to use High image
2661         interpolation quality by default.
2662
2663         * platform/graphics/cairo/PlatformContextCairo.cpp:
2664         (WebCore::PlatformContextCairo::drawSurfaceToContext): Add the
2665         missing break.
2666
2667 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2668
2669         Unreviewed. Fix GObject DOM bindings API break test after r188809.
2670
2671         element.getElementsByTagName and element.getElementsByClassName
2672         were also changed in r188809 to return an HTMLCollection. The
2673         build didn't fail because we don't use those in our tests, but the
2674         API breaks need to be fixed too.
2675
2676         * bindings/gobject/WebKitDOMDeprecated.cpp:
2677         (webkit_dom_element_get_elements_by_tag_name):
2678         (webkit_dom_element_get_elements_by_tag_name_ns):
2679         (webkit_dom_element_get_elements_by_class_name):
2680         * bindings/gobject/WebKitDOMDeprecated.h:
2681         * bindings/gobject/WebKitDOMDeprecated.symbols:
2682         * bindings/gobject/webkitdom.symbols:
2683         * bindings/scripts/CodeGeneratorGObject.pm:
2684         (GetEffectiveFunctionName):
2685
2686 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2687
2688         Unreviewed. Fix GObject DOM bindings API break test after r188735.
2689
2690         document.getElementsByClassName returns an HTMLCollection since
2691         r188735. So, rename it as
2692         webkit_dom_document_get_elements_by_class_name_as_html_collection,
2693         and deprecate the old method returning a NodeList.
2694
2695         * bindings/gobject/WebKitDOMDeprecated.cpp:
2696         (webkit_dom_document_get_elements_by_class_name): Use the
2697         implementation returning a NodeList.
2698         * bindings/gobject/WebKitDOMDeprecated.h:
2699         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
2700         * bindings/gobject/webkitdom.symbols: Ditto.
2701         * bindings/scripts/CodeGeneratorGObject.pm:
2702         (GetEffectiveFunctionName): Also check getElementsByClassName.
2703
2704 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2705
2706         Unreviewed. Fix GTK+ build after r188711.
2707
2708         Since r188711 document.createNodeIterator and
2709         document.createTreeWalker, don't raise exceptions anymore. Keep
2710         the GError parameter even if it's ignored to not break the API
2711         compatibility.
2712
2713         * bindings/scripts/CodeGeneratorGObject.pm:
2714         (FunctionUsedToRaiseException):
2715         (GenerateFunction):
2716
2717 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2718
2719         Unreviewed. Fix GTK+ build after r188809.
2720
2721         document.getElementsByTagName returns an HTMLCollection since
2722         r188809. So, rename it as
2723         webkit_dom_document_get_elements_by_tag_name_as_html_collection,
2724         and deprecate the old methods returning a NodeList.
2725
2726         * bindings/gobject/WebKitDOMDeprecated.cpp:
2727         (webkit_dom_document_get_elements_by_tag_name): Use the
2728         implementation returning a NodeList.
2729         (webkit_dom_document_get_elements_by_tag_name_ns): Ditto.
2730         * bindings/gobject/WebKitDOMDeprecated.h:
2731         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
2732         * bindings/gobject/webkitdom.symbols: Ditto.
2733         * bindings/scripts/CodeGeneratorGObject.pm:
2734         (GetEffectiveFunctionName): Bring back this method, now that we
2735         have deprecated API again and add the checks for
2736         getElementsByTagName methods.
2737         (GenerateFunction): Use GetEffectiveFunctionName().
2738
2739 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
2740
2741         @font-face related cleanup
2742         https://bugs.webkit.org/show_bug.cgi?id=148355
2743
2744         Reviewed by Darin Adler.
2745
2746         This patch cleans up much of our code related to web fonts. In general, it
2747         migrates to using C++ for-each style loops, uses Ref instead of RefPtr when
2748         things can't be nullptr, migrates to C++ Rvalue-references instead of
2749         PassRefPtr, and refactors CSSFontSelector::addFontFaceRule() to use helper
2750         functions.
2751
2752         No new tests because there is no behavior change.
2753
2754         * css/CSSFontFace.cpp:
2755         (WebCore::CSSFontFace::fontLoaded): Use a C++ for-each loop.
2756         * css/CSSFontFace.h:
2757         (WebCore::CSSFontFace::create): Use C++ Rvalue-references instead of
2758         PassRefPtr.
2759         (WebCore::CSSFontFace::CSSFontFace): Ditto.
2760         * css/CSSFontSelector.cpp:
2761         (WebCore::computeTraitsMask): Migrated a chunk of
2762         CSSFontSelector::addFontFaceRule() into this helper function.
2763         (WebCore::createFontFace): Ditto.
2764         (WebCore::familyNameFromPrimitive): Ditto.
2765         (WebCore::CSSFontSelector::addFontFaceRule): Call the newly-created helper
2766         functions. In addition, migrate to Refs instead of RefPtrs.
2767         (WebCore::compareFontFaces): Migrate to references instead of pointers.
2768         (WebCore::CSSFontSelector::getFontFace): Migrate to Refs instead of
2769         RefPtrs. Also use C++ for-each loops.
2770         * css/CSSFontSelector.h:
2771         * css/CSSSegmentedFontFace.cpp:
2772         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace): Use C++ for-each
2773         loops.
2774         (WebCore::CSSSegmentedFontFace::isValid): Ditto.
2775         (WebCore::CSSSegmentedFontFace::appendFontFace): Migrate to Rvalue-
2776         references instead of PassRefPtr.
2777         * css/CSSSegmentedFontFace.h:
2778         * platform/graphics/FontCache.h:
2779         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2780         (WebCore::FontCache::getTraitsInFamily): Return the result instead of being
2781         passed an out parameter.
2782         * platform/graphics/freetype/FontCacheFreeType.cpp:
2783         (WebCore::FontCache::getTraitsInFamily): Ditto.
2784         * platform/graphics/win/FontCacheWin.cpp:
2785         (WebCore::traitsInFamilyEnumProc): Ditto.
2786         (WebCore::FontCache::getTraitsInFamily): Ditto.
2787
2788 2015-08-23  Andy Estes  <aestes@apple.com>
2789
2790         [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
2791         https://bugs.webkit.org/show_bug.cgi?id=147872
2792         rdar://problem/22044000
2793
2794         Reviewed by Dan Bernstein.
2795
2796         Passed the ResourceLoader request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
2797
2798         New API test: ContentFiltering.ServerRedirect
2799
2800         * WebCore.xcodeproj/project.pbxproj:
2801         * loader/EmptyClients.h:
2802         * loader/FrameLoaderClient.h: Added a URL argument to dispatchDidReceiveServerRedirectForProvisionalLoad().
2803         * loader/ResourceLoader.cpp:
2804         (WebCore::ResourceLoader::willSendRequestInternal): Passed the request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
2805         * testing/Internals.cpp:
2806         (WebCore::Internals::Internals): Stopped calling MockContentFilter::ensureInstalled().
2807         * testing/MockContentFilterSettings.cpp:
2808         (WebCore::MockContentFilterSettings::setEnabled): Called MockContentFilter::ensureInstalled() to ensure the
2809         mock is installed whenever the filter is enabled.
2810         * testing/MockContentFilterSettings.h: Exported member functions used by TestWebKitAPI.
2811
2812 2015-08-23  Geoffrey Garen  <ggaren@apple.com>
2813
2814         Unreviewed, rolling back in r188803.
2815
2816         "Debugger's VM should never be null"
2817         https://bugs.webkit.org/show_bug.cgi?id=148341
2818         http://trac.webkit.org/changeset/188803
2819
2820         * bindings/js/WorkerScriptDebugServer.cpp:
2821         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
2822         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2823         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
2824         * inspector/PageScriptDebugServer.cpp:
2825         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
2826         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2827         (WebCore::PageScriptDebugServer::didPause):
2828         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
2829
2830 2015-08-23  Antti Koivisto  <antti@apple.com>
2831
2832         Remove SVGFrameLoaderClient and dataProtocolFrameLoader
2833         https://bugs.webkit.org/show_bug.cgi?id=148370
2834
2835         Reviewed by Darin Adler.
2836
2837         With data protocol handled internally in WebKit these are no longer needed.
2838
2839         This mostly reverts code changes from http://trac.webkit.org/179626 keeping the tests.
2840
2841         * loader/FrameLoaderClient.h:
2842         * loader/ResourceLoader.cpp:
2843         (WebCore::ResourceLoader::loadDataURL):
2844         (WebCore::ResourceLoader::setDataBufferingPolicy):
2845         (WebCore::ResourceLoader::dataProtocolFrameLoader): Deleted.
2846         * loader/ResourceLoader.h:
2847         (WebCore::ResourceLoader::documentLoader):
2848         (WebCore::ResourceLoader::originalRequest):
2849         * loader/cache/CachedImage.cpp:
2850         (WebCore::CachedImage::finishLoading):
2851         * svg/graphics/SVGImage.cpp:
2852         (WebCore::SVGImage::dataChanged):
2853         * svg/graphics/SVGImage.h:
2854         * svg/graphics/SVGImageClients.h:
2855
2856 2015-08-22  Chris Dumez  <cdumez@apple.com>
2857
2858         NodeList should not have a named getter
2859         https://bugs.webkit.org/show_bug.cgi?id=148117
2860
2861         Reviewed by Darin Adler.
2862
2863         Drop the named property getter on NodeList to match the specification:
2864         https://dom.spec.whatwg.org/#interface-nodelist
2865
2866         This change could be a bit risky but:
2867         1. Firefox and IE never had this named property getter on NodeList.
2868         2. Chrome successfuly dropped this named property getter in early 2014:
2869            https://src.chromium.org/viewvc/blink?revision=166356&view=revision
2870         3. Our named property getter on NodeList is only partly functional:
2871            It only matches by 'id' attribute, not by 'name' attribute.
2872         4. Our APIs that were wrongly returning a NodeList instead of an
2873            HTMLCollection (getElementsByTagName() / getElementsByClassName())
2874            have been fixed in r188735 and r188809. HTMLCollection does have
2875            a named property getter.
2876         5. This named getter adds code complexity.
2877
2878         * bindings/js/JSNodeListCustom.cpp:
2879         (WebCore::createWrapper): Deleted.
2880         * dom/ChildNodeList.cpp:
2881         (WebCore::ChildNodeList::invalidateCache): Deleted.
2882         * dom/ChildNodeList.h:
2883         * dom/LiveNodeList.cpp:
2884         * dom/LiveNodeList.h:
2885         * dom/NodeList.h:
2886         * dom/NodeList.idl:
2887         * dom/StaticNodeList.cpp:
2888         (WebCore::StaticElementList::length): Deleted.
2889         (WebCore::StaticElementList::item): Deleted.
2890         * dom/StaticNodeList.h:
2891         * html/HTMLCollection.h:
2892
2893 2015-08-22  Andreas Kling  <akling@apple.com>
2894
2895         [JSC] Static hash tables should be 100% compile-time constant.
2896         <https://webkit.org/b/148359>
2897
2898         Reviewed by Michael Saboff.
2899
2900         Adjust WebCore bindings generator for new JSC::HashTable layout
2901         and rebaseline the bindings tests for that change.
2902
2903         * bindings/scripts/CodeGeneratorJS.pm:
2904         (GenerateHashTable):
2905         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2906         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2907         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2908         * bindings/scripts/test/JS/JSTestException.cpp:
2909         * bindings/scripts/test/JS/JSTestInterface.cpp:
2910         * bindings/scripts/test/JS/JSTestObj.cpp:
2911         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2912         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2913
2914 2015-08-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2915
2916         Unreviewed, fix build without ENABLE_CSS_GRID_LAYOUT after r188582
2917
2918         * rendering/RenderBox.cpp:
2919         (WebCore::RenderBox::computeLogicalWidthInRegion):
2920
2921 2015-08-22  Zalan Bujtas  <zalan@apple.com>
2922
2923         Page::renderTreeSize() does not include anonymous renderers.
2924         https://bugs.webkit.org/show_bug.cgi?id=148352
2925
2926         Reviewed by Andreas Kling.
2927
2928         Anonymous renderes take the document as their node. Instead
2929         of checking whether the node is the document, we could just check
2930         if the RenderView is available.
2931
2932         * rendering/RenderObject.cpp:
2933         (WebCore::RenderObject::RenderObject):
2934         (WebCore::RenderObject::~RenderObject):
2935         * rendering/RenderView.cpp:
2936         (WebCore::RenderView::RenderView): Deleted.
2937         * rendering/RenderView.h: Include the RenderView in render tree size as well.
2938
2939 2015-08-22  Antti Koivisto  <antti@apple.com>
2940
2941         Decode data URLs in web process
2942         https://bugs.webkit.org/show_bug.cgi?id=148128
2943
2944         Reviewed by Darin Adler.
2945
2946         We currenly send data URLs to networking layer for decoding. This involves a long and slow roundtrip through IPC and API layers.
2947
2948         * WebCore.xcodeproj/project.pbxproj:
2949         * loader/ResourceLoadScheduler.cpp:
2950         (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Deleted.
2951
2952             Remove this awkward interface for WebKit2.
2953
2954         * loader/ResourceLoadScheduler.h:
2955         * loader/ResourceLoader.cpp:
2956         (WebCore::ResourceLoader::start):
2957         (WebCore::ResourceLoader::loadDataURL):
2958
2959             Load using DataURLDecoder.
2960
2961         * loader/ResourceLoader.h:
2962
2963             Make start() public and export it so it can be called directly from WebKit2.
2964
2965         * platform/network/DataURLDecoder.cpp: Added.
2966         (WebCore::DataURLDecoder::decodeQueue):
2967         (WebCore::DataURLDecoder::DecodeTask::DecodeTask):
2968         (WebCore::DataURLDecoder::createDecodeTask):
2969
2970             Parse data URL metadata and initialize the decode task.
2971
2972         (WebCore::DataURLDecoder::decodeBase64):
2973         (WebCore::DataURLDecoder::decodeEscaped):
2974         (WebCore::DataURLDecoder::decode):
2975
2976             Asynchronously decode in a concurrent distpatch queue.
2977
2978         * platform/network/DataURLDecoder.h: Added.
2979         * platform/network/ios/QuickLook.h:
2980         * platform/text/DecodeEscapeSequences.h:
2981         (WebCore::URLEscapeSequence::findEndOfRun):
2982         (WebCore::URLEscapeSequence::decodeRun):
2983
2984             Factor buffer generation to a function.
2985
2986         (WebCore::decodeEscapeSequences):
2987         (WebCore::decodeURLEscapeSequencesAsData):
2988
2989             Add decode function that produces bytes instead of a String.
2990
2991 2015-08-21  Commit Queue  <commit-queue@webkit.org>
2992
2993         Unreviewed, rolling out r188792 and r188803.
2994         https://bugs.webkit.org/show_bug.cgi?id=148347
2995
2996         broke lots of tests, ggaren is going to investigate and reland
2997         (Requested by thorton on #webkit).
2998
2999         Reverted changesets:
3000
3001         "Unify code paths for manually deleting all code"
3002         https://bugs.webkit.org/show_bug.cgi?id=148280
3003         http://trac.webkit.org/changeset/188792
3004
3005         "Debugger's VM should never be null"
3006         https://bugs.webkit.org/show_bug.cgi?id=148341
3007         http://trac.webkit.org/changeset/188803
3008
3009 2015-08-21  Chris Dumez  <cdumez@apple.com>
3010
3011         document.getElementsByTagName should return an HTMLCollection
3012         https://bugs.webkit.org/show_bug.cgi?id=110611
3013
3014         Reviewed by Darin Adler.
3015
3016         Update getElementsByTagName*() to return an HTMLCollection as per
3017         the specification:
3018         - https://dom.spec.whatwg.org/#interface-document
3019         - https://dom.spec.whatwg.org/#interface-element
3020
3021         Firefox, Chrome and IE all match the specification but WebKit was
3022         returning a NodeList.
3023
3024         Performance:
3025         DOM/get-elements-by-tag-name-traversal-uncached.html is ~4.5% faster.
3026
3027         Test: fast/dom/getElementsByTagName-return-type.html
3028
3029         * CMakeLists.txt:
3030         * WebCore.vcxproj/WebCore.vcxproj:
3031         * WebCore.vcxproj/WebCore.vcxproj.filters:
3032         * WebCore.xcodeproj/project.pbxproj:
3033         Rename TagNodeList.* to TagCollection.*
3034
3035         * accessibility/AccessibilityRenderObject.cpp:
3036         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
3037         Update the function to use descendantsOfType<>() instead of
3038         getElementsByTagName(). The code is both shorter and more efficient.
3039
3040         * dom/ContainerNode.cpp:
3041         (WebCore::ContainerNode::getElementsByTagName):
3042         (WebCore::ContainerNode::getElementsByTagNameForObjC):
3043         (WebCore::ContainerNode::getElementsByTagNameNS):
3044         (WebCore::ContainerNode::getElementsByTagNameNSForObjC):
3045         * dom/ContainerNode.h:
3046         - Have getElementsByTagName*() return an HTMLCollection.
3047         - Introduce versions used by the ObjC bindings that return a NodeList
3048           for API compatibility reasons.
3049         - Move the localName null check to the *ForObjC versions and use a
3050           simple assertion for the non ObjC versions. This gets rid of a
3051           branch for our JS bindings as this function is hot. It is currently
3052           impossible to get a null AtomicString from our JS bindings code because
3053           getElementsByTagName() and getElementsByTagName(undefined) in JS end up
3054           calling ContainerNode::getElementsByTagName("undefined").
3055           Also getElementsByTagName(null) in JS ends up calling
3056           ContainerNode::getElementsByTagName("null"). I have also gotten rid of
3057           most of the getElementsByTagName() calls from our native code. The
3058           remaining ones either call with a non-null AtomicString and they now
3059           have a null-check.
3060
3061         * dom/Document.idl:
3062         * dom/Element.idl:
3063         Have getElementsByTagName*() return an HTMLCollection except for ObjC
3064         bindings in order to maintain legacy API compatibility.
3065
3066         * dom/Node.cpp:
3067         (WebCore::Document::invalidateNodeListAndCollectionCaches):
3068         (WebCore::NodeListsNodeData::invalidateCaches):
3069         HTMLCollection::invalidateCache(attr) is now renamed to
3070         invalidateCacheForAttribute(attr) to avoid ambiguity with
3071         HTMLCollection::invalidateCache(doc) and for consistency
3072         with LiveNodeList.
3073
3074         * dom/NodeRareData.h:
3075         Make necessary updates now that TagNodeList is renamed to TagCollection
3076         and is an HTMLCollection.
3077
3078         * dom/TagCollection.cpp: Renamed from Source/WebCore/dom/TagNodeList.cpp.
3079         * dom/TagCollection.h: Renamed from Source/WebCore/dom/TagNodeList.h.
3080         Rename TagNodeList / HTMLTagNodeList to TagCollection / HTMLTagCollection
3081         and inherit CachedHTMLCollection instead of CachedLiveNodeList.
3082
3083         * editing/Editor.cpp:
3084         (WebCore::Editor::applyEditingStyleToBodyElement):
3085         Update code using getElementsByTagName() to reflect the fact that it
3086         now returns an HTMLCollection and item() returns an Element*. This
3087         function is matching any Element with "body" tag, not just HTMLBodyElement
3088         so I did not refactor it to use an descendantsOfType<HTMLBodyElement>().
3089         It is not clear to me what the intention of this code is.
3090
3091         * editing/markup.cpp:
3092         (WebCore::createFragmentFromMarkup):
3093         * editing/markup.h:
3094         - Return a Ref<> instead of a PassRefPtr<> as it can never return null.
3095         - Use descendantsOfType<HTMLAttachmentElement>(fragment) instead of
3096           getElementsByTagName() as it results in both shorter and more efficient
3097           code.
3098
3099         * html/CollectionType.h:
3100         Add new ByTag / ByHTMLTag collection types for TagCollection /
3101         HTMLTabCollection.
3102
3103         * html/GenericCachedHTMLCollection.cpp:
3104         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
3105         Handle new ByTag / ByHTMLTag collection types in the switch statement.
3106
3107         * html/HTMLCollection.cpp:
3108         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3109         (WebCore::HTMLCollection::~HTMLCollection):
3110         Handle new ByTag / ByHTMLTag collection types in switch statements.
3111
3112         (WebCore::HTMLCollection::tags):
3113         Add a null-check on localName() before calling getElementsByTagName().
3114         This function is currently for ObjC bindings only.
3115
3116         * html/HTMLPlugInImageElement.cpp:
3117         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
3118         Simplify / optimize the code by using descendantsOfType<HTMLPlugInImageElement>()
3119         instead of getElementsByTagName().
3120
3121         * html/MediaDocument.cpp:
3122         (WebCore::descendantVideoElement):
3123         Use descendantsOfType<HTMLVideoElement> instead of getElementsByTagNameNS().
3124
3125 2015-08-21  Geoffrey Garen  <ggaren@apple.com>
3126
3127         Debugger's VM should never be null
3128         https://bugs.webkit.org/show_bug.cgi?id=148341
3129
3130         Reviewed by Joseph Pecoraro.
3131
3132         It doesn't make sense for a Debugger's VM to be null, and code related
3133         to maintaining that illusion just caused the Web Inspector to crash on
3134         launch (https://bugs.webkit.org/show_bug.cgi?id=148312). So, let's stop
3135         doing that.
3136
3137         Now, Debugger requires its subclass to provide a never-null VM&.
3138
3139         * bindings/js/WorkerScriptDebugServer.cpp:
3140         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
3141         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
3142         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
3143         * inspector/PageScriptDebugServer.cpp:
3144         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
3145         (WebCore::PageScriptDebugServer::didPause):
3146
3147 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
3148
3149         [OS X] Remove dead code from FontCache::systemFallbackForCharacters()
3150         https://bugs.webkit.org/show_bug.cgi?id=148218
3151
3152         Reviewed by Daniel Bates.
3153
3154         lookupCTFont() in FontCacheMac.mm will always return the best font (because
3155         CTFontCreateForCharactersWithLanguage() does so). Also, all fonts that will
3156         be created on WebKit's behalf are already printer fonts.
3157
3158         No new tests because there is no behavior change.
3159
3160         * platform/graphics/mac/FontCacheMac.mm:
3161         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
3162
3163 2015-08-21  Anders Carlsson  <andersca@apple.com>
3164
3165         Fix build.
3166
3167         * platform/network/win/NetworkStateNotifierWin.cpp:
3168         (WebCore::NetworkStateNotifier::addrChangeCallback):
3169         (WebCore::NetworkStateNotifier::callAddressChanged): Deleted.
3170
3171 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
3172
3173         [Cocoa] Clean up Font class
3174         https://bugs.webkit.org/show_bug.cgi?id=148216
3175
3176         Reviewed by Dean Jackson.
3177
3178         No new tests because there is no behavior change.
3179
3180         * platform/graphics/Font.cpp:
3181         (WebCore::Font::platformGlyphInit): Deleted.
3182         * platform/graphics/Font.h:
3183         * platform/graphics/cocoa/FontCocoa.mm:
3184         (WebCore::Font::platformInit):
3185
3186 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
3187
3188         [Cocoa] Unify two more FontCache functions
3189         https://bugs.webkit.org/show_bug.cgi?id=148217
3190
3191         Reviewed by Dean Jackson.
3192
3193         Move duplicated code from FontCacheMac and FontCacheIOS into
3194         FontCacheCoreText.
3195
3196         No new tests because there is no behavior change.
3197
3198         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3199         (WebCore::toTraitsMask):
3200         (WebCore::isFontWeightBold):
3201         (WebCore::FontCache::similarFont):
3202         (WebCore::FontCache::getTraitsInFamily):
3203         * platform/graphics/ios/FontCacheIOS.mm:
3204         (WebCore::FontCache::similarFont): Deleted.
3205         (WebCore::toTraitsMask): Deleted.
3206         (WebCore::FontCache::getTraitsInFamily): Deleted.
3207         * platform/graphics/mac/FontCacheMac.mm:
3208         (WebCore::toTraitsMask): Deleted.
3209         (WebCore::FontCache::similarFont): Deleted.
3210         (WebCore::FontCache::getTraitsInFamily): Deleted.
3211
3212 2015-08-21  Anders Carlsson  <andersca@apple.com>
3213
3214         Stop using the old callOnMainThread variant on Windows
3215         https://bugs.webkit.org/show_bug.cgi?id=148332
3216
3217         Reviewed by Tim Horton.
3218
3219         * platform/network/cf/CookieStorageCFNet.cpp:
3220         (WebCore::notifyCookiesChanged):
3221         (WebCore::notifyCookiesChangedOnMainThread): Deleted.
3222         * platform/network/win/NetworkStateNotifierWin.cpp:
3223         (WebCore::NetworkStateNotifier::addrChangeCallback):
3224
3225 2015-08-20  Matt Rajca  <mrajca@apple.com>
3226
3227         Media Session: let UI clients change the volume of the focused media element
3228         https://bugs.webkit.org/show_bug.cgi?id=148289
3229
3230         Reviewed by Tim Horton.
3231
3232         * page/Page.cpp:
3233         (WebCore::Page::setVolumeOfMediaElement):
3234         * page/Page.h:
3235
3236 2015-08-21  Anders Carlsson  <andersca@apple.com>
3237
3238         Get rid of uses of the old callOnMainThread function that takes a function ptr + context
3239         https://bugs.webkit.org/show_bug.cgi?id=148324
3240
3241         Reviewed by Tim Horton.
3242
3243         * Modules/webaudio/AsyncAudioDecoder.cpp:
3244         (WebCore::AsyncAudioDecoder::DecodingTask::decode):
3245         (WebCore::AsyncAudioDecoder::DecodingTask::notifyCompleteDispatch): Deleted.
3246         * Modules/webaudio/AsyncAudioDecoder.h:
3247         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
3248         (WebCore::OfflineAudioDestinationNode::offlineRender):
3249         (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch): Deleted.
3250         * Modules/webaudio/OfflineAudioDestinationNode.h:
3251         * Modules/webaudio/ScriptProcessorNode.cpp:
3252         (WebCore::ScriptProcessorNode::process):
3253         (WebCore::ScriptProcessorNode::fireProcessEventDispatch): Deleted.
3254         * Modules/webaudio/ScriptProcessorNode.h:
3255         * Modules/webdatabase/DatabaseTracker.cpp:
3256         (WebCore::DatabaseTracker::scheduleForNotification):
3257         (WebCore::DatabaseTracker::notifyDatabasesChanged):
3258         * Modules/webdatabase/DatabaseTracker.h:
3259         * platform/graphics/cg/ImageCG.cpp:
3260         (WebCore::patternReleaseCallback):
3261         (WebCore::patternReleaseOnMainThreadCallback): Deleted.
3262         * platform/graphics/cg/PatternCG.cpp:
3263         (WebCore::patternReleaseCallback):
3264         (WebCore::patternReleaseOnMainThreadCallback): Deleted.
3265         * platform/graphics/mac/FontCacheMac.mm:
3266         (WebCore::invalidateFontCache):
3267         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
3268         * platform/network/BlobResourceHandle.cpp:
3269         (WebCore::doNotifyFinish):
3270         (WebCore::BlobResourceHandle::notifyFinish):
3271         * platform/network/cf/FormDataStreamCFNet.cpp:
3272         (WebCore::formFinalize):
3273         (WebCore::formFinishFinalizationOnMainThread): Deleted.
3274
3275 2015-08-21  Doug Russell  <d_russell@apple.com>
3276
3277         AX: Table with CSS that makes a row anonymous can return NULL from cellForColumnAndRow
3278         https://bugs.webkit.org/show_bug.cgi?id=148293
3279
3280         Reviewed by Chris Fleizach.
3281
3282         When RenderTableRows are anonymous, they may not be added to the accessible data 
3283         table's internal row list. However, when calculating the row range for a cell, 
3284         we were still accounting for those anonymous sections.
3285         Change how the row range is calculated to directly ask the accessible parent row 
3286         for its index. This will ensure it’s more inline with what’s being represented to 
3287         the accessibility API.
3288
3289         Test: accessibility/aria-table-content.html
3290
3291         * accessibility/AccessibilityTableCell.cpp:
3292         (WebCore::AccessibilityTableCell::parentRow):
3293         (WebCore::AccessibilityTableCell::rowIndexRange):
3294         * accessibility/AccessibilityTableCell.h:
3295
3296 2015-08-21  Joseph Pecoraro  <pecoraro@apple.com>
3297
3298         Web Inspector: REGRESSION(173684): Edit as HTML not working
3299         https://bugs.webkit.org/show_bug.cgi?id=148268
3300
3301         Reviewed by Chris Dumez.
3302
3303         Tests: inspector/dom/getOuterHTML.html
3304                inspector/dom/setOuterHTML.html
3305
3306         * inspector/DOMPatchSupport.cpp:
3307         (WebCore::DOMPatchSupport::innerPatchChildren):
3308         Revert the optimization change made in r173684. The optimization changes
3309         had a few issues. It changed the logic to potentially drop out of the
3310         loop before all new items were processed and using a node reference
3311         to track an index did not account for the modifications insertBefore
3312         may have made to that node's index in the list.
3313
3314 2015-08-21  Beth Dakin  <bdakin@apple.com>
3315
3316         HistoryItems will null CachedPages should never be left in the list of items; 
3317         causes crash
3318         https://bugs.webkit.org/show_bug.cgi?id=148237
3319         -and corresponding-
3320         rdar://problem/22356782
3321
3322         Reviewed by Brady Eidson.
3323
3324         Setting the CachedPage to nullptr will destroy the CachedPage, destroy the 
3325         FrameView, re-enter layout, and potentially try to modify items in the PageCache 
3326         based on that layout. So, we should not modify CachedPage in this way while the 
3327         item is still in the list of HistoryItems.
3328         * history/PageCache.cpp:
3329         (WebCore::PageCache::take):
3330         (WebCore::PageCache::remove):
3331         (WebCore::PageCache::prune):
3332
3333 2015-08-21  David Kilzer  <ddkilzer@apple.com>
3334
3335         dispatch_group_t objects may not be retained properly when not backed by Objective-C objects under garbage collection
3336         <http://webkit.org/b/148229>
3337
3338         Reviewed by Eric Carlson.
3339
3340         When compiled with garbage collection enabled, libdispatch
3341         objects are not backed by Objective-C objects, so they don't get
3342         the benefit of automatic reference counting when captured by a
3343         block or a lambda.  To address this, we use OSObjectPtr<> which
3344         always increments the reference count of the contained object.
3345
3346         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3347         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):
3348         Switch to use OSObjectPtr<>.
3349
3350 2015-08-21  Nan Wang  <n_wang@apple.com>
3351
3352         [Mac] accessibility/selection-states.html fails
3353         https://bugs.webkit.org/show_bug.cgi?id=116637
3354
3355         Reviewed by Chris Fleizach.
3356
3357         Added accessibilityAttributeValue callback for isMultiSelectable attribute.
3358
3359         Updated expectation for accessibility/selection-states.html on mac.
3360
3361         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3362         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3363
3364 2015-08-21  Jonathan Davis  <jond@apple.com>
3365
3366         Fixed status features JSON formatting.
3367
3368         * features.json:
3369
3370 2015-08-21  Chris Dumez  <cdumez@apple.com>
3371
3372         Have more getElementsBy*() methods return a Ref<>
3373         https://bugs.webkit.org/show_bug.cgi?id=148287
3374
3375         Reviewed by Sam Weinig.
3376
3377         Have more getElementsBy*() methods return a Ref<> instaed of a RefPtr<>
3378         as they cannot return null.
3379
3380         * dom/ContainerNode.cpp:
3381         (WebCore::ContainerNode::getElementsByTagName):
3382         (WebCore::ContainerNode::getElementsByTagNameNS):
3383         (WebCore::ContainerNode::getElementsByName):
3384         (WebCore::ContainerNode::getElementsByClassName):
3385         (WebCore::ContainerNode::getElementsByClassNameForObjC):
3386         (WebCore::ContainerNode::radioNodeList):
3387         * dom/ContainerNode.h:
3388
3389 2015-08-21  Chris Dumez  <cdumez@apple.com>
3390
3391         Drop NodeListBase class
3392         https://bugs.webkit.org/show_bug.cgi?id=148290
3393
3394         Reviewed by Ryosuke Niwa.
3395
3396         Drop NodeListBase class and have HTMLCollection subclass NodeList
3397         directly. There is no reason we need another base class.
3398
3399         * WebCore.xcodeproj/project.pbxproj:
3400         * bindings/scripts/CodeGeneratorObjC.pm:
3401         (GetImplClassName): Deleted.
3402         * dom/ContainerNode.cpp:
3403         (WebCore::ContainerNode::getElementsByClassNameForObjC):
3404         * dom/ContainerNode.h:
3405         * dom/NodeList.h:
3406         * dom/NodeListBase.h: Removed.
3407         * html/HTMLCollection.h:
3408
3409 2015-08-20  Yusuke Suzuki  <utatane.tea@gmail.com>
3410
3411         [ES6] prototyping module loader in JSC shell
3412         https://bugs.webkit.org/show_bug.cgi?id=147876
3413
3414         Reviewed by Saam Barati.
3415
3416         Just fill Loader hooks with nullptr.
3417
3418         * bindings/js/JSDOMWindowBase.cpp:
3419         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3420
3421 2015-08-20  Chris Dumez  <cdumez@apple.com>
3422
3423         Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker()
3424         https://bugs.webkit.org/show_bug.cgi?id=148257
3425
3426         Reviewed by Darin Adler.
3427
3428         Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker().
3429         It is supposed to be translated into a *null* NodeFilter. However, WebKit was constructing a
3430         NodeFilter in this case.
3431
3432         Chrome and Firefox do not create a NodeFilter in this case.
3433
3434         No new tests, already covered by:
3435         fast/dom/createNodeIterator-parameters.html
3436         fast/dom/createTreeWalker-parameters.html
3437
3438         * bindings/js/JSNodeFilterCustom.cpp:
3439         (WebCore::JSNodeFilter::toWrapped):
3440
3441 2015-08-20  Zalan Bujtas  <zalan@apple.com>
3442
3443         Make outline: auto repaint rect inflate more explicit.
3444         https://bugs.webkit.org/show_bug.cgi?id=148263
3445
3446         Reviewed by Simon Fraser.
3447
3448         Use RenderObject::adjustRectWithMaximumOutline() when inflating is conditional and call
3449         RenderView::maximalOutlineSize() when it is not.
3450         After this changeset, we can clearly tell calls when inflating is unconditional (adjusting the size of the compositing layer) apart from
3451         calls when we just simply inflate the repaint rect during outline painting phase.
3452
3453         No change in behaviour.
3454
3455         * rendering/InlineFlowBox.cpp:
3456         (WebCore::InlineFlowBox::paint):
3457         * rendering/RenderBlock.cpp:
3458         (WebCore::RenderBlock::paint):
3459         * rendering/RenderBlockFlow.cpp:
3460         (WebCore::RenderBlockFlow::layoutBlock):
3461         * rendering/RenderDetailsMarker.cpp:
3462         (WebCore::RenderDetailsMarker::paint):
3463         * rendering/RenderElement.cpp:
3464         (WebCore::RenderElement::computeMaxOutlineSize):
3465         * rendering/RenderLayer.cpp:
3466         (WebCore::RenderLayer::calculateClipRects):
3467         * rendering/RenderLineBoxList.cpp:
3468         (WebCore::isOutlinePhase):
3469         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
3470         (WebCore::RenderLineBoxList::paint):
3471         * rendering/RenderListMarker.cpp:
3472         (WebCore::RenderListMarker::paint):
3473         * rendering/RenderObject.cpp:
3474         (WebCore::RenderObject::adjustRectWithMaximumOutline):
3475         (WebCore::RenderObject::maximalOutlineSize): Deleted.
3476         * rendering/RenderObject.h:
3477         * rendering/RenderRegion.cpp:
3478         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
3479         * rendering/RenderReplaced.cpp:
3480         (WebCore::RenderReplaced::shouldPaint):
3481         * rendering/RenderTable.cpp:
3482         (WebCore::RenderTable::paint):
3483         * rendering/RenderTableCell.cpp:
3484         (WebCore::RenderTableCell::paintCollapsedBorders):
3485         * rendering/RenderTableSection.cpp:
3486         (WebCore::RenderTableSection::paintObject):
3487         * rendering/RenderView.cpp:
3488         (WebCore::RenderView::setMaximalOutlineSize):
3489         (WebCore::RenderView::RenderView): Deleted.
3490         * rendering/RenderView.h:
3491
3492 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
3493
3494         [OS X] Cleaup after r188591
3495         https://bugs.webkit.org/show_bug.cgi?id=148219
3496
3497         Unreviewed.
3498
3499         Forgot to update a call site of FontPlatformData().
3500
3501         * platform/graphics/mac/FontCacheMac.mm:
3502         (WebCore::FontCache::systemFallbackForCharacters):
3503
3504 2015-08-20  Alex Christensen  <achristensen@webkit.org>
3505
3506         Build fix after r188716.
3507
3508         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3509         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
3510         Add some scope so we can declare a variable (weakPtr) inside a switch statement.
3511
3512 2015-08-20  Alex Christensen  <achristensen@webkit.org>
3513
3514         Build fix after r188716.
3515
3516         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3517         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
3518         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
3519         Replace m_weakFactory with m_weakPtrFactory which actually exists.
3520
3521 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
3522
3523         [iOS] Adopt OS X's emoji behavior.
3524         https://bugs.webkit.org/show_bug.cgi?id=148265
3525
3526         Reviewed by Simon Fraser.
3527
3528         Remove our hardcoded hacks which limit the sizes of emoji. This is how
3529         OS X behaves with emoji.
3530
3531         Test: fast/text/emoji.html
3532
3533         * platform/graphics/FontPlatformData.h:
3534         (WebCore::FontPlatformData::hash):
3535         (WebCore::FontPlatformData::isEmoji): Deleted.
3536         (WebCore::FontPlatformData::setIsEmoji): Deleted.
3537         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3538         (WebCore::FontCascade::drawGlyphs):
3539         (WebCore::isOnOrAfterIOS6): Deleted.
3540         (WebCore::pointAdjustedForEmoji): Deleted.
3541         * platform/graphics/cocoa/FontCocoa.mm:
3542         (WebCore::canUseFastGlyphAdvanceGetter):
3543         (WebCore::Font::platformInit): Deleted.
3544         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3545         (WebCore::FontPlatformData::ctFont):
3546         (WebCore::FontPlatformData::platformDataInit): Deleted.
3547         (WebCore::FontPlatformData::platformDataAssign): Deleted.
3548         (WebCore::FontPlatformData::platformIsEqual): Deleted.
3549         (WebCore::FontPlatformData::ctFontSize): Deleted.
3550         * platform/graphics/ios/FontCacheIOS.mm:
3551         (WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
3552         (WebCore::FontCache::createFontPlatformData): Deleted.
3553         * platform/graphics/mac/ComplexTextController.cpp:
3554         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Deleted.
3555
3556 2015-08-20  Chris Dumez  <cdumez@apple.com>
3557
3558         getElementsByClassName() should return an HTMLCollection
3559         https://bugs.webkit.org/show_bug.cgi?id=147980
3560
3561         Reviewed by Darin Adler.
3562
3563         Update Document.getElementsByClassName() and Element.getElementsByClassName()
3564         to return an HTMLCollection instead of a NodeList, as per the specification:
3565         - https://dom.spec.whatwg.org/#interface-document
3566         - https://dom.spec.whatwg.org/#interface-element
3567
3568         This behavior is also consistent with other major browsers. Due to this and
3569         the fact that NodeList / HTMLCollection pretty much the same API, the
3570         compatibility risk should be fairly low.
3571
3572         I also verified that the performance is the same according to the following
3573         performance test:
3574         PerformanceTests/DOM/get-elements-by-class-name-traversal-uncached.html
3575
3576         Tests: fast/dom/getElementsByClassName/dumpHTMLCollection.html
3577                fast/dom/getElementsByClassName/return-type.html
3578
3579         * CMakeLists.txt:
3580         * WebCore.vcxproj/WebCore.vcxproj:
3581         * WebCore.xcodeproj/project.pbxproj:
3582         Rename ClassNodeList.cpp file.
3583
3584         * bindings/scripts/CodeGeneratorObjC.pm:
3585         (GetImplClassName):
3586         Indicate that NodeList is implemented as NodeListBase. This is
3587         needed so that DOMNodeList can have either an HTMLCollection or
3588         a NodeList as internal representation. NodeListBase is a new
3589         common base class for HTMLCollection and NodeList.
3590
3591         * dom/ClassCollection.cpp: Renamed from Source/WebCore/dom/ClassNodeList.cpp.
3592         (WebCore::ClassCollection::create):
3593         (WebCore::ClassCollection::~ClassCollection):
3594         * dom/ClassCollection.h: Renamed from Source/WebCore/dom/ClassNodeList.h.
3595         (WebCore::ClassCollection::ClassCollection):
3596         (WebCore::ClassCollection::elementMatches):
3597         Rename ClassNodeList to ClassCollection and have it subclass
3598         CachedHTMLCollection instead of ClassNodeList.
3599
3600         * dom/ContainerNode.cpp:
3601         (WebCore::ContainerNode::getElementsByClassName):
3602         Have getElementsByClassName return an HTMLCollection instead of a
3603         NodeList.
3604
3605         (WebCore::ContainerNode::getElementsByClassNameForObjC):
3606         New method returns a NodeListBase for ObjC bindings, so they can
3607         convert the return value into a DOMNodeList. We need this to not
3608         break ObjC API compatibility.
3609
3610         * dom/Document.idl:
3611         * dom/Element.idl:
3612         Have getElementsByClassName return an HTMLCollection instead of a
3613         NodeList, except for ObjC bindings.
3614
3615         * dom/NodeList.h:
3616         Have NodeList subclass NodeListBase.
3617
3618         * dom/NodeListBase.h: Added.
3619         New common base interface for HTMLCollection and NodeList. This is
3620         so that the internal representation for ObjC's DOMNodeList can be
3621         a NodeListBase instead of a NodeList. This way, the ObjC API can
3622         keep returning a DOMNodeList, even though our implementation now
3623         returns an HTMLCollection instead of a NodeList.
3624
3625         * dom/NodeRareData.h:
3626         (WebCore::NodeListTypeIdentifier<NameNodeList>::value):
3627         (WebCore::NodeListTypeIdentifier<TagNodeList>::value):
3628         (WebCore::NodeListTypeIdentifier<HTMLTagNodeList>::value):
3629         (WebCore::NodeListTypeIdentifier<RadioNodeList>::value):
3630         (WebCore::NodeListTypeIdentifier<LabelsNodeList>::value):
3631         Drop ClassNodeList from the NodeListTypeIndentifiers.
3632
3633         * html/CollectionType.h:
3634         Add new ByClass CollectionType for ClassCollection.
3635
3636         * html/GenericCachedHTMLCollection.cpp:
3637         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
3638         Handle new ByClass CollectionType in the switch statement.
3639
3640         * html/HTMLCollection.cpp:
3641         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3642         (WebCore::HTMLCollection::~HTMLCollection):
3643         Add support for new ByClass Collection type.
3644
3645         * html/HTMLCollection.h:
3646         Have HTMLCollection subclass the NodeListBase interface.
3647
3648 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
3649
3650         Fix the iOS build after r188726
3651         https://bugs.webkit.org/show_bug.cgi?id=148278
3652
3653         Unreviewed.
3654
3655         * platform/graphics/ios/FontCacheIOS.mm:
3656         (WebCore::FontCache::systemFallbackForCharacters):
3657
3658 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
3659
3660         Cleanup after r188726
3661         https://bugs.webkit.org/show_bug.cgi?id=148278
3662
3663         Unreviewed.
3664
3665         No new tests because there is no behavior change.
3666
3667         * platform/graphics/ios/FontCacheIOS.mm:
3668         (WebCore::FontCache::systemFallbackForCharacters):
3669
3670 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
3671
3672         [iOS] Delete dead code
3673         https://bugs.webkit.org/show_bug.cgi?id=148278
3674
3675         Reviewed by Dean Jackson.
3676
3677         No new tests because there is no behavior change.
3678
3679         * platform/graphics/cocoa/FontCocoa.mm:
3680         (WebCore::Font::platformInit):
3681         * platform/graphics/ios/FontCacheIOS.mm:
3682         (WebCore::copyFontCharacterSet): Deleted.
3683         (WebCore::appleColorEmojiCharacterSet): Deleted.
3684         (WebCore::phoneFallbackCharacterSet): Deleted.
3685         (WebCore::languageSpecificFallbackFont): Deleted.
3686         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
3687
3688 2015-08-20  Tim Horton  <timothy_horton@apple.com>
3689
3690         Unreviewed, rolling out r188712.
3691         https://bugs.webkit.org/show_bug.cgi?id=148274
3692
3693         broke allllll the tests (Requested by thorton on #webkit).
3694
3695         Reverted changeset:
3696
3697         "WK1 can re-enter layout during FrameView destruction and
3698         crash"
3699         https://bugs.webkit.org/show_bug.cgi?id=148237
3700         http://trac.webkit.org/changeset/188712
3701
3702 2015-08-20  Commit Queue  <commit-queue@webkit.org>
3703
3704         Unreviewed, rolling out r188717 and r188719.
3705         https://bugs.webkit.org/show_bug.cgi?id=148272
3706
3707         Broke the Mavericks build (Requested by andersca on #webkit).
3708
3709         Reverted changesets:
3710
3711         "Merge Lock and LockBase"
3712         https://bugs.webkit.org/show_bug.cgi?id=148266
3713         http://trac.webkit.org/changeset/188717
3714
3715         "Merge ConditionBase and Condition"
3716         https://bugs.webkit.org/show_bug.cgi?id=148270
3717         http://trac.webkit.org/changeset/188719
3718
3719 2015-08-20  Anders Carlsson  <andersca@apple.com>
3720
3721         Merge ConditionBase and Condition
3722         https://bugs.webkit.org/show_bug.cgi?id=148270
3723
3724         Reviewed by Filip Pizlo.
3725
3726         Change StaticCondition to Condition.
3727
3728         * platform/network/cf/LoaderRunLoopCF.cpp:
3729
3730 2015-08-20  Anders Carlsson  <andersca@apple.com>
3731
3732         Stop using cancelCallOnMainThread in MediaPlayerPrivateMediaFoundation
3733         https://bugs.webkit.org/show_bug.cgi?id=148252
3734
3735         Reviewed by Tim Horton.
3736
3737         Replace cancelCallOnMainThread with WeakPtrs.
3738
3739         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3740         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
3741         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
3742         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
3743         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
3744         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
3745         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
3746         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3747
3748 2015-08-20  Beth Dakin  <bdakin@apple.com>
3749
3750         WK1 can re-enter layout during FrameView destruction and crash
3751         https://bugs.webkit.org/show_bug.cgi?id=148237
3752         -and corresponding-
3753         rdar://problem/22356782
3754
3755         Reviewed by Zalan Bujtas.
3756
3757         This is a safe fix for the time being. We won't resetScrollbars() for a FrameView 
3758         that is in the PageCache because resetting scrollbars can re-enter layout for the 
3759         Frame's new FrameView, which leads to updating pages in the page cache, which 
3760         leads to a crash because we're in the process of destroying something
3761         in the page cache. We should not be able to get into this mess at all.
3762         * page/FrameView.cpp:
3763         (WebCore::FrameView::~FrameView):
3764
3765 2015-08-20  Chris Dumez  <cdumez@apple.com>
3766
3767         Default value for createNodeIterator() / createTreeWalker()'s whatToShow parameter should be 0xFFFFFFFF
3768         https://bugs.webkit.org/show_bug.cgi?id=148238
3769
3770         Reviewed by Ryosuke Niwa.
3771
3772         Default value for createNodeIterator() / createTreeWalker()'s whatToShow
3773         parameter should be 0xFFFFFFFF as per the specification:
3774         - http://w3c-test.org/dom/traversal/NodeIterator.html
3775         - http://w3c-test.org/dom/traversal/TreeWalker.html
3776
3777         Firefox and Chrome conform to the specification. However, WebKit was
3778         using 0 as default value.
3779
3780         We still don't behave as expected in some cases, as visible from
3781         the checks that are still failing in the new layout tests. Those
3782         will be addressed separately.
3783
3784         Tests: fast/dom/createNodeIterator-parameters.html
3785                fast/dom/createTreeWalker-parameters.html
3786
3787         * dom/Document.cpp:
3788         (WebCore::Document::createNodeIterator):
3789         (WebCore::Document::createTreeWalker):
3790         (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
3791         (WebCore::Document::scheduleStyleRecalc): Deleted.
3792         * dom/Document.h:
3793         * dom/Document.idl:
3794         * dom/NodeIterator.cpp:
3795         (WebCore::NodeIterator::NodeIterator):
3796         * dom/NodeIterator.h:
3797         (WebCore::NodeIterator::create):
3798         * dom/Traversal.cpp:
3799         (WebCore::NodeIteratorBase::NodeIteratorBase):
3800         * dom/Traversal.h:
3801         (WebCore::NodeIteratorBase::whatToShow):
3802         * dom/TreeWalker.cpp:
3803         (WebCore::TreeWalker::TreeWalker):
3804         * dom/TreeWalker.h:
3805         (WebCore::TreeWalker::create):
3806
3807 2015-08-20  Anders Carlsson  <andersca@apple.com>
3808
3809         Stop using cancelCallOnMainThread in MediaPlayerPrivateAVFoundation
3810         https://bugs.webkit.org/show_bug.cgi?id=148248
3811
3812         Reviewed by Tim Horton.
3813
3814         Replace cancelCallOnMainThread with WeakPtrs, just like in MediaPlayerPrivateAVFoundationObjC.
3815
3816         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3817         (WebCore::MediaPlayerPrivateAVFoundation::mainThreadCallback):
3818         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
3819         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
3820         (WebCore::MediaPlayerPrivateAVFoundation::~MediaPlayerPrivateAVFoundation): Deleted.
3821         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3822
3823 2015-08-20  Anders Carlsson  <andersca@apple.com>
3824
3825         Stop using cancelCallOnMainThread in DisplayRefreshMonitorMac
3826         https://bugs.webkit.org/show_bug.cgi?id=148241
3827
3828         Reviewed by Tim Horton.
3829
3830         Create a WeakPtrFactory in DisplayRefreshMonitorMac and bind a WeakPtr in the function passed
3831         to callOnMainThread so we can check if the DisplayRefreshMonitorMac has gone away.
3832
3833         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
3834         (WebCore::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac):
3835         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
3836         (WebCore::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac):
3837         * platform/graphics/mac/DisplayRefreshMonitorMac.h:
3838
3839 2015-08-20  Alex Christensen  <achristensen@webkit.org>
3840
3841         AppleWin CMake build fix after r188696.
3842
3843         * PlatformWin.cmake:
3844         No ${} fixes the problem and keeps the desired behavior.
3845
3846 2015-08-20  Per Arne Vollan  <peavo@outlook.com>
3847
3848         [WinCairo] Link errors when building with VS2015.
3849         https://bugs.webkit.org/show_bug.cgi?id=148233
3850
3851         Reviewed by Alex Christensen.
3852
3853         Include some inline function definitions.
3854
3855         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3856         * html/canvas/WebGLRenderingContext.cpp:
3857
3858 2015-08-20  Alex Christensen  <achristensen@webkit.org>
3859
3860         Clean up CMake build after r188673
3861         https://bugs.webkit.org/show_bug.cgi?id=148234
3862
3863         Reviewed by Tim Horton.
3864
3865         * CMakeLists.txt:
3866         * PlatformEfl.cmake:
3867         * PlatformGTK.cmake:
3868         * PlatformWin.cmake:
3869         Make including ANGLE headers platform specific because EFL and GTK don't want to copy headers,
3870         but we need to in order to get the Windows build working with each Source subdirectory isolated.
3871
3872 2015-08-20  Beth Dakin  <bdakin@apple.com>
3873
3874         Standalone image documents should send their size to the UIClient just like 
3875         standalone media documents
3876         https://bugs.webkit.org/show_bug.cgi?id=148195
3877         -and corresponding-
3878         rdar://problem/21951253
3879
3880         Reviewed by Tim Horton.
3881
3882         This patch re-names mediaDocumentNaturalSizeChanged() to 
3883         imageOrMediaDocumentSizeChanged(), and, as the new name implies, uses the 
3884         function for both media documents and images.
3885
3886         * html/ImageDocument.cpp:
3887         (WebCore::ImageDocument::imageUpdated):
3888         * html/MediaDocument.cpp:
3889         (WebCore::MediaDocument::mediaElementNaturalSizeChanged):
3890         * page/ChromeClient.h:
3891
3892 2015-08-20  Simon Fraser  <simon.fraser@apple.com>
3893
3894         Add myself as the will-change contact.
3895
3896         * features.json:
3897
3898 2015-08-20  Chris Dumez  <cdumez@apple.com>
3899
3900         [Cocoa] Treat Epoch as invalid value for "Last-Modified" header
3901         https://bugs.webkit.org/show_bug.cgi?id=148162
3902         rdar://problem/22330837
3903
3904         Reviewed by Antti Koivisto.
3905
3906         Ignore "Last-Modified" header when computing heuristic freshness if it
3907         is Epoch. CFNetwork currently converts a malformed date for Last-Modified
3908         into Epoch so there is no way for us to distinguish Epoch from invalid
3909         input. Without this, we would end up with cached resources that have a
3910         giant lifetime (> 4 years) due to a malformed HTTP header.
3911
3912         Some Websites (e.g. www.popehat.com) also wrongly return Epoch as
3913         Last-Modified value and we would end up caching it overly aggressively.
3914         Now that we consider Epoch as an invalid value for Last-Modified, it will
3915         also work around this content bug.
3916
3917         Test: http/tests/cache/disk-cache/disk-cache-last-modified.html
3918
3919         * platform/network/ResourceResponseBase.cpp:
3920         (WebCore::ResourceResponseBase::lastModified):
3921
3922 2015-08-19  Brian Burg  <bburg@apple.com>
3923
3924         Web Inspector: add TestHarness option to tee all commands to system console
3925         https://bugs.webkit.org/show_bug.cgi?id=148181
3926
3927         Reviewed by Joseph Pecoraro.
3928
3929         * inspector/InspectorFrontendHost.cpp:
3930         (WebCore::InspectorFrontendHost::unbufferedLog): Remove log prefix so output
3931         to stderr can be diffed against expected results without processing.
3932
3933 2015-08-19  Brent Fulgham  <bfulgham@apple.com>
3934
3935         [Win] Unreviewed build fix after r188663.
3936
3937         The new bindings file was added to the Visual Studio project, but was marked to not
3938         be built. It should have also been added to the "JSBindingsAllInOne.cpp" file so
3939         that the new code gets compiled.
3940
3941         * bindings/js/JSBindingsAllInOne.cpp:
3942
3943 2015-08-19  Alex Christensen  <achristensen@webkit.org>
3944
3945         CMake Windows build should not include files directly from other Source directories
3946         https://bugs.webkit.org/show_bug.cgi?id=148198
3947
3948         Reviewed by Brent Fulgham.
3949
3950         * CMakeLists.txt:
3951         * PlatformEfl.cmake:
3952         * PlatformGTK.cmake:
3953         * PlatformWin.cmake:
3954
3955 2015-08-19  Wenson Hsieh  <wenson_hsieh@apple.com>
3956
3957         Select validation does not correctly work when handling change event
3958         https://bugs.webkit.org/show_bug.cgi?id=145869
3959
3960         Reviewed by Dean Jackson.
3961
3962         When selecting an option in a <select> with validation that also has an onchange listener, calling
3963         checkValidity() for the select within the onchange handler would produce incorrect results and (on
3964         a debug build) crash at an assertion. This is because the change events were being dispatched before
3965         form validity was updated. Making the validation step come before the change event dispatch fixes
3966         this issue.
3967
3968         Test: fast/forms/onchange-select-check-validity.html
3969
3970         * html/HTMLSelectElement.cpp:
3971         (WebCore::HTMLSelectElement::selectOption): Update validity before dispatching change events.
3972
3973 2015-08-19  Jinyoung Hur  <hur.ims@navercorp.com>
3974
3975         GraphicsContext3D::activeTexture should not be called with zero-based index
3976         https://bugs.webkit.org/show_bug.cgi?id=148020
3977
3978         Reviewed by Alex Christensen.
3979
3980         GraphicsContext3D::activeTexture should be called with an argument that is greater than or equal to 
3981         GraphicsContext3D::TEXTURE0.
3982
3983         Test: fast/canvas/webgl/texture-complete.html
3984
3985         * html/canvas/WebGLRenderingContextBase.cpp:
3986         (WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
3987
3988 2015-08-19  Chris Dumez  <cdumez@apple.com>
3989
3990         Avoid double hash lookup in our JS bindings named property getter code
3991         https://bugs.webkit.org/show_bug.cgi?id=148193
3992
3993         Reviewed by Geoffrey Garen.
3994
3995         Avoid double hash lookup in our JS bindings named property getter code
3996         for performance reasons.
3997
3998         * CMakeLists.txt:
3999         * WebCore.xcodeproj/project.pbxproj:
4000         Add new file.
4001
4002         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp: Added.
4003         (WebCore::JSDOMNamedFlowCollection::nameGetter):
4004         Moved custom named getter code for DOMNamedFlowCollection from the
4005         bindings generator to an actual custom bindings file.
4006
4007         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
4008         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
4009         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
4010         * bindings/scripts/test/JS/JSTestEventTarget.h:
4011         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
4012         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
4013         Rebaseline bindings tests.
4014
4015 2015-08-19  Simon Fraser  <simon.fraser@apple.com>
4016
4017         Add CSS will-change to the feature list
4018         https://bugs.webkit.org/show_bug.cgi?id=148199
4019
4020         Reviewed by Dean Jackson.
4021
4022         * features.json:
4023
4024 2015-08-19  Eric Carlson  <eric.carlson@apple.com>
4025
4026         Remove ENABLE_WEBVTT_REGIONS
4027         https://bugs.webkit.org/show_bug.cgi?id=148184
4028
4029         Reviewed by Jer Noble.
4030
4031         * Configurations/FeatureDefines.xcconfig: Remove ENABLE_WEBVTT_REGIONS.
4032         * html/HTMLMediaElement.cpp:
4033         (WebCore::HTMLMediaElement::textTrackRemoveCue):
4034         * html/shadow/MediaControlElements.cpp:
4035         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
4036         * html/track/InbandGenericTextTrack.cpp:
4037         (WebCore::InbandGenericTextTrack::newCuesParsed):
4038         (WebCore::InbandGenericTextTrack::newRegionsParsed):
4039         (WebCore::InbandGenericTextTrack::fileFailedToParse):
4040         * html/track/InbandGenericTextTrack.h:
4041         * html/track/InbandWebVTTTextTrack.cpp:
4042         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
4043         (WebCore::InbandWebVTTTextTrack::newRegionsParsed):
4044         (WebCore::InbandWebVTTTextTrack::fileFailedToParse):
4045         * html/track/InbandWebVTTTextTrack.h:
4046         * html/track/LoadableTextTrack.cpp:
4047         (WebCore::LoadableTextTrack::cueLoadingCompleted):
4048         (WebCore::LoadableTextTrack::newRegionsAvailable):
4049         (WebCore::LoadableTextTrack::id):
4050         * html/track/LoadableTextTrack.h:
4051         * html/track/TextTrack.cpp:
4052         (WebCore::TextTrack::TextTrack):
4053         (WebCore::TextTrack::~TextTrack):
4054         (WebCore::TextTrack::removeCue):
4055         (WebCore::TextTrack::ensureVTTRegionList):
4056         (WebCore::TextTrack::removeRegion):
4057         (WebCore::TextTrack::cueWillChange):
4058         * html/track/TextTrack.h:
4059         * html/track/TextTrack.idl:
4060         * html/track/TextTrackCue.cpp:
4061         * html/track/VTTCue.cpp:
4062         (WebCore::VTTCueBox::applyCSSProperties):