Attempt to fix the Windows build after r160672.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
2
3         Attempt to fix the Windows build after r160672.
4         
5         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
6         (PlatformCALayerWin::PlatformCALayerWin):
7         * platform/graphics/ca/win/PlatformCALayerWin.h:
8
9 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
10
11         Apply overhang shadow and linen to UI-side layers
12         https://bugs.webkit.org/show_bug.cgi?id=125807
13
14         Reviewed by Tim Horton.
15         
16         With UI-side compositing, we need to apply the overhang shadow and linen
17         background to layers in the UI process. Achieve this by setting a "custom
18         appearance" flag on layers that need a shadow or linen background, and
19         migrating this flag to the UI process. Static functions on ScrollbarThemeMac
20         are exposed to do the actual setting.
21
22         * WebCore.exp.in: Export ScrollbarThemeMac and GraphicsLayerCA functions.
23         * WebCore.xcodeproj/project.pbxproj: ScrollbarThemeMac.h and ScrollbarThemeComposite.h
24         need to be Private.
25         * platform/graphics/GraphicsLayer.cpp: Initialize m_customAppearance.
26         (WebCore::GraphicsLayer::GraphicsLayer):
27         * platform/graphics/GraphicsLayer.h: Getter/setter for CustomAppearance.
28         (WebCore::GraphicsLayer::setCustomAppearance):
29         (WebCore::GraphicsLayer::customAppearance):
30         * platform/graphics/ca/GraphicsLayerCA.cpp: Update CustomAppearanceChanged as
31         we do other properties.
32         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
33         (WebCore::GraphicsLayerCA::updateCustomAppearance):
34         (WebCore::GraphicsLayerCA::setCustomAppearance):
35         * platform/graphics/ca/GraphicsLayerCA.h:
36         * platform/graphics/ca/PlatformCALayer.h:
37         * platform/graphics/ca/mac/PlatformCALayerMac.h:
38         * platform/graphics/ca/mac/PlatformCALayerMac.mm: When we have a custom
39         appearance, use ScrollbarThemeMac functions to update the layer. Ensure
40         that if the bounds change, we update the shadow (whose path depends on the bounds).
41         (PlatformCALayerMac::PlatformCALayerMac):
42         (PlatformCALayerMac::clone):
43         (PlatformCALayerMac::setBounds):
44         (PlatformCALayerMac::requiresCustomAppearanceUpdateOnBoundsChange):
45         (PlatformCALayerMac::updateCustomAppearance):
46         * platform/mac/ScrollbarThemeMac.h: Export some static functions.
47         * platform/mac/ScrollbarThemeMac.mm: Change code to use static functions.
48         (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
49         (WebCore::ScrollbarThemeMac::removeOverhangAreaBackground):
50         (WebCore::ScrollbarThemeMac::setUpOverhangAreaShadow):
51         (WebCore::ScrollbarThemeMac::removeOverhangAreaShadow):
52         (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents):
53         (WebCore::ScrollbarThemeMac::setUpContentShadowLayer):
54         * rendering/RenderLayerCompositor.cpp:
55         (WebCore::RenderLayerCompositor::updateRootLayerPosition): No need to call
56         setUpContentShadowLayer() now when size changes; PlatformCALayer takes
57         care of that.
58         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Now set
59         custom appearance via GraphicsLayer.
60
61 2013-12-16  Brent Fulgham  <bfulgham@apple.com>
62
63         [Win] Remove dead code after converstion to VS2013
64         https://bugs.webkit.org/show_bug.cgi?id=125795
65
66         Reviewed by Darin Adler.
67
68         * WebCorePrefix.h: Remove VS2012 include kludge.
69         * loader/FTPDirectoryParser.cpp: Remove gmtime workaround code.
70         * page/DOMWindow.cpp: Remove older pointer-based open implementation.
71         * page/DOMWindow.h: Ditto
72         * platform/text/TextEncodingRegistry.cpp:
73         (WebCore::TextEncodingNameHash::equal): Remove optimization bug workaround
74         * testing/Internals.cpp:
75         (WebCore::Internals::openDummyInspectorFrontend): Remove compiler workaround
76
77 2013-12-16  Daniel Bates  <dabates@apple.com>
78
79         [iOS] Upstream WebCore/history changes
80         https://bugs.webkit.org/show_bug.cgi?id=125769
81
82         Reviewed by Darin Adler.
83
84         * history/BackForwardClient.h:
85         * history/BackForwardList.cpp:
86         (WebCore::BackForwardList::current): Added; guard by PLATFORM(IOS). Also added FIXME comment.
87         (WebCore::BackForwardList::setCurrent): Added; guard by PLATFORM(IOS). Also added FIXME comment.
88         (WebCore::BackForwardList::clearAllPageCaches): Added; guarded by PLATFORM(IOS).
89         * history/BackForwardList.h:
90         * history/CachedFrame.cpp:
91         (WebCore::CachedFrameBase::restore): Added iOS-specific code.
92         (WebCore::CachedFrame::CachedFrame): Ditto.
93         * history/CachedPage.cpp:
94         (WebCore::CachedPage::restore): Ditto.
95         * history/HistoryItem.cpp:
96         (WebCore::HistoryItem::HistoryItem): Ditto.
97         * history/HistoryItem.h:
98         (WebCore::HistoryItem::scale): Added; guarded by PLATFORM(IOS).
99         (WebCore::HistoryItem::scaleIsInitial): Added; guarded by PLATFORM(IOS).
100         (WebCore::HistoryItem::setScale): Added; guarded by PLATFORM(IOS).
101         (WebCore::HistoryItem::viewportArguments): Added; guarded by PLATFORM(IOS).
102         (WebCore::HistoryItem::setViewportArguments): Added; guarded by PLATFORM(IOS).
103         (WebCore::HistoryItem::bookmarkID): Added; guarded by PLATFORM(IOS).
104         (WebCore::HistoryItem::setBookmarkID): Added; guarded by PLATFORM(IOS).
105         (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
106         (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
107         * history/PageCache.cpp:
108         (WebCore::logCanCacheFrameDecision): Added iOS-specific code.
109         (WebCore::logCanCachePageDecision): Ditto.
110         (WebCore::PageCache::canCachePageContainingThisFrame): Ditto.
111         (WebCore::PageCache::canCache): Ditto.
112         (WebCore::PageCache::pruneToCapacityNow): Added.
113         * history/PageCache.h:
114
115 2013-12-16  Daniel Bates  <dabates@apple.com>
116
117         [iOS] Upstream WebCore/svg changes
118         https://bugs.webkit.org/show_bug.cgi?id=125784
119
120         Reviewed by Darin Adler.
121
122         * svg/SVGAElement.cpp:
123         (WebCore::SVGAElement::willRespondToMouseClickEvents): Added.
124         * svg/SVGAElement.h:
125         * svg/SVGElement.cpp:
126         (WebCore::SVGElement::parseAttribute): Added attribute listeners for touch{cancel, end, move, start},
127         and gesture{change, end, start}.
128
129 2013-12-13  Jeffrey Pfau  <jpfau@apple.com>
130
131         [Mac] Cache partitioning asserts when associated NSURLRequest is nil
132         https://bugs.webkit.org/show_bug.cgi?id=125716
133
134         Reviewed by Darin Adler.
135
136         * platform/network/mac/ResourceRequestMac.mm:
137         (WebCore::ResourceRequest::doUpdateResourceRequest):
138
139 2013-12-16  Brady Eidson  <beidson@apple.com>
140
141         DatabaseProcess: Fix a few bugs with opening an IDB connection
142         https://bugs.webkit.org/show_bug.cgi?id=125798
143
144         Reviewed by Alexey Proskuryakov.
145
146         * Modules/indexeddb/IDBDatabaseBackend.cpp:
147         (WebCore::IDBDatabaseBackend::processPendingCalls): As the comment says, we should only
148           early return when there *are* pending delete calls. The logic here was backwards,
149           preventing the backend from ever getting to processPendingOpenCalls().
150
151 2013-12-16  Alex Christensen  <achristensen@webkit.org>
152
153         Fixed Win64 build on VS2013.
154         https://bugs.webkit.org/show_bug.cgi?id=125753
155
156         Reviewed by Brent Fulgham.
157
158         * WebCore.vcxproj/WebCore.vcxproj:
159         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
160         Added correct PlatformToolset for 64-bit builds.
161
162 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
163
164         Package up some data about scrollability into a struct for use in the scrolling tree
165         https://bugs.webkit.org/show_bug.cgi?id=125792
166
167         Reviewed by Beth Dakin.
168
169         Both scrolling state nodes and scrolling nodes share a set of parameters
170         relating to scrollability and rubberbanding, so package them into a struct
171         for re-use. Send the struct wholesale to the scrolling thread.
172
173         * page/scrolling/ScrollingCoordinator.h:
174         (WebCore::ScrollableAreaParameters::ScrollableAreaParameters): New struct.
175         (WebCore::ScrollableAreaParameters::operator==):
176         * page/scrolling/ScrollingStateScrollingNode.cpp:
177         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): Reordering.
178         (WebCore::ScrollingStateScrollingNode::setScrollOrigin): Moved.
179         (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): Set the parameters all at once.
180         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
181         * page/scrolling/ScrollingStateScrollingNode.h: Getters access the struct. Reorder member variables.
182         * page/scrolling/ScrollingTreeScrollingNode.cpp:
183         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
184         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
185         * page/scrolling/ScrollingTreeScrollingNode.h:
186         (WebCore::ScrollingTreeScrollingNode::scrollOrigin):
187         (WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity):
188         (WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity):
189         (WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar):
190         (WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar):
191         (WebCore::ScrollingTreeScrollingNode::canHaveScrollbars):
192         * page/scrolling/mac/ScrollingCoordinatorMac.h:
193         * page/scrolling/mac/ScrollingCoordinatorMac.mm: Removed setScrollParametersForNode().
194         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated): Set the params in this
195         function. Reordering.
196
197 2013-12-16  Sam Weinig  <sam@webkit.org>
198
199         CTTE: Convert more of SVG to use references
200         https://bugs.webkit.org/show_bug.cgi?id=125762
201
202         Reviewed by Darin Adler.
203
204         * rendering/svg/RenderSVGImage.cpp:
205         (WebCore::RenderSVGImage::imageChanged):
206         * rendering/svg/RenderSVGResource.cpp:
207         (WebCore::removeFromCacheAndInvalidateDependencies):
208         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
209         * rendering/svg/RenderSVGResource.h:
210         * rendering/svg/RenderSVGResourceClipper.cpp:
211         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
212         * rendering/svg/RenderSVGResourceClipper.h:
213         * rendering/svg/RenderSVGResourceContainer.cpp:
214         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
215         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
216         (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
217         (WebCore::RenderSVGResourceContainer::removeClient):
218         * rendering/svg/RenderSVGResourceContainer.h:
219         * rendering/svg/RenderSVGResourceFilter.cpp:
220         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
221         (WebCore::RenderSVGResourceFilter::postApplyResource):
222         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
223         * rendering/svg/RenderSVGResourceFilter.h:
224         * rendering/svg/RenderSVGResourceGradient.cpp:
225         (WebCore::RenderSVGResourceGradient::removeClientFromCache):
226         * rendering/svg/RenderSVGResourceGradient.h:
227         * rendering/svg/RenderSVGResourceMarker.cpp:
228         (WebCore::RenderSVGResourceMarker::removeClientFromCache):
229         * rendering/svg/RenderSVGResourceMarker.h:
230         * rendering/svg/RenderSVGResourceMasker.cpp:
231         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
232         * rendering/svg/RenderSVGResourceMasker.h:
233         * rendering/svg/RenderSVGResourcePattern.cpp:
234         (WebCore::RenderSVGResourcePattern::removeClientFromCache):
235         * rendering/svg/RenderSVGResourcePattern.h:
236         * rendering/svg/RenderSVGResourceSolidColor.h:
237         (WebCore::RenderSVGResourceSolidColor::removeClientFromCache):
238         * rendering/svg/SVGRenderSupport.cpp:
239         (WebCore::invalidateResourcesOfChildren):
240         * rendering/svg/SVGResources.cpp:
241         (WebCore::SVGResources::removeClientFromCache):
242         * rendering/svg/SVGResources.h:
243         * rendering/svg/SVGResourcesCache.cpp:
244         (WebCore::SVGResourcesCache::clientLayoutChanged):
245         (WebCore::SVGResourcesCache::clientStyleChanged):
246         (WebCore::SVGResourcesCache::clientWasAddedToTree):
247         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
248         (WebCore::SVGResourcesCache::clientDestroyed):
249         * svg/SVGAnimateMotionElement.cpp:
250         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
251         * svg/SVGCircleElement.cpp:
252         (WebCore::SVGCircleElement::svgAttributeChanged):
253         * svg/SVGEllipseElement.cpp:
254         (WebCore::SVGEllipseElement::svgAttributeChanged):
255         * svg/SVGFEImageElement.cpp:
256         (WebCore::SVGFEImageElement::notifyFinished):
257         * svg/SVGFELightElement.cpp:
258         (WebCore::SVGFELightElement::childrenChanged):
259         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
260         (WebCore::invalidateFilterPrimitiveParent):
261         * svg/SVGFilterPrimitiveStandardAttributes.h:
262         (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
263         (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged):
264         * svg/SVGForeignObjectElement.cpp:
265         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
266         * svg/SVGGElement.cpp:
267         (WebCore::SVGGElement::svgAttributeChanged):
268         * svg/SVGGraphicsElement.cpp:
269         (WebCore::SVGGraphicsElement::svgAttributeChanged):
270         * svg/SVGImageElement.cpp:
271         (WebCore::SVGImageElement::svgAttributeChanged):
272         * svg/SVGLineElement.cpp:
273         (WebCore::SVGLineElement::svgAttributeChanged):
274         * svg/SVGPathElement.cpp:
275         (WebCore::SVGPathElement::svgAttributeChanged):
276         (WebCore::SVGPathElement::invalidateMPathDependencies):
277         (WebCore::SVGPathElement::pathSegListChanged):
278         * svg/SVGPolyElement.cpp:
279         (WebCore::SVGPolyElement::svgAttributeChanged):
280         * svg/SVGRectElement.cpp:
281         (WebCore::SVGRectElement::svgAttributeChanged):
282         * svg/SVGSVGElement.cpp:
283         (WebCore::SVGSVGElement::svgAttributeChanged):
284         (WebCore::SVGSVGElement::setupInitialView):
285         * svg/SVGStopElement.cpp:
286         (WebCore::SVGStopElement::svgAttributeChanged):
287         * svg/SVGTRefElement.cpp:
288         (WebCore::SVGTRefElement::svgAttributeChanged):
289         * svg/SVGTextContentElement.cpp:
290         (WebCore::SVGTextContentElement::svgAttributeChanged):
291         * svg/SVGTextPathElement.cpp:
292         (WebCore::SVGTextPathElement::svgAttributeChanged):
293         * svg/SVGTextPositioningElement.cpp:
294         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
295         * svg/SVGUseElement.cpp:
296         (WebCore::SVGUseElement::svgAttributeChanged):
297
298 2013-12-16  Hans Muller  <hmuller@adobe.com>
299
300         [CSS Shapes] Add support for the computing the included intervals for a BoxShape
301         https://bugs.webkit.org/show_bug.cgi?id=124605
302
303         Reviewed by Andreas Kling.
304
305         Setting shape-inside to content-box now works.
306
307         Changed FloatRoundedRect::xInterceptsAtY() to include the bottom edge of
308         the rectangle and to check for the special cases where any or all of the
309         corner radii are empty.
310
311         Test: fast/shapes/shape-inside/shape-inside-content-box.html
312
313         * platform/graphics/FloatRoundedRect.cpp:
314         (WebCore::FloatRoundedRect::xInterceptsAtY):
315         * rendering/shapes/BoxShape.cpp:
316         (WebCore::BoxShape::getIncludedIntervals): Replaced the stub implementation with logic that's similar to getExcludedIntervals().
317         * rendering/shapes/ShapeInfo.cpp:
318         (WebCore::::computedShape): Removed a meaningless assert.
319         * rendering/shapes/ShapeInsideInfo.cpp:
320         (WebCore::ShapeInsideInfo::isEnabledFor):
321
322 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
323
324         [ATK] Expose accessibility objects for more WAI-ARIA roles
325         https://bugs.webkit.org/show_bug.cgi?id=125596
326
327         Reviewed by Chris Fleizach.
328
329         Exposed accessibility objects with the proper AtkRoles, some of
330         them to be provided by the next stable release of ATK.
331
332         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
333         (atkRole):
334
335 2013-12-16  Eric Carlson  <eric.carlson@apple.com>
336
337         Fix QuickTime plug-in replacement scripting bugs
338         https://bugs.webkit.org/show_bug.cgi?id=125717
339
340         Reviewed by Sam Weinig.
341
342         No new tests, existing test updated.
343
344         * Modules/plugins/QuickTimePluginReplacement.js:
345         (Replacement): Change '' to "" to avoid "Empty character constant" warning when creating
346             Derived Sources.
347         (Replacement.prototype.createVideoElement): Handle qtsrc attribute. Remember base url.
348         (Replacement.prototype.setURL): Resolve urls relative to base.
349
350 2013-12-15  Darin Adler  <darin@apple.com>
351
352         Catch callers who forget to use initializeStyle
353         https://bugs.webkit.org/show_bug.cgi?id=125763
354
355         Reviewed by Andreas Kling.
356
357         A recent fix was because a caller used setStyle first rather than using
358         initializeStyle. This patch adds an assertion to catch cases where we do
359         that so we see the mistake right away instead of indirectly later.
360
361         * rendering/RenderElement.cpp:
362         (WebCore::RenderElement::initializeStyle): Simplified an assertion.
363         (WebCore::RenderElement::setStyle): Added an assertion that m_hasInitializedStyle
364         is true, with an exception for RenderView, which needs to be created before we
365         have the correct style computed for it (at least for now). Also broke out an
366         assertion that was using &&, since we would prefer to know which clause failed,
367         making separate assertions more useful than a combined assertion.
368
369 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
370
371         [ATK] Expose accessibility objects with ATK_ROLE_CHECK_MENU_ITEM
372         https://bugs.webkit.org/show_bug.cgi?id=125594
373
374         Reviewed by Chris Fleizach.
375
376         Exposed accessibility objects with checkmenuitem role with the
377         proper AtkRole, to be provided by the next stable release of ATK.
378
379         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
380         (atkRole):
381
382 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
383
384         [ATK] Expose accessibility objects with ATK_ROLE_ARTICLE
385         https://bugs.webkit.org/show_bug.cgi?id=125587
386
387         Reviewed by Chris Fleizach.
388
389         Exposed accessibility objects with article role with the proper
390         AtkRole, to be provided by the next stable release of ATK.
391
392         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
393         (atkRole):
394
395 2013-11-27  Sergio Villar Senin  <svillar@igalia.com>
396
397         [CSS Grid Layout] Fix the preferred logical widths code to work with spanning grid items
398         https://bugs.webkit.org/show_bug.cgi?id=123994
399
400         Reviewed by Andreas Kling.
401
402         From Blink r159189 by <jchaffraix@chromium.org>
403
404         There was no definition in the specs for the intrinsic / preferred
405         logical widths on the grid element. The following was proposed to
406         the WG and later accepted:
407         - The sum of the grid tracks' UsedBreadth is the minimum logical width
408         - The sum of the grid tracks' MaxBreadth is the maximum logical width
409
410         http://lists.w3.org/Archives/Public/www-style/2013Oct/0054.html
411         for more information.
412
413         * rendering/RenderGrid.cpp:
414         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
415         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
416         (WebCore::RenderGrid::minContentForChild):
417         (WebCore::RenderGrid::maxContentForChild):
418         * rendering/RenderGrid.h:
419
420 2013-12-15  Frédéric Wang  <fred.wang@free.fr>
421
422         Add support for maction@toggle
423         https://bugs.webkit.org/show_bug.cgi?id=120059
424
425         Reviewed by Chris Fleizach.
426
427         Test: mathml/presentation/maction-toggle.html
428
429         * mathml/MathMLSelectElement.cpp:
430         (WebCore::MathMLSelectElement::getSelectedChildAndIndex):
431         (WebCore::MathMLSelectElement::updateSelectedChild):
432         (WebCore::MathMLSelectElement::defaultEventHandler):
433         (WebCore::MathMLSelectElement::willRespondToMouseClickEvents):
434         (WebCore::MathMLSelectElement::toggle):
435         * mathml/MathMLSelectElement.h:
436
437 2013-12-15  Darin Adler  <darin@apple.com>
438
439         More nullptr in RenderElement
440         https://bugs.webkit.org/show_bug.cgi?id=125764
441
442         Reviewed by Andreas Kling.
443
444         * rendering/RenderElement.cpp:
445         (WebCore::RenderElement::uncachedFirstLineStyle):
446         (WebCore::RenderElement::updateShapeImage):
447         (WebCore::RenderElement::destroyLeftoverChildren):
448         (WebCore::RenderElement::findNextLayer):
449         Use nullptr in a few more places.
450
451 2013-12-15  Ryosuke Niwa  <rniwa@webkit.org>
452
453         REGRESSION: 2x regression on Dromaeo DOM query tests
454         https://bugs.webkit.org/show_bug.cgi?id=125377
455
456         Reviewed by Filip Pizlo.
457
458         The bug was caused by JSC not JIT'ing property accesses on document because of its having
459         custom named getter (named properties).  This resulted in resolution of methods on document
460         such as getElementById to happen inside the interpreter.
461
462         Fixed the bug by using the new JSC type info flag which tells JSC to JIT property access on
463         document, and then notifying JSC whenever a new named property appeared on document.
464
465         Tests: js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
466                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
467                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
468                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
469                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
470                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
471
472         * bindings/js/JSDOMBinding.cpp:
473         (WebCore::addImpureProperty): Wraps VM::addImpureProperty.
474         * bindings/js/JSDOMBinding.h:
475         * bindings/scripts/CodeGeneratorJS.pm:
476         (GenerateHeader): Added the support for NewImpurePropertyFiresWatchpoints.
477         * bindings/scripts/IDLAttributes.txt: Ditto.
478         * html/HTMLDocument.cpp:
479         (WebCore::HTMLDocument::addDocumentNamedItem): Calls addImpureProperty.
480         * html/HTMLDocument.idl: Added NewImpurePropertyFiresWatchpoints.
481
482 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
483
484         [WIn] Unreviewed build fix after r160599
485
486         * rendering/RenderMediaControls.cpp:
487         (WebCore::determineState): RenderObject::theme now returns
488         a reference.
489
490 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
491
492         [Win] Unreviewed build fix
493
494         The build system continues to attempt to build QTMovieWin, even
495         though it is excluded from the build solution. I'm actually
496         removing the project files to prevent this.
497
498         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Removed.
499         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Removed.
500
501 2013-12-15  Rob Buis  <rob.buis@samsung.com>
502
503         [CSS Shapes] shape-outside animation does not handle 'auto' well
504         https://bugs.webkit.org/show_bug.cgi?id=125700
505
506         Reviewed by Dirk Schulze.
507
508         Handle the case where we are blending/animating with a null ShapeValue due to 'auto'.
509
510         Adapted LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html for testing this.
511
512         * page/animation/CSSPropertyAnimation.cpp:
513         (WebCore::blendFunc):
514
515 2013-12-15  Andy Estes  <aestes@apple.com>
516
517         [iOS] Upstream changes to FeatureDefines.xcconfig
518         https://bugs.webkit.org/show_bug.cgi?id=125742
519
520         Reviewed by Dan Bernstein.
521
522         * Configurations/FeatureDefines.xcconfig:
523
524 2013-12-14  Darin Adler  <darin@apple.com>
525
526         Crash in CSSImageGeneratorValue and RenderScrollbar
527         https://bugs.webkit.org/show_bug.cgi?id=125702
528
529         Reviewed by Alexey Proskuryakov.
530
531         This crash had two causes at two different levels. The crash fixes both.
532
533         At the RenderScrollbar level, we were setting up a new renderer, a
534         RenderScrollbarPart, and never calling initializeStyle. This meant that
535         we did not do proper style setup, which meant we did not end up calling
536         CSSImageGeneratorValue::addClient and so had a removeClient that was not
537         properly balanced by an addClient. This is the primary bug.
538
539         At the CSSImageGeneratorValue level, the addClient and removeClient
540         functions were not properly handling possibly-mismatched calls. It was
541         easy to fix the functions to work even if the calls are not perfectly
542         matched up, which makes the consequences of a missed addClient call
543         much less dire, no longer messing up reference counting. Fixing this
544         mitigates the risk if we made this same mistake elsewhere, although I
545         could not find any other places with some quick searches.
546
547         Test: fast/css/scrollbar-image-crash.html
548
549         * css/CSSImageGeneratorValue.cpp:
550         (WebCore::CSSImageGeneratorValue::addClient): Only call ref if this will
551         add the first client.
552         (WebCore::CSSImageGeneratorValue::removeClient): Only call deref if this
553         removes the last client. Also added an assertion that can fire if we call
554         removeClient without first calling addClient, which is illegal. However,
555         the function handles that case without over-deref'ing itself.
556
557         * rendering/RenderScrollbar.cpp:
558         (WebCore::RenderScrollbar::updateScrollbarPart): Simplify the logic for
559         needRenderer a bit. Use initializeStyle rather than setStyle when first
560         creating the RenderScrollbarPart. Also use add and take properly so we
561         don't do extra hash lookups the old code did with get/set and get/remove.
562
563 2013-12-14  Sam Weinig  <sam@webkit.org>
564
565         CTTE: SVGResourcesCache::cachedResourcesForRenderObject() should take a reference
566         https://bugs.webkit.org/show_bug.cgi?id=125743
567
568         Reviewed by Dan Bernstein.
569
570         * rendering/svg/RenderSVGContainer.cpp:
571         (WebCore::RenderSVGContainer::selfWillPaint):
572         * rendering/svg/RenderSVGImage.cpp:
573         (WebCore::RenderSVGImage::imageChanged):
574         * rendering/svg/RenderSVGResource.cpp:
575         (WebCore::requestPaintingResource):
576         (WebCore::removeFromCacheAndInvalidateDependencies):
577         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
578         * rendering/svg/RenderSVGResourceClipper.cpp:
579         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
580         * rendering/svg/RenderSVGRoot.cpp:
581         (WebCore::RenderSVGRoot::paintReplaced):
582         * rendering/svg/RenderSVGShape.cpp:
583         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
584         (WebCore::RenderSVGShape::markerRect):
585         (WebCore::RenderSVGShape::drawMarkers):
586         * rendering/svg/SVGRenderSupport.cpp:
587         (WebCore::invalidateResourcesOfChildren):
588         (WebCore::SVGRenderSupport::layoutChildren):
589         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
590         (WebCore::SVGRenderSupport::filtersForceContainerLayout):
591         (WebCore::SVGRenderSupport::pointInClippingArea):
592         * rendering/svg/SVGRenderingContext.cpp:
593         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
594         * rendering/svg/SVGResourcesCache.cpp:
595         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
596         (WebCore::SVGResourcesCache::clientLayoutChanged):
597         (WebCore::SVGResourcesCache::clientDestroyed):
598         * rendering/svg/SVGResourcesCache.h:
599         * rendering/svg/SVGResourcesCycleSolver.cpp:
600         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
601
602 2013-12-14  Dan Bernstein  <mitz@apple.com>
603
604         Clean up the project after r160487
605
606         * WebCore.xcodeproj/project.pbxproj: Moved reference to Security.framework from the top
607         level of the project to the Frameworks group, and made it SDK-relative.
608
609 2013-12-14  Andreas Kling  <akling@apple.com>
610
611         Page::theme() should return a reference.
612         <https://webkit.org/b/125737>
613
614         There's always a RenderTheme, and not a single call site was checking
615         for null pointers anyway. Updated RenderObject::theme() as well.
616
617         Reviewed by Antti Koivisto.
618
619 2013-12-13  Sam Weinig  <sam@webkit.org>
620
621         CTTE: Convert Element and RenderObject iterator usage to use range-based for loops
622         https://bugs.webkit.org/show_bug.cgi?id=125731
623
624         Reviewed by Andreas Kling.
625
626         Perform straight forward conversions. A few stragglers that do odd things remain.
627
628 2013-12-14  Joseph Pecoraro  <pecoraro@apple.com>
629
630         Small string improvements to JSInjectedScriptHost::type and other bindings
631         https://bugs.webkit.org/show_bug.cgi?id=125722
632
633         Reviewed by Timothy Hatcher.
634
635         * bindings/js/JSInjectedScriptHostCustom.cpp:
636         (WebCore::JSInjectedScriptHost::type):
637         Use SmallStrings, jsNontrivialString and ASCIILiteral.
638
639         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
640         (WebCore::JSJavaScriptCallFrame::type):
641         Use jsNontrivialString.
642
643         * bridge/c/c_instance.cpp:
644         (JSC::Bindings::CInstance::stringValue):
645         Use jsNontrivialString and ASCIILiteral.
646
647 2013-12-14  Andreas Kling  <akling@apple.com>
648
649         Move a couple of inlines from RenderObject to RenderElement.
650         <https://webkit.org/b/125734>
651
652         Take most of the inline functions on RenderObject that call style()
653         and move them over to RenderElement where style() is branchless.
654
655         Reviewed by Antti Koivisto.
656
657 2013-12-14  Andreas Kling  <akling@apple.com>
658
659         RenderElement::rendererForRootBackground() should return a reference.
660         <https://webkit.org/b/125735>
661
662         This function always finds a renderer to return.
663
664         Reviewed by Antti Koivisto.
665
666 2013-12-14  Mark Rowe  <mrowe@apple.com>
667
668         Build fix after r160557.
669
670         * Configurations/WebCore.xcconfig: Find JavaScriptCore.framework below SDKROOT so that we'll pick
671         up the built version in production builds rather than the system version.
672
673 2013-12-14  Brendan Long  <b.long@cablelabs.com>
674
675         [GStreamer] Use GMutexLocker instead of g_mutex_lock
676         https://bugs.webkit.org/show_bug.cgi?id=125588
677
678         Reviewed by Philippe Normand.
679
680         No new tests because this is just code simplification.
681
682         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
683         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
684         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
685         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
686         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
687         (webkitVideoSinkTimeoutCallback):
688         (webkitVideoSinkRender):
689         (unlockBufferMutex):
690         (webkitVideoSinkUnlockStop):
691         (webkitVideoSinkStart):
692
693 2013-12-13  Andreas Kling  <akling@apple.com>
694
695         Move RenderObject::repaintAfterLayoutIfNeeded() to RenderElement.
696         <https://webkit.org/b/125712>
697
698         This function is only ever called on RenderElements, so move it there.
699         Removes some RenderObject::style() branchiness.
700
701         Reviewed by Darin Adler.
702
703 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
704
705         Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore
706         https://bugs.webkit.org/show_bug.cgi?id=125707
707
708         Reviewed by Timothy Hatcher.
709
710           - Switch TypeBuilder::Page::SearchMatch to TypeBuilder::GenericTypes::SearchMatch
711             which comes from InspectorJSTypeBuilders.
712           - Remove domains that moved to JavaScriptCore.
713
714         No new tests, this only moves code around. There are no functional changes.
715
716         * CMakeLists.txt:
717         * DerivedSources.make:
718         * GNUmakefile.am:
719         Add new files.
720
721         * inspector/ContentSearchUtils.cpp:
722         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
723         (WebCore::ContentSearchUtils::searchInTextByLines):
724         * inspector/ContentSearchUtils.h:
725         * inspector/InspectorAgent.cpp:
726         * inspector/InspectorAgent.h:
727         * inspector/InspectorDebuggerAgent.h:
728         * inspector/InspectorPageAgent.cpp:
729         (WebCore::InspectorPageAgent::searchInResource):
730         * inspector/InspectorPageAgent.h:
731         * inspector/protocol/Page.json:
732         Update includes and type builder type names.
733
734         * inspector/InspectorDebuggerAgent.cpp:
735         (WebCore::breakpointActionTypeForString):
736         (WebCore::InspectorDebuggerAgent::searchInContent):
737         * inspector/InspectorTimelineAgent.cpp:
738         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
739         Use the new getEnum function names.
740
741 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
742
743         [Win] Remove pre-VS2013 support code.
744         https://bugs.webkit.org/show_bug.cgi?id=125693
745
746         Reviewed by Darin Adler.
747
748         * Modules/webdatabase/DatabaseTracker.cpp:
749         (WebCore::DatabaseTracker::setQuota): Use C99 format arguments
750         * loader/FTPDirectoryParser.cpp:
751         (WebCore::parseOneFTPLine): Ditto
752         * loader/icon/IconDatabase.cpp:
753         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto 
754         * platform/sql/SQLiteDatabase.cpp:
755         (WebCore::SQLiteDatabase::setMaximumSize): Ditto
756
757 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
758
759         SVG bindings are improperly being generated with "fastGetAttribute"
760         https://bugs.webkit.org/show_bug.cgi?id=125670
761
762         Reviewed by Darin Adler.
763
764         A bug was introduced in r152845 that improperly called the
765         IsSVGAnimatedType using the $attribute hash, rather than the
766         expected $attribute->signature->type.
767
768         * bindings/scripts/CodeGenerator.pm:
769         (GetterExpression): Clean up attribute type confusion.
770
771 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
772
773         [Win] Unreviewed build fix after r160548
774
775         * WebCore.vcxproj/WebCore.vcxproj: Exclude MediaPlayerPrivateQuickTimeVisualContext from
776         Windows build.
777         * platform/graphics/MediaPlayer.cpp: Don't use QuickTime as the PlatformMediaEngine.
778
779 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
780
781         [GTK] Remove Warnings in building about duplicate INSPECTOR variables
782         https://bugs.webkit.org/show_bug.cgi?id=125710
783
784         Reviewed by Tim Horton.
785
786         * GNUmakefile.am:
787
788 2013-12-13  Roger Fong  <roger_fong@apple.com>
789
790         [WebGL] Check for global variable precision mismatch between vertex and fragment shaders.
791         https://bugs.webkit.org/show_bug.cgi?id=125546.
792         <rdar://problem/15203364>
793
794         Reviewed by Brent Fulgham.
795
796         Covered Khronos conformances tests:
797         webgl/1.0.2/glsl/misc/shader-with-global-variable-precision-mismatch.html
798
799         * html/canvas/WebGLRenderingContext.cpp:
800         (WebCore::WebGLRenderingContext::linkProgram):
801         * platform/graphics/GraphicsContext3D.h: Rename areProgramSymbolsValid since it currently only serves one purpose.
802         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
803         (WebCore::GraphicsContext3D::precisionsMatch):
804
805 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
806
807         [Win] Unreviewed build fix after r160548
808
809         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Specify that we are
810         using the vs120_xp build target for Makefile-based projects.
811
812 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
813
814         Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
815         https://bugs.webkit.org/show_bug.cgi?id=125595
816
817         Reviewed by Timothy Hatcher.
818
819           - CodeGeneration changed to output Frontend and Backend dispatchers
820             in namespace Inspector. So update all the agent's appropriately.
821           - Update Derived Sources code generation to use the Scripts that had
822             moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
823             directly, but others have to use the Scripts exported by JSC
824             in JavaScriptCore's PrivateHeaders.
825           - Add ForwardingHeaders for the files generated in JavaScriptCore.
826           - Update the names of Inspector DerivedSources files, since they
827             were renamed to InspectorWeb*.
828
829         No new tests, this only moves code around. There are no functional changes.
830
831         * CMakeLists.txt:
832         * DerivedSources.make:
833         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
834         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
835         * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
836         * GNUmakefile.am:
837         * GNUmakefile.list.am:
838         * WebCore.vcxproj/WebCore.vcxproj:
839         * WebCore.vcxproj/WebCore.vcxproj.filters:
840         * WebCore.vcxproj/build-generated-files.sh:
841         * WebCore.xcodeproj/project.pbxproj:
842         Remove files, rename files, update code generation.
843
844         * make-generated-sources.sh:
845         Update this standalone developer script to fill in the new InspectorScripts variable.
846
847         * inspector/ConsoleMessage.h:
848         * inspector/InjectedScriptHost.cpp:
849         * inspector/InspectorAgent.cpp:
850         * inspector/InspectorAgent.h:
851         * inspector/InspectorApplicationCacheAgent.cpp:
852         * inspector/InspectorApplicationCacheAgent.h:
853         * inspector/InspectorCSSAgent.h:
854         * inspector/InspectorCanvasAgent.cpp:
855         * inspector/InspectorCanvasAgent.h:
856         * inspector/InspectorConsoleAgent.cpp:
857         * inspector/InspectorConsoleAgent.h:
858         * inspector/InspectorController.cpp:
859         * inspector/InspectorDOMAgent.cpp:
860         * inspector/InspectorDOMAgent.h:
861         * inspector/InspectorDOMDebuggerAgent.cpp:
862         * inspector/InspectorDOMDebuggerAgent.h:
863         * inspector/InspectorDOMStorageAgent.cpp:
864         * inspector/InspectorDOMStorageAgent.h:
865         * inspector/InspectorDatabaseAgent.cpp:
866         * inspector/InspectorDatabaseAgent.h:
867         * inspector/InspectorDatabaseResource.cpp:
868         * inspector/InspectorDatabaseResource.h:
869         * inspector/InspectorDebuggerAgent.cpp:
870         * inspector/InspectorDebuggerAgent.h:
871         * inspector/InspectorFrontendClientLocal.cpp:
872         * inspector/InspectorHeapProfilerAgent.h:
873         * inspector/InspectorIndexedDBAgent.cpp:
874         * inspector/InspectorIndexedDBAgent.h:
875         * inspector/InspectorInputAgent.h:
876         * inspector/InspectorLayerTreeAgent.cpp:
877         * inspector/InspectorLayerTreeAgent.h:
878         * inspector/InspectorMemoryAgent.cpp:
879         * inspector/InspectorMemoryAgent.h:
880         * inspector/InspectorPageAgent.cpp:
881         * inspector/InspectorPageAgent.h:
882         * inspector/InspectorProfilerAgent.cpp:
883         * inspector/InspectorProfilerAgent.h:
884         * inspector/InspectorResourceAgent.cpp:
885         * inspector/InspectorResourceAgent.h:
886         * inspector/InspectorRuntimeAgent.h:
887         * inspector/InspectorTimelineAgent.cpp:
888         * inspector/InspectorTimelineAgent.h:
889         * inspector/InspectorWorkerAgent.cpp:
890         * inspector/InspectorWorkerAgent.h:
891         * inspector/PageRuntimeAgent.h:
892         * inspector/ScriptCallFrame.cpp:
893         * inspector/WorkerInspectorController.cpp:
894         * inspector/WorkerRuntimeAgent.h:
895         Updates header names and class namespace changes.
896
897 2013-12-13  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
898
899         Adding RTCPeerConnectionErrorCallback
900         https://bugs.webkit.org/show_bug.cgi?id=125574
901
902         Reviewed by Eric Carlson.
903
904         According to the spec there should be a RTCPeerConnectionErrorCallback function type for createOffer/Answer,
905         setLocal/RemoteDescription and updateIce function calls. This callback must handle a DOMError object.
906
907         Existing tests were updated.
908
909         * CMakeLists.txt:
910         * GNUmakefile.list.am:
911         * Modules/mediastream/RTCPeerConnection.cpp:
912         (WebCore::RTCPeerConnection::createOffer):
913         (WebCore::RTCPeerConnection::createAnswer):
914         (WebCore::RTCPeerConnection::setLocalDescription):
915         (WebCore::RTCPeerConnection::setRemoteDescription):
916         (WebCore::RTCPeerConnection::addIceCandidate):
917         * Modules/mediastream/RTCErrorCallback.h: Removed.
918         * Modules/mediastream/RTCErrorCallback.idl: Removed.
919         * Modules/mediastream/RTCPeerConnection.h:
920         * Modules/mediastream/RTCPeerConnection.idl:
921         * Modules/mediastream/RTCPeerConnectionErrorCallback.h: Added.
922         * Modules/mediastream/RTCPeerConnectionErrorCallback.idl: Added.
923         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
924         (WebCore::RTCSessionDescriptionRequestImpl::create):
925         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
926         (WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
927         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
928         * Modules/mediastream/RTCVoidRequestImpl.cpp:
929         (WebCore::RTCVoidRequestImpl::create):
930         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
931         (WebCore::RTCVoidRequestImpl::requestFailed):
932         * Modules/mediastream/RTCVoidRequestImpl.h:
933         * WebCore.xcodeproj/project.pbxproj:
934         * platform/mediastream/RTCPeerConnectionHandler.cpp:
935         (WebCore::RTCPeerConnectionHandler::incompatibleConstraintsErrorName):
936         (WebCore::RTCPeerConnectionHandler::invalidSessionDescriptionErrorName):
937         (WebCore::RTCPeerConnectionHandler::incompatibleSessionDescriptionErrorName):
938         (WebCore::RTCPeerConnectionHandler::internalErrorName):
939         * platform/mediastream/RTCPeerConnectionHandler.h:
940         * platform/mock/RTCNotifiersMock.cpp:
941         (WebCore::SessionRequestNotifier::SessionRequestNotifier):
942         (WebCore::SessionRequestNotifier::fire):
943         (WebCore::VoidRequestNotifier::VoidRequestNotifier):
944         (WebCore::VoidRequestNotifier::fire):
945         * platform/mock/RTCNotifiersMock.h:
946         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
947         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
948         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
949
950 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
951
952         [Win] Switch WebKit solution to Visual Studio 2013
953         https://bugs.webkit.org/show_bug.cgi?id=125192
954
955         Reviewed by Anders Carlsson.
956
957         * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013
958         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
959         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto
960
961 2013-12-13  Alexey Proskuryakov  <ap@apple.com>
962
963         WebCrypto Key.usages should be ordered alphabetically
964         https://bugs.webkit.org/show_bug.cgi?id=125696
965
966         Reviewed by Darin Adler.
967
968         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::usages): Do it.
969
970 2013-12-13  Darin Adler  <darin@apple.com>
971
972         Make some optimizations for DOM bindings involving vectors
973         https://bugs.webkit.org/show_bug.cgi?id=125680
974
975         Reviewed by Andreas Kling.
976
977         * bindings/js/JSDOMBinding.h:
978         (WebCore::toJS): Removed unnecessary copying of vectors when converting them
979         to JavaScript values.
980         (WebCore::toRefPtrNativeArray): Use reserveInitialCapacity and uncheckedAppend.
981         (WebCore::toNativeArray): Ditto.
982         (WebCore::toNativeArguments): Ditto.
983
984 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
985
986         REGRESSION(r155784): [GTK] Some methods incorrectly removed in r155784 and deprecated in r158662
987         https://bugs.webkit.org/show_bug.cgi?id=125692
988
989         Reviewed by Martin Robinson.
990
991         In r155784 the build was fixed by skipping Console::profile() and
992         Console::profileEnd(), but the patch also skipped other methods
993         containing the profile method name. Those were incorrectly
994         deprecated in r158662 thinking that the property had been removed
995         in the idl.
996
997         * bindings/gobject/WebKitDOMDeprecated.cpp: Undeprecate
998         webkit_dom_html_head_element_get_profile and
999         webkit_dom_html_head_element_set_profile.
1000         * bindings/gobject/WebKitDOMDeprecated.h: Ditto.
1001         * bindings/gobject/WebKitDOMDeprecated.symbols: Ditto.
1002         * bindings/scripts/CodeGeneratorGObject.pm:
1003         (SkipFunction): Skip webkit_dom_console_profile and
1004         webkit_dom_console_profile_end.
1005
1006 2013-12-13  Rob Buis  <rob.buis@samsung.com>
1007
1008         Clean up SVGScriptElement
1009         https://bugs.webkit.org/show_bug.cgi?id=125527
1010
1011         Reviewed by Darin Adler.
1012
1013         From the Blink port of this bug it becomes clear that svg/dom/SVGScriptElement/script-set-href.svg and
1014         svg/dom/svg-element-attribute-js-null.xhtml still hit an assert in Debug because SVGNames::typeAttr can't
1015         be used with fastGetAttribute in all cases, because it can be animatable. However for SVGScriptElement
1016         it is not animatable, so make isAnimatableAttribute virtual (note Debug only method) and allow typeAttr
1017         in the SVGScriptElement case to be useable for fastGetAttribute.
1018
1019         Test: svg/dom/SVGScriptElement/script-type-attribute.svg
1020
1021         * svg/SVGElement.h:
1022         * svg/SVGScriptElement.cpp:
1023         (WebCore::SVGScriptElement::isAnimatableAttribute):
1024         * svg/SVGScriptElement.h:
1025
1026 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1027
1028         [GTK] Expose also webkit_dom_document_get_url
1029         https://bugs.webkit.org/show_bug.cgi?id=125691
1030
1031         Reviewed by Martin Robinson.
1032
1033         For some reason we expose the URL property, so it can be accessed
1034         with g_object_get(), but we have a special case to not provide a
1035         public getter.
1036
1037         * bindings/gobject/webkitdom.symbols: Add new symbol.
1038         * bindings/scripts/CodeGeneratorGObject.pm:
1039         (GenerateFunctions): Remove the special case of URL property.
1040
1041 2013-12-13  Andreas Kling  <akling@apple.com>
1042
1043         CSSFilterImageValue constructor should require both image and filter.
1044         <https://webkit.org/b/125056>
1045
1046         Make the CSSFilterImageValue::create() helper take both the image and
1047         filter CSSValues by PassRef since they should never be null.
1048
1049         Tweaked ComputedStyleExtractor::valueForFilter() to return a PassRef
1050         for this to work.
1051
1052         Reviewed by Anders Carlsson.
1053
1054 2013-12-12  Andreas Kling  <akling@apple.com>
1055
1056         StyleResolver::adjustRenderStyle() should take RenderStyle references.
1057         <https://webkit.org/b/125623>
1058
1059         This function doesn't handle null styles being passed, so prevent
1060         it at compile time.
1061
1062         Reviewed by Anders Carlsson.
1063
1064 2013-12-13  Darin Adler  <darin@apple.com>
1065
1066         Eliminate awkward virtualComputedStyle construction
1067         https://bugs.webkit.org/show_bug.cgi?id=125681
1068
1069         Reviewed by Andreas Kling.
1070
1071         * dom/Element.cpp:
1072         (WebCore::Element::computedStyle): Tweak coding style a bit.
1073
1074         * dom/Element.h: Marked computedStyle virtual and got rid of virtualComputedStyle.
1075         This fixes a bug that we would not call SVGElement::computedStyle if we called
1076         it through an Element pointer or reference. Not sure how to get test coverage for this.
1077
1078         * dom/Node.cpp:
1079         (WebCore::Node::computedStyle): Use a loop instead of recursive virtual calls.
1080
1081         * dom/Node.h: Made computedStyle virtual and got rid of virtualComputedStyle.
1082
1083         * svg/SVGElement.cpp:
1084         (WebCore::SVGElement::computedStyle): Tweak coding style a bit.
1085
1086         * svg/SVGElement.h: Made computedStyle virtual (and FINAL) and got rid fo
1087         virtualComputedStyle.
1088
1089 2013-12-13  Darin Adler  <darin@apple.com>
1090
1091         Fix a couple stray uses of RefPtr that should release
1092         https://bugs.webkit.org/show_bug.cgi?id=125679
1093
1094         Reviewed by Andreas Kling.
1095
1096         * css/CSSParser.cpp:
1097         (WebCore::CSSParser::parseFilter): Add calls to release, in
1098         one case rearranging the order of operations slightly so we
1099         don't release the pointer before using it.
1100
1101 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1102
1103         WebCrypto wrapKey operation doesn't check key usage
1104         https://bugs.webkit.org/show_bug.cgi?id=125675
1105
1106         Reviewed by Darin Adler.
1107
1108         Tests: crypto/subtle/unwrapKey-check-usage.html
1109                crypto/subtle/wrapKey-check-usage.html
1110
1111         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::wrapKey):
1112         Added accidentally omitted code. Other operations are fine.
1113
1114 2013-12-12  Darin Adler  <darin@apple.com>
1115
1116         Make some improvements in CSSImageGeneratorValue code
1117         https://bugs.webkit.org/show_bug.cgi?id=125676
1118
1119         Reviewed by Simon Fraser.
1120
1121         * css/CSSCrossfadeValue.cpp:
1122         (WebCore::subimageKnownToBeOpaque): Take a reference to the CSSValue, since
1123         it's known not to be null. Used checked cast.
1124         (WebCore::CSSCrossfadeValue::knownToBeOpaque): Updated to pass a reference.
1125
1126         * css/CSSImageGeneratorValue.cpp:
1127         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): Use
1128         make_unique instead of adoptPtr.
1129         (WebCore::CSSImageGeneratorValue::subimageIsPending): Use checked cast.
1130         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto, also
1131         use nullptr.
1132
1133         * css/CSSImageGeneratorValue.h: Removed unneeded includes, added some forward
1134         declarations, used unique_ptr instead of OwnPtr, and used CSS_VALUE_TYPE_CASTS
1135         macro to create cast functions.
1136
1137         * css/CSSValue.cpp: Removed unneeded include of CSSImageGeneratorValue.h.
1138
1139         * css/StyleResolver.cpp:
1140         (WebCore::StyleResolver::State::clear): Use nullptr instead of 0.
1141         (WebCore::StyleResolver::applyProperty): Use checked cast and pass references
1142         instead of pointers to StyleGeneratedImage::create.
1143         (WebCore::StyleResolver::styleImage): Use checked cast and pass references
1144         instead of pointers to generatedOrPendingFromValue.
1145         (WebCore::StyleResolver::generatedOrPendingFromValue): Take the value as a
1146         reference instead of a pointer.
1147         (WebCore::StyleResolver::loadPendingImage): Pass a refernece instead of a
1148         pointer to StyleGeneratedImage::create.
1149         (WebCore::StyleResolver::loadPendingImages): Use auto for iteration instead of
1150         a lot type name.
1151
1152         * css/StyleResolver.h: Changed generatedOrPendingFromValue to take the value
1153         as a reference instead of a pointer.
1154
1155         * page/animation/CSSPropertyAnimation.cpp:
1156         (WebCore::blendFilter): Pass a reference insted of a pointer to
1157         StyleGeneratedImage::create.
1158         (WebCore::crossfadeBlend): Ditto.
1159         (WebCore::blendFunc): Ditto. Also use references for local variables.
1160
1161         * rendering/style/StyleGeneratedImage.cpp:
1162         (WebCore::StyleGeneratedImage::StyleGeneratedImage): Use PassRef instead of
1163         PassRefPtr for the argument type.
1164         (WebCore::StyleGeneratedImage::cssValue): Updated since m_imageGeneratorValue
1165         is now a Ref instead of a RefPtr. Sadly this requires a const_cast that we can
1166         come back and get rid of later.
1167         (WebCore::StyleGeneratedImage::imageSize): Ditto.
1168         (WebCore::StyleGeneratedImage::image): Ditto.
1169
1170         * rendering/style/StyleGeneratedImage.h: Changed create function and constructor
1171         to take a PassRef. Made imageValue non-const since it returns a non-const value,
1172         to be consistent with "conceptual const". Changed m_imageGeneratorValue to be a
1173         Ref instead of a RefPtr.
1174
1175         * rendering/style/StyleImage.h: Made WrappedImagePtr be const void*, since it's
1176         a pointer used only for equality checks. Not a great idiom, but fine to use a
1177         const pointer instead of non-const, and avoids the const_cast we'd otherwise
1178         need in StyleGeneratedImage::data.
1179
1180 2013-12-12  KyungTae Kim  <ktf.kim@samsung.com>
1181
1182         Improve the find word boundary performance
1183         https://bugs.webkit.org/show_bug.cgi?id=125619
1184
1185         In endWordBoundary case, the textBreakPrevious call in findWordBoundary is unnecessary.
1186         So use separate function for endWordBoundary can improve the performance.
1187
1188         Reviewed by Darin Adler.
1189
1190         No tests because no operation changes.
1191
1192         * editing/VisibleUnits.cpp: Use findEndWordBoundary in endWordBoundary
1193         (WebCore::endWordBoundary):
1194         * platform/text/TextBoundaries.cpp: Add findEndWordBoundary function
1195         (WebCore::findEndWordBoundary):
1196         * platform/text/TextBoundaries.h:
1197         * platform/text/mac/TextBoundaries.mm: Add findEndWordBoundary function
1198         (WebCore::findEndWordBoundary):
1199
1200 2013-12-12  Benjamin Poulain  <bpoulain@apple.com>
1201
1202         Fix a silly mistake of r160467
1203         https://bugs.webkit.org/show_bug.cgi?id=125657
1204
1205         Reviewed by Alexey Proskuryakov.
1206
1207         Fix a typo. The validity check was missing the logical not.
1208
1209         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1210         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1211         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1212         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
1213         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
1214         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
1215         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
1216         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
1217         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
1218         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
1219         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1220         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1221
1222 2013-12-12  Tim Horton  <timothy_horton@apple.com>
1223
1224         [wk2] Handle pinch-to-zoom gesture
1225         https://bugs.webkit.org/show_bug.cgi?id=125604
1226
1227         Reviewed by Simon Fraser.
1228
1229         * WebCore.exp.in:
1230         Export some TransformationMatrix functions.
1231
1232         * WebCore.xcodeproj/project.pbxproj:
1233         Make some headers private so that RenderLayerCompositor/Backing can be used from WebKit2.
1234
1235         * rendering/RenderLayerCompositor.h:
1236         (WebCore::RenderLayerCompositor::layerForContentShadow):
1237         Add a getter for the content shadow layer.
1238
1239 2013-12-12  Brady Eidson  <beidson@apple.com>
1240
1241         DatabaseProcess IndexedDB: Establish a metadata backing store on disk
1242         https://bugs.webkit.org/show_bug.cgi?id=125258
1243
1244         Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton.
1245
1246         Teach CrossThreadCopier how to handle IDBDatabaseMetadata.
1247
1248         * CMakeLists.txt:
1249         * GNUmakefile.list.am:
1250         * WebCore.exp.in:
1251         * WebCore.xcodeproj/project.pbxproj:
1252
1253         * Modules/indexeddb/IDBDatabaseMetadata.cpp: Added.
1254         (WebCore::IDBDatabaseMetadata::isolatedCopy):
1255         (WebCore::IDBObjectStoreMetadata::isolatedCopy):
1256         (WebCore::IDBIndexMetadata::isolatedCopy):
1257         * Modules/indexeddb/IDBDatabaseMetadata.h:
1258
1259         * Modules/indexeddb/IDBKeyPath.cpp:
1260         (WebCore::IDBKeyPath::isolatedCopy):
1261         * Modules/indexeddb/IDBKeyPath.h:
1262
1263         * platform/CrossThreadCopier.cpp:
1264         (WebCore::::copy): Add an IDBDatabaseMetadata specialization.
1265         * platform/CrossThreadCopier.h:
1266
1267 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1268
1269         Add support for RSAES-PKCS1-v1_5
1270         https://bugs.webkit.org/show_bug.cgi?id=125647
1271
1272         Build fix.
1273
1274         * crypto/CommonCryptoUtilities.h: Declare a newly used private constant.
1275
1276 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1277
1278         Add support for RSAES-PKCS1-v1_5
1279         https://bugs.webkit.org/show_bug.cgi?id=125647
1280
1281         Reviewed by Anders Carlsson.
1282
1283         Tests: crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html
1284                crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
1285
1286         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
1287         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
1288         Removed meaningless parameters arguments from private functions. The base arguments
1289         class is always empty.
1290
1291         * WebCore.xcodeproj/project.pbxproj:
1292         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1293         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
1294         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
1295         * bindings/js/JSCryptoKeySerializationJWK.cpp:
1296         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
1297         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
1298         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
1299         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: Added.
1300         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::CryptoAlgorithmRSAES_PKCS1_v1_5):
1301         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::~CryptoAlgorithmRSAES_PKCS1_v1_5):
1302         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::create):
1303         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::identifier):
1304         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
1305         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
1306         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
1307         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
1308         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
1309         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: Added.
1310         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp: Added.
1311         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
1312         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
1313         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
1314         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
1315         Added support for this algorithm.
1316
1317 2013-12-12  Andreas Kling  <akling@apple.com>
1318
1319         [Mac] Stop not caching HTTP resources with "Vary" header in response.
1320         <https://webkit.org/b/125483>
1321         <rdar://problem/11781097>
1322
1323         Remove the workaround preventing resources with the "Vary" header
1324         from going into cache, as the CFNetwork cache has supported this
1325         for quite a while now.
1326
1327         31.5 MB progression on Membuster3, because we can now mmap those
1328         resources from disk once they are in the cache.
1329
1330         We keep the workaround on PLATFORM(WIN) for now.
1331
1332         Reviewed by Antti Koivisto.
1333
1334 2013-12-12  Sam Weinig  <sam@webkit.org>
1335
1336         Replace uses of WTF::BitArray with std::bitset
1337         https://bugs.webkit.org/show_bug.cgi?id=125642
1338
1339         Reviewed by Anders Carlsson.
1340
1341         * css/CSSParser.cpp:
1342         (WebCore::filterProperties):
1343         (WebCore::CSSParser::createStyleProperties):
1344         * css/StyleProperties.cpp:
1345         (WebCore::StyleProperties::asText):
1346
1347 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1348
1349         Public key in a generated KeyPair should always be extractable
1350         https://bugs.webkit.org/show_bug.cgi?id=125643
1351
1352         Reviewed by Sam Weinig.
1353
1354         The spec doesn't explain how generateKey works with key pairs (there are open bugs
1355         about that). Making public keys non-extractable makes no sense one way or another.
1356
1357         Test: crypto/subtle/rsa-oaep-generate-non-extractable-key.html
1358
1359         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair):
1360
1361 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1362
1363         Make algorithm.name return registered name, not normalized one
1364         https://bugs.webkit.org/show_bug.cgi?id=125641
1365
1366         Reviewed by Anders Carlsson.
1367
1368         Currently, WebCrypto editor's draft stipulates that algorithm name is lowercased
1369         as part of normalization.
1370
1371         But it makes little sense to register algorithms as mixed (mostly upper) case, yet
1372         return the name lowercased. Other implementations don't bother respecting this,
1373         and signs are that the spec will change.
1374
1375         I'd like to match other implementations here, because sticking to the spec only
1376         makes us fail 3rd party test suites for no good reason.
1377
1378         Updated many existing tests.
1379
1380         * crypto/CryptoAlgorithmRegistry.cpp:
1381         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
1382         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
1383         * crypto/CryptoAlgorithmRegistry.h:
1384         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
1385         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
1386         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
1387         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
1388         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
1389         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
1390         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
1391         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
1392         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
1393         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
1394
1395 2013-12-12  Csaba Osztrogonác  <ossy@webkit.org>
1396
1397         Move CertificateInfo to WebCore
1398         https://bugs.webkit.org/show_bug.cgi?id=124720
1399
1400         Reviewed by Darin Adler.
1401
1402         Based on the patch by Kwang Yul Seo <skyul@company100.net>
1403
1404         * GNUmakefile.list.am:
1405         * PlatformEfl.cmake:
1406         * PlatformGTK.cmake:
1407         * WebCore.exp.in:
1408         * WebCore.xcodeproj/project.pbxproj:
1409         * platform/network/mac/CertificateInfo.h: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.h.
1410         (WebCore::CertificateInfo::setCertificateChain): Added, because WebCoreArgumentCoders needs it.
1411         * platform/network/mac/CertificateInfoMac.mm: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.mm.
1412         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersMac.mm.
1413         * platform/network/soup/CertificateInfo.cpp: Copied from Source/WebKit2/Shared/WebCertificateInfo.h.
1414         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersSoup.cpp.
1415         * platform/network/soup/CertificateInfo.h: Renamed from Source/WebKit2/Shared/soup/CertificateInfo.h.
1416         (WebCore::CertificateInfo::setCertificate): Added, because WebCoreArgumentCoders needs it.
1417         (WebCore::CertificateInfo::setTLSErrors): Added, because WebCoreArgumentCoders needs it.
1418
1419 2013-12-12  Commit Queue  <commit-queue@webkit.org>
1420
1421         Unreviewed, rolling out r160417.
1422         http://trac.webkit.org/changeset/160417
1423         https://bugs.webkit.org/show_bug.cgi?id=125629
1424
1425         The patch is causing crashes (Requested by zdobersek1 on
1426         #webkit).
1427
1428         * accessibility/AXObjectCache.cpp:
1429         (WebCore::AXObjectCache::~AXObjectCache):
1430         (WebCore::AXObjectCache::remove):
1431         * accessibility/AXObjectCache.h:
1432         (WebCore::AXObjectCache::detachWrapper):
1433         * accessibility/atk/AXObjectCacheAtk.cpp:
1434         (WebCore::AXObjectCache::detachWrapper):
1435         (WebCore::AXObjectCache::attachWrapper):
1436         (WebCore::AXObjectCache::postPlatformNotification):
1437         * accessibility/ios/AXObjectCacheIOS.mm:
1438         (WebCore::AXObjectCache::detachWrapper):
1439         * accessibility/mac/AXObjectCacheMac.mm:
1440         (WebCore::AXObjectCache::detachWrapper):
1441         * accessibility/win/AXObjectCacheWin.cpp:
1442         (WebCore::AXObjectCache::detachWrapper):
1443
1444 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
1445
1446         Remove a few more guards mistakenly added in r160367
1447
1448         Reviewed by Carlos Garcia Campos
1449
1450         r160367 was too liberal in hiding APIs from the GObject DOM bindings.
1451         We should expose the BatteryManager and the text and audio tracks.
1452
1453         * Modules/battery/BatteryManager.idl:
1454         * html/HTMLMediaElement.idl:
1455
1456 2013-12-11  Darin Adler  <darin@apple.com>
1457
1458         StylePendingImage needs to correctly manage the CSSValue pointer lifetime
1459         https://bugs.webkit.org/show_bug.cgi?id=125468
1460
1461         Reviewed by Andreas Kling.
1462
1463         Test: fast/css/pending-image-crash.xhtml
1464
1465         Disconnect the reference counted StylePendingImage from the CSSValue that owns
1466         it when it's not needed any more, otherwise we could end up using a pointer
1467         that might no longer be valid.
1468
1469         * css/CSSCursorImageValue.cpp:
1470         (WebCore::CSSCursorImageValue::detachPendingImage): Added. Calls detachFromCSSValue
1471         on the current image if it is a StylePendingImage.
1472         (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Call detachPendingImage.
1473         (WebCore::CSSCursorImageValue::cachedImage): Call detachPendingImage before changing
1474         m_image to a new value.
1475         (WebCore::CSSCursorImageValue::clearCachedImage): Ditto.
1476         * css/CSSCursorImageValue.h: Added detachPendingImage.
1477
1478         * css/CSSImageSetValue.cpp:
1479         (WebCore::CSSImageSetValue::detachPendingImage): Added. Calls detachFromCSSValue
1480         on the current image set if it is a StylePendingImage.
1481         (WebCore::CSSImageSetValue::~CSSImageSetValue): Call detachPendingImage.
1482         (WebCore::CSSImageSetValue::cachedImageSet): Call detachPendingImage before changing
1483         m_imageSet to a new value.
1484         * css/CSSImageSetValue.h: Added detachPendingImage.
1485
1486         * css/CSSImageValue.cpp:
1487         (WebCore::CSSImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the
1488         current image if it is a StylePendingImage.
1489         (WebCore::CSSImageValue::~CSSImageValue): Call detachPendingImage.
1490         (WebCore::CSSImageValue::cachedImage): Call detachPendingImage before changing m_image
1491         to a new value.
1492         * css/CSSImageValue.h: Added detachPendingImage.
1493
1494         * rendering/style/StylePendingImage.h:
1495         (WebCore::StylePendingImage::cssImageValue): Added a null check.
1496         (WebCore::StylePendingImage::cssImageGeneratorValue): Added a null check.
1497         (WebCore::StylePendingImage::cssCursorImageValue): Added a null check.
1498         (WebCore::StylePendingImage::cssImageSetValue): Added a null check.
1499         (WebCore::StylePendingImage::detachFromCSSValue): Added. Sets m_value to null since
1500         the style is no longer using this StylePendingImage.
1501         (WebCore::StylePendingImage::data): Changed to use the "this" pointer since all we
1502         need is some arbitrary pointer uniquely identifying the image. Before loading the image,
1503         we have no suitable weak identifier, so it suffices to use the unique pointer to each
1504         StylePendingImage object. This function is used only in a limited way; it would be nice
1505         to find a way to make the code less strange long term.
1506
1507 2013-12-11  Darin Adler  <darin@apple.com>
1508
1509         Remove some unneeded code noticed while looking at StylePendingImage
1510         https://bugs.webkit.org/show_bug.cgi?id=125618
1511
1512         Reviewed by Andreas Kling.
1513
1514         * css/StyleResolver.cpp:
1515         (WebCore::StyleResolver::loadPendingImage): Removed redundant function calls.
1516
1517         * rendering/RenderImageResource.cpp: Removed unneeded nullImage and
1518         usesImageContainerSize member functions.
1519         (WebCore::RenderImageResource::image): Use Image::nullImage directly instead of
1520         through RenderImageResourceImage::nullImage.
1521
1522         * rendering/RenderImageResource.h: Removed unneeded usesImageContainerSize
1523         and nullImage functions. Also removed unneeded includes.
1524
1525         * rendering/RenderImageResourceStyleImage.h: Removed unneeded
1526         usesImageContainerSize override. Nobody was calling it.
1527
1528 2013-12-11  Benjamin Poulain  <bpoulain@apple.com>
1529
1530         Add the CFNetwork implementation of the asynchronous ResourceHandle
1531         https://bugs.webkit.org/show_bug.cgi?id=124440
1532
1533         Reviewed by Alexey Proskuryakov.
1534
1535         Add a second subclass of ResourceHandleCFURLConnectionDelegate: ResourceHandleCFURLConnectionDelegateWithOperationQueue.
1536         The difference is those objects handle the network callback on a different queue.
1537
1538         Some common code has been refactored in ResourceHandleCFURLConnectionDelegate to reduce duplicated code.
1539
1540         The initialization of the request and connection is moved to the subclass to clean up initialization.
1541
1542         * WebCore.xcodeproj/project.pbxproj:
1543         * platform/network/ResourceHandle.h:
1544         * platform/network/ResourceHandleClient.cpp:
1545         (WebCore::ResourceHandleClient::willCacheResponseAsync):
1546         * platform/network/ResourceHandleClient.h:
1547         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: Added.
1548         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::ResourceHandleCFURLConnectionDelegateWithOperationQueue):
1549         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::~ResourceHandleCFURLConnectionDelegateWithOperationQueue):
1550         (WebCore::connectionWasCancelled):
1551         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
1552         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupConnectionScheduling):
1553         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1554         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1555         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
1556         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
1557         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
1558         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
1559         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
1560         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
1561         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
1562         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1563         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1564         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillSendRequest):
1565         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse):
1566         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueShouldUseCredentialStorage):
1567         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillCacheResponse):
1568         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthenticateAgainstProtectionSpace):
1569         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: Copied from Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h.
1570         * platform/network/cf/ResourceHandleCFNet.cpp:
1571         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1572         (WebCore::ResourceHandle::createCFURLConnection):
1573         (WebCore::ResourceHandle::start):
1574         (WebCore::ResourceHandle::shouldUseCredentialStorage):
1575         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
1576         (WebCore::ResourceHandle::continueWillSendRequest):
1577         (WebCore::ResourceHandle::continueDidReceiveResponse):
1578         (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
1579         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
1580         (WebCore::ResourceHandle::continueWillCacheResponse):
1581         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1582         (WebCore::ResourceHandleCFURLConnectionDelegate::releaseHandle):
1583         (WebCore::ResourceHandleCFURLConnectionDelegate::synthesizeRedirectResponseIfNecessary):
1584         (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
1585         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1586         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1587         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
1588         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
1589         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
1590         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillSendRequest):
1591         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueDidReceiveResponse):
1592         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueShouldUseCredentialStorage):
1593         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillCacheResponse):
1594         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueCanAuthenticateAgainstProtectionSpace):
1595         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
1596
1597 2013-12-11  David Kilzer  <ddkilzer@apple.com>
1598
1599         Define m_hasBadParent in InlineBox if defined(ADDRESS_SANITIZER)
1600         <http://webkit.org/b/125329>
1601
1602         Reviewed by Darin Adler.
1603
1604         No tests since this is a build fix for:
1605
1606             $ ./Tools/Scripts/build-webkit --release OTHER_CFLAGS="$inherited -DADDRESS_SANITIZER=1"
1607
1608         * rendering/InlineBox.cpp:
1609         * rendering/InlineBox.h:
1610         - Replace ASSERT_DISABLED use with
1611           ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for m_hasBadParent.
1612
1613         * rendering/InlineFlowBox.cpp:
1614         (WebCore::InlineFlowBox::~InlineFlowBox):
1615         - Use !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED instead of
1616           #ifndef NDEBUG since this calls setHasBadParent().
1617         (WebCore::InlineFlowBox::checkConsistency):
1618         - Move ASSERT(!m_hasBadChildList) outside of
1619           #if CHECK_CONSISTENCY and change to
1620           ASSERT_WITH_SECURITY_IMPLICATION(!m_hasBadChildList).
1621
1622         * rendering/InlineFlowBox.h:
1623         (WebCore::InlineFlowBox::InlineFlowBox):
1624         (WebCore::InlineFlowBox::setHasBadChildList):
1625         - Change #ifndef NDEBUG to
1626           #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for code using
1627           m_hasBadChildList.
1628
1629 2013-12-11  Ralph Thomas  <ralpht@gmail.com>
1630
1631         [WebGL] Fix build on GL ES 2.0 targets after r160119
1632         https://bugs.webkit.org/show_bug.cgi?id=125541
1633
1634         Reviewed by Brent Fulgham.
1635
1636         GL ES 2.0 doesn't define GL_HALF_FLOAT_ARB, so pass through HALF_FLOAT_OES (which is defined for GL ES 2.0).
1637         This change also reverts r160324 which incorrectly defined GL_HALF_FLOAT_ARB for the Windows ANGLE target.
1638
1639         No new tests, no change in functionality.
1640
1641         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1642         (WebCore::GraphicsContext3D::texSubImage2D):
1643
1644 2013-12-11  Joseph Pecoraro  <pecoraro@apple.com>
1645
1646         Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
1647         https://bugs.webkit.org/show_bug.cgi?id=125324
1648
1649         Reviewed by Timothy Hatcher.
1650
1651         Part 1: Push down core inspector classes.
1652
1653           - Move InspectAgentBase, InspectorAgentRegistry, InspectorBackendDispatcher, InspectorValues
1654             down to JavaScriptCore and into the Inspector namespace.
1655           - Add forwarding headers for JavaScriptCore/inspector files.
1656           - Use the Inspector namespace where appropriate.
1657           - Rename InspectorBaseAgent to InspectorAgentBase for clarity.
1658
1659         Part 2: Push Script wrapper classes down into JavaScriptCore/bindings.
1660
1661           - Move ScriptObject and ScriptValue into JavaScriptCore but namespace Deprecated
1662           - Add forwarding headers
1663           - Use Deprecated::ScriptObject and Deprecated::ScriptValue everywhere.
1664
1665         Part 3: Push Down ScriptFunctionCall
1666
1667           - Move ScriptFunctionCall to JavaScriptCore/bindings into namespace Deprecated.
1668           - Give constructor a function to all for a different JSC::call, because
1669             WebCore ScriptFunctionCall's use JSMainThreadExecState when isMainThread.
1670           - Prefer Deprecated::ScriptFunctionCall everywhere it is used in WebCore.
1671
1672         Part 4: Extract InspectorTypeBuilder helper functions
1673
1674           - There is a chunk of InspectorTypeBuilder that never changes. Extract it into
1675             its own file, InspectorTypeBuilder.h in JSC/inspector, Inspector namespace.
1676           - This moves TypeBuilder from namespace WebCore to namespace Inspector
1677           - Rename the WebCore generated InspectorTypeBuilder to InspectorWebTypeBuilders,
1678             eventually the CodeGenerator script will do this for more then TypeBuilders
1679             and there will be "JS" TypeBuilders and "Web" TypeBuilders files.
1680
1681         No new tests. No change in functionality, just moving things around.
1682
1683         * CMakeLists.txt:
1684         * ForwardingHeaders/bindings/ScriptFunctionCall.h: Added.
1685         * ForwardingHeaders/bindings/ScriptObject.h: Added.
1686         * ForwardingHeaders/bindings/ScriptValue.h: Added.
1687         * ForwardingHeaders/inspector/InspectorAgentBase.h: Added.
1688         * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Added.
1689         * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Added.
1690         * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Added.
1691         * ForwardingHeaders/inspector/InspectorValues.h: Added.
1692         * GNUmakefile.am:
1693         * GNUmakefile.list.am:
1694         * Modules/indexeddb/IDBAny.cpp:
1695         (WebCore::IDBAny::scriptValue):
1696         (WebCore::IDBAny::IDBAny):
1697         * Modules/indexeddb/IDBAny.h:
1698         * Modules/indexeddb/IDBCursor.cpp:
1699         (WebCore::IDBCursor::key):
1700         (WebCore::IDBCursor::primaryKey):
1701         (WebCore::IDBCursor::value):
1702         (WebCore::IDBCursor::update):
1703         (WebCore::IDBCursor::continueFunction):
1704         (WebCore::IDBCursor::setValueReady):
1705         * Modules/indexeddb/IDBCursor.h:
1706         * Modules/indexeddb/IDBFactory.cpp:
1707         (WebCore::IDBFactory::cmp):
1708         * Modules/indexeddb/IDBFactory.h:
1709         * Modules/indexeddb/IDBIndex.cpp:
1710         (WebCore::IDBIndex::openCursor):
1711         (WebCore::IDBIndex::count):
1712         (WebCore::IDBIndex::openKeyCursor):
1713         (WebCore::IDBIndex::get):
1714         (WebCore::IDBIndex::getKey):
1715         * Modules/indexeddb/IDBIndex.h:
1716         (WebCore::IDBIndex::openCursor):
1717         (WebCore::IDBIndex::openKeyCursor):
1718         * Modules/indexeddb/IDBKeyRange.cpp:
1719         (WebCore::IDBKeyRange::lowerValue):
1720         (WebCore::IDBKeyRange::upperValue):
1721         (WebCore::IDBKeyRange::only):
1722         (WebCore::IDBKeyRange::lowerBound):
1723         (WebCore::IDBKeyRange::upperBound):
1724         (WebCore::IDBKeyRange::bound):
1725         * Modules/indexeddb/IDBKeyRange.h:
1726         (WebCore::IDBKeyRange::lowerBound):
1727         (WebCore::IDBKeyRange::upperBound):
1728         (WebCore::IDBKeyRange::bound):
1729         * Modules/indexeddb/IDBObjectStore.cpp:
1730         (WebCore::IDBObjectStore::get):
1731         (WebCore::generateIndexKeysForValue):
1732         (WebCore::IDBObjectStore::add):
1733         (WebCore::IDBObjectStore::put):
1734         (WebCore::IDBObjectStore::deleteFunction):
1735         (WebCore::IDBObjectStore::openCursor):
1736         (WebCore::IDBObjectStore::count):
1737         * Modules/indexeddb/IDBObjectStore.h:
1738         * Modules/indexeddb/IDBRequest.cpp:
1739         (WebCore::IDBRequest::setResultCursor):
1740         (WebCore::IDBRequest::onSuccess):
1741         (WebCore::IDBRequest::onSuccessInternal):
1742         * Modules/indexeddb/IDBRequest.h:
1743         * Modules/mediastream/CapabilityRange.cpp:
1744         (WebCore::scriptValue):
1745         (WebCore::CapabilityRange::min):
1746         (WebCore::CapabilityRange::max):
1747         * Modules/mediastream/CapabilityRange.h:
1748         * Modules/mediastream/MediaTrackConstraint.h:
1749         * Modules/mediastream/RTCIceCandidate.cpp:
1750         * Modules/plugins/QuickTimePluginReplacement.cpp:
1751         * Modules/plugins/QuickTimePluginReplacement.h:
1752         * UseJSC.cmake:
1753         * WebCore.exp.in:
1754         * WebCore.vcxproj/WebCore.vcxproj:
1755         * WebCore.vcxproj/WebCore.vcxproj.filters:
1756         * WebCore.xcodeproj/project.pbxproj:
1757         * bindings/js/Dictionary.h:
1758         (WebCore::Dictionary::getEventListener):
1759         * bindings/js/IDBBindingUtilities.cpp:
1760         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
1761         (WebCore::injectIDBKeyIntoScriptValue):
1762         (WebCore::canInjectIDBKeyIntoScriptValue):
1763         (WebCore::deserializeIDBValue):
1764         (WebCore::deserializeIDBValueBuffer):
1765         (WebCore::idbKeyToScriptValue):
1766         (WebCore::scriptValueToIDBKey):
1767         * bindings/js/IDBBindingUtilities.h:
1768         * bindings/js/JSBindingsAllInOne.cpp:
1769         * bindings/js/JSDictionary.cpp:
1770         (WebCore::JSDictionary::convertValue):
1771         * bindings/js/JSDictionary.h:
1772         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1773         (WebCore::JSHTMLCanvasElement::getContext):
1774         * bindings/js/JSInjectedScriptHostCustom.cpp:
1775         (WebCore::InjectedScriptHost::scriptValueAsNode):
1776         (WebCore::InjectedScriptHost::nodeAsScriptValue):
1777         (WebCore::JSInjectedScriptHost::inspectedObject):
1778         (WebCore::JSInjectedScriptHost::inspect):
1779         * bindings/js/JSInjectedScriptManager.cpp:
1780         (WebCore::InjectedScriptManager::createInjectedScript):
1781         * bindings/js/JSMainThreadExecState.cpp:
1782         (WebCore::functionCallHandlerFromAnyThread):
1783         * bindings/js/JSMainThreadExecState.h:
1784         (WebCore::JSMainThreadExecState::currentState):
1785         * bindings/js/JSMessageEventCustom.cpp:
1786         (WebCore::JSMessageEvent::data):
1787         (WebCore::handleInitMessageEvent):
1788         * bindings/js/ScheduledAction.cpp:
1789         * bindings/js/ScriptCallStackFactory.cpp:
1790         (WebCore::createScriptArguments):
1791         * bindings/js/ScriptController.cpp:
1792         (WebCore::ScriptController::evaluateInWorld):
1793         (WebCore::ScriptController::evaluate):
1794         (WebCore::ScriptController::executeScriptInWorld):
1795         (WebCore::ScriptController::executeScript):
1796         (WebCore::ScriptController::executeIfJavaScriptURL):
1797         * bindings/js/ScriptController.h:
1798         * bindings/js/ScriptDebugServer.cpp:
1799         (WebCore::ScriptDebugServer::setScriptSource):
1800         (WebCore::ScriptDebugServer::updateCallStack):
1801         (WebCore::ScriptDebugServer::dispatchDidPause):
1802         (WebCore::ScriptDebugServer::runScript):
1803         * bindings/js/ScriptDebugServer.h:
1804         * bindings/js/ScriptGlobalObject.cpp: Renamed from Source/WebCore/bindings/js/ScriptObject.cpp.
1805         (WebCore::handleException):
1806         (WebCore::ScriptGlobalObject::set):
1807         (WebCore::ScriptGlobalObject::get):
1808         (WebCore::ScriptGlobalObject::remove):
1809         * bindings/js/ScriptGlobalObject.h: Copied from Source/WebCore/inspector/ScriptCallStack.h.
1810         (WebCore::ScriptGlobalObject::ScriptGlobalObject):
1811         * bindings/js/ScriptObject.h: Removed.
1812         * bindings/js/ScriptProfile.cpp:
1813         (WebCore::buildInspectorObjectFor):
1814         (WebCore::ScriptProfile::buildInspectorObjectForHead):
1815         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
1816         * bindings/js/ScriptProfile.h:
1817         * bindings/js/ScriptProfiler.cpp:
1818         (WebCore::ScriptProfiler::objectByHeapObjectId):
1819         (WebCore::ScriptProfiler::getHeapObjectId):
1820         * bindings/js/ScriptProfiler.h:
1821         * bindings/js/ScriptState.h:
1822         * bindings/js/SerializedScriptValue.cpp:
1823         (WebCore::SerializedScriptValue::deserializeForInspector):
1824         (WebCore::SerializedScriptValue::serialize):
1825         (WebCore::SerializedScriptValue::deserialize):
1826         * bindings/js/SerializedScriptValue.h:
1827         * bindings/js/WorkerScriptController.cpp:
1828         (WebCore::WorkerScriptController::evaluate):
1829         (WebCore::WorkerScriptController::setException):
1830         * bindings/js/WorkerScriptController.h:
1831         * bindings/scripts/CodeGeneratorJS.pm:
1832         * bindings/scripts/test/JS/JSTestObj.cpp:
1833         (WebCore::setJSTestObjAnyAttribute):
1834         * dom/CustomEvent.cpp:
1835         (WebCore::CustomEvent::initCustomEvent):
1836         * dom/CustomEvent.h:
1837         (WebCore::CustomEvent::detail):
1838         * dom/MessageEvent.cpp:
1839         (WebCore::MessageEvent::MessageEvent):
1840         (WebCore::MessageEvent::initMessageEvent):
1841         * dom/MessageEvent.h:
1842         (WebCore::MessageEvent::create):
1843         (WebCore::MessageEvent::dataAsScriptValue):
1844         * dom/PopStateEvent.h:
1845         (WebCore::PopStateEvent::state):
1846         * dom/ScriptElement.cpp:
1847         * html/HTMLMediaElement.cpp:
1848         * html/parser/XSSAuditor.cpp:
1849         * html/parser/XSSAuditorDelegate.cpp:
1850         * inspector/CodeGeneratorInspector.py:
1851         (RawTypes.BaseType.get_raw_validator_call_text):
1852         (RawTypes.Object.get_array_item_raw_c_type_text):
1853         (RawTypes.Any.get_array_item_raw_c_type_text):
1854         (RawTypes.Array.get_array_item_raw_c_type_text):
1855         (CommandReturnPassModel.OptOutput.get_return_var_type):
1856         (CommandReturnPassModel.OptOutput.get_output_parameter_type):
1857         (TypeModel.ExactlyInt.get_input_param_type_text):
1858         (TypeModel.ExactlyInt.get_opt_output_type_):
1859         (TypeModel.init_class):
1860         (TypeBindings.create_named_type_declaration.Helper):
1861         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
1862         (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
1863         (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder):
1864         (Inspector):
1865         (ArrayBinding.get_array_item_c_type_text):
1866         (Generator.go):
1867         (Generator.process_command):
1868         * inspector/CodeGeneratorInspectorStrings.py:
1869         (void):
1870         (InspectorFrontend_h):
1871         (InspectorBackendDispatchers_h):
1872         * inspector/ConsoleMessage.cpp:
1873         (WebCore::messageSourceValue):
1874         (WebCore::messageTypeValue):
1875         (WebCore::messageLevelValue):
1876         (WebCore::ConsoleMessage::addToFrontend):
1877         * inspector/ConsoleMessage.h:
1878         * inspector/ContentSearchUtils.cpp:
1879         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
1880         (WebCore::ContentSearchUtils::searchInTextByLines):
1881         * inspector/ContentSearchUtils.h:
1882         * inspector/InjectedScript.cpp:
1883         (WebCore::InjectedScript::InjectedScript):
1884         (WebCore::InjectedScript::evaluate):
1885         (WebCore::InjectedScript::callFunctionOn):
1886         (WebCore::InjectedScript::evaluateOnCallFrame):
1887         (WebCore::InjectedScript::getFunctionDetails):
1888         (WebCore::InjectedScript::getProperties):
1889         (WebCore::InjectedScript::getInternalProperties):
1890         (WebCore::InjectedScript::nodeForObjectId):
1891         (WebCore::InjectedScript::releaseObject):
1892         (WebCore::InjectedScript::wrapCallFrames):
1893         (WebCore::InjectedScript::wrapObject):
1894         (WebCore::InjectedScript::wrapTable):
1895         (WebCore::InjectedScript::wrapNode):
1896         (WebCore::InjectedScript::findObjectById):
1897         (WebCore::InjectedScript::inspectNode):
1898         (WebCore::InjectedScript::releaseObjectGroup):
1899         (WebCore::InjectedScript::nodeAsScriptValue):
1900         * inspector/InjectedScript.h:
1901         * inspector/InjectedScriptBase.cpp:
1902         (WebCore::InjectedScriptBase::InjectedScriptBase):
1903         (WebCore::InjectedScriptBase::initialize):
1904         (WebCore::InjectedScriptBase::injectedScriptObject):
1905         (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
1906         (WebCore::InjectedScriptBase::makeCall):
1907         (WebCore::InjectedScriptBase::makeEvalCall):
1908         * inspector/InjectedScriptBase.h:
1909         * inspector/InjectedScriptCanvasModule.cpp:
1910         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
1911         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
1912         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
1913         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
1914         (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
1915         (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
1916         (WebCore::InjectedScriptCanvasModule::traceLog):
1917         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
1918         (WebCore::InjectedScriptCanvasModule::resourceInfo):
1919         (WebCore::InjectedScriptCanvasModule::resourceState):
1920         * inspector/InjectedScriptCanvasModule.h:
1921         * inspector/InjectedScriptHost.cpp:
1922         (WebCore::InjectedScriptHost::inspectImpl):
1923         (WebCore::InjectedScriptHost::InspectableObject::get):
1924         * inspector/InjectedScriptHost.h:
1925         * inspector/InjectedScriptManager.cpp:
1926         (WebCore::InjectedScriptManager::injectedScriptFor):
1927         * inspector/InjectedScriptManager.h:
1928         * inspector/InjectedScriptModule.cpp:
1929         (WebCore::InjectedScriptModule::ensureInjected):
1930         * inspector/InspectorAgent.cpp:
1931         (WebCore::InspectorAgent::InspectorAgent):
1932         (WebCore::InspectorAgent::didCreateFrontendAndBackend):
1933         (WebCore::InspectorAgent::inspect):
1934         * inspector/InspectorAgent.h:
1935         * inspector/InspectorAllInOne.cpp:
1936         * inspector/InspectorApplicationCacheAgent.cpp:
1937         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
1938         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
1939         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1940         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
1941         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
1942         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
1943         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
1944         * inspector/InspectorApplicationCacheAgent.h:
1945         * inspector/InspectorCSSAgent.cpp:
1946         (WebCore::SelectorProfile::toInspectorObject):
1947         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
1948         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
1949         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1950         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
1951         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
1952         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1953         (WebCore::InspectorCSSAgent::getStyleSheet):
1954         (WebCore::InspectorCSSAgent::setStyleText):
1955         (WebCore::InspectorCSSAgent::setPropertyText):
1956         (WebCore::InspectorCSSAgent::toggleProperty):
1957         (WebCore::InspectorCSSAgent::setRuleSelector):
1958         (WebCore::InspectorCSSAgent::addRule):
1959         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1960         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
1961         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
1962         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
1963         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
1964         (WebCore::InspectorCSSAgent::collectStyleSheets):
1965         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1966         (WebCore::InspectorCSSAgent::detectOrigin):
1967         (WebCore::InspectorCSSAgent::buildObjectForRule):
1968         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
1969         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1970         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
1971         (WebCore::InspectorCSSAgent::buildArrayForRegions):
1972         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
1973         * inspector/InspectorCSSAgent.h:
1974         * inspector/InspectorCanvasAgent.cpp:
1975         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
1976         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
1977         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
1978         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
1979         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
1980         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
1981         * inspector/InspectorCanvasAgent.h:
1982         * inspector/InspectorCanvasInstrumentation.h:
1983         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
1984         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
1985         * inspector/InspectorClient.cpp:
1986         * inspector/InspectorClient.h:
1987         * inspector/InspectorConsoleAgent.cpp:
1988         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
1989         (WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
1990         (WebCore::InspectableHeapObject::get):
1991         * inspector/InspectorConsoleAgent.h:
1992         * inspector/InspectorController.cpp:
1993         * inspector/InspectorController.h:
1994         * inspector/InspectorDOMAgent.cpp:
1995         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
1996         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
1997         (WebCore::InspectorDOMAgent::getDocument):
1998         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
1999         (WebCore::InspectorDOMAgent::querySelectorAll):
2000         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
2001         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2002         (WebCore::InspectorDOMAgent::getSearchResults):
2003         (WebCore::InspectorDOMAgent::resolveNode):
2004         (WebCore::InspectorDOMAgent::getAttributes):
2005         (WebCore::InspectorDOMAgent::buildObjectForNode):
2006         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
2007         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
2008         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2009         (WebCore::InspectorDOMAgent::didCommitLoad):
2010         (WebCore::InspectorDOMAgent::didInsertDOMNode):
2011         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
2012         * inspector/InspectorDOMAgent.h:
2013         * inspector/InspectorDOMDebuggerAgent.cpp:
2014         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
2015         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
2016         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
2017         * inspector/InspectorDOMDebuggerAgent.h:
2018         * inspector/InspectorDOMStorageAgent.cpp:
2019         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2020         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
2021         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2022         (WebCore::InspectorDOMStorageAgent::storageId):
2023         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
2024         * inspector/InspectorDOMStorageAgent.h:
2025         * inspector/InspectorDatabaseAgent.cpp:
2026         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
2027         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
2028         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
2029         * inspector/InspectorDatabaseAgent.h:
2030         * inspector/InspectorDatabaseResource.cpp:
2031         (WebCore::InspectorDatabaseResource::bind):
2032         * inspector/InspectorDebuggerAgent.cpp:
2033         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2034         (WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
2035         (WebCore::breakpointActionTypeForString):
2036         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2037         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2038         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2039         (WebCore::scriptToInspectorObject):
2040         (WebCore::InspectorDebuggerAgent::searchInContent):
2041         (WebCore::InspectorDebuggerAgent::setScriptSource):
2042         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
2043         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
2044         (WebCore::InspectorDebuggerAgent::compileScript):
2045         (WebCore::InspectorDebuggerAgent::runScript):
2046         (WebCore::InspectorDebuggerAgent::currentCallFrames):
2047         (WebCore::InspectorDebuggerAgent::didParseSource):
2048         (WebCore::InspectorDebuggerAgent::didPause):
2049         (WebCore::InspectorDebuggerAgent::didContinue):
2050         (WebCore::InspectorDebuggerAgent::clear):
2051         * inspector/InspectorDebuggerAgent.h:
2052         * inspector/InspectorForwarding.h:
2053         * inspector/InspectorFrontendClientLocal.cpp:
2054         (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
2055         * inspector/InspectorFrontendHost.cpp:
2056         (WebCore::FrontendMenuProvider::create):
2057         (WebCore::FrontendMenuProvider::disconnect):
2058         (WebCore::FrontendMenuProvider::FrontendMenuProvider):
2059         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
2060         (WebCore::FrontendMenuProvider::contextMenuCleared):
2061         (WebCore::InspectorFrontendHost::showContextMenu):
2062         * inspector/InspectorHeapProfilerAgent.cpp:
2063         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
2064         (WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
2065         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
2066         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
2067         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
2068         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
2069         * inspector/InspectorHeapProfilerAgent.h:
2070         * inspector/InspectorIndexedDBAgent.cpp:
2071         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
2072         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
2073         * inspector/InspectorIndexedDBAgent.h:
2074         * inspector/InspectorInputAgent.cpp:
2075         (WebCore::InspectorInputAgent::InspectorInputAgent):
2076         (WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
2077         * inspector/InspectorInputAgent.h:
2078         * inspector/InspectorInstrumentation.cpp:
2079         * inspector/InspectorInstrumentation.h:
2080         * inspector/InspectorLayerTreeAgent.cpp:
2081         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
2082         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
2083         (WebCore::InspectorLayerTreeAgent::layersForNode):
2084         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
2085         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
2086         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2087         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
2088         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2089         * inspector/InspectorLayerTreeAgent.h:
2090         * inspector/InspectorMemoryAgent.cpp:
2091         (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
2092         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
2093         * inspector/InspectorMemoryAgent.h:
2094         * inspector/InspectorOverlay.cpp:
2095         * inspector/InspectorOverlay.h:
2096         * inspector/InspectorPageAgent.cpp:
2097         (WebCore::InspectorPageAgent::resourceTypeJson):
2098         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
2099         (WebCore::InspectorPageAgent::InspectorPageAgent):
2100         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
2101         (WebCore::buildObjectForCookie):
2102         (WebCore::buildArrayForCookies):
2103         (WebCore::InspectorPageAgent::getCookies):
2104         (WebCore::InspectorPageAgent::getResourceTree):
2105         (WebCore::InspectorPageAgent::searchInResource):
2106         (WebCore::buildObjectForSearchResult):
2107         (WebCore::InspectorPageAgent::searchInResources):
2108         (WebCore::InspectorPageAgent::buildObjectForFrame):
2109         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2110         * inspector/InspectorPageAgent.h:
2111         * inspector/InspectorProfilerAgent.cpp:
2112         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2113         (WebCore::InspectorProfilerAgent::createProfileHeader):
2114         (WebCore::InspectorProfilerAgent::createSnapshotHeader):
2115         (WebCore::InspectorProfilerAgent::getProfileHeaders):
2116         (WebCore::InspectorProfilerAgent::getCPUProfile):
2117         (WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
2118         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
2119         (WebCore::InspectorProfilerAgent::getHeapObjectId):
2120         * inspector/InspectorProfilerAgent.h:
2121         * inspector/InspectorResourceAgent.cpp:
2122         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
2123         (WebCore::buildObjectForTiming):
2124         (WebCore::buildObjectForResourceRequest):
2125         (WebCore::buildObjectForResourceResponse):
2126         (WebCore::buildObjectForCachedResource):
2127         (WebCore::InspectorResourceAgent::willSendRequest):
2128         (WebCore::InspectorResourceAgent::didReceiveResponse):
2129         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2130         (WebCore::InspectorResourceAgent::buildInitiatorObject):
2131         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
2132         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
2133         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
2134         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
2135         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
2136         * inspector/InspectorResourceAgent.h:
2137         * inspector/InspectorRuntimeAgent.cpp:
2138         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
2139         (WebCore::buildErrorRangeObject):
2140         (WebCore::InspectorRuntimeAgent::parse):
2141         (WebCore::InspectorRuntimeAgent::evaluate):
2142         (WebCore::InspectorRuntimeAgent::callFunctionOn):
2143         (WebCore::InspectorRuntimeAgent::getProperties):
2144         * inspector/InspectorRuntimeAgent.h:
2145         * inspector/InspectorStyleSheet.cpp:
2146         (WebCore::buildSourceRangeObject):
2147         (WebCore::buildMediaObject):
2148         (WebCore::fillMediaListChain):
2149         (WebCore::InspectorStyle::buildObjectForStyle):
2150         (WebCore::InspectorStyle::buildArrayForComputedStyle):
2151         (WebCore::InspectorStyle::styleWithProperties):
2152         (WebCore::InspectorStyleSheet::create):
2153         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
2154         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2155         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2156         (WebCore::selectorsFromSource):
2157         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
2158         (WebCore::InspectorStyleSheet::buildObjectForRule):
2159         (WebCore::InspectorStyleSheet::buildObjectForStyle):
2160         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
2161         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2162         (WebCore::InspectorStyleSheetForInlineStyle::create):
2163         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2164         * inspector/InspectorStyleSheet.h:
2165         (WebCore::InspectorCSSId::InspectorCSSId):
2166         (WebCore::InspectorStyleSheet::canBind):
2167         * inspector/InspectorStyleTextEditor.cpp:
2168         * inspector/InspectorTimelineAgent.cpp:
2169         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2170         (WebCore::toProtocol):
2171         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2172         (WebCore::InspectorTimelineAgent::setDOMCounters):
2173         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2174         (WebCore::InspectorTimelineAgent::sendEvent):
2175         * inspector/InspectorTimelineAgent.h:
2176         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2177         * inspector/InspectorWebAgentBase.h: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.h.
2178         (WebCore::InspectorAgentBase::InspectorAgentBase):
2179         * inspector/InspectorWorkerAgent.cpp:
2180         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
2181         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
2182         * inspector/InspectorWorkerAgent.h:
2183         * inspector/InstrumentingAgents.cpp:
2184         * inspector/NetworkResourcesData.cpp:
2185         * inspector/PageConsoleAgent.cpp:
2186         (WebCore::InspectableNode::get):
2187         * inspector/PageDebuggerAgent.cpp:
2188         * inspector/PageDebuggerAgent.h:
2189         * inspector/PageRuntimeAgent.cpp:
2190         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
2191         * inspector/PageRuntimeAgent.h:
2192         * inspector/ScriptArguments.cpp:
2193         (WebCore::ScriptArguments::create):
2194         (WebCore::ScriptArguments::ScriptArguments):
2195         (WebCore::ScriptArguments::argumentAt):
2196         (WebCore::ScriptArguments::getFirstArgumentAsString):
2197         * inspector/ScriptArguments.h:
2198         * inspector/ScriptCallFrame.cpp:
2199         (WebCore::ScriptCallFrame::buildInspectorObject):
2200         * inspector/ScriptCallFrame.h:
2201         * inspector/ScriptCallStack.cpp:
2202         (WebCore::ScriptCallStack::buildInspectorArray):
2203         * inspector/ScriptCallStack.h:
2204         * inspector/ScriptDebugListener.h:
2205         * inspector/TimelineRecordFactory.cpp:
2206         * inspector/TimelineRecordFactory.h:
2207         (WebCore::TimelineRecordFactory::createWebSocketCreateData):
2208         (WebCore::TimelineRecordFactory::createGenericWebSocketData):
2209         * inspector/WorkerConsoleAgent.cpp:
2210         * inspector/WorkerDebuggerAgent.cpp:
2211         * inspector/WorkerInspectorController.cpp:
2212         * inspector/WorkerInspectorController.h:
2213         * inspector/WorkerRuntimeAgent.cpp:
2214         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
2215         * inspector/WorkerRuntimeAgent.h:
2216         * page/Console.cpp:
2217         * page/ContentSecurityPolicy.cpp:
2218         * page/Frame.cpp:
2219         * page/PageConsole.cpp:
2220         * plugins/PluginView.cpp:
2221         (WebCore::PluginView::performRequest):
2222         * testing/Internals.cpp:
2223         (WebCore::Internals::parserMetaData):
2224         * testing/Internals.h:
2225         * workers/SharedWorkerGlobalScope.cpp:
2226         (WebCore::createConnectEvent):
2227         * workers/WorkerGlobalScope.cpp:
2228         (WebCore::WorkerGlobalScope::importScripts):
2229         * workers/WorkerThread.cpp:
2230         * xml/XMLTreeViewer.cpp:
2231         * xml/parser/XMLDocumentParser.cpp:
2232         * xml/parser/XMLDocumentParserLibxml2.cpp:
2233
2234 2013-12-11  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2235
2236         Store SHA1 hash in std::array
2237         https://bugs.webkit.org/show_bug.cgi?id=125446
2238
2239         Reviewed by Darin Adler.
2240
2241         Change Vector to std::array and use typedef.
2242
2243         * Modules/websockets/WebSocketHandshake.cpp:
2244         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
2245         * inspector/DOMPatchSupport.cpp:
2246         (WebCore::DOMPatchSupport::createDigest):
2247         * platform/network/soup/ResourceHandleSoup.cpp:
2248         (WebCore::HostTLSCertificateSet::computeCertificateHash):
2249
2250 2013-12-11  Alexey Proskuryakov  <ap@apple.com>
2251
2252         WebCrypto keys should support structured clone
2253         https://bugs.webkit.org/show_bug.cgi?id=125590
2254
2255         Reviewed by Oliver Hunt.
2256
2257         Tests: crypto/subtle/aes-postMessage.html
2258                crypto/subtle/hmac-postMessage.html
2259                crypto/subtle/postMessage-worker.html
2260                crypto/subtle/rsa-postMessage.html
2261
2262         * crypto/CryptoAlgorithmIdentifier.h:
2263         (WebCore::CryptoAlgorithmIdentifier):
2264         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2265         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
2266         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
2267         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
2268         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
2269         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
2270         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
2271         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
2272         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
2273         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
2274         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
2275         AES_KW was added to WebCrypto spec editor's draft yesterday night. Now that we're
2276         adding a matching enum for structired clone serialization, it's as good a time as
2277         any to update the order of values to match.
2278
2279         * bindings/js/SerializedScriptValue.cpp:
2280         (WebCore::countUsages):
2281         (WebCore::CloneSerializer::dumpIfTerminal):
2282         (WebCore::CloneSerializer::write):
2283         (WebCore::CloneDeserializer::read):
2284         (WebCore::CloneDeserializer::readHMACKey):
2285         (WebCore::CloneDeserializer::readAESKey):
2286         (WebCore::CloneDeserializer::readRSAKey):
2287         (WebCore::CloneDeserializer::readCryptoKey):
2288         (WebCore::CloneDeserializer::readTerminal):
2289         Added serialization/deserialization for CryptoKey. This doesn't update version
2290         number, because we don't currently store structured clones in persistent storage -
2291         and even if we did, we wouldn't want to invalidate everything users already stored.
2292
2293         * crypto/CryptoAlgorithmRegistry.cpp:
2294         (WebCore::CryptoAlgorithmRegistry::shared):
2295         (WebCore::registryMutex):
2296         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
2297         (WebCore::CryptoAlgorithmRegistry::nameForIdentifier):
2298         (WebCore::CryptoAlgorithmRegistry::create):
2299         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
2300         * crypto/CryptoKey.idl:
2301         With structured clone, it is now possible to send a Key to a web worker. That's
2302         of no practical use because the crypto API is not exposed in workers, but we
2303         shouldn't crash anyway.
2304
2305         * crypto/keys/CryptoKeyAES.cpp:
2306         (WebCore::CryptoKeyAES::CryptoKeyAES):
2307         (WebCore::CryptoKeyAES::isValidAESAlgorithm):
2308         * crypto/keys/CryptoKeyAES.h:
2309         Exposed isValidAESAlgorithm, so that a caller could know whether the constructor
2310         will assert.
2311
2312         * CMakeLists.txt:
2313         * GNUmakefile.am:
2314         * WebCore.vcxproj/WebCore.vcxproj.filters:
2315         * WebCore.vcxproj/WebCoreCommon.props:
2316         Added crypto/keys to search paths to avoid build breakage.
2317
2318 2013-12-11  Bear Travis  <betravis@adobe.com>
2319
2320         Web Inspector: [CSS Shapes] Highlight margin-shape for shape-outside
2321         https://bugs.webkit.org/show_bug.cgi?id=125175
2322
2323         Reviewed by Darin Adler.
2324
2325         In addition to highlighting the shape, also highlight the shape created
2326         by shape-margin with a slightly more transparent color. This patch modifies
2327         the shape info passed to the Inspector Overlay to include a path for both
2328         the raw shape and the shape with margin.
2329
2330         Test: inspector-protocol/model/highlight-shape-outside-margin.html
2331
2332         * inspector/InspectorOverlay.cpp:
2333         (WebCore::buildObjectForShapeOutside): Call Shape::buildDisplayPaths rather than
2334         Shape::buildPath, and pass along any relevant paths to the Inspector overlay.
2335         * inspector/InspectorOverlayPage.js:
2336         (_drawShapeHighlight): Draw the margin shape in addition to the raw shape.
2337         * rendering/shapes/BoxShape.cpp:
2338         (WebCore::addRoundedRect): Add a rounded rect to the path.
2339         (WebCore::BoxShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes.
2340         * rendering/shapes/BoxShape.h:
2341         * rendering/shapes/PolygonShape.cpp:
2342         (WebCore::addPolygon): Add a set of vertices as a polygon to the path.
2343         (WebCore::PolygonShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes.
2344         * rendering/shapes/PolygonShape.h:
2345         * rendering/shapes/RasterShape.h:
2346         (WebCore::RasterShape::buildDisplayPaths): Ditto.
2347         * rendering/shapes/RectangleShape.cpp:
2348         (WebCore::RectangleShape::buildDisplayPaths): Ditto.
2349         * rendering/shapes/RectangleShape.h:
2350         * rendering/shapes/Shape.h:
2351
2352 2013-12-11  Mario Sanchez Prada  <mario.prada@samsung.com>
2353
2354         [ATK] Expose accessibility objects WAI-ARIA landmark roles
2355         https://bugs.webkit.org/show_bug.cgi?id=125584
2356
2357         Reviewed by Chris Fleizach.
2358
2359         Exposed accessibility objects with landmark roles with the proper
2360         AtkRole, to be provided by the next stable release of ATK.
2361
2362         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2363         (webkitAccessibleGetAttributes):
2364         (atkRole):
2365
2366 2013-12-11  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
2367
2368         [GTK] Add a UPower-based BatteryProvider
2369         https://bugs.webkit.org/show_bug.cgi?id=115719
2370
2371         Reviewed by Martin Robinson.
2372
2373         Introduce the BatteryProviderUPower, a provider of the system's battery status that produces the information
2374         using the upower-glib library.
2375
2376         The BatteryProviderUPower creates a new UPower client when the provider should start emitting updates and hooks
2377         up to device alteration signals. These only fire recalculation of the battery status when a battery device is altered.
2378
2379         When recalculating, every battery device is taken into account, accumulating the energy capacities when both empty
2380         and full, the current rate of energy charging/discharging, and the battery status (whether the device is charging or
2381         discharging). This gives a set of data that covers the overall battery status of the system.
2382
2383         This data is then used to calculate the battery status as perceived by the WebCore implementation. Charging is determined
2384         by examining the integral sign of the current combined energy rate. Charging and discharging times are calculated, when
2385         appropriate, by dividing the chargable/dischargable capacity with the current combined energy rate. The battery level is
2386         calculated by dividing the current energy capacity with the full energy capacity (i.e. the combined capacity of all
2387         the batteries that the system possesses). The status is (indirectly) passed onto BatteryManager by invoking the
2388         updateBatteryStatus method on the client, with the first parameter representing the battery charging/discharging state,
2389         the second parameter representing the time left until the battery is fully charged (when charging) or fully
2390         depleted (when discharging), and the third parameter representing the current battery level.
2391
2392         Whenever the implementation cannot provide any information about the battery status of the system, the client's
2393         updateBatteryStatus method is invoked with the first parameter reporting the unavailability of any information
2394         about the battery status. The other two parameters can be omitted as they default to 0 when not given and are neither
2395         available nor useful in such circumstances. The client should handle such an update by reporting the 'default' battery
2396         status - charging, the battery level being at 1.0 and both the charging and discharging time having the value of
2397         the positive infinity (as per the Battery Status API specification).
2398
2399         The implementation is heavily inspired by a similar approach to calculating battery status in GNOME Settings Daemon.
2400
2401         No new tests - no new functionality. The feature is not yet enabled. When enabled, the relevant tests pass.
2402
2403         * GNUmakefile.list.am: Add the BatteryProviderUPower(Client) build targets.
2404         * platform/glib/BatteryProviderUPower.cpp: Added.
2405         (powerDeviceAlterationCallback):
2406         (BatteryProviderUPower::BatteryProviderUPower):
2407         (BatteryProviderUPower::startUpdating):
2408         (BatteryProviderUPower::stopUpdating):
2409         (BatteryProviderUPower::updateBatteryStatus):
2410         * platform/glib/BatteryProviderUPower.h: Added.
2411         (WebCore):
2412         (BatteryProviderUPower):
2413         * platform/glib/BatteryProviderUPowerClient.h: Added.
2414         (WebCore):
2415         (BatteryProviderUPowerClient):
2416
2417 2013-12-11  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2418
2419         Improving createOffer and createAnswer LayoutTests
2420         https://bugs.webkit.org/show_bug.cgi?id=125568
2421
2422         Reviewed by Philippe Normand.
2423
2424         The constraints parameter should be optional in both. Also adding tests to check if we already have a local SDP
2425         when creating an answer.
2426
2427         Existing tests were updated.
2428
2429         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2430         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
2431
2432 2013-12-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2433
2434         [EFL] Fix build with CONTEXT_MENUS flag set OFF
2435         https://bugs.webkit.org/show_bug.cgi?id=125572
2436
2437         Reviewed by Gyuyoung Kim.
2438
2439         dispatchEventAsContextMenuEvent is called regardless of CONTEXT_MENUS flag setting,
2440         thus its definition in InspectorFrontendHost should not be guarded by this flag.
2441
2442         No new tests, no behaviour change.
2443
2444         * inspector/InspectorFrontendHost.cpp:
2445         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
2446
2447 2013-12-11  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
2448
2449         [CURL] Build fails after r160386.
2450         https://bugs.webkit.org/show_bug.cgi?id=125571
2451
2452         Reviewed by Zoltan Herczeg.
2453
2454         Need no new tests.
2455
2456         Fix a typo in commit r160386 that prevents building with curl.
2457
2458         * platform/network/curl/CurlCacheEntry.cpp:
2459         (WebCore::CurlCacheEntry::generateBaseFilename):
2460
2461 2013-12-11  Rob Buis  <rob.buis@samsung.com>
2462
2463         [CSS Shapes] Take into account fill-rule for polygon interpolation
2464         https://bugs.webkit.org/show_bug.cgi?id=125508
2465
2466         Reviewed by Dirk Schulze.
2467
2468         Implement the polygon fill-rule part of http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation.
2469
2470         Adapt fast/shapes/shape-outside-floats/shape-outside-animation.html.
2471
2472         * rendering/style/BasicShapes.cpp:
2473         (WebCore::BasicShape::canBlend):
2474
2475 2013-12-11  Mario Sanchez Prada  <mario.prada@samsung.com>
2476
2477         Programmatically-inserted children lack accessibility events
2478         https://bugs.webkit.org/show_bug.cgi?id=100275
2479
2480         Reviewed by Chris Fleizach.
2481
2482         Test: accessibility/children-changed-sends-notification.html
2483
2484         Emit children-changed::add and children-changed::remove whenever
2485         an object has been added/removed to the accessibility hierarchy,
2486         that is, when a new AtkObject is being attached/detached.
2487
2488         * accessibility/AXObjectCache.h: Added new enumeration to know
2489         when we are detaching a wrapper because of the cache or the
2490         element is being destroyed, so we can use that information.
2491         (WebCore::AXObjectCache::detachWrapper): Added a new parameter and
2492         updated all the prototypes in different ports.
2493         * accessibility/AXObjectCache.cpp:
2494         (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper()
2495         specifying that we do it because the cache is being destroyed.
2496         (WebCore::AXObjectCache::remove): Call detachWrapper() specifying
2497         that we do it because an accessible element is being destroyed.
2498
2499         * accessibility/atk/AXObjectCacheAtk.cpp:
2500         (WebCore::AXObjectCache::detachWrapper): Emit the children-changed
2501         signal when needed. We rely on the cached reference to the parent
2502         AtkObject (using the implementation of atk_object_get_parent from
2503         the AtkObject class) to find the right object to emit the signal
2504         from here, since the accessibility hierarchy from WebCore will no
2505         longer be accessible at this point.
2506         (WebCore::AXObjectCache::attachWrapper): Emit the children-change
2507         signal from here unless we are in the middle of a layout update,
2508         trying to provide as much information (e.g. the offset) as possible.
2509         (WebCore::AXObjectCache::postPlatformNotification): Make sure we
2510         update (touch) the subtree under an accessibility object whenever
2511         we receive AXChildrenChanded from WebCore, to ensure that those
2512         objects will also be visible rightaway to ATs, and that those get
2513         properly notified of the event at that very same moment.
2514
2515         * accessibility/ios/AXObjectCacheIOS.mm:
2516         (WebCore::AXObjectCache::detachWrapper): Updated function signature.
2517         * accessibility/mac/AXObjectCacheMac.mm:
2518         (WebCore::AXObjectCache::detachWrapper): Ditto.
2519         * accessibility/win/AXObjectCacheWin.cpp:
2520         (WebCore::AXObjectCache::detachWrapper): Ditto.
2521
2522 2013-12-11  Andreas Kling  <akling@apple.com>
2523
2524         REGRESSION(r160389): SVG test assertion extravaganza.
2525
2526         Unreviewed. Use getAttribute() instead of fastGetAttribute() for
2527         the "type" attribute since it's animatable on SVG elements.
2528
2529 2013-12-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2530
2531         Set m_nextBreakablePosition as private in InlineIterator, and use it.
2532         https://bugs.webkit.org/show_bug.cgi?id=125482
2533
2534         Reviewed by Andreas Kling.
2535
2536         InlineIterator has been exported m_nextBreakablePosition as public though it is member variable.
2537         This patch set it as private, and add getter/setter functions for it.
2538
2539         No new tests, no behavior changes.
2540
2541         * rendering/InlineIterator.h:
2542         (WebCore::InlineIterator::InlineIterator):
2543         (WebCore::InlineIterator::nextBreakablePosition):
2544         (WebCore::InlineIterator::setNextBreakablePosition):
2545         * rendering/line/BreakingContextInlineHeaders.h:
2546         (WebCore::BreakingContext::handleText):
2547
2548 2013-12-10  Gurpreet Kaur  <k.gurpreet@samsung.com>
2549
2550         top and bottom black background line not getting displayed
2551         https://bugs.webkit.org/show_bug.cgi?id=21664
2552
2553         Reviewed by Simon Fraser.
2554
2555         The table cell's background was not being displayed. Since the table
2556         cell had no child correct offsetWidth was not being set even if table
2557         width is being defined.
2558
2559         Test: fast/dom/HTMLTableElement/empy-table-cell-with-background-color.html
2560
2561         * rendering/AutoTableLayout.cpp:
2562         (WebCore::AutoTableLayout::recalcColumn):
2563         cellHasContent should also be set to true incase background color is
2564         present.
2565
2566 2013-12-10  Beth Dakin  <bdakin@apple.com>
2567
2568         Horizontal rubber-banding without a horizontal scrollbar is distracting
2569         https://bugs.webkit.org/show_bug.cgi?id=125550
2570
2571         Reviewed by Simon Fraser.
2572
2573         Setting the ScrollElasticity to ScrollElasticityAutomatic will make sure we only 
2574         rubber-band horizontally when there is a horizontal scrollbar.
2575
2576         * page/FrameView.cpp:
2577         (WebCore::FrameView::FrameView):
2578
2579 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2580
2581         Correct a preprocessor guard from a mis-merged patch
2582
2583         In r160367, I mismerged a patch from Gustavo Noronha. This commit
2584         fixes the merge and thus fixes the CMake build.
2585
2586         * html/HTMLMediaElement.idl: Move the preprocessor guard to the correct property.
2587
2588 2013-12-10  Rob Buis  <rob.buis@samsung.com>
2589
2590         Clean up SVGScriptElement
2591         https://bugs.webkit.org/show_bug.cgi?id=125527
2592
2593         Reviewed by Sam Weinig.
2594
2595         Rewrite to not store type in m_type and also remove type getter/setter.
2596
2597         * svg/SVGScriptElement.cpp:
2598         (WebCore::SVGScriptElement::parseAttribute):
2599         (WebCore::SVGScriptElement::typeAttributeValue):
2600         * svg/SVGScriptElement.h:
2601         * svg/SVGScriptElement.idl:
2602
2603 2013-12-10  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2604
2605         Use std::array when computing MD5 checksum
2606         https://bugs.webkit.org/show_bug.cgi?id=125509
2607
2608         Reviewed by Anders Carlsson.
2609
2610         Use MD5::Digest type and MD5::hashSize when computing MD5 checksum.
2611
2612         * platform/network/curl/CurlCacheEntry.cpp:
2613         (WebCore::CurlCacheEntry::generateBaseFilename):
2614
2615 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2616
2617         [ATK] Expose splitter elements with ATK_ROLE_SEPARATOR
2618         https://bugs.webkit.org/show_bug.cgi?id=125522
2619
2620         Reviewed by Chris Fleizach.
2621
2622         Expose objects with SplitterRole role as ATK_ROLE_SEPARATOR.
2623
2624         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2625         (atkRole):
2626
2627 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2628
2629         [ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT
2630         https://bugs.webkit.org/show_bug.cgi?id=125521
2631
2632         Reviewed by Chris Fleizach.
2633
2634         Stop exposing alert dialogs as ATK_ROLE_DIALOG and do it as
2635         ATK_ROLE_ALERT instead.
2636
2637         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2638         (atkRole):
2639
2640 2013-12-10  Brendan Long  <b.long@cablelabs.com>
2641
2642         [GTK][GStreamer] media/video-preload.html is flakily crashing on WK2
2643         https://bugs.webkit.org/show_bug.cgi?id=125411
2644
2645         Reviewed by Philippe Normand.
2646
2647         No new tests because this fixes flakeyness in existing tests (media/video-preload.html, and various tests in media/track/{audio,in-band,video}).
2648
2649         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
2650         (webkitTextCombinerPadGetProperty): Copy tag list to prevent concurrent modification problems.
2651         (webkitTextCombinerPadEvent): Add locking.
2652         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2653         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Call tagsChanged() because we need it to setup m_tags.
2654         (WebCore::TrackPrivateBaseGStreamer::disconnect): Clear m_tags.
2655         (WebCore::TrackPrivateBaseGStreamer::tagsChanged): Lookup the tags while we're in this callback, because it's the only time we can guarantee that the input-selector won't unref them.
2656         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use m_tags.
2657         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_tags and a mutex.
2658
2659 2013-12-10  László Langó  <lango@inf.u-szeged.hu>
2660
2661         PageConsole::addMessage should automatically determine column number alongside line number
2662         https://bugs.webkit.org/show_bug.cgi?id=114319
2663
2664         Reviewed by Joseph Pecoraro.
2665
2666         * dom/InlineStyleSheetOwner.cpp:
2667         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2668         * dom/ScriptElement.cpp:
2669         (WebCore::ScriptElement::ScriptElement):
2670         * dom/ScriptableDocumentParser.h:
2671         * dom/StyledElement.cpp:
2672         (WebCore::StyledElement::styleAttributeChanged):
2673         * html/parser/HTMLDocumentParser.cpp:
2674         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
2675         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2676         * html/parser/HTMLDocumentParser.h:
2677         * inspector/InspectorResourceAgent.cpp:
2678         (WebCore::InspectorResourceAgent::buildInitiatorObject):
2679         * page/Console.cpp:
2680         (WebCore::internalAddMessage):
2681         * page/PageConsole.cpp:
2682         (WebCore::PageConsole::printSourceURLAndPosition):
2683         (WebCore::PageConsole::addMessage):
2684         * page/PageConsole.h:
2685         * xml/parser/XMLDocumentParser.h:
2686         * xml/parser/XMLDocumentParserLibxml2.cpp:
2687         (WebCore::XMLDocumentParser::error):
2688
2689 2013-12-10  Andreas Kling  <akling@apple.com>
2690
2691         Jettison all StyleResolver data on memory pressure.
2692         <https://webkit.org/b/125498>
2693
2694         The StyleResolver can be rebuilt relatively quickly; we already
2695         have an optimization that discards it some time after last use.
2696
2697         If we find ourseles under serious memory pressure, don't wait for
2698         the timer to kick in, throw everything overboard right away.
2699
2700         ~5MB progression post-pressure on Membuster3.
2701
2702         Reviewed by Anders Carlsson.
2703
2704 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2705
2706         [GTK] [CMake] Add support for building the DOM bindings
2707         https://bugs.webkit.org/show_bug.cgi?id=116375
2708
2709         Reviewed by Gustavo Noronha Silva.
2710
2711         The CMake build is more complete than the autotools counterpart, so autotools doesn't consider
2712         some supplemental IDL attributes when building the DOM bindings. To prevent API breaks we should
2713         protect these attributes from DOM binding generation.
2714
2715         * Modules/battery/BatteryManager.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
2716         * Modules/battery/NavigatorBattery.idl: Ditto.
2717         * Modules/mediastream/HTMLMediaElementMediaStream.idl: Ditto.
2718         * Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Ditto.
2719         * Modules/networkinfo/NetworkInfoConnection.idl: Ditto.
2720         * PlatformGTK.cmake: Add build steps for building the bindings.
2721         * dom/Document.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
2722         * html/HTMLMediaElement.idl: Ditto.
2723
2724 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2725
2726         Various fixes for the CMake GTK+ build
2727
2728         Reviewed by Gustavo Noronha.
2729
2730         * PlatformGTK.cmake: Update source list.
2731
2732 2013-12-10  Robert Sipka  <sipka@inf.u-szeged.hu>
2733
2734         [nix][curl] Buildfix after r160310
2735         https://bugs.webkit.org/show_bug.cgi?id=125489
2736
2737         Reviewed by Gustavo Noronha Silva.
2738
2739         Curl doesn't include soup files.
2740
2741         * PlatformNix.cmake:
2742
2743 2013-12-10  Gustavo Noronha Silva  <gns@gnome.org>
2744
2745         [GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change
2746         https://bugs.webkit.org/show_bug.cgi?id=125444
2747
2748         Reviewed by Martin Robinson.
2749
2750         * platform/gtk/UserAgentGtk.cpp:
2751         (WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X.
2752         (WebCore::standardUserAgent): ditto.
2753
2754 2013-12-09  Gustavo Noronha Silva  <gns@gnome.org>
2755
2756         [Soup] Send original encoded data size to didReceiveBuffer
2757         https://bugs.webkit.org/show_bug.cgi?id=125410
2758
2759         Reviewed by Martin Robinson.
2760
2761         No tests, the only way to test this seems to be through the inspector UI.
2762
2763         * platform/network/ResourceHandle.h:
2764         * platform/network/ResourceHandleInternal.h:
2765         (WebCore::ResourceHandleInternal::ResourceHandleInternal): data member to track stream
2766         position.
2767         * platform/network/soup/ResourceHandleSoup.cpp:
2768         (WebCore::ResourceHandle::currentStreamPosition): obtains the current stream position by querying
2769         the first seekable input stream we find.
2770         (WebCore::nextMultipartResponsePartCallback): store the position before we start reading a new part.
2771         (WebCore::sendRequestCallback): store the position before we start reading the response body.
2772         (WebCore::readCallback): pass the position delta to didReceiveData.
2773
2774 2013-12-09  Andreas Kling  <akling@apple.com>
2775
2776         Clear out font width measurement caches on memory pressure.
2777         <https://webkit.org/b/125481>
2778
2779         The data kept in WidthCaches can be regenerated on demand. Throwing
2780         it away when we're under memory pressure buys us ~4MB on Membuster3.
2781
2782         Reviewed by Antti Koivisto.
2783
2784 2013-12-09  Seokju Kwon  <seokju@webkit.org>
2785
2786         Web Inspector: Remove enabled() in InspectorRuntimeAgent.
2787         https://bugs.webkit.org/show_bug.cgi?id=125476
2788
2789         Reviewed by Joseph Pecoraro.
2790
2791         Dead code. It's never called anywhere.
2792
2793         No new tests, no behavior change.
2794
2795         * inspector/InspectorRuntimeAgent.h:
2796
2797 2013-12-09  Sam Weinig  <sam@webkit.org>
2798
2799         Replace use of WTF::FixedArray with std::array
2800         https://bugs.webkit.org/show_bug.cgi?id=125475
2801
2802         Reviewed by Anders Carlsson.
2803
2804         * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
2805         * platform/graphics/GlyphMetricsMap.h:
2806
2807 2013-12-09  Benjamin Poulain  <bpoulain@apple.com>
2808
2809         Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
2810         https://bugs.webkit.org/show_bug.cgi?id=125379
2811
2812         Reviewed by Alexey Proskuryakov.
2813
2814         * WebCore.vcxproj/WebCore.vcxproj:
2815         * WebCore.vcxproj/WebCore.vcxproj.filters:
2816         * WebCore.xcodeproj/project.pbxproj:
2817         * platform/network/ResourceHandle.h:
2818         * platform/network/ResourceHandleInternal.h:
2819         * platform/network/cf/ResourceHandleCFNet.cpp:
2820         (WebCore::ResourceHandle::createCFURLConnection):
2821         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: Added.
2822         (WebCore::ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate):
2823         (WebCore::ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate):
2824         (WebCore::ResourceHandleCFURLConnectionDelegate::willSendRequestCallback):
2825         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
2826         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback):
2827         (WebCore::ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback):
2828         (WebCore::ResourceHandleCFURLConnectionDelegate::didFailCallback):
2829         (WebCore::ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback):
2830         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback):
2831         (WebCore::ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback):
2832         (WebCore::ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
2833         (WebCore::ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback):
2834         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback):
2835         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
2836         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: Added.
2837         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Added.
2838         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate):
2839         (WebCore::synthesizeRedirectResponseIfNecessary):
2840         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
2841         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
2842         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):
2843         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
2844         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail):
2845         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
2846         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge):
2847         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData):
2848         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
2849         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
2850         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
2851         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Added.
2852
2853 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
2854
2855         REGRESSION(r136280): input[type=image] should assume coords of 0,0 when activated without physically clicking
2856         https://bugs.webkit.org/show_bug.cgi?id=125392
2857
2858         Reviewed by Darin Adler.
2859
2860         Merge https://chromium.googlesource.com/chromium/blink/+/3c33d42207cd209bb171083ba66c225f694f2101
2861
2862         Activating an image button with the keyboard or element.click() should result in selected coords of (0,0) per
2863         http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#image-button-state-(type=image)
2864         "If the user activates the control without explicitly selecting a coordinate, then the coordinate (0,0) must be assumed."
2865
2866         New behavior also matches that of Internet Explorer and Firefox.
2867
2868         Tests: fast/forms/input-image-submit.html
2869
2870         * html/ImageInputType.cpp:
2871         (WebCore::ImageInputType::handleDOMActivateEvent): Set m_clickLocation to (0, 0) for simulated events.
2872
2873 2013-12-09  Jer Noble  <jer.noble@apple.com>
2874
2875         [MSE] Add support for VideoPlaybackMetrics.
2876         https://bugs.webkit.org/show_bug.cgi?id=125380
2877
2878         Reviewed by Eric Carlson.
2879
2880         Test: media/media-source/media-source-video-playback-quality.html
2881
2882         Add a new object type VideoPlaybackQuality to be returned by
2883         HTMLMediaElement.getVideoPlaybackQuality().
2884
2885         HTMLMediaElements must separately track a droppedVideoFrame count, as
2886         certain operations on SourceBuffer will drop incoming frames, which must
2887         be accounted for. Reset this count when the media engine changes, which is
2888         indicitive of a new media load requset starting.
2889
2890         Add the new VideoPlaybackQuality class:
2891         * Modules/mediasource/VideoPlaybackQuality.cpp: Added.
2892         (WebCore::VideoPlaybackQuality::create):
2893         (WebCore::VideoPlaybackQuality::VideoPlaybackQuality):
2894         * Modules/mediasource/VideoPlaybackQuality.h: Added.
2895         (WebCore::VideoPlaybackQuality::creationTime):
2896         (WebCore::VideoPlaybackQuality::totalVideoFrames):
2897         (WebCore::VideoPlaybackQuality::droppedVideoFrames):
2898         (WebCore::VideoPlaybackQuality::corruptedVideoFrames):
2899         (WebCore::VideoPlaybackQuality::totalFrameDelay):
2900         * Modules/mediasource/VideoPlaybackQuality.idl: Added.
2901
2902         Add support for the new class to HTMLMediaElement:
2903         * html/HTMLMediaElement.cpp:
2904         (HTMLMediaElement::shouldUseVideoPluginProxy):
2905         (HTMLMediaElement::getVideoPlaybackQuality):
2906         * html/HTMLMediaElement.h:
2907         * html/HTMLMediaElement.idl:
2908
2909         Report the video quality metrics from the MediaPlayer:
2910         * platform/graphics/MediaPlayer.cpp:
2911         (WebCore::MediaPlayer::totalVideoFrames):
2912         (WebCore::MediaPlayer::droppedVideoFrames):
2913         (WebCore::MediaPlayer::corruptedVideoFrames):
2914         (WebCore::MediaPlayer::totalFrameDelay):
2915         * platform/graphics/MediaPlayer.h:
2916         * platform/graphics/MediaPlayerPrivate.h:
2917         (WebCore::MediaPlayerPrivateInterface::totalVideoFrames):
2918         (WebCore::MediaPlayerPrivateInterface::droppedVideoFrames):
2919         (WebCore::MediaPlayerPrivateInterface::corruptedVideoFrames):
2920         (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
2921
2922         Correctly report the dropped frame count:
2923         * Modules/mediasource/SourceBuffer.cpp:
2924         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): needsRandomAccessFlag defaults to true.
2925         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check the sync status of the incoming sample.
2926         (WebCore::SourceBuffer::didDropSample): Notify the media element of a dropped frame.
2927         * Modules/mediasource/SourceBuffer.h:
2928         * html/HTMLMediaElement.cpp:
2929         (WebCore::HTMLMediaElement::HTMLMediaElement):
2930         (HTMLMediaElement::mediaPlayerEngineUpdated): Reset m_droppedFrameCount.
2931         (HTMLMediaElement::getVideoPlaybackQuality): Return a new VideoPlaybackQuality object.
2932         * html/HTMLMediaElement.h:
2933         (WebCore::HTMLMediaElement::incrementDroppedFrameCount): Simple incrementer.
2934         * platform/MediaSample.h:
2935         (WebCore::MediaSample::isSync): Convenience function.
2936         (WebCore::MediaSample::isNonDisplaying): Ditto.
2937
2938         Add support in the AVFoundation MediaSource Engine:
2939         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2940         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2941         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalVideoFrames):
2942         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::droppedVideoFrames):
2943         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::corruptedVideoFrames):
2944         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
2945
2946         Add support in the Mock MediaSource Engine:
2947         * platform/mock/mediasource/MockBox.h:
2948         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2949         (WebCore::MockMediaPlayerMediaSource::totalVideoFrames): Simple accessor.
2950         (WebCore::MockMediaPlayerMediaSource::droppedVideoFrames): Ditto.
2951         (WebCore::MockMediaPlayerMediaSource::corruptedVideoFrames): Ditto.
2952         (WebCore::MockMediaPlayerMediaSource::totalFrameDelay): Ditto.
2953         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2954         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2955         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
2956         * platform/mock/mediasource/MockMediaSourcePrivate.h:
2957         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2958         (WebCore::MockSourceBufferPrivate::enqueueSample): Increment the frame counts based on
2959             the incoming sample.
2960         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2961
2962         Add the new files to the project:
2963         * bindings/gobject/GNUmakefile.am:
2964         * DerivedSources.make:
2965         * WebCore.xcodeproj/project.pbxproj:
2966         * GNUMakefile.list.am:
2967         * CMakeLists.txt:
2968
2969 2013-12-09  Simon Fraser  <simon.fraser@apple.com>
2970
2971         Avoid divide by zero in scrollbar code, and protect against Obj-C exceptions
2972         https://bugs.webkit.org/show_bug.cgi?id=125469
2973         <rdar://problem/15535772>
2974
2975         Reviewed by Beth Dakin.
2976         
2977         In ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(), proportion could
2978         end up as NaN if scrollbar->totalSize() were zero. Protect against that.
2979         
2980         Also wrap functions that call into Objective-C with BEGIN_BLOCK_OBJC_EXCEPTIONS/
2981         END_BLOCK_OBJC_EXCEPTIONS.
2982
2983         * platform/mac/ScrollbarThemeMac.mm:
2984         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2985         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2986         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2987         (WebCore::ScrollbarThemeMac::updateEnabledState):
2988         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
2989         (WebCore::scrollbarPainterPaint):
2990
2991 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
2992
2993         Implement Document.cloneNode()
2994         https://bugs.webkit.org/show_bug.cgi?id=11646
2995
2996         Reviewed by Darin Adler.
2997
2998         Merge https://chromium.googlesource.com/chromium/blink/+/dc7879025e01d63be9fcf6a84ca6c9b8b5768a80
2999
3000         Implement the behavior specified in the current DOM4 working draft:
3001         http://www.w3.org/TR/2013/WD-dom-20131107/#dom-node-clonenode
3002
3003         Tests: fast/dom/Document/clone-node.html
3004                fast/dom/HTMLDocument/clone-node-quirks-mode.html
3005                svg/custom/clone-node.html
3006
3007         * dom/Document.cpp:
3008         (WebCore::Document::cloneNode):
3009         (WebCore::Document::cloneDocumentWithoutChildren):
3010         (WebCore::Document::cloneDataFromDocument):
3011         * dom/Document.h:
3012         * html/HTMLDocument.cpp:
3013         (WebCore::HTMLDocument::cloneDocumentWithoutChildren):
3014         * html/HTMLDocument.h:
3015         * svg/SVGDocument.cpp:
3016         (WebCore::SVGDocument::cloneDocumentWithoutChildren):
3017         * svg/SVGDocument.h:
3018
3019 2013-12-09  Andreas Kling  <akling@apple.com>
3020
3021         REGRESSION(r160260): Memory pressure signal causes web process to hang.
3022         <https://webkit.org/b/125465>
3023
3024         Reviewed by Tim Horton.
3025
3026         This command caused all of my web processes to hang:
3027
3028             notifyutil -p org.WebKit.lowMemory
3029
3030         This only happens when the cache pruning code encounters a resource
3031         using purgeable memory.
3032
3033         * loader/cache/MemoryCache.cpp:
3034         (WebCore::MemoryCache::pruneLiveResourcesToSize):
3035
3036             Grab the next CachedResource pointer before continuing the loop.
3037
3038 2013-12-09  peavo@outlook.com  <peavo@outlook.com>
3039
3040         [WinCairo] OpenGL compile error.
3041         https://bugs.webkit.org/show_bug.cgi?id=125383
3042
3043         Reviewed by Darin Adler.
3044
3045         * platform/graphics/opengl/Extensions3DOpenGLES.h: Define GL_HALF_FLOAT_ARB on Windows when OPENGL_ES_2 is used.
3046
3047 2013-12-09  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3048
3049         Fix handling of 'inherit' and 'initial' for grid lines.
3050         https://bugs.webkit.org/show_bug.cgi?id=125223
3051
3052         Reviewed by Darin Adler.
3053
3054         'initial' and 'inherit' are always allowed values for CSS properties.
3055         As the CSSParser handles them automatically, those 2 values were never
3056         taken care of in StyleResolver, leading to crashes.
3057
3058         Added tests cases for 'inherit' and 'initial' to the following tests:
3059
3060         fast/css-grid-layout/grid-item-column-row-get-set.html
3061         fast/css-grid-layout/grid-item-end-after-get-set.html
3062         fast/css-grid-layout/grid-item-start-before-get-set.html
3063
3064         Patch backported from Blink: https://src.chromium.org/viewvc/blink?revision=149257&view=revision
3065
3066         * css/StyleResolver.cpp:
3067         (WebCore::StyleResolver::applyProperty):
3068         * rendering/style/RenderStyle.h:
3069         * rendering/style/StyleGridItemData.cpp:
3070         (WebCore::StyleGridItemData::StyleGridItemData):
3071
3072 2013-12-09  Joseph Pecoraro  <pecoraro@apple.com>
3073
3074         Web Inspector: Inspector.json and CodeGenerator tweaks
3075         https://bugs.webkit.org/show_bug.cgi?id=125321
3076
3077         Reviewed by Timothy Hatcher.
3078
3079         * inspector/protocol/Runtime.json:
3080         Runtime.js was depending on Network.FrameId. This is a layering
3081         violation, so ideally we can fix this later. For now, just copy
3082         the FrameId type into Runtime. They are strings so all is good.
3083
3084         * inspector/CodeGeneratorInspector.py:
3085         (Generator.EventMethodStructTemplate.append_epilog):
3086         * inspector/CodeGeneratorInspectorStrings.py:
3087         Improve --help usage information.
3088         Make the script work with a single domain json file.
3089         Add ASCIILiteral's where appropriate.
3090
3091 2013-12-09  Nick Diego Yamane  <nick.yamane@openbossa.org>
3092
3093         [Nix] Fix file name typo in PlatformNix.cmake
3094         https://bugs.webkit.org/show_bug.cgi?id=125457
3095
3096         Reviewed by Gustavo Noronha Silva.
3097
3098         Wrong file name introduced in http://trac.webkit.org/changeset/160310.
3099         * PlatformNix.cmake:
3100
3101 2013-12-09  Brendan Long  <b.long@cablelabs.com>
3102
3103         [GStreamer] Memory leak due to incorrect use of gst_tag_list_merge in TextCombinerGStreamer
3104         https://bugs.webkit.org/show_bug.cgi?id=125452
3105
3106         Reviewed by Philippe Normand.
3107
3108         No new tests because this fixes a memory leak.
3109
3110         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
3111         (webkitTextCombinerPadEvent): Use gst_tag_list_insert instead of gst_tag_list_merge, since we don't want to create a new list.
3112
3113 2013-12-09  Chris Fleizach  <cfleizach@apple.com>
3114
3115         AX: WebKit ignores @alt on IMG elements with role="text"
3116         https://bugs.webkit.org/show_bug.cgi?id=125363
3117
3118         Reviewed by Mario Sanchez Prada.
3119
3120         If an <img> element has a different role, the alt attribute should still be used in the 
3121         name calculation if present.
3122
3123         Test: accessibility/alt-tag-on-image-with-nonimage-role.html
3124
3125         * accessibility/AccessibilityNodeObject.cpp:
3126         (WebCore::AccessibilityNodeObject::usesAltTagForTextComputation):
3127         (WebCore::AccessibilityNodeObject::alternativeText):
3128         (WebCore::AccessibilityNodeObject::accessibilityDescription):
3129         (WebCore::AccessibilityNodeObject::text):
3130         * accessibility/AccessibilityNodeObject.h:
3131
3132 2013-12-08  Martin Robinson  <mrobinson@igalia.com>
3133
3134         [WK2][Soup] Use didReceiveBuffer instead of didReceiveData
3135         https://bugs.webkit.org/show_bug.cgi?id=118598
3136
3137         Reviewed by Gustavo Noronha Silva.
3138
3139         Original patch by Kwang Yul Seo  <skyul@company100.net> and Csaba Osztrogonác  <ossy@webkit.org>.
3140
3141         Switch from using didReceiveData to didReceiveBuffer for the Soup backend and
3142         let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess
3143         only supports getting data via SharedBuffer.
3144
3145         * GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list.
3146         * PlatformEfl.cmake:
3147         * PlatformGTK.cmake:
3148         * PlatformNix.cmake:
3149         * platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods.
3150         * platform/SharedBuffer.h: Ditto.
3151         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:  Use didReceiveBuffer instead of didReceiveData.
3152         * platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer.
3153         * platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer.
3154         * platform/network/soup/GOwnPtrSoup.h: Ditto.
3155         * platform/network/soup/ResourceHandleSoup.cpp:
3156         (WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be
3157         called now.
3158         (WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly.
3159         (WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer.
3160         (WebCore::redirectSkipCallback): Use the new m_soupBuffer member.
3161         (WebCore::cleanupSoupRequestOperation): Ditto.
3162         (WebCore::nextMultipartResponsePartCallback): Ditto.
3163         (WebCore::sendRequestCallback): Ditto.
3164         (WebCore::readCallback):
3165         * platform/soup/SharedBufferSoup.cpp: Added.
3166
3167 2013-12-09  Michal Poteralski  <m.poteralski@samsung.com>
3168
3169         DataCloneError exception is not thrown when postMessage's second parameter is the source
3170         port or the target port.
3171
3172         https://bugs.webkit.org/show_bug.cgi?id=124708
3173
3174         Reviewed by Alexey Proskuryakov.
3175
3176         According to specification:
3177         http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage
3178
3179         If the method was invoked with a second argument transfer then if any of the objects in the
3180         transfer are either the source port or the target port (if any), then a DataCloneError
3181         exception should be thrown. Currently an InvalidStateError exception is thrown what is an
3182         incorrect behaviour.
3183
3184         The proposed solution is change to the correct the exception value.
3185
3186         Tests: fast/dom/Window/postMessage-clone-port-error.html
3187
3188         * dom/MessagePort.cpp:
3189         (WebCore::MessagePort::postMessage): Improve exception value
3190
3191 2013-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3192
3193         Unreviewed. Fix the GTK+ build with NetworkProcess enabled.
3194
3195         * GNUmakefile.list.am: Add missing file to compilation.
3196
3197 2013-12-08  Ryosuke Niwa  <rniwa@webkit.org>
3198
3199         getComputedStyle border-radius shorthand omits vertical radius information
3200         https://bugs.webkit.org/show_bug.cgi?id=125394
3201
3202         Reviewed by Andreas Kling.
3203
3204         Merge https://chromium.googlesource.com/chromium/blink/+/4c2866855dddbb28bb7d978ad627acc368af23d0
3205
3206         getComputedStyle of border-radius shows the vertical radius components if they differ from their horizontal counterpants.
3207         We were incorrectly detecting this case and over simplifying the results of getComputedStyle.
3208         This patch ensures we only hide the vertical values if they are identical to the horizontal values.
3209
3210         * css/CSSComputedStyleDeclaration.cpp:
3211         (WebCore::getBorderRadiusShorthandValue):
3212
3213 2013-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3214
3215         [GTK] Do not skip attributes with only custom setter
3216         https://bugs.webkit.org/show_bug.cgi?id=125417
3217
3218         Reviewed by Gustavo Noronha Silva.
3219
3220         For attributes with a custom setter, we now generate the code as a
3221         read-only attribute with a getter method, unless it also has a
3222         custom getter in which case the attribute is skipped.
3223
3224         * bindings/gobject/GNUmakefile.am: Generate WebKitDOMMediaController
3225         that is now required by an attribute having a custom setter.
3226         * bindings/gobject/WebKitDOMCustom.cpp: Remove methods that are now generated.
3227         * bindings/gobject/WebKitDOMCustom.h: Ditto.
3228         * bindings/gobject/WebKitDOMCustom.symbols: Ditto.
3229         * bindings/gobject/webkitdom.symbols: Add new symbols.
3230         * bindings/scripts/CodeGeneratorGObject.pm:
3231         (SkipAttribute): Do not skip attributes having a custom setter.
3232         (GetWriteableProperties): Do not include attributes having a
3233         custom setter.
3234         (GenerateProperty): Do not return early for attributes having
3235         custom setter.
3236         (GenerateFunctions): Do not generate setter for attributes having
3237         a custom setter.
3238
3239 2013-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3240
3241         [GTK] Do not generate new dispatch_event methods marked as deprecated
3242         https://bugs.webkit.org/show_bug.cgi?id=125416
3243
3244         Reviewed by Gustavo Noronha Silva.
3245
3246         * bindings/scripts/CodeGeneratorGObject.pm:
3247         (SkipFunction): Skip dispatch_event methods for objects
3248         implementing EventTarget interface unless they are already
3249         deprecated.
3250         (GenerateFunction): Pass also the parentNode to SkipFunction().
3251
3252 2013-12-05  Jer Noble  <jer.noble@apple.com>
3253
3254         [MSE] Bring end-of-stream algorithm section up to current spec.
3255         https://bugs.webkit.org/show_bug.cgi?id=125270
3256
3257         Reviewed by Darin Adler.
3258
3259         Test: media/media-source/media-source-end-of-stream.html
3260
3261         Separate the "endOfStream()" method from the "end of stream algorithm".
3262
3263         * Modules/mediasource/MediaSource.cpp:
3264         (WebCore::SourceBufferIsUpdating): Added predicate function.
3265         (WebCore::MediaSource::endOfStream): Call streamEndedWithError().
3266         (WebCore::MediaSource::streamEndedWithError): Added.
3267         * Modules/mediasource/MediaSource.h:
3268         * Modules/mediasource/SourceBuffer.cpp:
3269         (WebCore::SourceBuffer::appendBufferTimerFired): Call streamEndedWithError().
3270         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
3271         * Modules/mediasource/SourceBuffer.h:
3272         * html/HTMLMediaElement.cpp:
3273         (HTMLMediaElement::mediaLoadingFailedFatally): Renamed from mediaEngineError.
3274         (HTMLMediaElement::mediaLoadingFailed): Call renamed method.
3275         * html/HTMLMediaElement.h:
3276         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3277         (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream): Set load state to Loaded.
3278         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3279         (WebCore::MockMediaPlayerMediaSource::setNetworkState): Simple setter.
3280         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3281         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3282         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set the intitial duration to NaN.
3283         (WebCore::MockMediaSourcePrivate::markEndOfStream): Set load state to Loaded.
3284
3285 2013-12-04  Jer Noble  <jer.noble@apple.com>
3286
3287         [MSE][Mac] Crash when removing MediaSource from HTMLMediaElement.
3288         https://bugs.webkit.org/show_bug.cgi?id=125269
3289
3290         Reviewed by Sam Weinig.
3291
3292         Fixes the media/media-source/media-source-fastseek.html test when run with MallocScribble enabled.
3293
3294         It's possible for a SourceBufferPrivateAVFObjC to outlive its MediaSourcePrivateAVFObjC, so
3295         make sure to clear the pointer from the former to the latter when the latter is destroyed.
3296         That means we now have to check to see if the pointer to the latter is still valid at every
3297         call site.
3298
3299         As a drive-by fix, rename m_parent to m_mediaSource to more accurately reflect what the pointer
3300         points to.
3301
3302         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3303         (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC): Clear the SourceBuffer's backpointer.
3304         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3305         (WebCore::SourceBufferPrivateAVFObjC::clearMediaSource): 
3306         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3307         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Rename m_parent -> m_mediaSource.
3308         (WebCore::SourceBufferPrivateAVFObjC::append): Check m_mediaSource before calling.
3309         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto.
3310         (WebCore::SourceBufferPrivateAVFObjC::readyState): Ditto.
3311         (WebCore::SourceBufferPrivateAVFObjC::setReadyState): Ditto.
3312         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
3313         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
3314         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
3315         (WebCore::SourceBufferPrivateAVFObjC::setActive): Ditto.
3316         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3317         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate): Clear the SourceBuffer's backpointer.
3318         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3319         (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate): Rename m_parent -> m_mediaSource.
3320         (WebCore::MockSourceBufferPrivate::removedFromMediaSource): Check m_mediaSource before calling.
3321         (WebCore::MockSourceBufferPrivate::readyState): Ditto.
3322         (WebCore::MockSourceBufferPrivate::setReadyState): Ditto.
3323         (WebCore::MockSourceBufferPrivate::setActive): Ditto.
3324         * platform/mock/mediasource/MockSourceBufferPrivate.h:
3325         (WebCore::MockSourceBufferPrivate::clearMediaSource):
3326
3327 2013-12-07  Zoltan Horvath  <zoltan@webkit.org>
3328
3329         Remove statusWithDirection static function from RenderBlockLineLayout
3330         https://bugs.webkit.org/show_bug.cgi?id=125372
3331
3332         Reviewed by Andreas Kling.
3333
3334         I run into a FIXME about using BidiStatus constructor rather than statusWithDirection,
3335         once it's implemented. BidiStatus has got the appropriate constructor now, so I removed
3336         statusWithDirection and updated the code to use the constructor of BidiStatus.
3337
3338         No new tests, no behavior change.
3339
3340         * rendering/RenderBlockLineLayout.cpp:
3341         (WebCore::constructBidiRunsForSegment):
3342
3343 2013-12-07  ChangSeok Oh  <changseok.oh@collabora.com>
3344
3345         Unreviewed. Build fix for gtk port after r160260.
3346
3347         * loader/cache/CachedImage.h: Add missing a header.
3348
3349 2013-12-07  Gustavo Noronha Silva  <gns@gnome.org>
3350
3351         ubuntu software center hits _XReadEvents() error
3352         https://bugs.webkit.org/show_bug.cgi?id=123480
3353
3354         Reviewed by Martin Robinson.
3355
3356         * platform/gtk/WidgetBackingStoreGtkX11.cpp:
3357         (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11): clear the surface
3358         before freeing the associated pixmap.
3359
3360 2013-12-06  Tim Horton  <timothy_horton@apple.com>
3361
3362         [mac] Keep around more decoded image data, since it's purgeable
3363         https://bugs.webkit.org/show_bug.cgi?id=125273
3364         <rdar://problem/13205438>
3365
3366         Unreviewed patch to fix review comments...
3367
3368         * platform/graphics/BitmapImage.h:
3369         Dan noticed that these return statements were improperly indented.
3370
3371 2013-12-05  Jer Noble  <jer.noble@apple.com>
3372
3373         [MSE][Mac] Disable AVFoundation when enabling the MockMediaPlayerMediaSource.
3374         https://bugs.webkit.org/show_bug.cgi?id=125338
3375
3376         Reviewed by Darin Adler.
3377
3378         The MediaSource API has some assumptions which break if more than one installed
3379         media engine supports MediaSources at the same time. So when enabling the mock
3380         media source engine in DRT or WKTR, disable AVFoundation so that only the mock
3381         engine will support media source loading.
3382
3383         * testing/Internals.cpp:
3384         (WebCore::Internals::initializeMockMediaSource):
3385
3386 2013-12-06  Antti Koivisto  <antti@apple.com>
3387
3388         Use NeverDestroyed instead of DEFINE_STATIC_LOCAL
3389
3390         Reviewed by Anders Carlsson.
3391
3392         * rendering/RenderText.cpp:
3393         (WebCore::originalTextMap):
3394
3395 2013-12-05  Jer Noble  <jer.noble@apple.com>
3396
3397         [MSE] Add a runtime-setting for the MediaSource constructor.
3398         https://bugs.webkit.org/show_bug.cgi?id=125336
3399
3400         Reviewed by Eric Carlson.
3401
3402         Add a Setting to enable the MediaSource constructor.
3403
3404         * Modules/mediasource/MediaSource.idl:
3405         * page/Settings.in:
3406
3407 2013-12-06  Tim Horton  <timothy_horton@apple.com>
3408
3409         [mac] Keep around more decoded image data, since it's purgeable
3410         https://bugs.webkit.org/show_bug.cgi?id=125273
3411         <rdar://problem/13205438>
3412
3413         Reviewed by Simon Fraser.
3414
3415         No new tests, just an optimization.
3416
3417         Instead of throwing away decoded image data eagerly, allow the operating
3418         system to manage the memory via the standard purgeability mechanism,
3419         where it can.
3420
3421         This improves the performance on some pathological cases (extremely large
3422         animated GIFs) by up to 8x.
3423
3424         * loader/cache/MemoryCache.cpp:
3425         (WebCore::MemoryCache::pruneLiveResourcesToSize):
3426         Don't prune live resources' decoded data if it is purgeable.
3427
3428         * platform/graphics/BitmapImage.cpp:
3429         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
3430         Don't eagerly throw away decoded image data if it's purgeable.
3431
3432         * loader/cache/CachedImage.h:
3433         * loader/cache/CachedResource.h: