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