24e90d447aeb61c1df28cd9d1e13e39391cedfe2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-10-10  Ryuan Choi  <ryuan.choi@samsung.com>
2
3         Unreviewed build fix with ENABLE_DEVICE_ORIENTATION after r157215
4
5         Now, impl() return reference instead of a pointer.
6
7         * bindings/js/JSDeviceMotionEventCustom.cpp:
8         (WebCore::JSDeviceMotionEvent::acceleration):
9         (WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
10         (WebCore::JSDeviceMotionEvent::rotationRate):
11         (WebCore::JSDeviceMotionEvent::interval):
12         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
13         * bindings/js/JSDeviceOrientationEventCustom.cpp:
14         (WebCore::JSDeviceOrientationEvent::alpha):
15         (WebCore::JSDeviceOrientationEvent::beta):
16         (WebCore::JSDeviceOrientationEvent::gamma):
17         (WebCore::JSDeviceOrientationEvent::absolute):
18         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
19
20 2013-10-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
21
22         [MediaStream API] update MediaStream object to match spec
23         https://bugs.webkit.org/show_bug.cgi?id=121939
24
25         Reviewed by Jer Noble.
26
27         Test: fast/mediastream/MediaStream-clone.html
28
29         * Modules/mediastream/MediaStream.cpp:
30         (WebCore::MediaStream::MediaStream):
31         (WebCore::MediaStream::ended):
32         (WebCore::MediaStream::clone):
33         (WebCore::MediaStream::cloneMediaStreamTrackVector):
34         (WebCore::MediaStream::contextDestroyed):
35         (WebCore::MediaStream::scheduledEventTimerFired):
36         * Modules/mediastream/MediaStream.h:
37         * Modules/mediastream/MediaStream.idl:
38
39 2013-10-10  Beth Dakin  <bdakin@apple.com>
40
41         Calling setUsePresentationValue on MountainLion results in unrecognized selector 
42         warnings
43         https://bugs.webkit.org/show_bug.cgi?id=122624
44
45         Reviewed by Tim Horton.
46
47         Only call setUsePresentationValue if the scrollbar supports updates on a secondary 
48         thread.
49         * platform/mac/ScrollAnimatorMac.mm:
50         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
51
52 2013-10-10  Seokju Kwon  <seokju@webkit.org>
53
54         Unreviewed build fix after r157250
55
56         * dom/EventDispatcher.cpp:
57         (WebCore::EventDispatcher::dispatchEvent):
58
59 2013-10-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
60
61         Create MediaStream object with ended attribute set if all tracks that are being used on its creation are ended
62         https://bugs.webkit.org/show_bug.cgi?id=122358
63
64         Reviewed by Jer Noble.
65
66         Spec tells that if all tracks that belongs to a new MediaStream object being created are ended,
67         then the ended attribute of this MediaStream must be set to true.
68         http://www.w3.org/TR/mediacapture-streams/#widl-MediaStream-ended
69
70         Since there is no port supporting MediaStream yet, we are skipping this test for now.
71
72         Test: fast/mediastream/MediaStream-construct-with-ended-tracks.html
73
74         * Modules/mediastream/MediaStream.cpp:
75         (WebCore::createFromSourceVectors):
76         (WebCore::MediaStream::create):
77         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
78         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
79         * platform/mediastream/MediaStreamDescriptor.cpp:
80         (WebCore::MediaStreamDescriptor::create):
81         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
82         * platform/mediastream/MediaStreamDescriptor.h:
83         * platform/mock/MockMediaStreamCenter.cpp:
84         (WebCore::MockMediaStreamCenter::createMediaStream):
85
86 2013-10-10  Andy Estes  <aestes@apple.com>
87
88         Add SPI for telling WebKit to prefer pictograph glyphs over monochrome ones
89         https://bugs.webkit.org/show_bug.cgi?id=122608
90
91         Reviewed by Dan Bernstein.
92
93         Based on patches by Dan Bernstein.
94
95         Test: fonts/font-fallback-prefers-pictographs.html
96
97         Created a mechanism to append a font to the end of a font's fallback
98         list, before the system fallback list. This mechanism is used when
99         Settings::fontFallbackPrefersPictographs() is true to insert a
100         pictograph font ahead of a monochrome one from the system fallback list.
101
102         * WebCore.exp.in: Moved
103         __ZN7WebCore8Settings33setFontFallbackPrefersPictographsEb outside of
104         an iOS platform guard.
105         * css/CSSFontSelector.cpp:
106         (WebCore::CSSFontSelector::fallbackFontDataCount): Retuned 1 if
107         pictograph fonts are preferred.
108         (WebCore::CSSFontSelector::getFallbackFontData): Returned the
109         pictograph font's FontData if it is preferred.
110         * css/CSSFontSelector.h:
111         * page/Settings.cpp:
112         (WebCore::Settings::Settings): Initialized
113         m_fontFallbackPrefersPictographs to false.
114         (WebCore::Settings::setFontFallbackPrefersPictographs): Set
115         m_fontFallbackPrefersPictographs and called
116         Page::setNeedsRecalcStyleInAllFrames().
117         * page/Settings.h:
118         (WebCore::Settings::fontFallbackPrefersPictographs):
119         * platform/graphics/FontGlyphs.cpp:
120         (WebCore::FontGlyphs::realizeFontDataAt): Realized the selector's
121         fallback font if necessary.
122         * platform/graphics/FontSelector.h:
123         * style/StyleResolveTree.cpp:
124         (WebCore::Style::resolveTree): Removed iOS platform guards.
125         * testing/InternalSettings.cpp:
126         (WebCore::InternalSettings::setFontFallbackPrefersPictographs): Set the
127         corresponding WebCore::Setting.
128         * testing/InternalSettings.h: Defined an internal setting for the test.
129         * testing/InternalSettings.idl: Ditto.
130
131 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
132
133         Remove unused attribute in CoordinatedTile class
134         https://bugs.webkit.org/show_bug.cgi?id=122619
135
136         Reviewed by Noam Rosenthal.
137
138         No new tests, covered by existing ones.
139
140         * platform/graphics/texmap/coordinated/CoordinatedTile.h: Remove
141         m_localBuffer.
142
143 2013-10-10  Beth Dakin  <bdakin@apple.com>
144
145         Scrollbars are updated on the main thread rather than the scrolling thread 
146         (causing scroll bars not to appear/update quickly in some cases)
147         https://bugs.webkit.org/show_bug.cgi?id=122585
148         -and corresponding-
149         <rdar://problem/10710775>
150
151         Reviewed by Simon Fraser.
152
153         This patch does a few things in order to allow scrollbars to be updated on the 
154         scrolling thread:
155
156         1. This patch adds the ability to know if the lower-level APIs necessary to get 
157         this to work right are available, AND if the content is actually capable of taking 
158         advantage of this feature. This is currently implemented as 
159         Scrollbar::supportsUpdateOnSecondaryThread() which makes use of a new 
160         ScrollableArea function called updatesScrollLayerPositionOnMainThread()
161         
162         2. To update on the scrolling thread, the scrolling tree needs to know about the 
163         ScrollbarPainters.
164         
165         3. Once it knows about them, it should update the presentation value whenever the 
166         layer position changes.
167         
168         4. Presentation value is basically the same thing as double value. There is a bit 
169         of code we maintain currently to compute that. This patch moves that code to a 
170         static function on ScrollableArea that can be called from both the main thread and 
171         the scrolling thread.
172         
173         5. ScrollbarPainter API needs to know about the layers we have created for the 
174         vertical and horizontal scrollbars, then they will use those layers and the 
175         presentation value that we set on the scrolling thread to move the layers around.
176
177         This is part of #1 above. 
178         * page/FrameView.cpp:
179         (WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
180         * page/FrameView.h:
181
182         This is part of #2. ScrollingStateScrollingNodes now have vertical and horizontal 
183         ScrollbarPainters for Mac only.
184         * page/scrolling/ScrollingStateScrollingNode.cpp:
185         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
186         * page/scrolling/ScrollingStateScrollingNode.h:
187         (WebCore::ScrollingStateScrollingNode::verticalScrollbarPainter):
188         (WebCore::ScrollingStateScrollingNode::horizontalScrollbarPainter):
189
190         Also part of #2. Make sure to set the ScrollbarPainters for scrolling nodes when 
191         appropriate.
192         * page/scrolling/mac/ScrollingCoordinatorMac.h:
193         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
194         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
195
196         Implement this function that was just stubbed out before. This is part of #5 in 
197         that is will allow the ScrollbarPainter API to know about any layer changes. 
198         (WebCore::ScrollingCoordinatorMac::scrollableAreaScrollbarLayerDidChange):
199
200         Back to #2, making sure we properly set the ScrollbarPainters to send over to the 
201         scrolling thread.
202         (WebCore::ScrollingCoordinatorMac::setScrollbarPaintersForNode):
203         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
204         (WebCore::ScrollingStateScrollingNode::setScrollbarPainters):
205
206         This code achieves #3. It uses new ScrollbarPainter API to adjust the position of 
207         the scrollbars from the scrolling thread.
208         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
209         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
210         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
211         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
212         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
213
214         This is for #5. ScrollbarPainter needs to know about our scrollbar layers.
215         * platform/ScrollAnimator.h:
216         (WebCore::ScrollAnimator::verticalScrollbarLayerDidChange):
217         (WebCore::ScrollAnimator::horizontalScrollbarLayerDidChange):
218         * platform/ScrollableArea.cpp:
219         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
220         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
221
222         This is for #4. This code computes the scrollbar’s value and current overhang 
223         amount.
224         (WebCore::ScrollableArea::computeScrollbarValueAndOverhang):
225         * platform/ScrollableArea.h:
226         (WebCore::ScrollableArea::layerForHorizontalScrollbar):
227         (WebCore::ScrollableArea::layerForVerticalScrollbar):
228         (WebCore::ScrollableArea::layerForScrolling):
229
230         This is for #1. We need to know if we have the ability to update scrollbars on a 
231         different thread. We can do that only on certain versions of the OS, only when 
232         threaded scrolling is enabled, and only when the current page is actually using 
233         the scrolling thread to scroll.
234         * platform/Scrollbar.cpp:
235         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
236         * platform/Scrollbar.h:
237         * platform/ScrollbarThemeClient.h:
238
239         New ScrollbarPainter APIs.
240         * platform/mac/NSScrollerImpDetails.h:
241
242         This is for #5, letting the ScrollbarPainter API  know about the layers.
243         * platform/mac/ScrollAnimatorMac.h:
244         * platform/mac/ScrollAnimatorMac.mm:
245         (-[WebScrollbarPainterDelegate layer]):
246         (-[WebScrollbarPainterDelegate convertRectToLayer:]):
247         (-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
248
249         Before we kick off a scroll animation, set the current painting characteristics so 
250         they are up-to-date in case we are scrolling on the scrolling thread.
251         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
252         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
253         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
254         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
255         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
256         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
257         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
258
259         Only paint the scrollbars through ScrollbarThemeMac if they are NOT being updated 
260         by the scrolling thread.
261         * platform/mac/ScrollbarThemeMac.h:
262         * platform/mac/ScrollbarThemeMac.mm:
263         (WebCore::ScrollbarThemeMac::setCurrentPaintCharacteristics):
264         (WebCore::scrollbarPainterPaint):
265         (WebCore::ScrollbarThemeMac::paint):
266
267         Back to #1.
268         * rendering/RenderLayer.cpp:
269         (WebCore::RenderLayer::updatesScrollLayerPositionOnMainThread):
270         * rendering/RenderLayer.h:
271         * rendering/RenderLayerCompositor.cpp:
272         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
273         * rendering/RenderListBox.h:
274
275 2013-10-10  Brent Fulgham  <bfulgham@apple.com>
276
277         [Win] Unreviewed build fix after r157228
278
279         The changes in r157228 trigger a bug in VS2010. This patch works around the compiler bug
280         to allow this platform to build.
281
282         * dom/Range.cpp: Move implementation to header file.
283         * dom/Range.h: Inline the method.
284         * page/DOMWindow.cpp:
285         (WebCore::DOMWindow::open): Add stub method (with pointer arguments) to call the real
286         method with references.
287         * page/DOMWindow.h: Declare stub method taking pointer arguments to avoid compiler bug.
288         * testing/Internals.cpp:
289         (WebCore::Internals::openDummyInspectorFrontend): Use work-around method when building under
290         the buggy version of Visual Studio.
291
292 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
293
294         Make all functions of EventDispatcher static
295         https://bugs.webkit.org/show_bug.cgi?id=122591
296
297         Reviewed by Antti Koivisto.
298
299         Now that EventDispatchMediator is gone, we don't have to have an EventDispatcher object.
300         Turn EventDispatcher into an empty class with a bunch of static functions.
301
302         We can convert it to a namespace or whatever later.
303
304         * dom/EventDispatcher.cpp:
305         (WebCore::EventDispatcher::dispatchSimulatedClick):
306         (WebCore::EventDispatcher::dispatchEvent):
307         * dom/EventDispatcher.h:
308
309 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
310
311         Convert some OwnPtr/PassOwnPtr in CoordinatedGraphics code to std::unique_ptr's
312         https://bugs.webkit.org/show_bug.cgi?id=122614
313
314         Reviewed by Anders Carlsson.
315
316         No new tests, covered by existing ones.
317
318         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
319         (WebCore::CompositingCoordinator::paintToSurface):
320         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
321         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
322         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
323         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
324         (WebCore::CoordinatedGraphicsLayer::createBackingStore):
325         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
326         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
327         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
328         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
329         (WebCore::CoordinatedGraphicsScene::createLayer):
330         (WebCore::CoordinatedGraphicsScene::deleteLayer):
331         (WebCore::CoordinatedGraphicsScene::ensureRootLayer):
332         (WebCore::CoordinatedGraphicsScene::purgeGLResources):
333         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
334         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp:
335         (WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
336         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h:
337         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
338         (WebCore::UpdateAtlas::buildLayoutIfNeeded):
339         (WebCore::UpdateAtlas::didSwapBuffers):
340         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
341         (WebCore::UpdateAtlas::isInUse):
342
343 2013-10-10  Roger Fong  <roger_fong@apple.com>
344
345         Validate uniform input when setting texture sampler uniforms.
346         https://bugs.webkit.org/show_bug.cgi?id=122610.
347
348         Reviewed by Dean Jackson.
349
350         Covered by Khronos Conformance Suite 1.0.2.
351         Specifically, conformance/uniforms/uniform-samplers-test.html.
352
353         * html/canvas/WebGLRenderingContext.cpp:
354         (WebCore::WebGLRenderingContext::uniform1i):
355         (WebCore::WebGLRenderingContext::uniform1iv):
356
357 2013-10-10  Roger Fong  <roger_fong@apple.com>
358
359         Store uniform type information in WebGLUniformationLocation.
360         https://bugs.webkit.org/show_bug.cgi?id=122607.
361
362         Reviewed by Dean Jackson.
363
364         Covered by Khronos Conformance Suite 1.0.2.
365
366         * html/canvas/WebGLRenderingContext.cpp:
367         (WebCore::WebGLRenderingContext::getUniform):
368         (WebCore::WebGLRenderingContext::getUniformLocation):
369         * html/canvas/WebGLUniformLocation.cpp:
370         (WebCore::WebGLUniformLocation::create):
371         (WebCore::WebGLUniformLocation::WebGLUniformLocation):
372         (WebCore::WebGLUniformLocation::type):
373         * html/canvas/WebGLUniformLocation.h:
374
375 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
376
377         REGRESSION(r157203): WebKit crashes after dispatching gesture event
378         https://bugs.webkit.org/show_bug.cgi?id=122615
379
380         Reviewed by Anders Carlsson.
381
382         Don't release the event until the end of the function where we call member functions on it.
383
384         * dom/Node.cpp:
385         (WebCore::Node::dispatchGestureEvent):
386
387 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
388
389         Move the rest of EventRetargeter functions to EventPath
390         https://bugs.webkit.org/show_bug.cgi?id=122586
391
392         Reviewed by Andreas Kling.
393
394         Moved the rest of EventRetargeter functiosn either static local or EventPath member functions.
395
396         * dom/EventDispatcher.cpp:
397         (WebCore::EventDispatcher::dispatchScopedEvent):
398         (WebCore::EventDispatcher::dispatch):
399         (WebCore::EventDispatcher::dispatchEventPostProcess):
400         * dom/EventDispatcher.h:
401         * dom/EventRetargeter.cpp:
402         (WebCore::EventPath::EventPath):
403         (WebCore::calculateAdjustedNodes): Made static local. Also takes const EventPath and returns the size
404         to which EventPath should be shrunk; this allows us to remove EventPath::shrink.
405         (WebCore::updateTouchListsInEventPath): Moved and renamed from EventRetargeter::adjustTouchList.
406         (WebCore::EventPath::updateTouchLists): Moved and renamed from EventRetargeter::adjustForTouchEvent.
407         (WebCore::EventPath::setRelatedTarget): Moved.
408         * dom/EventRetargeter.h:
409         (WebCore::eventTargetRespectingTargetRules): Renamed from EventRetargeter::eventTargetRespectingTargetRules.
410
411 2013-10-10  Mark Rowe  <mrowe@apple.com>
412
413         <rdar://problem/13341666> WebKit should always build against an SDK.
414
415         Have all projects default to building against the OS X Internal SDK for the Production
416         configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
417         to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.
418
419         Reviewed by Dan Bernstein.
420
421
422         * Configurations/Base.xcconfig:
423         * Configurations/DebugRelease.xcconfig:
424
425 2013-10-10  Hans Muller  <hmuller@adobe.com>
426
427         [CSS Shapes] clampToUnsigned() should return unsigned, not int
428         https://bugs.webkit.org/show_bug.cgi?id=122601
429
430         Reviewed by Andreas Kling.
431
432         Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
433         No new tests since this is just an internal refactoring of existing code.
434
435         * rendering/shapes/RasterShape.cpp:
436         (WebCore::RasterShape::marginIntervals): Use the redefined clampToUnsigned method.
437
438 2013-10-10  Bem Jones-Bey  <bjonesbe@adobe.com>
439
440         [CSS Shapes] New positioning model: Shape cropped to margin box
441         https://bugs.webkit.org/show_bug.cgi?id=118092
442
443         Reviewed by Alexandru Chiculita.
444
445         Clip the shape to the margin box when it extends out the left or right
446         edges. Also added a few local variables to make the code easier to
447         read.
448
449         Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-ref.html
450                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html
451                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005.html
452                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006.html
453
454         * rendering/shapes/ShapeOutsideInfo.cpp:
455         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
456
457 2013-10-10  Daniel Bates  <dabates@apple.com>
458
459         Avoid resizing the internal buffer of SharedBuffer when creating a PurgeableBuffer
460         https://bugs.webkit.org/show_bug.cgi?id=122516
461
462         Reviewed by Darin Adler.
463
464         Currently when we create a PurgeableBuffer from a SharedBuffer we may
465         resize the internal buffer of the SharedBuffer so that it can fit the
466         concatenated contents of all of its segments before copying this
467         internal buffer to the internal buffer of the PurgeableBuffer. Instead,
468         we can avoid resizing the internal buffer of SharedBuffer by allocating
469         a PurgeableBuffer and then copying the internal buffer of SharedBuffer
470         and its segments directly into it.
471
472         * platform/PurgeableBuffer.h:
473         (WebCore::PurgeableBuffer::createUninitialized): Add inline implementation
474         when building with ENABLE_PURGEABLE_MEMORY disabled.
475         * platform/SharedBuffer.cpp:
476         (WebCore::SharedBuffer::createPurgeableBuffer): Implemented in terms of
477         SharedBuffer::{copyBufferAndClear, createUninitialized}().
478         (WebCore::SharedBuffer::copyBufferAndClear): Added.
479         (WebCore::SharedBuffer::buffer): Moved logic to copy segments/data array to
480         SharedBuffer::copyBufferAndClear() and modified this function to use it.
481         * platform/SharedBuffer.h:
482         * platform/cf/SharedBufferCF.cpp:
483         (WebCore::SharedBuffer::copyBufferAndClear): Renamed; formerly called SharedBuffer::copyDataArrayAndClear.
484         * platform/mac/PurgeableBufferMac.cpp:
485         (WebCore::allocatePurgeableBuffer): Added.
486         (WebCore::PurgeableBuffer::createUninitialized): Added.
487         (WebCore::PurgeableBuffer::create): Moved logic to allocate a purgeable buffer into
488         PurgeableBuffer::createUninitialized() and modified this function to use it.
489
490 2013-10-09  Chris Fleizach  <cfleizach@apple.com>
491
492         AX: VoiceOver speaking too much when group elements with tabindex=-1 are used
493         https://bugs.webkit.org/show_bug.cgi?id=122574
494
495         Reviewed by Mario Sanchez Prada.
496
497         Tests: accessibility/negative-tabindex-does-not-expose-label.html
498
499         Elements that expose tabindex=-1 are being identified as generic focusable elements for accessibility.
500         Which among other things, determines whether to create an accessible name for the object. 
501         This has the negative effect of causing VoiceOver to speak way too much information when navigating inside
502         a <div> with this attribute.
503
504         * accessibility/AccessibilityNodeObject.cpp:
505         (WebCore::AccessibilityNodeObject::visibleText):
506         (WebCore::AccessibilityNodeObject::title):
507
508 2013-10-10  Andreas Kling  <akling@apple.com>
509
510         Remove custom finalizer for Node JS wrappers.
511         <https://webkit.org/b/122603>
512
513         Reviewed by Geoff Garen.
514
515         Node can just use the auto-generated finalizer, the custom one was
516         identical to what the generator would output.
517
518 2013-10-10  Andreas Kling  <akling@apple.com>
519
520         CTTE: activeDOMWindow() and firstDOMWindow() should return references.
521         <https://webkit.org/b/122598>
522
523         Reviewed by Anders Carlsson.
524
525         Now that wrappers vend references to their WebCore objects, follow
526         up and make these two return references as well.
527
528 2013-10-10  Mario Sanchez Prada  <mario.prada@samsung.com>
529
530         [ATK] Missing checks in returnIfWebKitAccessibleIsInvalid
531         https://bugs.webkit.org/show_bug.cgi?id=122600
532
533         Reviewed by Chris Fleizach.
534
535         Check that the AccessibilityObject associated to the ATK wrapper
536         is not NULL and contains a valid reference to the document before
537         calling AccessibilityObject::updateBackingStore().
538
539         * accessibility/atk/WebKitAccessibleUtil.h: Add extra checks.
540
541 2013-10-10  Andreas Kling  <akling@apple.com>
542
543         Clean up JSDOMWindowShell a little.
544         <https://webkit.org/b/122599>
545
546         Reviewed by Anders Carlsson.
547
548         - Have impl() return a DOMWindow& instead of a pointer.
549         - Store the DOMWrapperWorld in a Ref instead of a RefPtr.
550         - Reuse TRY_TO_UNWRAP_WITH_INTERFACE in EventTarget bindings.
551
552 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
553
554         Make XPathGrammar.y bison3-friendly again after r157205
555         https://bugs.webkit.org/show_bug.cgi?id=122595
556
557         Reviewed by Anders Carlsson.
558
559         No new tests, build fix.
560
561         * xml/XPathGrammar.y: Replace YYLEX_PARAM with %lex-param, as the
562         former was removed in bison3.
563
564 2013-10-10  Andreas Kling  <akling@apple.com>
565
566         SVGUseElement: Use iterative traversal to find disallowed elements.
567         <https://webkit.org/b/122596>
568
569         Reviewed by Antti Koivisto.
570
571         Rewrote subtreeContainsDisallowedElement() in SVGUseElement.cpp to
572         use iterative traversal with descendantsOfType<Element> instead of
573         recursing through the tree.
574
575 2013-10-10  Andreas Kling  <akling@apple.com>
576
577         Move RenderObject::layout() to RenderElement.
578         <https://webkit.org/b/122537>
579
580         Reviewed by Antti Koivisto.
581
582         RenderText will ASSERT_NOT_REACHED() in its layout(), so move this
583         to RenderElement. This allows us to use the fast firstChild()
584         instead of virtual dispatch.
585
586         The needsLayout() bit remains on RenderObject for now. Moving that
587         to RenderElement is a far more involved change.
588
589 2013-10-10  Chris Fleizach  <cfleizach@apple.com>
590
591         AX: Crash at WebCore::accessibleNameForNode when visiting Facebook
592         https://bugs.webkit.org/show_bug.cgi?id=122572
593
594         Reviewed by Mario Sanchez Prada.
595
596         Test: accessibility/aria-labeled-with-hidden-node.html
597
598         Handle the case where aria-labelledby references a non-rendered node.
599
600         * accessibility/AccessibilityNodeObject.cpp:
601         (WebCore::accessibleNameForNode):
602
603 2013-10-10  Zan Dobersek  <zdobersek@igalia.com>
604
605         REGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for platforms using GCC
606         https://bugs.webkit.org/show_bug.cgi?id=122592
607
608         Reviewed by Gustavo Noronha Silva.
609
610         * dom/ScopedEventQueue.cpp:
611         (WebCore::ScopedEventQueue::dispatchEvent): When calling EventDispatcher::dispatchEvent(), the GCC-compiled code
612         first creates a copy of the PassRefPtr<Event> object that's being passed into the method call. The copy will be used
613         in that method while the original is left with a null pointer. Only after that is the original queried for its pointer
614         while trying to get the Event's target, resulting in a crash due to calling the Event::target() on a null pointer.
615         To avoid it, pass a naked Event pointer to the method call. This will create a new PassRefPtr object without nullifying
616         the original one.
617
618 2013-10-10  Andreas Kling  <akling@apple.com>
619
620         Use more Element iterators in SVG code.
621         <http://webkit.org/b/121127>
622
623         Reviewed by Antti Koivisto.
624
625         Use childrenOfType to iterate over only SVGElement (or even more
626         specific) children in a bunch of places.
627
628         Also auto-generate type helpers for SVGElement and SVGStopElement.
629
630 2013-10-10  Andreas Kling  <akling@apple.com>
631
632         JS DOM wrappers' impl() functions should return references.
633         <https://webkit.org/b/122497>
634
635         Reviewed by Antti Koivisto.
636
637         JS DOM wrappers always have a corresponding WebCore object during
638         their lifetime, so make impl() return a reference.
639
640 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
641
642         Fix debug build after r157210
643         https://bugs.webkit.org/show_bug.cgi?id=122593
644
645         Reviewed by Andreas Kling.
646
647         No new tests, build fix.
648
649         * dom/EventContext.cpp:
650         (WebCore::TouchEventContext::handleLocalEvents): Fix ASSERT, now that
651         event is a reference instead of a pointer.
652
653 2013-10-10  Andreas Kling  <akling@apple.com>
654
655         Tighten some renderer access in Document.
656         <https://webkit.org/b/121865>
657
658         Reviewed by Antti Koivisto.
659
660         A bit of Node/Element and RenderObject/RenderElement tightening.
661
662 2013-10-08  Andreas Kling  <akling@apple.com>
663
664         rangeOfContents() should take a Node&.
665         <https://webkit.org/b/122438>
666
667         Reviewed by Darin Adler.
668
669         All callers of rangeOfContents() either have a Node& already,
670         or do some kind of null-checking before calling it.
671
672 2013-10-08  Sergio Villar Senin  <svillar@igalia.com>
673
674         [CSS Grid Layout] Implement support for grid-template
675         https://bugs.webkit.org/show_bug.cgi?id=103313
676
677         Reviewed by Dean Jackson.
678
679         Based on Blink r153427, r155199 and r155712 by <jchaffraix@chromium.org>
680
681         Test: fast/css-grid-layout/grid-template-get-set.html
682
683         Recognize, parse, store and return properly the value of
684         grid-template. It required some extra parsing code because the
685         specs mandates to check that the defined grid areas are indeed
686         rectangular. Named grid areas are still not fully supported, will
687         be done in a follow up patch.
688
689         As validating involves building the grid areas a new CSSValue was
690         added to hold the computed value. Note that we have to track the
691         explicit size of the named grid areas as the named grid areas
692         (".") are not tracked in our HashMap of grid areas.
693
694         This change also involves moving GridCoordinate and GridSpan to a
695         separate file in order to share the code that describes the grid
696         area coordinates.
697
698         * CMakeLists.txt: Added new files to the build.
699         * GNUmakefile.list.am: Ditto.
700         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
701         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
702         * WebCore.xcodeproj/project.pbxproj: Ditto.
703         * css/CSSComputedStyleDeclaration.cpp:
704         (WebCore::ComputedStyleExtractor::propertyValue):
705         * css/CSSGridTemplateValue.cpp: Added.
706         (WebCore::CSSGridTemplateValue::CSSGridTemplateValue):
707         (WebCore::stringForPosition):
708         (WebCore::CSSGridTemplateValue::customCSSText):
709         * css/CSSGridTemplateValue.h: Added.
710         (WebCore::CSSGridTemplateValue::create):
711         (WebCore::CSSGridTemplateValue::~CSSGridTemplateValue):
712         (WebCore::CSSGridTemplateValue::gridAreaMap):
713         (WebCore::CSSGridTemplateValue::rowCount):
714         (WebCore::CSSGridTemplateValue::columnCount):
715         (WebCore::toCSSGridTemplateValue):
716         * css/CSSParser.cpp:
717         (WebCore::CSSParser::parseValue):
718         (WebCore::CSSParser::parseGridTemplate): create the grid areas and
719         validate that they define rectangular sections.
720         * css/CSSParser.h:
721         * css/CSSPropertyNames.in: Added -webkit-grid-template.
722         * css/CSSValue.cpp:
723         (WebCore::CSSValue::equals): add support for the new CSSGridTemplateValue.
724         (WebCore::CSSValue::cssText): Ditto.
725         (WebCore::CSSValue::destroy): Ditto.
726         * css/CSSValue.h:
727         (WebCore::CSSValue::isGridTemplateValue):
728         * css/StyleResolver.cpp:
729         (WebCore::StyleResolver::applyProperty):
730         * rendering/RenderGrid.cpp:
731         (WebCore::RenderGrid::cachedGridCoordinate): Replaced RenderGrid::GridSpan by WebCore::GridSpan.
732         (WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition): Ditto.
733         (WebCore::RenderGrid::resolveGridPositionsFromStyle): Ditto.
734         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition): Ditto.
735         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition): Ditto.
736         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Ditto.
737         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
738         * rendering/RenderGrid.h: Took GridSpan and GridCoordinate out.
739         * rendering/style/GridCoordinate.h: Added.
740         (WebCore::GridSpan::create):
741         (WebCore::GridSpan::GridSpan):
742         (WebCore::GridSpan::operator==):
743         (WebCore::GridCoordinate::GridCoordinate):
744         (WebCore::GridCoordinate::operator==):
745         (WebCore::GridCoordinate::operator!=):
746         * rendering/style/RenderStyle.h:
747         * rendering/style/StyleGridData.cpp:
748         (WebCore::StyleGridData::StyleGridData):
749         * rendering/style/StyleGridData.h:
750         (WebCore::StyleGridData::operator==):
751
752 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
753
754         Make EventDispatcher::dispatch comprehensible
755         https://bugs.webkit.org/show_bug.cgi?id=122588
756
757         Reviewed by Andreas Kling.
758
759         Merged EventDispatcher::dispatchEventAtCapturing, EventDispatcher::dispatchEventAtTarget,
760         EventDispatcher::dispatchEventAtBubbling, and EventDispatcher::dispatchEventPostProcess into EventDispatcher::dispatch,
761         and extracted static local callDefaultEventHandlersInTheBubblingOrder and dispatchEventInDOM out of it.
762
763         Also made handleLocalEvents of subclasses of EventContext and Node take Event& instead of Event*.
764
765         * dom/EventContext.cpp: The following functions now take Event& instead of Event*.
766         (WebCore::EventContext::handleLocalEvents):
767         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
768         (WebCore::TouchEventContext::handleLocalEvents):
769         * dom/EventContext.h:
770
771         * dom/EventDispatcher.cpp:
772         (WebCore::callDefaultEventHandlersInTheBubblingOrder): Extracted from EventDispatcher::dispatchEventPostProcess,
773         which is now merged into EventDispatcher::dispatch.
774         (WebCore::dispatchEventInDOM): Extracted out of EventDispatcher::dispatch, EventDispatcher::dispatchEventAtCapturing,
775         EventDispatcher::dispatchEventAtTarget and EventDispatcher::dispatchEventAtBubbling. This function is responsible for
776         dispatching the event for capturing, at the target, and then bubbling through the event path chain.
777         (WebCore::EventDispatcher::dispatch): EventDispatcher::dispatchEventPostProcess got merged into this. The calls to
778         dispatchEventAtCapturing, dispatchEventAtTarget, and dispatchEventAtBubbling are replaced by a single call to
779         dispatchEventInDOM.
780         * dom/EventDispatcher.h:
781
782         * dom/FocusEvent.h:
783         (WebCore::toFocusEvent): Added the version that takes a reference.
784         * dom/MouseEvent.h:
785         (WebCore::toMouseEvent): Ditto.
786         * dom/TouchEvent.h:
787         (WebCore::toTouchEvent): Ditto.
788         * dom/Node.cpp:
789         (WebCore::Node::handleLocalEvents): Now takes Event& instead of Event*.
790         * dom/Node.h:
791         * dom/WindowEventContext.cpp:
792         (WebCore::WindowEventContext::handleLocalEvents): Ditto.
793         * dom/WindowEventContext.h:
794         * html/HTMLFormElement.cpp:
795         (WebCore::HTMLFormElement::handleLocalEvents): Ditto.
796         * html/HTMLFormElement.h:
797
798 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
799
800         Another build fix after r157204.
801
802         * dom/EventDispatcher.cpp:
803         (WebCore::EventDispatcher::dispatch):
804
805 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
806
807         Build fix after r157204.
808
809         * dom/EventDispatcher.cpp:
810         (WebCore::EventDispatcher::dispatch):
811
812 2013-10-07  Darin Adler  <darin@apple.com>
813
814         Use unique_ptr instead of deleteAllValues in XPath
815         https://bugs.webkit.org/show_bug.cgi?id=121082
816
817         Reviewed by Anders Carlsson.
818
819         * dom/Attr.h: Made the namespaceURI function public so it can be called by
820         code in XPath. Since the class is FINAL, calls won't do virtual dispatch.
821
822         * xml/XPathExpression.cpp:
823         (WebCore::XPathExpression::XPathExpression): Added. Use std::move.
824         (WebCore::XPathExpression::createExpression): Use the new Parser::parseStatement
825         and more std::move.
826         (WebCore::XPathExpression::~XPathExpression): Removed now-unneeded delete.
827         * xml/XPathExpression.h: Removed unused create function. Use std::unique_ptr.
828
829         * xml/XPathExpressionNode.cpp:
830         (WebCore::XPath::Expression::evaluationContext): Use NeverDestroyed instead of
831         DEFINE_STATIC_LOCAL.
832         (WebCore::XPath::Expression::setSubexpressions): Added. Used to set all the
833         subexpressions at once rather than adding one at a time.
834
835         * xml/XPathExpressionNode.h: Use plain unsigned instead of unsigned long.
836         Eliminated the ParseNode class, used only by the parser to delete objects,
837         which we now do with %destructor. Made more functions protected. Fixed the
838         capitalization of the word "subexpression". Made m_subexpressions be a Vector
839         of std::unique_ptr.
840
841         * xml/XPathFunctions.cpp: Marked all the classes FINAL and all their virtual
842         functions OVERRIDE. Reduced some of the boilerplate.
843         (WebCore::XPath::Function::setArguments): Passed in the name so we don't have
844         to store the function names in all the function objects.
845         (WebCore::XPath::FunId::evaluate): Use std::move instead of Value::adopt.
846         (WebCore::XPath::FunLocalName::evaluate): Use emptyString instead of "".
847         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
848         (WebCore::XPath::FunName::evaluate): Ditto.
849         (WebCore::XPath::FunSubstringBefore::evaluate): Ditto.
850         (WebCore::XPath::FunSubstringAfter::evaluate): Ditto.
851         (WebCore::XPath::FunSubstring::evaluate): Ditto.
852         (WebCore::XPath::FunLang::evaluate): Use Value(false) so we can make the
853         constructor that takes a boolean explicit.
854         (WebCore::XPath::FunFalse::evaluate): Ditto.
855         (WebCore::XPath::populateFunctionMap): Changed idiom slightly to match other
856         maps we set up.
857         (WebCore::XPath::Function::create): Refactored createFunction into three
858         member functions of this name.
859
860         * xml/XPathFunctions.h: Made all the Function members private or protected
861         except for Function::create.
862
863         * xml/XPathGrammar.y: Changed the parser to use a reference instead of
864         a pointer, and to pass the reference through to yylex as well. Break up
865         the union into pieces and add %destructor as needed to make sure everything
866         gets deallocated if parsing fails. Added a new top level rule "Top" so that
867         we would not try to set the parse result multiple times during parsing.
868         Call setParseResult instead of setting m_topExpr directly. Use std::unique_ptr
869         to adopt pointers from the union. Removed all the register/unregister calls
870         that used to be used to manage storage. Also changed the four different node
871         types to be separate tokens instead of using string matching at this level
872         for them.
873
874         * xml/XPathNodeSet.cpp:
875         (WebCore::XPath::NodeSet::sort): Removed const_cast since m_isSorted and
876         m_nodes are now both marked mutable. Also set m_isSorted after sorting; this
877         was an oversight that hurt performance before.
878         (WebCore::XPath::NodeSet::traversalSort): Ditto.
879         (WebCore::XPath::NodeSet::firstNode): Use nullptr.
880         (WebCore::XPath::NodeSet::anyNode): Ditto.
881
882         * xml/XPathNodeSet.h: Removed unneeded extra includes. Removed the
883         WTF_MAKE_FAST_ALLOCATED for NodeSet since we never allocate these on the heap.
884         Added a constructor that takes a single node. Deleted the swap function, since
885         we now move instead of swap. Deleted the append function that takes a raw Node*,
886         since calling the PassRefPtr<Node> overload does the same thing. Removed the
887         unused reverse function. Marked both m_isSorted and m_nodes mutable so the
888         sort function can be const.
889
890         * xml/XPathParser.cpp: Moved the Token struct in here instead of the header.
891         (WebCore::XPath::populateAxisNamesMap):Renamed to match our normal naming scheme,
892         and changed to use add instead of set, use WTF_ARRAY_LENGTH, and not use a typedef.
893         (WebCore::XPath::parseAxisName): Related style changes, including renaming to
894         better reflect the way this works with a boolean.
895         (WebCore::XPath::Parser::nextTokenInternal): Updated to call parseAxisName,
896         and to produce four separate tokens for the four node type functions.
897         (WebCore::XPath::Parser::nextToken): Renamed local variable.
898         (WebCore::XPath::Parser::Parser): Made this a real constructor that takes arguments
899         and initializes all the fields. Deleted the unneeded reset function.
900         (WebCore::XPath::Parser::lex): Changed to take an argument of an appropriate type
901         instead of casting from void*. Also changed the string code to leak a StringImpl,
902         which is now what the grammar code expects.
903         (WebCore::XPath::Parser::expandQualifiedName): Renamed from expandQName. Changed
904         to set m_sawNamespaceError instead of relying on code in the grammar to do it.
905         (WebCore::XPath::Parser::parseStatement): Removed most of the code in this function.
906         Changed to a much simpler model. Also made this a static member function so it
907         takes care of creating the parser itself and does not need to call reset. Also
908         changed return value to be a std::unique_ptr to make ownership more clear.
909
910         * xml/XPathParser.h: Added a declaration of YYSTYPE. Removed unneeded forward
911         declarations and moved Token into the cpp file. Deleted most public functions,
912         leaving only parseStatement, the entry point, and the three functions needed by
913         the grammar, lex, expandQualifiedName, and setParseResult.
914
915         * xml/XPathPath.cpp:
916         (WebCore::XPath::Filter::Filter): Move in the arguments instead of copying them.
917         (WebCore::XPath::Filter::evaluate): Updated for name and type changes.
918         (WebCore::XPath::LocationPath::LocationPath): Ditto.
919         (WebCore::XPath::LocationPath::evaluate): Ditto. Also use std::move instead of
920         Value::adopt and instead of swap.
921         (WebCore::XPath::LocationPath::appendStep): Changed to take ownership of a
922         unique_ptr.
923         (WebCore::XPath::LocationPath::prependStep): Ditto. Renamed from insertFirstStep.
924         (WebCore::XPath::Path::Path): Move in the arguments.
925
926         * xml/XPathPath.h: Removed unneeded includes. Changed arugument types to use
927         std::unique_ptr to pass ownership in. Added override to all virtual functions.
928         Changed data members to use std::unique_ptr.
929
930         * xml/XPathPredicate.cpp:
931         (WebCore::XPath::StringExpression::StringExpression): Use move.
932         (WebCore::XPath::Negative::Negative): Added.
933         (WebCore::XPath::Negative::evaluate): Updated for name changes.
934         (WebCore::XPath::NumericOp::NumericOp): Use move.
935         (WebCore::XPath::NumericOp::evaluate): Tweak formatting.
936         (WebCore::XPath::EqTestOp::EqTestOp): Use move.
937         (WebCore::XPath::EqTestOp::evaluate): Updated for name changes.
938         (WebCore::XPath::LogicalOp::LogicalOp): Use move.
939         (WebCore::XPath::LogicalOp::shortCircuitOn): Made shorter.
940         (WebCore::XPath::LogicalOp::evaluate): Updated for name changes.
941         (WebCore::XPath::Union::Union): Added.
942         (WebCore::XPath::Union::evaluate): Updated for name changes.
943         (WebCore::XPath::evaluatePredicate): Updated for name changes, to use
944         ASCIILiteral, and to be a free function that takes an expression.
945         (WebCore::XPath::predicateIsContextPositionSensitive): Added.
946         Replaces the Predicate::isContextPositionSensitive function.
947
948         * xml/XPathPredicate.h: Made all the classes FINAL and added a lot of OVERRIDE.
949         Added a constructor for Negative and Union. Got rid of the Predicate class and
950         instead provided two functions that operate on an Expression.
951
952         * xml/XPathStep.cpp:
953         (WebCore::XPath::Step::Step): Use move instea dof copying.
954         (WebCore::XPath::Step::~Step): Removed calls to deleteAllValues.
955         (WebCore::XPath::Step::optimize): Use move instead of swap and copy. Also
956         operate directly on the data members of the node test instead of using functions
957         that just return references to those data members.
958         (WebCore::XPath::optimizeStepPair): Use references instead of pointers, move
959         instead of swap, and early return instead of nested if statements.
960         (WebCore::XPath::Step::predicatesAreContextListInsensitive): Use references.
961         (WebCore::XPath::Step::evaluate): Use references instead of pointers and move
962         instead of swap.
963         (WebCore::XPath::nodeMatchesBasicTest): Use references instead of pointers and
964         more specific types when possible.
965         (WebCore::XPath::nodeMatches): Ditto.
966         (WebCore::XPath::Step::nodesInAxis): Use references instead of pointers. Added
967         braces to match style. Use words instead of letters for local variable names.
968
969         * xml/XPathStep.h: Make almost everything in NodeTest private since callers
970         just set these up and Step is what actually uses them. Changed the predicate
971         vectors to be vectors of Predicate instead of Predicate*, since a Predicate
972         is just a wrapper around a single std::unique_ptr<Expression>. Changed to use
973         move instead of copy when making a Step and to use references instead of pointers.
974
975         * xml/XPathValue.cpp: Use std::numeric_limits explicitly instead of using using.
976         Got rid of Value::adopt.
977         (WebCore::XPath::Value::toNodeSet): Use NeverDestroyed instead of DEFINE_STATE_LOCAL.
978         Updated for name changes.
979         (WebCore::XPath::Value::modifiableNodeSet): Ditto.
980         (WebCore::XPath::Value::toBoolean): Ditto.
981         (WebCore::XPath::Value::toNumber): Ditto.
982         (WebCore::XPath::Value::toString): Ditto. Use ASCIILiteral.
983
984         * xml/XPathValue.h: Moved ValueData class inside the Value class and renamed
985         it Value::Data. Removed fancy trick that avoids turning pointers into bool, and
986         just take the risk. Made many, but not all, of the Value constructors explicit
987         since we normally are explicit at call sites. Removed unneeded unsigned long
988         overload of the constructor. Changed the NodeSet version of the constructor to
989         use std::move and use that instead of AdoptTag.
990
991 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
992
993         Build fix. Add back the missing call to EventRetargeter::adjustForTouchEvent.
994
995         * dom/EventDispatcher.cpp:
996         (WebCore::EventDispatcher::dispatch):
997
998 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
999
1000         EventDispatchMediator is goner
1001         https://bugs.webkit.org/show_bug.cgi?id=122581
1002
1003         Reviewed by Antti Koivisto.
1004
1005         Killed the death.
1006
1007         * CMakeLists.txt:
1008         * GNUmakefile.list.am:
1009         * WebCore.vcxproj/WebCore.vcxproj:
1010         * WebCore.vcxproj/WebCore.vcxproj.filters:
1011         * WebCore.xcodeproj/project.pbxproj:
1012         * dom/DOMAllInOne.cpp:
1013         * dom/Element.cpp:
1014         (WebCore::Element::dispatchWheelEvent):
1015         (WebCore::Element::dispatchKeyEvent):
1016         (WebCore::Element::dispatchFocusEvent):
1017         (WebCore::Element::dispatchBlurEvent):
1018         * dom/EventDispatchMediator.cpp: Removed.
1019         * dom/EventDispatchMediator.h: Removed.
1020         * dom/EventDispatcher.cpp:
1021         (WebCore::EventDispatcher::dispatchEvent):
1022         (WebCore::EventDispatcher::dispatchScopedEvent):
1023         * dom/EventDispatcher.h:
1024         * dom/KeyboardEvent.h:
1025         * dom/MouseEvent.h:
1026         * dom/Node.cpp:
1027         (WebCore::Node::dispatchScopedEvent):
1028         (WebCore::Node::dispatchEvent):
1029         (WebCore::Node::dispatchGestureEvent):
1030         (WebCore::Node::dispatchTouchEvent):
1031         (WebCore::Node::dispatchUIRequestEvent):
1032         * dom/Node.h:
1033         * dom/ScopedEventQueue.cpp:
1034         (WebCore::ScopedEventQueue::~ScopedEventQueue):
1035         (WebCore::ScopedEventQueue::enqueueEvent):
1036         (WebCore::ScopedEventQueue::dispatchAllEvents):
1037         (WebCore::ScopedEventQueue::dispatchEvent):
1038         * dom/ScopedEventQueue.h:
1039         * dom/TouchEvent.cpp:
1040         * dom/TouchEvent.h:
1041         * dom/UIEvent.h:
1042         * dom/WheelEvent.h:
1043
1044 2013-10-09  Andreas Kling  <akling@apple.com>
1045
1046         Kill some RenderObject::firstChildSlow/lastChildSlow usage.
1047         <https://webkit.org/b/122582>
1048
1049         Reviewed by Antti Koivisto.
1050
1051         Use tighter typing in some random places to flush out unnecessary use
1052         of virtual first/last child getters on RenderObject.
1053
1054         There are more of these opportunities, but I left them untouched to
1055         avoid snowballing this patch.
1056
1057 2013-10-09  Simon Fraser  <simon.fraser@apple.com>
1058
1059         Fix some bad paths in the Xcode project
1060         https://bugs.webkit.org/show_bug.cgi?id=122583
1061
1062         Reviewed by Mark Rowe.
1063
1064         Fix paths for some storage quota-related files, and remove
1065         reference to mediaControlsQuickTime.css which was removed in r156546.
1066
1067         * WebCore.xcodeproj/project.pbxproj:
1068
1069 2013-10-09  Alexandru Chiculita  <achicu@adobe.com>
1070
1071         Web Inspector: [CSS Regions] Display the correct fragment boxes for content inside flow threads
1072         https://bugs.webkit.org/show_bug.cgi?id=122291
1073
1074         Reviewed by Timothy Hatcher.
1075
1076         Tests: inspector/elements/highlight-regions-flow-horiz-bt.html
1077                inspector/elements/highlight-regions-flow-transform-horiz-bt.html
1078                inspector/elements/highlight-regions-flow-transform-vert-lr.html
1079                inspector/elements/highlight-regions-flow-transform-vert-rl.html
1080                inspector/elements/highlight-regions-flow-transform.html
1081                inspector/elements/highlight-regions-flow-vert-lr.html
1082                inspector/elements/highlight-regions-flow-vert-rl.html
1083                inspector/elements/highlight-regions-flow.html
1084
1085         Nodes inside a RenderFlowThread can be split across multiple regions. This patch adds the required
1086         code to compute "fragments" for each region. Each fragment will display its own label.
1087
1088         There are a couple of changes:
1089         1. The node highlight object now has a "scroll" property to hold the main view's scroll offset.
1090         2. There's a "fragment" array to get a list of quads for each renderer fragment. Renderers outside 
1091         RenderFlowThreads will just have one fragment.
1092         3. ElementInfo now has two more properties: "regionFlowInfo" (renamed from former flowInfo) and "contentFlowInfo".
1093         If the renderer is a RenderRegion it will have a regionFlowInfo. If the renderer is inside a RenderFlowThread
1094         then it will have a "contentFlowInfo".
1095
1096         * inspector/InspectorOverlay.cpp:
1097         (WebCore::InspectorOverlay::getHighlight): It should now take a "region" parameter to customize the output for a specific
1098         containing region.
1099         (WebCore::buildObjectForHighlight):
1100         (WebCore::buildObjectForCSSRegionContentClip): We need to know how to clip the fragments inside regions.
1101         (WebCore::buildObjectForRendererFragments): Extracted code from buildObjectForHighlight and added
1102         the new regions lookup code.
1103         (WebCore::buildObjectForElementInfo): Extracted from buildObjectForHighlight.
1104         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
1105         (WebCore::InspectorOverlay::drawQuadHighlight):
1106         * inspector/InspectorOverlayPage.css: There can be multiple labels on screen at once, so I've
1107         created the #element-title-template element that we clone for each label. .element-title-container is now
1108         holding all the .element-title elements, so that we can remove them all at once.
1109         (.element-title-container):
1110         (.element-title):
1111         (#element-title-template):
1112         (.tag-name):
1113         (.node-id):
1114         (.class-name):
1115         * inspector/InspectorOverlayPage.html:
1116         * inspector/InspectorOverlayPage.js:
1117         (reset):
1118         (_toggleOptionalValue):
1119         (_createElementTitle): Creates an element populated with data read from elementInfo.
1120         (_drawElementTitle): Added code to create more labels for multiple fragments.
1121         (_drawRegionsHighlight):
1122         (_drawFragmentHighlight):
1123         (drawNodeHighlight): Consolidated the scroll property into a canvas.transform.
1124
1125 2013-10-09  Simon Fraser  <simon.fraser@apple.com>
1126
1127         Layout assertion failure in WebCore::RenderView::paint
1128         https://bugs.webkit.org/show_bug.cgi?id=121925
1129
1130         Reviewed by Tim Horton.
1131
1132         This fixes the assertion seen when running WK2 API tests.
1133         
1134         If RenderLayerCompositor::flushPendingLayerChanges() was called before
1135         the root layer was attached, it would set m_shouldFlushOnReattach
1136         to do the flush later, after attaching (bypassing the runloop observer
1137         that updated layout if necessary).
1138         
1139         This could cause us to get to a CA commit without having updated
1140         layout, hence the assertion.
1141         
1142         Fix by having attachRootLayer() schedule a layer flush, rather than doing
1143         one right away.
1144
1145         * rendering/RenderLayerCompositor.cpp:
1146         (WebCore::RenderLayerCompositor::attachRootLayer):
1147
1148 2013-10-09  Bem Jones-Bey  <bjonesbe@adobe.com>
1149
1150         Move float logical location/dimension methods to RenderBlockFlow
1151         https://bugs.webkit.org/show_bug.cgi?id=122282
1152
1153         Reviewed by David Hyatt.
1154
1155         I recently moved the logical location and dimension methods from
1156         RenderBlock to FloatingObject. This made it so that the methods needed
1157         to take in the horizontal writing mode of the FloatingObject's
1158         container in order to do their thing. When looking into how to fix
1159         this, I came to understand why RenderBlock has methods to determine
1160         the logical location and dimensions of its children, when the children
1161         themselves have those methods: the methods on RenderBlock are for
1162         determining the logical value in the writing mode of that RenderBlock,
1163         and the method on the child is for determining the logical value in
1164         the writing mode of the child.
1165
1166         Since the floating object list has moved from RenderBlock to
1167         RenderBlockFlow, this change moves the logical dimension methods from
1168         FloatingObject to RenderBlockFlow.
1169
1170         No new tests, no new behavior.
1171
1172         * rendering/FloatingObjects.cpp:
1173         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
1174         (WebCore::FloatingObjects::FloatingObjects):
1175         (WebCore::::updateOffsetIfNeeded):
1176         (WebCore::::collectIfNeeded):
1177         (WebCore::::getHeightRemaining):
1178         * rendering/FloatingObjects.h:
1179         * rendering/LineWidth.cpp:
1180         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
1181         * rendering/RenderBlockFlow.cpp:
1182         (WebCore::RenderBlockFlow::clearFloats):
1183         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
1184         (WebCore::RenderBlockFlow::insertFloatingObject):
1185         (WebCore::RenderBlockFlow::removeFloatingObject):
1186         (WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
1187         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
1188         (WebCore::RenderBlockFlow::positionNewFloats):
1189         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
1190         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
1191         (WebCore::RenderBlockFlow::addOverhangingFloats):
1192         (WebCore::RenderBlockFlow::hasOverhangingFloat):
1193         (WebCore::RenderBlockFlow::addIntrudingFloats):
1194         * rendering/RenderBlockFlow.h:
1195         (WebCore::RenderBlockFlow::logicalTopForFloat):
1196         (WebCore::RenderBlockFlow::logicalBottomForFloat):
1197         (WebCore::RenderBlockFlow::logicalLeftForFloat):
1198         (WebCore::RenderBlockFlow::logicalRightForFloat):
1199         (WebCore::RenderBlockFlow::logicalWidthForFloat):
1200         (WebCore::RenderBlockFlow::logicalHeightForFloat):
1201         (WebCore::RenderBlockFlow::logicalSizeForFloat):
1202         (WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat):
1203         (WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat):
1204         (WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat):
1205         (WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat):
1206         (WebCore::RenderBlockFlow::setLogicalTopForFloat):
1207         (WebCore::RenderBlockFlow::setLogicalLeftForFloat):
1208         (WebCore::RenderBlockFlow::setLogicalHeightForFloat):
1209         (WebCore::RenderBlockFlow::setLogicalWidthForFloat):
1210         * rendering/RenderBlockLineLayout.cpp:
1211         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
1212         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
1213         (WebCore::updateSegmentsForShapes):
1214         (WebCore::LineBreaker::nextSegmentBreak):
1215         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
1216         * rendering/shapes/ShapeOutsideInfo.cpp:
1217         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
1218         * rendering/shapes/ShapeOutsideInfo.h:
1219
1220 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
1221
1222         Remove MouseEventDispatchMediator
1223         https://bugs.webkit.org/show_bug.cgi?id=122580
1224
1225         Reviewed by Antti Koivisto.
1226
1227         Removed. Will remove EventDispatchMediator next.
1228
1229         * dom/Element.cpp:
1230         (WebCore::Element::dispatchMouseEvent):
1231         * dom/MouseEvent.cpp:
1232         * dom/MouseEvent.h:
1233         * dom/Node.cpp:
1234         (WebCore::Node::dispatchEvent):
1235         (WebCore::Node::dispatchTouchEvent):
1236
1237 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
1238
1239         Remove all subclasses of EventDispatchMediator except MouseEventDispatchMediator
1240         https://bugs.webkit.org/show_bug.cgi?id=122579
1241
1242         Reviewed by Antti Koivisto.
1243
1244         Removed UIRequestEventDispatchMediator, GestureEventDispatchMediator, KeyboardEventDispatchMediator,
1245         and WheelEventDispatchMediator. Moved the code in the respective mediateAndDispatchEvent functions
1246         to their respective dispatch*Event functions in Node.cpp and Element.cpp.
1247
1248         * Modules/indieui/UIRequestEvent.cpp:
1249         (WebCore::UIRequestEvent::eventInterface):
1250         * Modules/indieui/UIRequestEvent.h:
1251         * dom/Element.cpp:
1252         (WebCore::deltaMode):
1253         (WebCore::Element::dispatchWheelEvent):
1254         (WebCore::Element::dispatchKeyEvent):
1255         * dom/GestureEvent.cpp:
1256         * dom/GestureEvent.h:
1257         * dom/KeyboardEvent.cpp:
1258         * dom/KeyboardEvent.h:
1259         * dom/Node.cpp:
1260         (WebCore::Node::dispatchGestureEvent):
1261         (WebCore::Node::dispatchUIRequestEvent):
1262         * dom/WheelEvent.cpp:
1263         * dom/WheelEvent.h:
1264
1265 2013-10-09  Bem Jones-Bey  <bjonesbe@adobe.com>
1266
1267         [CSS Shapes] Lines that don't intersect shape-outside should ignore both left and right margins
1268         https://bugs.webkit.org/show_bug.cgi?id=122570
1269
1270         Reviewed by Alexandru Chiculita.
1271
1272         Due to an oversight, the left margin on left floats and the right
1273         margin on right floats was having an effect on lines that did not
1274         intersect the shape (but did intersect the margin box of the float).
1275         By the spec, lines that do not intersect the shape should act as if
1276         the float isn't there, so those margins should have no effect on
1277         those lines. This patch fixes this.
1278
1279         No new tests, it is covered by the existing tests now that they have
1280         been fixed to have the proper behavior.
1281
1282         * rendering/shapes/ShapeOutsideInfo.cpp:
1283         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
1284
1285 2013-10-09  Bem Jones-Bey  <bjonesbe@adobe.com>
1286
1287         [CSS Shapes] Clip shape-outside to the bottom of the margin box
1288         https://bugs.webkit.org/show_bug.cgi?id=122562
1289
1290         Reviewed by Alexandru Chiculita.
1291
1292         The spec says that a shape-outside shape must be clipped to the
1293         margin box. This implements clipping the bottom of the shape to the
1294         bottom of the margin box.
1295
1296         Test: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-000.html
1297               csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html
1298               csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-002.html
1299               csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html
1300
1301         * rendering/RenderBlockFlow.cpp:
1302         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
1303
1304 2013-10-09  Sergio Correia  <sergio.correia@openbossa.org>
1305
1306         [CoordinatedGraphics] ASSERTION FAILED: !m_flushingLayers (after r156291)
1307         https://bugs.webkit.org/show_bug.cgi?id=122016
1308
1309         Reviewed by Noam Rosenthal.
1310
1311         To prevent calling scheduleLayerFlush() inside flushCompositingState(),
1312         we now only call m_client->notifyFlushRequired() - which will trigger
1313         scheduleLayerFlush() - if we are not already flushing layer changes.
1314
1315         No new tests, covered by existing ones.
1316
1317         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1318         (WebCore::CompositingCoordinator::notifyFlushRequired): Check if we
1319         are already flushing layer changes before calling notifyFlushRequired.
1320         (WebCore::CompositingCoordinator::sizeDidChange): Use notifyFlushRequired()
1321         from CompositingCoordinator instead of calling the one from m_client
1322         directly.
1323         (WebCore::CompositingCoordinator::createGraphicsLayer): Ditto.
1324         (WebCore::CompositingCoordinator::detachLayer): Ditto.
1325         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1326         (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Added helper
1327         to check whether we are flushing layer changes before calling client()'s
1328         notifyFlushRequired(). It returns a boolean indicating whether it
1329         called the client's method.
1330         (WebCore::CoordinatedGraphicsLayer::didChangeLayerState): Use the
1331         notifyFlushRequired() helper.
1332         (WebCore::CoordinatedGraphicsLayer::didChangeAnimations): Ditto.
1333         (WebCore::CoordinatedGraphicsLayer::didChangeChildren): Ditto.
1334         (WebCore::CoordinatedGraphicsLayer::didChangeFilters): Ditto.
1335         (WebCore::CoordinatedGraphicsLayer::didChangeImageBacking): Ditto.
1336         (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay): Ditto.
1337         (WebCore::CoordinatedGraphicsLayer::setContentsToCanvas): Ditto.
1338         (WebCore::CoordinatedGraphicsLayer::flushCompositingState): Ditto.
1339         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):Ditto.
1340         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1341         Declaration of the notifyFlushRequired() helper.
1342
1343 2013-10-09  Chris Fleizach  <cfleizach@apple.com>
1344
1345         AX: VoiceOver double speaks all items in <li> nodes
1346         https://bugs.webkit.org/show_bug.cgi?id=122564
1347
1348         Reviewed by Brent Fulgham.
1349
1350         Test: platform/mac/accessibility/native-list-item-should-not-expose-label.html
1351
1352         * accessibility/AccessibilityNodeObject.cpp:
1353         (WebCore::AccessibilityNodeObject::visibleText):
1354
1355 2013-10-09  Sergio Correia  <sergio.correia@openbossa.org>
1356
1357         CoordinatedGraphics: Fix integer rounding when computing pixel alignment
1358         https://bugs.webkit.org/show_bug.cgi?id=122565
1359
1360         Reviewed by Noam Rosenthal.
1361
1362         Replace roundedIntRect call in computePixelAlignment() with enclosingIntRect,
1363         so that very small rectangles (after content scaling) don't appear to be empty,
1364         creating a crash later.
1365
1366         Test: transforms/3d/general/rotate-45-degrees-long-inner-text-in-dt.html
1367
1368         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1369         (WebCore::CoordinatedGraphicsLayer::computePixelAlignment):
1370
1371 2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
1372
1373         Rename EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget
1374         https://bugs.webkit.org/show_bug.cgi?id=122539
1375
1376         Reviewed by Darin Adler.
1377
1378         Renamed EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget and got rid of
1379         EventDispatchMediators for focus events. We set the related target inside EventDispatcher's
1380         dispatch via Event::relatedTarget, which is now virtual and overridden by mouse/focus events.
1381
1382         * dom/Element.cpp: The following functions no longer use FocusEventDispatchMediators.
1383         (WebCore::Element::dispatchFocusInEvent):
1384         (WebCore::Element::dispatchFocusOutEvent):
1385         (WebCore::Element::dispatchFocusEvent):
1386         (WebCore::Element::dispatchBlurEvent):
1387
1388         * dom/Event.h:
1389         (WebCore::Event::relatedTarget): Added as a virtual function.
1390
1391         * dom/EventDispatcher.cpp:
1392         (WebCore::EventDispatcher::dispatchEvent): Cache Event*.
1393         (WebCore::EventDispatcher::dispatch): Call setRelatedTargetToPath at the beginning to update
1394         related targets in the path.
1395
1396         * dom/EventDispatcher.h:
1397
1398         * dom/EventRetargeter.cpp:
1399         (WebCore::EventPath::EventPath): Initialize m_origin, used in EventPath::setRelatedTarget.
1400         (WebCore::EventRetargeter::adjustTouchList):
1401         (WebCore::EventPath::setRelatedTarget): Renamed from EventRetargeter::adjustForRelatedTarget.
1402         Delegated the nullity checks to callers by taking references instead of pointers.
1403         (WebCore::EventRetargeter::calculateAdjustedNodes):
1404
1405         * dom/EventRetargeter.h: Removed AdjustedNodes typedef. It's just a Vector of RefPtr<Node>.
1406
1407         * dom/FocusEvent.cpp: Removed FocusEventDispatchMediators for focus events.
1408         * dom/FocusEvent.h:
1409
1410         * dom/MouseEvent.cpp:
1411         (WebCore::MouseEvent::toElement): Cache the related target now that relatedTarget() is virtual.
1412         (WebCore::MouseEvent::fromElement): Ditto.
1413         (WebCore::MouseEventDispatchMediator::mediateAndDispatchEvent): No longer sets the related
1414         targets since that's done in EventDispatcher::dispatch now.
1415
1416         * dom/MouseEvent.h:
1417
1418         * dom/Node.cpp: Removed obnoxious Node::dispatchScopedEventDispatchMediator.
1419         (WebCore::Node::dispatchScopedEvent):
1420         * dom/Node.h:
1421
1422         * html/shadow/MediaControlElements.cpp:
1423         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Cache the related
1424         target in a local variable now that relatedTarget() is virtual.
1425
1426 2013-10-09  Chris Fleizach  <cfleizach@apple.com>
1427
1428         AX: VoiceOver does not speak aria-expanded state on iOS
1429         https://bugs.webkit.org/show_bug.cgi?id=122540
1430
1431         Expose aria-pressed state for iOS.
1432
1433         Reviewed by Mario Sanchez Prada.
1434
1435         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1436         (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
1437
1438 2013-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1439
1440         Unreviewed. Update GObject DOM symbols file after r157163.
1441
1442         * bindings/gobject/webkitdom.symbols:
1443
1444 2013-10-08  Anders Carlsson  <andersca@apple.com>
1445
1446         Remove RunLoopMac.mm
1447         https://bugs.webkit.org/show_bug.cgi?id=122527
1448
1449         Reviewed by Antti Koivisto.
1450
1451         RunLoop::setUseApplicationRunLoopOnMainRunLoop() is no longer used, so we can just use the run() and stop()
1452         implementations from RunLoopCF.
1453
1454         * WebCore.exp.in:
1455         * WebCore.xcodeproj/project.pbxproj:
1456         * platform/RunLoop.cpp:
1457         * platform/RunLoop.h:
1458         * platform/cf/RunLoopCF.cpp:
1459         (WebCore::RunLoop::stop):
1460         * platform/mac/RunLoopMac.mm: Removed.
1461
1462 2013-10-09  Mario Sanchez Prada  <mario.prada@samsung.com>
1463
1464         [ATK] Implement new API in AtkText: atk_text_get_string_at_offset()
1465         https://bugs.webkit.org/show_bug.cgi?id=120638
1466
1467         Reviewed by Gustavo Noronha Silva.
1468
1469         Implemented new atk_text_get_string_at_offset() API, introduced in
1470         ATK 2.9.4 to simplify how text at a given offset is retrieved.
1471
1472         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1473         (webkitAccessibleTextGetStringAtOffset): New function implementing
1474         the new API, which basically translates calls to the new API to
1475         calls to the old API using 'at' positions and START boundaries.
1476         (webkitAccessibleTextInterfaceInit): Hook the new function.
1477
1478 2013-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1479
1480         [GTK] mouse wheel events are not considered to be mouse events
1481         https://bugs.webkit.org/show_bug.cgi?id=120648
1482
1483         Reviewed by Gustavo Noronha Silva.
1484
1485         Expose WheelEvent in the GObject DOM bindings API.
1486
1487         * bindings/gobject/GNUmakefile.am: Add new files to compilation.
1488         * bindings/gobject/WebKitDOMPrivate.cpp:
1489         (WebKit::wrap): Create a WebKitDOMWheelEvent when the given Event
1490         is a WheelEvent.
1491
1492 2013-10-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1493
1494         Unreviewed. Fix EFL buildbreak since r157152.
1495
1496         * dom/EventRetargeter.cpp:
1497         (WebCore::EventRetargeter::adjustForTouchEvent):
1498
1499 2013-10-08  Alex Christensen  <achristensen@webkit.org>
1500
1501         Improved WinLauncher.
1502         https://bugs.webkit.org/show_bug.cgi?id=122536
1503
1504         Reviewed by Brent Fulgham.
1505
1506         * platform/network/curl/ResourceHandleManager.cpp:
1507         (WebCore::cookieJarPath):
1508         Put cookies.dat into the AppData directory on Windows.
1509
1510 2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
1511
1512         Remove the code erroneously in the previous commit.
1513
1514         * dom/EventDispatcher.h:
1515         (WebCore::EventPath::contextAt):
1516
1517 2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
1518
1519         Turn EventPath into a real class
1520         https://bugs.webkit.org/show_bug.cgi?id=122533
1521
1522         Reviewed by Antti Koivisto.
1523
1524         Turned EventPath into a real class and made EventRetargeter::calculateEventPath its constructor.
1525         We can turn a lot of functions in EventRetargeter.cpp member functions of EventPath since many
1526         of them manipulate EventPath in one way or another.
1527
1528         * dom/EventContext.h:
1529         (WebCore::toMouseOrFocusEventContext):
1530         (WebCore::toTouchEventContext):
1531         * dom/EventDispatcher.cpp:
1532         (WebCore::EventDispatcher::EventDispatcher):
1533         (WebCore::EventDispatcher::dispatchEventAtCapturing):
1534         (WebCore::EventDispatcher::dispatchEventAtTarget):
1535         (WebCore::EventDispatcher::dispatchEventAtBubbling):
1536         (WebCore::EventDispatcher::dispatchEventPostProcess):
1537         (WebCore::EventDispatcher::topEventContext):
1538         (WebCore::EventPath::hasEventListeners):
1539         * dom/EventDispatcher.h:
1540         (WebCore::EventPath::isEmpty):
1541         (WebCore::EventPath::size):
1542         (WebCore::EventPath::item):
1543         (WebCore::EventPath::targetRespectingTargetRules):
1544         (WebCore::EventPath::shrink):
1545         (WebCore::EventPath::lastContextIfExists):
1546         * dom/EventRetargeter.cpp:
1547         (WebCore::EventPath::EventPath):
1548         (WebCore::EventRetargeter::adjustForTouchEvent):
1549         (WebCore::EventRetargeter::adjustForRelatedTarget):
1550         (WebCore::EventRetargeter::calculateAdjustedNodes):
1551         * dom/EventRetargeter.h:
1552         * inspector/InspectorInstrumentation.cpp:
1553         (WebCore::eventHasListeners):
1554         * inspector/InspectorInstrumentation.h:
1555
1556 2013-10-08  Alex Christensen  <achristensen@webkit.org>
1557
1558         Enabled all necessary files for Win64 build.
1559         https://bugs.webkit.org/show_bug.cgi?id=122530
1560
1561         Reviewed by Brent Fulgham.
1562
1563         * WebCore.vcxproj/WebCore.vcxproj:
1564         Enabled MediaPlayerPrivateFullscreenWindow and
1565         RenderLayerModelObject to be built in Win64 build.
1566
1567 2013-10-07  Sam Weinig  <sam@webkit.org>
1568
1569         Consolidate findString functions
1570         https://bugs.webkit.org/show_bug.cgi?id=122480
1571
1572         Reviewed by Darin Adler.
1573
1574         * editing/Editor.cpp:
1575         * editing/Editor.h:
1576         * editing/EditorCommand.cpp:
1577         (WebCore::executeFindString):
1578         * page/DOMWindow.cpp:
1579         (WebCore::DOMWindow::find):
1580         * page/Page.cpp:
1581         * page/Page.h:
1582         Fix a long standing FIXME.
1583
1584 2013-10-08  Bem Jones-Bey  <bjonesbe@adobe.com>
1585
1586         Move m_floatingObjects to RenderBlockFlow from RenderBlock
1587         https://bugs.webkit.org/show_bug.cgi?id=122512
1588
1589         Reviewed by David Hyatt.
1590
1591         Floats are part of block flow, not every RenderBlock can contain
1592         floars. This change makes it so that RenderBlock no longer can contain
1593         floats, only RenderBlockFlow can.
1594
1595         This also moves a bunch of line layout stuff over to RenderBlockFlow,
1596         but makes no effort to move all of line layout, as all of that is
1597         destined to move out of both RenderBlockFlow and RenderBlock into its
1598         own class.
1599
1600         No new tests, no behavior change.
1601
1602         * rendering/InlineIterator.h:
1603         (WebCore::InlineBidiResolver::appendRun):
1604         * rendering/LineWidth.cpp:
1605         (WebCore::LineWidth::LineWidth):
1606         * rendering/LineWidth.h:
1607         * rendering/RenderBlock.cpp:
1608         (WebCore::RenderBlock::styleWillChange):
1609         (WebCore::RenderBlock::styleDidChange):
1610         (WebCore::RenderBlock::splitFlow):
1611         (WebCore::RenderBlock::deleteLineBoxTree):
1612         (WebCore::RenderBlock::removeChild):
1613         (WebCore::RenderBlock::computeOverflow):
1614         (WebCore::RenderBlock::selectionGaps):
1615         (WebCore::RenderBlock::adjustForBorderFit):
1616         * rendering/RenderBlock.h:
1617         (WebCore::RenderBlock::containsFloats):
1618         (WebCore::RenderBlock::shouldSkipCreatingRunsForObject):
1619         (WebCore::RenderBlock::addOverflowFromFloats):
1620         (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
1621         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
1622         (WebCore::RenderBlock::moveAllChildrenOnRemovalTo):
1623         (WebCore::RenderBlock::paintFloats):
1624         (WebCore::RenderBlock::hitTestFloats):
1625         (WebCore::RenderBlock::clipOutFloatingObjects):
1626         * rendering/RenderBlockFlow.cpp:
1627         (WebCore::RenderBlockFlow::clearFloats):
1628         (WebCore::RenderBlockFlow::layoutBlock):
1629         (WebCore::RenderBlockFlow::layoutBlockChild):
1630         (WebCore::RenderBlockFlow::collapseMargins):
1631         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
1632         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
1633         (WebCore::RenderBlockFlow::containsFloat):
1634         (WebCore::RenderBlockFlow::styleDidChange):
1635         (WebCore::RenderBlockFlow::styleWillChange):
1636         (WebCore::RenderBlockFlow::deleteLineBoxTree):
1637         (WebCore::RenderBlockFlow::moveAllChildrenOnRemovalTo):
1638         (WebCore::RenderBlockFlow::addOverflowFromFloats):
1639         (WebCore::RenderBlockFlow::computeOverflow):
1640         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
1641         (WebCore::RenderBlockFlow::paintFloats):
1642         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
1643         (WebCore::RenderBlockFlow::createFloatingObjects):
1644         (WebCore::RenderBlockFlow::removeFloatingObjects):
1645         (WebCore::RenderBlockFlow::insertFloatingObject):
1646         (WebCore::RenderBlockFlow::removeFloatingObject):
1647         (WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
1648         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
1649         (WebCore::RenderBlockFlow::positionNewFloats):
1650         (WebCore::RenderBlockFlow::newLine):
1651         (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine):
1652         (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine):
1653         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
1654         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
1655         (WebCore::RenderBlockFlow::addOverhangingFloats):
1656         (WebCore::RenderBlockFlow::hasOverhangingFloat):
1657         (WebCore::RenderBlockFlow::addIntrudingFloats):
1658         (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
1659         (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
1660         (WebCore::RenderBlockFlow::getClearDelta):
1661         (WebCore::RenderBlockFlow::hitTestFloats):
1662         (WebCore::RenderBlockFlow::adjustForBorderFit):
1663         * rendering/RenderBlockFlow.h:
1664         (WebCore::RenderBlockFlow::hasOverhangingFloats):
1665         * rendering/RenderBlockLineLayout.cpp:
1666         (WebCore::LineBreaker::LineBreaker):
1667         (WebCore::RenderBlockFlow::appendRunsForObject):
1668         (WebCore::RenderBlockFlow::createLineBoxes):
1669         (WebCore::RenderBlockFlow::constructLine):
1670         (WebCore::RenderBlockFlow::setMarginsForRubyRun):
1671         (WebCore::updateLogicalInlinePositions):
1672         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
1673         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1674         (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
1675         (WebCore::setStaticPositions):
1676         (WebCore::RenderBlockFlow::handleTrailingSpaces):
1677         (WebCore::RenderBlockFlow::appendFloatingObjectToLastLine):
1678         (WebCore::constructBidiRunsForLine):
1679         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
1680         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
1681         (WebCore::RenderBlockFlow::restartLayoutRunsAndFloatsInRange):
1682         (WebCore::pushShapeContentOverflowBelowTheContentBox):
1683         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLine):
1684         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
1685         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
1686         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1687         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
1688         (WebCore::RenderBlockFlow::repaintDirtyFloats):
1689         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
1690         (WebCore::RenderBlockFlow::determineStartPosition):
1691         (WebCore::RenderBlockFlow::determineEndPosition):
1692         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
1693         (WebCore::RenderBlockFlow::matchedEndLine):
1694         (WebCore::shouldSkipWhitespaceAfterStartObject):
1695         (WebCore::updateSegmentsForShapes):
1696         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
1697         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
1698         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
1699         * rendering/RenderBox.cpp:
1700         (WebCore::RenderBox::outermostBlockContainingFloatingObject):
1701         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1702         * rendering/RenderBox.h:
1703         * rendering/RenderBoxModelObject.cpp:
1704         (WebCore::RenderBoxModelObject::moveChildrenTo):
1705         * rendering/RenderInline.cpp:
1706         (WebCore::RenderInline::splitFlow):
1707
1708 2013-10-08  Dean Jackson  <dino@apple.com>
1709
1710         Support unprefixed WebGL context creation
1711         https://bugs.webkit.org/show_bug.cgi?id=122523
1712         <rdar://problem/15179463>
1713
1714         Reviewed by Simon Fraser.
1715
1716         Add support for the unprefixed "webgl" canvas context type.
1717
1718         Test: fast/canvas/webgl/unprefixed-context.html
1719
1720         * html/HTMLCanvasElement.cpp:
1721         (WebCore::HTMLCanvasElement::is3dType):
1722         * inspector/InjectedScriptCanvasModuleSource.js:
1723
1724 2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
1725
1726         Rename EventDispatchMediator::dispatchEvent to mediateAndDispatchEvent
1727         https://bugs.webkit.org/show_bug.cgi?id=122522
1728
1729         Reviewed by Darin Adler.
1730
1731         Renamed EventDispatchMediator::dispatchEvent to EventDispatchMediator::mediateAndDispatchEvent
1732         to make the future refactoring easier.
1733
1734         * Modules/indieui/UIRequestEvent.cpp:
1735         (WebCore::UIRequestEventDispatchMediator::mediateAndDispatchEvent):
1736         * Modules/indieui/UIRequestEvent.h:
1737         * dom/EventDispatchMediator.cpp:
1738         (WebCore::EventDispatchMediator::mediateAndDispatchEvent):
1739         * dom/EventDispatchMediator.h:
1740         * dom/EventDispatcher.cpp:
1741         (WebCore::EventDispatcher::dispatchEvent):
1742         * dom/FocusEvent.cpp:
1743         (WebCore::FocusEventDispatchMediator::mediateAndDispatchEvent):
1744         (WebCore::BlurEventDispatchMediator::mediateAndDispatchEvent):
1745         (WebCore::FocusInEventDispatchMediator::mediateAndDispatchEvent):
1746         (WebCore::FocusOutEventDispatchMediator::mediateAndDispatchEvent):
1747         * dom/FocusEvent.h:
1748         * dom/GestureEvent.cpp:
1749         (WebCore::GestureEventDispatchMediator::mediateAndDispatchEvent):
1750         * dom/GestureEvent.h:
1751         * dom/KeyboardEvent.cpp:
1752         (WebCore::KeyboardEventDispatchMediator::mediateAndDispatchEvent):
1753         * dom/KeyboardEvent.h:
1754         * dom/MouseEvent.cpp:
1755         (WebCore::MouseEventDispatchMediator::mediateAndDispatchEvent):
1756         * dom/MouseEvent.h:
1757         * dom/TouchEvent.cpp:
1758         (WebCore::TouchEventDispatchMediator::mediateAndDispatchEvent):
1759         * dom/TouchEvent.h:
1760         * dom/WheelEvent.cpp:
1761         (WebCore::WheelEventDispatchMediator::mediateAndDispatchEvent):
1762         * dom/WheelEvent.h:
1763
1764 2013-10-08  Brent Fulgham  <bfulgham@apple.com>
1765
1766         [MathML] Use of floating point floor/ceil on LayoutUnits seems wrong
1767         https://bugs.webkit.org/show_bug.cgi?id=122367
1768
1769         Reviewed by Darin Adler.
1770
1771         * rendering/mathml/RenderMathMLOperator.cpp:
1772         (WebCore::RenderMathMLOperator::paintCharacter): Use member methods to compute
1773         correct floor/ceil values for LayoutUnits.
1774
1775 2013-10-07  Dean Jackson  <dino@apple.com>
1776
1777         Video -> pixel buffer output should not manage color spaces
1778         https://bugs.webkit.org/show_bug.cgi?id=122486
1779
1780         Reviewed by Tim Horton.
1781
1782         On Mac, when we draw a video into a canvas or WebGL, the
1783         output of the video should not be color managed. Instead, leave it
1784         as DeviceRGB so that it matches other colors in those elements.
1785         We'll hopefully solve this properly soon - making everything sRGB.
1786
1787         Test: media/video-canvas-drawing-output.html
1788
1789         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1790         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Pass on
1791         a CGImageRef via CGImageCreateCopyWithColorSpace rather than the raw data.
1792         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Tell CoreImage
1793         to allocate a pixel buffer that is unmanaged.
1794
1795 2013-10-08  Lauro Neto  <lauro.neto@openbossa.org>
1796
1797         [MediaStream] Fix segfault in initializeMockSources()
1798         https://bugs.webkit.org/show_bug.cgi?id=122517
1799
1800         Reviewed by Darin Adler.
1801
1802         Calling release() and a member function on the same RefPtr
1803         as arguments to a function can lead to segfaults if the release
1804         call is evaluated first.
1805
1806         * platform/mock/MockMediaStreamCenter.cpp:
1807         (WebCore::initializeMockSources):
1808
1809 2013-10-08  Mihnea Ovidenie  <mihnea@adobe.com>
1810
1811         [CSSRegions] Regions with overflow: hidden should paint over positioned sibling
1812         https://bugs.webkit.org/show_bug.cgi?id=122389
1813
1814         Reviewed by Alexandru Chiculita.
1815
1816         As a follow-up from https://bugs.webkit.org/show_bug.cgi?id=122321, a region should not
1817         be a normal flow layer when it has overflow clip. Change existing test by adding overflow:hidden
1818         to the region element.
1819
1820         * rendering/RenderLayer.cpp:
1821         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1822
1823 2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
1824
1825         Simplify the loop in EventRetargeter::calculateEventPath
1826         https://bugs.webkit.org/show_bug.cgi?id=122500
1827
1828         Reviewed by Antti Koivisto.
1829
1830         Replaced the convoluted loop by two nested loops to make semantics clear.
1831
1832         * dom/EventRetargeter.cpp:
1833         (WebCore::EventRetargeter::calculateEventPath):
1834
1835 2013-10-08  ChangSeok Oh  <changseok.oh@collabora.com>
1836
1837         [GTK] Leak: GdkEvent retured by gtk_get_current_event is not freed.
1838         https://bugs.webkit.org/show_bug.cgi?id=122506
1839
1840         Reviewed by Gustavo Noronha Silva.
1841
1842         Gdk event returned by gtk_get_current_event should be freed after using it.
1843
1844         No functionality changed.
1845
1846         * platform/gtk/PopupMenuGtk.cpp:
1847         (WebCore::PopupMenuGtk::show):
1848
1849 2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
1850
1851         Use references in EventRetargeter::calculateEventPath and EventRetargeter::eventTargetRespectingTargetRules
1852         https://bugs.webkit.org/show_bug.cgi?id=122494
1853
1854         Reviewed by Antti Koivisto.
1855
1856         Use referenecs instead of pointers in ventRetargeter's calculateEventPath and eventTargetRespectingTargetRules.
1857         Also replace Vector<EventTarget*, 32> targetStack by a single pointer since we only append an item to
1858         the vector when it's empty and we always use the last item.
1859
1860         * dom/EventDispatcher.cpp:
1861         (WebCore::EventDispatcher::EventDispatcher):
1862         (WebCore::EventDispatcher::dispatchScopedEvent):
1863         (WebCore::EventDispatcher::dispatch):
1864         (WebCore::EventDispatcher::dispatchEventPostProcess):
1865         * dom/EventDispatcher.h:
1866         * dom/EventRetargeter.cpp:
1867         (WebCore::EventRetargeter::calculateEventPath):
1868         * dom/EventRetargeter.h:
1869         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
1870         * dom/Node.cpp:
1871         (WebCore::Node::dispatchScopedEventDispatchMediator):
1872
1873 2013-10-08  Mihnea Ovidenie  <mihnea@adobe.com>
1874
1875         [CSSRegions] Computed z-Index should return 0 instead of auto for a region
1876         https://bugs.webkit.org/show_bug.cgi?id=122405
1877
1878         Reviewed by David Hyatt.
1879
1880         Test: fast/regions/layers/region-zIndex-computedStyle.html
1881
1882         Adjust the z-index value for a region. Also, since a box with a z-Index
1883         that is non-auto receives a layer, i removed the requiresLayer override
1884         in RenderRegion and RenderMultiColumnSet.
1885
1886         * css/StyleResolver.cpp:
1887         (WebCore::StyleResolver::adjustRenderStyle):
1888         * rendering/RenderMultiColumnSet.cpp:
1889         * rendering/RenderMultiColumnSet.h:
1890         * rendering/RenderRegion.cpp:
1891         * rendering/RenderRegion.h:
1892         * rendering/style/RenderStyle.h:
1893
1894 2013-10-08  Andrei Bucur  <abucur@adobe.com>
1895
1896         [CSS Regions] Widows don't work if the first line in a region is aligned with the top of the region
1897         https://bugs.webkit.org/show_bug.cgi?id=122450
1898
1899         Reviewed by David Hyatt.
1900
1901         The patch adds a new function updateRegionForLine that updates the containing region for a line and the
1902         flag used to determine if it's the first line in that region. This is necessary because the code in
1903         adjustLinePositionForPagination is not sufficient to determine when an unforced break occurs and the line
1904         being positioned is the first one in the fragmentation container or not.
1905
1906         Test: fast/regions/regions-widows-float-top-aligned.html
1907
1908         * rendering/RenderBlockFlow.cpp:
1909         (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Added FIXME comment.
1910         * rendering/RenderBlockFlow.h:
1911         * rendering/RenderBlockLineLayout.cpp:
1912         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
1913         (WebCore::RenderBlock::linkToEndLineIfNeeded):
1914         (WebCore::RenderBlock::determineStartPosition):
1915         (WebCore::RenderBlockFlow::updateRegionForLine): New function used to update the containing region and
1916         the first line flag.
1917
1918 2013-10-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1919
1920         Get EFL and GTK compiling with media stream enabled
1921         https://bugs.webkit.org/show_bug.cgi?id=122505
1922
1923         Reviewed by Philippe Normand.
1924
1925         After r157068
1926
1927         No new tests needed.
1928
1929         * GNUmakefile.list.am:
1930         * UseJSC.cmake:
1931
1932 2013-10-08  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
1933
1934         Composited layer that painted into composited ancestor is not repainted after moving
1935         https://bugs.webkit.org/show_bug.cgi?id=114655
1936
1937         Reviewed by Simon Fraser.
1938
1939         Test: compositing/repaint/absolute-painted-into-composited-ancestor.html
1940
1941         Composited layers are currently skipping repainting after layout,
1942         if the repaint status is not NeedsFullRepaint. However, in case layers
1943         were painted into composited ancestor, they need to repaint.
1944
1945         * rendering/RenderLayer.cpp:
1946         (WebCore::RenderLayer::shouldRepaintAfterLayout):
1947
1948 2013-10-08  Zalan Bujtas  <zalan@apple.com>
1949
1950         Unreviewed. Rollout of r156536. ~5% regression in inline layout performance.
1951
1952         * rendering/LineWidth.cpp:
1953         * rendering/LineWidth.h:
1954         (WebCore::LineWidth::addUncommittedWidth):
1955         * rendering/RenderBlockLineLayout.cpp:
1956         (WebCore::LineBreaker::nextSegmentBreak):
1957
1958 2013-10-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1959
1960         Use toCSSFooValue() instead of using static_cast<const CSSFooValue*>
1961         https://bugs.webkit.org/show_bug.cgi?id=122491
1962
1963         Reviewed by Andreas Kling.
1964
1965         static_cast<const CSSFooValue*> wasn't cleanup. So, we need to use toCSSFooValue() for it.
1966         To use toCSSValue() will help to detect bad type-cast.
1967
1968         Besides static_cast<const WebKitCSSFooValue*> helper functions need to be added to support this use.
1969
1970         No new tests, no behavior change.
1971
1972         * css/CSSComputedStyleDeclaration.cpp:
1973         (WebCore::ComputedStyleExtractor::propertyMatches):
1974         * css/CSSImageGeneratorValue.cpp:
1975         (WebCore::CSSImageGeneratorValue::isFixedSize):
1976         (WebCore::CSSImageGeneratorValue::isPending):
1977         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
1978         * css/CSSValue.cpp:
1979         (WebCore::CSSValue::isImplicitInitialValue):
1980         (WebCore::CSSValue::addSubresourceStyleURLs):
1981         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
1982         (WebCore::CSSValue::equals):
1983         (WebCore::CSSValue::cssText):
1984         (WebCore::CSSValue::serializeResolvingVariables):
1985         (WebCore::CSSValue::cloneForCSSOM):
1986         * css/StylePropertySet.cpp:
1987         (WebCore::StylePropertySet::PropertyReference::cssName):
1988         * css/WebKitCSSSVGDocumentValue.h:
1989         (WebCore::toWebKitCSSSVGDocumentValue):
1990         * css/WebKitCSSTransformValue.h:
1991         (WebCore::toWebKitCSSTransformValue):
1992
1993 2013-10-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1994
1995         Get MediaStreamCenterGStreamer compiling again
1996         https://bugs.webkit.org/show_bug.cgi?id=122482
1997
1998         Reviewed by Eric Carlson.
1999
2000         r157068 was including a nonexistent header
2001
2002         No new tests needed.
2003
2004         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
2005
2006 2013-10-08  Mario Sanchez Prada  <mario.prada@samsung.com>
2007
2008         [ATK] Expose state of aria-invalid as ATK_STATE_INVALID_ENTRY
2009         https://bugs.webkit.org/show_bug.cgi?id=122104
2010
2011         Reviewed by Chris Fleizach.
2012
2013         Map invalid state of an AccessibilityObject to the proper AtkState.
2014
2015         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2016         (setAtkStateSetFromCoreObject): Add the mapping.
2017
2018 2013-10-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2019
2020
2021         [GTK] media/video-src-blob.html
2022         https://bugs.webkit.org/show_bug.cgi?id=102586
2023
2024         Reviewed by Martin Robinson.
2025
2026         Add support for loading videos using blob URLs.
2027
2028         Fixes media/video-src-blob.html.
2029
2030         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2031         (webKitWebSrcStart): Use BufferData buffering policy for blob
2032         URLs.
2033         (webKitWebSrcGetProtocols): Add blob to the list of supported
2034         protocols.
2035         (webKitWebSrcSetUri): Consider blob URLs as valid.
2036
2037 2013-10-07  Ryosuke Niwa  <rniwa@webkit.org>
2038
2039         EventDispatchBehavior is unnecessary
2040         https://bugs.webkit.org/show_bug.cgi?id=122483
2041
2042         Reviewed by Andreas Kling.
2043
2044         Removed EventDispatchBehavior and changed the return type of determineDispatchBehavior to bool.
2045         Also renamed it to shouldEventCrossShadowBoundary to reflect the semantics more clear.
2046
2047         * dom/EventRetargeter.cpp:
2048         (WebCore::shouldEventCrossShadowBoundary):
2049         (WebCore::EventRetargeter::calculateEventPath):
2050         * dom/EventRetargeter.h:
2051
2052 2013-10-07  Ryosuke Niwa  <rniwa@webkit.org>
2053
2054         Make buildRelatedNodeMap and findRelatedNode static to EventRetargeter.cpp
2055         https://bugs.webkit.org/show_bug.cgi?id=122477
2056
2057         Reviewed by Antti Koivisto.
2058
2059         Make EventRetargeter::buildRelatedNodeMap and EventRetargeter::findRelatedNode static local functions
2060         in EventRetargeter.cpp since they're only called in EventRetargeter::calculateAdjustedNodes and don't
2061         depend on any oher member function or variable (EventRetarger doesn't have any member variables).
2062
2063         Also get rid of Vector local variables in both functions as they're redundant.
2064
2065         * dom/EventRetargeter.cpp:
2066         (WebCore::buildRelatedNodeMap): Moved. Replaced Vector<Node*, 32> relatedNodeStack by a single pointer
2067         since the only time we add an item to this Vector is when it's empty, and we always use or remove the
2068         last item.
2069         (WebCore::addRelatedNodeForUnmapedTreeScopes): Renamed from EventRetargeter::findRelatedNode. Removed
2070         Vector<TreeScope*, 32> parentTreeScopes since it only contains the ancestor tree scopes of scope up to
2071         a tree scope already in relatedNodeMap. We could simply remember this tree scope and re-traverse the
2072         ancestor tree scopes in the second loop.
2073         (WebCore::EventRetargeter::calculateAdjustedNodes):
2074         * dom/EventRetargeter.h:
2075
2076 2013-10-07  Andreas Kling  <akling@apple.com>
2077
2078         CTTE: EditCommand always has a Document.
2079         <https://webkit.org/b/122473>
2080
2081         Reviewed by Anders Carlsson.
2082
2083         Store a Ref<Document> in EditComment since it's never null.
2084
2085         Since Ref enforces more const consistency than RefPtr, I had to make
2086         document() and frame() non-const here. Only a single method depended
2087         on the old half-const behavior.
2088
2089 2013-10-07  Anders Carlsson  <andersca@apple.com>
2090
2091         Update test again.
2092
2093         * bindings/scripts/test/JS/JSTestCallback.cpp:
2094         (WebCore::JSTestCallback::~JSTestCallback):
2095
2096 2013-10-07  Commit Queue  <commit-queue@webkit.org>
2097
2098         Unreviewed, rolling out r157061.
2099         http://trac.webkit.org/changeset/157061
2100         https://bugs.webkit.org/show_bug.cgi?id=122479
2101
2102         Broke worker tests (Requested by andersca on #webkit).
2103
2104         * Modules/webdatabase/Database.cpp:
2105         (WebCore::DerefContextTask::create):
2106         (WebCore::DerefContextTask::DerefContextTask):
2107         (WebCore::Database::~Database):
2108         (WebCore::DeliverPendingCallbackTask::create):
2109         (WebCore::DeliverPendingCallbackTask::performTask):
2110         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask):
2111         (WebCore::Database::scheduleTransactionCallback):
2112         * Modules/webdatabase/DatabaseManager.cpp:
2113         (WebCore::DatabaseCreationCallbackTask::create):
2114         (WebCore::DatabaseCreationCallbackTask::performTask):
2115         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
2116         (WebCore::DatabaseManager::openDatabase):
2117         * Modules/webdatabase/SQLCallbackWrapper.h:
2118         (WebCore::SQLCallbackWrapper::clear):
2119         (WebCore::SQLCallbackWrapper::SafeReleaseTask::create):
2120         (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask):
2121         (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask):
2122         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
2123         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2124         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
2125         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2126         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2127         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create):
2128         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask):
2129         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
2130         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2131         * bindings/js/JSCallbackData.h:
2132         (WebCore::DeleteCallbackDataTask::create):
2133         (WebCore::DeleteCallbackDataTask::performTask):
2134         (WebCore::DeleteCallbackDataTask::isCleanupTask):
2135         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
2136         * bindings/js/JSDOMGlobalObjectTask.h:
2137         * bindings/js/JSDOMWindowBase.cpp:
2138         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
2139         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2140         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
2141         * bindings/scripts/CodeGeneratorJS.pm:
2142         (GenerateCallbackImplementation):
2143         * dom/CrossThreadTask.h:
2144         (WebCore::CrossThreadTask1::create):
2145         (WebCore::CrossThreadTask1::performTask):
2146         (WebCore::CrossThreadTask2::create):
2147         (WebCore::CrossThreadTask2::performTask):
2148         (WebCore::CrossThreadTask3::create):
2149         (WebCore::CrossThreadTask3::performTask):
2150         (WebCore::CrossThreadTask4::create):
2151         (WebCore::CrossThreadTask4::performTask):
2152         (WebCore::CrossThreadTask5::create):
2153         (WebCore::CrossThreadTask5::performTask):
2154         (WebCore::CrossThreadTask6::create):
2155         (WebCore::CrossThreadTask6::performTask):
2156         (WebCore::CrossThreadTask7::create):
2157         (WebCore::CrossThreadTask7::performTask):
2158         (WebCore::CrossThreadTask8::create):
2159         (WebCore::CrossThreadTask8::performTask):
2160         (WebCore::createCallbackTask):
2161         * dom/Document.cpp:
2162         (WebCore::Document::addConsoleMessage):
2163         (WebCore::Document::addMessage):
2164         (WebCore::PerformTaskContext::PerformTaskContext):
2165         (WebCore::Document::postTask):
2166         (WebCore::Document::pendingTasksTimerFired):
2167         * dom/Document.h:
2168         * dom/ScriptExecutionContext.cpp:
2169         (WebCore::ProcessMessagesSoonTask::create):
2170         (WebCore::ProcessMessagesSoonTask::performTask):
2171         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
2172         * dom/ScriptExecutionContext.h:
2173         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create):
2174         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2175         * dom/StringCallback.cpp:
2176         (WebCore::StringCallback::scheduleCallback):
2177         * loader/appcache/ApplicationCacheGroup.cpp:
2178         (WebCore::CallCacheListenerTask::create):
2179         (WebCore::CallCacheListenerTask::CallCacheListenerTask):
2180         (WebCore::ApplicationCacheGroup::postListenerTask):
2181         * workers/DefaultSharedWorkerRepository.cpp:
2182         (WebCore::SharedWorkerProxy::postTaskToLoader):
2183         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
2184         (WebCore::SharedWorkerConnectTask::create):
2185         (WebCore::SharedWorkerConnectTask::performTask):
2186         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
2187         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
2188         * workers/WorkerEventQueue.cpp:
2189         (WebCore::WorkerEventQueue::enqueueEvent):
2190         * workers/WorkerGlobalScope.cpp:
2191         (WebCore::WorkerGlobalScope::close):
2192         (WebCore::WorkerGlobalScope::postTask):
2193         (WebCore::WorkerGlobalScope::addConsoleMessage):
2194         (WebCore::WorkerGlobalScope::addMessage):
2195         * workers/WorkerGlobalScope.h:
2196         * workers/WorkerLoaderProxy.h:
2197         * workers/WorkerMessagingProxy.cpp:
2198         (WebCore::MessageWorkerGlobalScopeTask::create):
2199         (WebCore::MessageWorkerGlobalScopeTask::performTask):
2200         (WebCore::MessageWorkerTask::create):
2201         (WebCore::MessageWorkerTask::performTask):
2202         (WebCore::WorkerExceptionTask::create):
2203         (WebCore::WorkerExceptionTask::performTask):
2204         (WebCore::WorkerGlobalScopeDestroyedTask::create):
2205         (WebCore::WorkerGlobalScopeDestroyedTask::performTask):
2206         (WebCore::WorkerTerminateTask::create):
2207         (WebCore::WorkerTerminateTask::WorkerTerminateTask):
2208         (WebCore::WorkerTerminateTask::performTask):
2209         (WebCore::WorkerThreadActivityReportTask::create):
2210         (WebCore::WorkerThreadActivityReportTask::performTask):
2211         (WebCore::PostMessageToPageInspectorTask::create):
2212         (WebCore::PostMessageToPageInspectorTask::performTask):
2213         (WebCore::NotifyNetworkStateChangeTask::create):
2214         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask):
2215         (WebCore::NotifyNetworkStateChangeTask::performTask):
2216         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
2217         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
2218         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
2219         (WebCore::WorkerMessagingProxy::postTaskToLoader):
2220         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
2221         (WebCore::WorkerMessagingProxy::workerThreadCreated):
2222         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2223         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
2224         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
2225         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2226         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
2227         (WebCore::WorkerMessagingProxy::reportPendingActivity):
2228         * workers/WorkerMessagingProxy.h:
2229         * workers/WorkerRunLoop.cpp:
2230         (WebCore::WorkerRunLoop::postTask):
2231         (WebCore::WorkerRunLoop::postTaskAndTerminate):
2232         (WebCore::WorkerRunLoop::postTaskForMode):
2233         (WebCore::WorkerRunLoop::Task::create):
2234         (WebCore::WorkerRunLoop::Task::Task):
2235         * workers/WorkerRunLoop.h:
2236         * workers/WorkerThread.cpp:
2237         (WebCore::WorkerThreadShutdownFinishTask::create):
2238         (WebCore::WorkerThreadShutdownFinishTask::performTask):
2239         (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask):
2240         (WebCore::WorkerThreadShutdownStartTask::performTask):
2241         (WebCore::WorkerThread::stop):
2242         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2243
2244 2013-10-07  Darin Adler  <darin@apple.com>
2245
2246         Make Vector::insert work for move-only types
2247         https://bugs.webkit.org/show_bug.cgi?id=122429
2248
2249         Reviewed by Anders Carlsson.
2250
2251         * history/HistoryItem.cpp:
2252         (WebCore::HistoryItem::padDailyCountsForNewVisit): Call insertVector.
2253         Also added some inline capacity, which should make this faster.
2254
2255 2013-10-07  Anders Carlsson  <andersca@apple.com>
2256
2257         Update test results.
2258
2259         * bindings/scripts/test/JS/JSTestCallback.cpp:
2260         (WebCore::JSTestCallback::~JSTestCallback):
2261
2262 2013-10-04  Ojan Vafai  <ojan@chromium.org> and Martin Robinson  <mrobinson@igalia.com>
2263
2264         [MathML] Remove RenderTree modification during layout and refactor the StretchyOp code
2265         https://bugs.webkit.org/show_bug.cgi?id=121416
2266
2267         Reviewed by David Hyatt.
2268
2269         Tests: mathml/presentation/mo-minus.html
2270                mathml/presentation/mo-stacked-glyphs.html
2271                mathml/presentation/mo-stretchy-vertical-bar.html
2272                mathml/very-large-stretchy-operators.html
2273
2274         MathML stretched operators by both modifying the width of the operator
2275         and adding children to the operator node in the render tree.
2276
2277         Instead we make the operator width equal to the widest glyph possible that we use
2278         to represent the operator.  Additionally instead of rendering stretchy glyphs via
2279         stacked operator pieces in separate render tree nodes, keep only one node for the
2280         glyph, and use a custom paint method to paint the stacked representation.
2281
2282         With this patch, rendering seems roughly equivalent on Mac and markedly better
2283         on Linux.
2284
2285         * css/mathml.css:
2286         Not sure what this line-height:0 was here for, but it caused bugs with the new code
2287
2288         * mathml/MathMLTextElement.cpp:
2289         (WebCore::MathMLTextElement::attach):
2290         (WebCore):
2291         (WebCore::MathMLTextElement::childrenChanged):
2292         Need to update the anonymous render tree below <mo> elements when their
2293         children change or when the renderer is first attached.
2294
2295         * mathml/MathMLTextElement.h:
2296         (MathMLTextElement):
2297         * rendering/mathml/RenderMathMLBlock.cpp:
2298         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
2299         * rendering/mathml/RenderMathMLBlock.h:
2300         Now that the preferred width doesn't depend on the height, we don't
2301         need to override computePreferredLogicalWidths at all.
2302
2303         * rendering/mathml/RenderMathMLFenced.cpp:
2304         (WebCore::RenderMathMLFenced::makeFences):
2305         (WebCore::RenderMathMLFenced::styleDidChange):
2306         Need to update the anonymous renderers for the anonymous RenderMathMLOperators.
2307
2308         * rendering/mathml/RenderMathMLOperator.cpp:
2309         (WebCore::RenderMathMLOperator::expandedStretchHeight):
2310         Store the non-expanded stretch height so that we can detect when the height
2311         actually changed.
2312
2313         (WebCore::RenderMathMLOperator::stretchToHeight):
2314         Only update the style on the anonymous render tree since this is called
2315         from RenderMathMLRow::layout
2316
2317         (WebCore::RenderMathMLOperator::styleDidChange):
2318         (WebCore::RenderMathMLOperator::glyphBoundsForCharacter): A helper to get glyph boundaries.
2319         (WebCore::RenderMathMLOperator::glyphHeightForCharacter): Ditto for glyph width.
2320         (WebCore::RenderMathMLOperator::advanceForCharacter): The advance is different from the width,
2321         and we want the width of the operator to be the advance instead of the tight bounding width.
2322         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use the max of all possible glyphs
2323         we can use to render this operator.
2324         (WebCore::RenderMathMLOperator::computeLogicalHeight): Return the stretched operator height, if appropriate.
2325         (WebCore::RenderMathMLOperator::updateFromElement): We add a child for rendering the non-scaled
2326         version of the glyph.
2327         (WebCore::RenderMathMLOperator::firstCharacterForStretching): Helper to figure out what character
2328         is the character used for stretching operations.
2329         (WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter): Helper to find an acceptable set
2330         of glyph pieces for stretching characters.
2331         (WebCore::RenderMathMLOperator::updateStyle): Resize the operator to the appropriate height and hide
2332         the child if we are using the stretchy style.
2333         (WebCore::RenderMathMLOperator::firstLineBoxBaseline):
2334         (WebCore::RenderMathMLOperator::paintCharacter): Helper to paint a single character component of the
2335         stretchy glyph.
2336         (WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Helper to paint the extender glue between
2337         features of the stretchy glyph.
2338         (WebCore::RenderMathMLOperator::paint): Properly paint stretchy glyphs.
2339         * rendering/mathml/RenderMathMLOperator.h: Update method declarations.
2340
2341 2013-10-07  Eric Carlson  <eric.carlson@apple.com>
2342
2343         [MediaStream API] update MediaStreamTrack object to match spec
2344         https://bugs.webkit.org/show_bug.cgi?id=121940
2345
2346         Reviewed by Jer Noble.
2347
2348         No new tests, existing test updated.
2349
2350         Add new source files to the project:
2351         * CMakeLists.txt:
2352         * DerivedSources.make:
2353         * GNUmakefile.list.am:
2354         * WebCore.xcodeproj/project.pbxproj:
2355
2356         New capability dictionary objects:
2357         * Modules/mediastream/AllAudioCapabilities.h: Added.
2358         * Modules/mediastream/AllAudioCapabilities.idl: Added.
2359         * Modules/mediastream/AllVideoCapabilities.h: Added.
2360         * Modules/mediastream/AllVideoCapabilities.idl: Added.
2361
2362         * Modules/mediastream/AudioStreamTrack.cpp:
2363         (WebCore::AudioStreamTrack::create): New version that takes a MediaStreamTrack*.
2364         * Modules/mediastream/AudioStreamTrack.h:
2365
2366         New object for a capability range:
2367         * Modules/mediastream/CapabilityRange.cpp: Added.
2368         * Modules/mediastream/CapabilityRange.h: Added.
2369         * Modules/mediastream/CapabilityRange.idl: Added.
2370
2371         * Modules/mediastream/MediaConstraintsImpl.h: Make initialize() public.
2372
2373         New object for the current states for a media source.
2374         * Modules/mediastream/MediaSourceStates.cpp: Added.
2375         * Modules/mediastream/MediaSourceStates.h: Added.
2376         * Modules/mediastream/MediaSourceStates.idl: Added.
2377
2378         Don't call the media stream center to notify it when the state of other
2379         objects change.
2380         * Modules/mediastream/MediaStream.cpp:
2381         (WebCore::processTrack): Remove the stream source duplication hack.
2382         (WebCore::createFromSourceVectors): 
2383         (WebCore::MediaStream::MediaStream):
2384         (WebCore::MediaStream::addTrack):
2385         (WebCore::MediaStream::removeTrack):
2386         * Modules/mediastream/MediaStream.h:
2387
2388         New object for the capabilities of a source.
2389         * Modules/mediastream/MediaStreamCapabilities.cpp: Added.
2390         * Modules/mediastream/MediaStreamCapabilities.h: Added.
2391         * Modules/mediastream/MediaStreamCapabilities.idl: Added.
2392
2393         Update interface to match spec.
2394         * Modules/mediastream/MediaStreamTrack.cpp:
2395         (WebCore::MediaStreamTrack::MediaStreamTrack): Define a copy constructor to use in clone().
2396         (WebCore::MediaStreamTrack::setSource): Call removeObserver if the track already has a source.
2397             Initialize m_muted from new source's muted state.
2398         (WebCore::MediaStreamTrack::id): Allow source to provide ID as the spec suggests.
2399         (WebCore::MediaStreamTrack::setEnabled): Add some spec text to clarify logic. Always call
2400             source->setEnabled, it can figure out if nothing needs to be done.
2401         (WebCore::MediaStreamTrack::muted): Don't call the stream center when muted changes, the
2402             source can take care of notifying interested parties.
2403         (WebCore::MediaStreamTrack::readonly): New.
2404         (WebCore::MediaStreamTrack::remote): New.
2405         (WebCore::MediaStreamTrack::constraints): New. 
2406         (WebCore::MediaStreamTrack::states): New.
2407         (WebCore::MediaStreamTrack::capabilities): New.
2408         (WebCore::MediaStreamTrack::applyConstraints): New.
2409         (WebCore::MediaStreamTrack::clone): New.
2410         (WebCore::MediaStreamTrack::stopProducingData): New.
2411         (WebCore::MediaStreamTrack::sourceStateChanged): Renamed from sourceChangedState.
2412         (WebCore::MediaStreamTrack::sourceMutedChanged): New.
2413         (WebCore::MediaStreamTrack::sourceEnabledChanged): New.
2414         (WebCore::MediaStreamTrack::configureTrackRendering): New.
2415         (WebCore::MediaStreamTrack::stopped): New. 
2416         (WebCore::MediaStreamTrack::stop): Call stopProducingData.
2417         (WebCore::MediaStreamTrack::scheduleEventDispatch): New.
2418         (WebCore::MediaStreamTrack::dispatchQueuedEvents): New.
2419         * Modules/mediastream/MediaStreamTrack.h:
2420         * Modules/mediastream/MediaStreamTrack.idl:
2421
2422         * Modules/mediastream/MediaTrackConstraint.cpp: Added.
2423         * Modules/mediastream/MediaTrackConstraint.h: Added.
2424         * Modules/mediastream/MediaTrackConstraint.idl: Added.
2425
2426         // Add empty classes/IDL for track constraint objects.
2427         * Modules/mediastream/MediaTrackConstraintSet.cpp: Added.
2428         * Modules/mediastream/MediaTrackConstraintSet.h: Added.
2429         * Modules/mediastream/MediaTrackConstraintSet.idl: Added.
2430         * Modules/mediastream/MediaTrackConstraints.cpp: Added.
2431         * Modules/mediastream/MediaTrackConstraints.h: Added.
2432         * Modules/mediastream/MediaTrackConstraints.idl: Added.
2433
2434         * Modules/mediastream/UserMediaRequest.cpp:
2435         (WebCore::UserMediaRequest::callSuccessHandler): Don't call the stream center, the
2436             stream can take care of notifying interested parties.
2437
2438         // Add a constructor and create() that take a MediaStreamTrack*.
2439         * Modules/mediastream/VideoStreamTrack.cpp:
2440         (WebCore::VideoStreamTrack::create): 
2441         (WebCore::VideoStreamTrack::VideoStreamTrack):
2442         * Modules/mediastream/VideoStreamTrack.h:
2443
2444         // Create a MediaStreamSource subclass for WebAudio
2445         * Modules/webaudio/AudioContext.cpp:
2446         (WebCore::AudioContext::createMediaStreamSource): Call isAudioStreamSource instead
2447             of checking deviceID.
2448         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2449         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): Create a
2450             MediaStreamAudioSource instead of a MediaStreamSource.
2451         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
2452         * Modules/webaudio/MediaStreamAudioSource.cpp: Added.
2453         * Modules/webaudio/MediaStreamAudioSource.h: Added.
2454         (WebCore::MediaStreamAudioSource::~MediaStreamAudioSource):
2455
2456         // Add new generated files.
2457         * bindings/js/JSMediaSourceStatesCustom.cpp: Added.
2458         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Added.
2459
2460         * dom/EventNames.h: Defined 'overconstrained' event.
2461
2462         * platform/mediastream/MediaStreamCenter.h: Get rid of all of the methods nobody uses.
2463             It isn't clear that they are necessary, and we can add them back if/when we need them.
2464
2465         * platform/mediastream/MediaStreamDescriptor.cpp:
2466         (WebCore::MediaStreamDescriptor::~MediaStreamDescriptor): Clear the all source streams.
2467         (WebCore::MediaStreamDescriptor::removeSource): Clear the source stream.
2468         * platform/mediastream/MediaStreamDescriptor.h:
2469
2470         // Make MediaStreamSource an abstract base class, and remove everyting WebAudio-specific
2471         //  to MediaStreamAudioSource. 
2472         * platform/mediastream/MediaStreamSource.cpp:
2473         (WebCore::MediaStreamSource::MediaStreamSource): Remove readyState and requiresConsumer
2474             parameters. Create new UUID for id if non was passed.
2475         (WebCore::MediaStreamSource::reset): Reset internal state to just-constructed. Used for testing.
2476         (WebCore::MediaStreamSource::setReadyState): sourceChangedState -> sourceStateChanged.
2477         (WebCore::MediaStreamSource::setStream): Remove the ASSERT that check for a source being
2478             added to a new stream. This is still a problem, but it is required for testing and will
2479             be fixed as a part of bug 121954.
2480         (WebCore::MediaStreamSource::setConstraints): Added.
2481         (WebCore::MediaStreamSource::setMuted): Notify observers when muted changes.
2482         (WebCore::MediaStreamSource::setEnabled): Notify observers when enabled changes.
2483         (WebCore::MediaStreamSource::readonly): New.
2484         (WebCore::MediaStreamSource::stop): New. Set state to Ended when all of the observers has
2485             stopped.
2486         * platform/mediastream/MediaStreamSource.h:
2487
2488         // Define platform versions of the Capabilities classes.
2489         * platform/mediastream/MediaStreamSourceCapabilities.h: Added.
2490
2491         // Update the non-functional platform stream centers for the API changes.
2492         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
2493         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
2494         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
2495         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
2496         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
2497         * platform/mediastream/mac/MediaStreamCenterMac.h:
2498
2499         // Update the Mock stream center for the API changes. Add a concrete mock MediaStreamSource
2500         //  subclass.
2501         * platform/mock/MockMediaStreamCenter.cpp:
2502         (WebCore::MockSource::MockSource): New, the mock media stream source.
2503         (WebCore::MockSource::~MockSource):
2504         (WebCore::MockSource::capabilities):
2505         (WebCore::MockSource::states):
2506         (WebCore::mockSourceMap):
2507         (WebCore::mockAudioSourceID):
2508         (WebCore::mockVideoSourceID):
2509         (WebCore::initializeMockSources): Create one audio and one video mock source.
2510         (WebCore::MockMediaStreamCenter::registerMockMediaStreamCenter): Call initializeMockSources.
2511         (WebCore::MockMediaStreamCenter::createMediaStream): Use the already allocated mock media
2512             sources.
2513         (WebCore::MockMediaStreamCenter::getMediaStreamTrackSources): Ditto.
2514         * platform/mock/MockMediaStreamCenter.h:
2515
2516 2013-10-07  Andreas Kling  <akling@apple.com>
2517
2518         CTTE: Live node lists always have an owner Node.
2519         <https://webkit.org/b/122470>
2520
2521         Reviewed by Anders Carlsson.
2522
2523         Make LiveNodeListBase::m_ownerNode a Ref<Node> instead of a RefPtr
2524         and have all constructors take Node&.
2525
2526 2013-10-07  Anders Carlsson  <andersca@apple.com>
2527
2528         Clean up ScriptExecutionContext::Task and subclasses
2529         https://bugs.webkit.org/show_bug.cgi?id=122469
2530
2531         Reviewed by Andreas Kling.
2532
2533         * Modules/webdatabase/Database.cpp:
2534         (WebCore::DerefContextTask::DerefContextTask):
2535         (WebCore::Database::~Database):
2536         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask):
2537         (WebCore::Database::scheduleTransactionCallback):
2538         * Modules/webdatabase/DatabaseManager.cpp:
2539         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
2540         (WebCore::DatabaseManager::openDatabase):
2541         * Modules/webdatabase/SQLCallbackWrapper.h:
2542         (WebCore::SQLCallbackWrapper::clear):
2543         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
2544         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2545         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
2546         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2547         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2548         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
2549         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2550         * bindings/js/JSCallbackData.h:
2551         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
2552         * bindings/js/JSDOMGlobalObjectTask.h:
2553         * bindings/js/JSDOMWindowBase.cpp:
2554         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
2555         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2556         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
2557         * bindings/scripts/CodeGeneratorJS.pm:
2558         (GenerateCallbackImplementation):
2559         * dom/CrossThreadTask.h:
2560         (WebCore::createCallbackTask):
2561         * dom/Document.cpp:
2562         (WebCore::Document::addConsoleMessage):
2563         (WebCore::Document::addMessage):
2564         (WebCore::PerformTaskContext::PerformTaskContext):
2565         (WebCore::Document::postTask):
2566         (WebCore::Document::pendingTasksTimerFired):
2567         * dom/Document.h:
2568         * dom/ScriptExecutionContext.cpp:
2569         (WebCore::ProcessMessagesSoonTask::ProcessMessagesSoonTask):
2570         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
2571         * dom/ScriptExecutionContext.h:
2572         * dom/StringCallback.cpp:
2573         (WebCore::StringCallback::scheduleCallback):
2574         * loader/appcache/ApplicationCacheGroup.cpp:
2575         (WebCore::CallCacheListenerTask::CallCacheListenerTask):
2576         (WebCore::ApplicationCacheGroup::postListenerTask):
2577         * workers/DefaultSharedWorkerRepository.cpp:
2578         (WebCore::SharedWorkerProxy::postTaskToLoader):
2579         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
2580         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
2581         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
2582         * workers/WorkerEventQueue.cpp:
2583         (WebCore::WorkerEventQueue::enqueueEvent):
2584         * workers/WorkerGlobalScope.cpp:
2585         (WebCore::WorkerGlobalScope::close):
2586         (WebCore::WorkerGlobalScope::postTask):
2587         (WebCore::WorkerGlobalScope::addConsoleMessage):
2588         (WebCore::WorkerGlobalScope::addMessage):
2589         * workers/WorkerGlobalScope.h:
2590         * workers/WorkerLoaderProxy.h:
2591         * workers/WorkerMessagingProxy.cpp:
2592         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
2593         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
2594         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
2595         (WebCore::WorkerMessagingProxy::postTaskToLoader):
2596         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
2597         (WebCore::WorkerMessagingProxy::workerThreadCreated):
2598         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2599         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
2600         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
2601         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2602         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
2603         (WebCore::WorkerMessagingProxy::reportPendingActivity):
2604         * workers/WorkerMessagingProxy.h:
2605         * workers/WorkerRunLoop.cpp:
2606         (WebCore::WorkerRunLoop::postTask):
2607         (WebCore::WorkerRunLoop::postTaskAndTerminate):
2608         (WebCore::WorkerRunLoop::postTaskForMode):
2609         (WebCore::WorkerRunLoop::Task::Task):
2610         * workers/WorkerRunLoop.h:
2611         * workers/WorkerThread.cpp:
2612         (WebCore::WorkerThreadShutdownFinishTask::WorkerThreadShutdownFinishTask):
2613         (WebCore::WorkerThreadShutdownStartTask::performTask):
2614         (WebCore::WorkerThread::stop):
2615         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2616
2617 2013-10-07  Sam Weinig  <sam@webkit.org>
2618
2619         CTTE: Use references in and around DragController
2620         https://bugs.webkit.org/show_bug.cgi?id=122427
2621
2622         Reviewed by Andreas Kling.
2623
2624         Use references to indicate non-nullness of DragController related
2625         objects.
2626
2627 2013-10-07  Tim Horton  <timothy_horton@apple.com>
2628
2629         Animated images are not restarted when page visibility changes
2630         https://bugs.webkit.org/show_bug.cgi?id=122464
2631         <rdar://problem/14293474>
2632
2633         Reviewed by Simon Fraser.
2634
2635         Always kickstart animated images when the page visibility changes,
2636         which can occur via window occlusion, and which is independent of in-window
2637         state, which we were previously using to advance animation.
2638
2639         No new tests; attempts to make a test have resulted only in a flaky, timing-dependent test.
2640
2641         * page/Frame.cpp:
2642         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
2643         Move this call to resumeAnimatingImages() up to Page.
2644
2645         * page/FrameView.cpp:
2646         (WebCore::FrameView::setIsInWindow):
2647         Move this call to resumeAnimatingImages() up to Page.
2648
2649         * WebCore.exp.in
2650         * page/FrameView.h:
2651         * page/Page.h:
2652         Move resumeAnimatingImages() itself up to Page.
2653
2654         * page/Page.cpp:
2655         (WebCore::Page::setIsInWindow):
2656         Resume animated images when we move in-window.
2657
2658         (WebCore::Page::setVisibilityState):
2659         Resume animated images when we become visible.
2660         This is the one we were previously missing.
2661
2662         (WebCore::Page::resumeActiveDOMObjectsAndAnimations):
2663         Resume animated images when we're told to.
2664
2665         (WebCore::Page::resumeAnimatingImages):
2666         Kickstart any animated images in all frames.
2667
2668 2013-10-07  Jer Noble  <jer.noble@apple.com>
2669
2670         [Mac] Drawing video into canvas doesn't work on the first attempt
2671         https://bugs.webkit.org/show_bug.cgi?id=122404
2672
2673         Reviewed by Eric Carlson.
2674
2675         Test: media/video-canvas-drawing.html
2676
2677         If creating and painting from an AVPlayerItemVideoOutput fails, fall back
2678         to the (much slower) AVAssetImageGenerator path. Make sure to revert to the
2679         AVPlayerItemVideoOutput path when that object begins to have available
2680         images, however.
2681
2682         To do so, remove the "__MAC_OS_X_VERSION_MIN_REQUIRED < 1080" check around
2683         the AVAssetImageGenerator code, and allow both the image generator and video
2684         output to exist simultaneously.
2685
2686         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2687         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2688         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer):
2689         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer):
2690         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyImageGenerator):
2691         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
2692         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoOutputHasAvailableFrame):
2693         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2694
2695 2013-10-07  Jer Noble  <jer.noble@apple.com>
2696
2697         URLMediaSource.idl and URLMediaStream.idl are wrong
2698         https://bugs.webkit.org/show_bug.cgi?id=122301
2699
2700         Reviewed by Philippe Normand.
2701
2702         Rename URLMediaSource and URLMediaStream to DOMURLMediaSource and DOMURLMediaStream,
2703         respectively.
2704
2705         Update the build files:
2706         * CMakeLists.txt: Rename URL -> DOMURL.
2707         * DerivedSources.make: Ditto.
2708         * GNUmakefile.list.am: Ditto.
2709         * WebCore.xcodeproj/project.pbxproj: Ditto.
2710
2711         Rename the .idl and implementation files:
2712         * Modules/mediasource/DOMURLMediaSource.cpp: Renamed from Source/WebCore/Modules/mediasource/URLMediaSource.cpp.
2713         (WebCore::DOMURLMediaSource::createObjectURL):
2714         * Modules/mediasource/DOMURLMediaSource.h: Renamed from Source/WebCore/Modules/mediasource/URLMediaSource.h.
2715         * Modules/mediasource/DOMURLMediaSource.idl: Renamed from Source/WebCore/Modules/mediasource/URLMediaSource.idl.
2716         * Modules/mediastream/DOMURLMediaStream.cpp: Renamed from Source/WebCore/Modules/mediastream/URLMediaStream.cpp.
2717         (WebCore::DOMURLMediaStream::createObjectURL):
2718         * Modules/mediastream/DOMURLMediaStream.h: Renamed from Source/WebCore/Modules/mediastream/URLMediaStream.h.
2719         * Modules/mediastream/DOMURLMediaStream.idl: Renamed from Source/WebCore/Modules/mediastream/URLMediaStream.idl.
2720
2721 2013-10-07  Philippe Normand  <pnormand@igalia.com>
2722
2723         Conditional support in bindings code generator for overloaded functions
2724         https://bugs.webkit.org/show_bug.cgi?id=122443
2725
2726         Reviewed by Darin Adler.
2727
2728         * bindings/scripts/CodeGeneratorJS.pm: 
2729         (GenerateOverloadedFunction): Generate conditional for overloaded
2730         function, if it's present in the idl.
2731         (GenerateImplementation): Close the last overloaded function
2732         conditional before generating the distpatch function.
2733         * bindings/scripts/test/JS/JSTestObj.cpp:
2734         (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
2735         Rebaseline overloaded function tests.
2736
2737 2013-10-07  Tim Horton  <timothy_horton@apple.com>
2738
2739         -webkit-cross-fade paints SVGs at full opacity during cross-fade
2740         https://bugs.webkit.org/show_bug.cgi?id=122441
2741         <rdar://problem/13973162>
2742
2743         Reviewed by Simon Fraser.
2744
2745         Test: css3/images/cross-fade-svg-with-opacity.html
2746
2747         * platform/graphics/CrossfadeGeneratedImage.cpp:
2748         (WebCore::drawCrossfadeSubimage):
2749         (WebCore::CrossfadeGeneratedImage::drawCrossfade):
2750         Factor the image painting out into a function.
2751         Conditionally use a transparency layer around painting if the image
2752         we're drawing is an SVG (SVGImage is the only Image subclass that will
2753         not respect the context's opacity).
2754
2755 2013-10-06  Anders Carlsson  <andersca@apple.com>
2756
2757         Add OVERRIDE and virtual where appropriate
2758         https://bugs.webkit.org/show_bug.cgi?id=122439
2759
2760         Reviewed by Antti Koivisto.
2761
2762         * Modules/encryptedmedia/MediaKeys.h:
2763         * Modules/webaudio/AnalyserNode.h:
2764         * Modules/webaudio/AudioBasicInspectorNode.h:
2765         * Modules/webaudio/AudioBasicProcessorNode.h:
2766         * Modules/webaudio/AudioBufferSourceNode.h:
2767         * Modules/webaudio/AudioContext.h:
2768         * Modules/webaudio/AudioDestinationNode.h:
2769         * Modules/webaudio/AudioProcessingEvent.h:
2770         * Modules/webaudio/BiquadDSPKernel.h:
2771         * Modules/webaudio/BiquadProcessor.h:
2772         * Modules/webaudio/ChannelMergerNode.h:
2773         * Modules/webaudio/ChannelSplitterNode.h:
2774         * Modules/webaudio/ConvolverNode.h:
2775         * Modules/webaudio/DelayDSPKernel.h:
2776         * Modules/webaudio/DelayProcessor.h:
2777         * Modules/webaudio/DynamicsCompressorNode.h:
2778         * Modules/webaudio/GainNode.h:
2779         * Modules/webaudio/MediaElementAudioSourceNode.h:
2780         * Modules/webaudio/OfflineAudioCompletionEvent.h:
2781         * Modules/webaudio/OfflineAudioDestinationNode.h:
2782         * Modules/webaudio/OscillatorNode.h:
2783         * Modules/webaudio/PannerNode.h:
2784         * Modules/webaudio/ScriptProcessorNode.h:
2785         * Modules/webaudio/WaveShaperProcessor.h:
2786         * accessibility/AccessibilityARIAGrid.h:
2787         * accessibility/AccessibilityARIAGridCell.h:
2788         * accessibility/AccessibilityARIAGridRow.h:
2789         * accessibility/AccessibilityImageMapLink.h:
2790         * accessibility/AccessibilityList.h:
2791         * accessibility/AccessibilityListBox.h:
2792         * accessibility/AccessibilityListBoxOption.h:
2793         * accessibility/AccessibilityMediaControls.h:
2794         * accessibility/AccessibilityMenuList.h:
2795         * accessibility/AccessibilityMenuListOption.h:
2796         * accessibility/AccessibilityMenuListPopup.h:
2797         * accessibility/AccessibilityMockObject.h:
2798         * accessibility/AccessibilityNodeObject.h:
2799         * accessibility/AccessibilityProgressIndicator.h:
2800         * accessibility/AccessibilityRenderObject.h:
2801         * accessibility/AccessibilitySVGRoot.h:
2802         * accessibility/AccessibilityScrollView.h:
2803         * accessibility/AccessibilityScrollbar.h:
2804         * accessibility/AccessibilitySlider.h:
2805         * accessibility/AccessibilitySpinButton.h:
2806         * accessibility/AccessibilityTable.h:
2807         * accessibility/AccessibilityTableCell.h:
2808         * accessibility/AccessibilityTableColumn.h:
2809         * accessibility/AccessibilityTableHeaderContainer.h:
2810         * accessibility/AccessibilityTableRow.h:
2811         * bindings/js/JSEventListener.h:
2812         * bindings/js/WebCoreTypedArrayController.h:
2813         * bridge/c/c_class.h:
2814         * bridge/c/c_instance.h:
2815         * bridge/c/c_runtime.h:
2816         * bridge/runtime_root.h:
2817         * css/CSSBasicShapes.h:
2818         * css/CSSComputedStyleDeclaration.h:
2819         * css/CSSStyleSheet.h:
2820         * dom/Attr.h:
2821         * dom/BeforeTextInsertedEvent.h:
2822         * dom/CDATASection.h:
2823         * dom/ChildNodeList.h:
2824         * dom/DatasetDOMStringMap.h:
2825         * dom/Document.h:
2826         * dom/DocumentEventQueue.h:
2827         * dom/DocumentFragment.h:
2828         * dom/Element.h:
2829         * dom/ErrorEvent.h:
2830         * dom/KeyboardEvent.h:
2831         * dom/Node.h:
2832         * dom/PageTransitionEvent.h:
2833         * dom/ProgressEvent.h:
2834         * dom/PseudoElement.h:
2835         * dom/ScriptExecutionContext.h:
2836         * dom/ShadowRoot.h:
2837         * dom/StyledElement.h:
2838         * dom/TagNodeList.h:
2839         * dom/Text.h:
2840         * dom/TextEvent.h:
2841         * dom/TransitionEvent.h:
2842         * dom/UIEvent.h:
2843         * dom/WebKitAnimationEvent.h:
2844         * dom/WebKitTransitionEvent.h:
2845         * editing/ApplyBlockElementCommand.h:
2846         * editing/ApplyStyleCommand.h:
2847         * editing/BreakBlockquoteCommand.h:
2848         * editing/CompositeEditCommand.h:
2849         * editing/SpellingCorrectionCommand.h:
2850         * fileapi/File.h:
2851         * fileapi/FileThreadTask.h:
2852         * history/BackForwardList.h:
2853         * html/BaseCheckableInputType.h:
2854         * html/HTMLAnchorElement.h:
2855         * html/HTMLAreaElement.h:
2856         * html/HTMLCanvasElement.h:
2857         * html/HTMLCollection.h:
2858         * html/HTMLElement.h:
2859         * html/HTMLFieldSetElement.h:
2860         * html/HTMLFormControlElement.h:
2861         * html/HTMLFormControlElementWithState.h:
2862         * html/HTMLFormElement.h:
2863         * html/HTMLFrameElementBase.h:
2864         * html/HTMLImageElement.h:
2865         * html/HTMLImageLoader.h:
2866         * html/HTMLInputElement.h:
2867         * html/HTMLLabelElement.h:
2868         * html/HTMLLegendElement.h:
2869         * html/HTMLMediaElement.h:
2870         * html/HTMLMeterElement.h:
2871         * html/HTMLOptGroupElement.h:
2872         * html/HTMLOptionElement.h:
2873         * html/HTMLPlugInElement.h:
2874         * html/HTMLPlugInImageElement.h:
2875         * html/HTMLProgressElement.h:
2876         * html/HTMLSelectElement.h:
2877         * html/HTMLTableElement.h:
2878         * html/HTMLTextAreaElement.h:
2879         * html/HTMLTextFormControlElement.h:
2880         * html/HTMLVideoElement.h:
2881         * html/canvas/CanvasRenderingContext2D.cpp:
2882         * html/shadow/MediaControlElementTypes.h:
2883         * html/shadow/MediaControlElements.h:
2884         * html/shadow/SpinButtonElement.h:
2885         * html/shadow/TextControlInnerElements.h:
2886         * html/track/AudioTrackList.h:
2887         * html/track/TextTrackList.h:
2888         * html/track/TrackListBase.h:
2889         * inspector/InspectorValues.h:
2890         * loader/EmptyClients.h:
2891         * loader/ImageLoader.h:
2892         * loader/ResourceLoader.h:
2893         * loader/SubresourceLoader.h:
2894         * loader/appcache/ApplicationCacheGroup.cpp:
2895         * loader/appcache/ApplicationCacheGroup.h:
2896         * loader/appcache/DOMApplicationCache.h:
2897         * loader/archive/cf/LegacyWebArchive.h:
2898         * loader/cache/CachedCSSStyleSheet.h:
2899         * loader/cache/CachedFont.h:
2900         * loader/cache/CachedFontClient.h:
2901         * loader/cache/CachedImageClient.h:
2902         * loader/cache/CachedSVGDocumentClient.h:
2903         * loader/cache/CachedStyleSheetClient.h:
2904         * loader/cache/CachedXSLStyleSheet.h:
2905         * page/Chrome.h:
2906         * page/DOMWindow.h:
2907         * page/FrameView.h:
2908         * page/animation/ImplicitAnimation.h:
2909         * platform/PODIntervalTree.h:
2910         * platform/PODRedBlackTree.h:
2911         * platform/ScrollView.h:
2912         * platform/Scrollbar.h:
2913         * platform/Timer.h:
2914         * platform/animation/TimingFunction.h:
2915         (WebCore::LinearTimingFunction::~LinearTimingFunction):
2916         (WebCore::CubicBezierTimingFunction::~CubicBezierTimingFunction):
2917         (WebCore::StepsTimingFunction::~StepsTimingFunction):
2918         * platform/audio/AudioDSPKernelProcessor.h:
2919         * platform/audio/HRTFPanner.h:
2920         * platform/audio/mac/AudioDestinationMac.h:
2921         * platform/graphics/SimpleFontData.h:
2922         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2923         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2924         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2925         * platform/graphics/filters/FilterOperation.h:
2926         * platform/network/ResourceHandle.h:
2927         * rendering/AutoTableLayout.h:
2928         * rendering/ClipPathOperation.h:
2929         * rendering/InlineFlowBox.h:
2930         * rendering/RenderBlock.h:
2931         * rendering/RenderBox.h:
2932         * rendering/RenderBoxModelObject.h:
2933         * rendering/RenderButton.h:
2934         * rendering/RenderFieldset.h:
2935         * rendering/RenderFileUploadControl.h:
2936         * rendering/RenderFlexibleBox.h:
2937         * rendering/RenderFlowThread.h:
2938         * rendering/RenderFullScreen.h:
2939         * rendering/RenderImage.h:
2940         * rendering/RenderLayer.h:
2941         * rendering/RenderLineBreak.h:
2942         * rendering/RenderListBox.h:
2943         * rendering/RenderListItem.h:
2944         * rendering/RenderListMarker.h:
2945         * rendering/RenderMenuList.h:
2946         * rendering/RenderMeter.h:
2947         * rendering/RenderObject.h:
2948         * rendering/RenderReplaced.h:
2949         * rendering/RenderSlider.h:
2950         * rendering/RenderTable.h:
2951         * rendering/RenderTableCell.h:
2952         * rendering/RenderText.h:
2953         * rendering/RenderTextControl.h:
2954         * rendering/RenderTextControlSingleLine.h:
2955         * rendering/RenderTextFragment.h:
2956         * rendering/RenderView.h:
2957         * rendering/RootInlineBox.h:
2958         * rendering/mathml/RenderMathMLBlock.h:
2959         * rendering/mathml/RenderMathMLFraction.h:
2960         * rendering/mathml/RenderMathMLOperator.h:
2961         * rendering/style/BasicShapes.h:
2962         * rendering/svg/RenderSVGModelObject.h:
2963         * rendering/svg/RenderSVGShape.h:
2964         * svg/SVGAnimatedBoolean.h:
2965         * svg/SVGAnimatedString.h:
2966         * svg/SVGAnimatedTransformList.h:
2967         * svg/SVGDocument.h:
2968         * svg/SVGElement.h:
2969         * svg/SVGElementInstance.h:
2970         * svg/SVGFontElement.h:
2971         * svg/SVGGElement.h:
2972         * svg/SVGGraphicsElement.h:
2973         * svg/SVGTransformable.h:
2974         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2975         * svg/properties/SVGAnimatedPropertyMacros.h:
2976         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
2977         * svg/properties/SVGListPropertyTearOff.h:
2978         * svg/properties/SVGPropertyTearOff.h:
2979         * workers/WorkerGlobalScope.h:
2980
2981 2013-10-07  Philippe Normand  <pnormand@igalia.com>
2982
2983         URLMediaStream is unguarded by ENABLE(MEDIA_STREAM)
2984         https://bugs.webkit.org/show_bug.cgi?id=122444
2985
2986         Reviewed by Martin Robinson.
2987
2988         * Modules/mediastream/URLMediaStream.cpp: Added missing
2989         conditional guards.
2990         * Modules/mediastream/URLMediaStream.h: Ditto.
2991
2992 2013-10-07  Philippe Normand  <pnormand@igalia.com>
2993
2994         [GTK] webkit_dom_html_style_element_{s,g}et_scoped was removed
2995         https://bugs.webkit.org/show_bug.cgi?id=122446
2996
2997         Reviewed by Martin Robinson.
2998
2999         Added skeleton functions warning of removed functionality for
3000         the <style scoped> GObject DOM binding.
3001
3002         * bindings/gobject/WebKitDOMCustom.cpp:
3003         * bindings/gobject/WebKitDOMCustom.h:
3004         * bindings/gobject/WebKitDOMCustom.symbols:
3005
3006 2013-10-07  Csaba Osztrogonác  <ossy@webkit.org>
3007
3008         Unreviewed buildfix for GCC 4.6.
3009
3010         Changed override to OVERRIDE and final to FINAL.
3011
3012         * page/PageSerializer.cpp:
3013         * workers/AbstractWorker.h:
3014         * workers/SharedWorker.h:
3015         * workers/Worker.h:
3016
3017 2013-10-07  Chris Fleizach  <cfleizach@apple.com>
3018
3019         AX: Facebook wrapped a file upload button in an unfocusable ARIA button, which doesn't work with AXPress.
3020         https://bugs.webkit.org/show_bug.cgi?id=122252
3021
3022         Reviewed by Mario Sanchez Prada.
3023
3024         When an author uses a control-type ARIA role (like button), but then hides a native control-type inside,
3025         AXPress needs to operate on the inside node if possible.
3026
3027         Test: accessibility/axpress-on-aria-button.html
3028
3029         * accessibility/AccessibilityNodeObject.cpp:
3030         (WebCore::isNodeActionElement):
3031         (WebCore::nativeActionElement):
3032         (WebCore::AccessibilityNodeObject::actionElement):
3033
3034 2013-10-07  Zan Dobersek  <zdobersek@igalia.com>
3035
3036         Unreviewed debug build fix for ports enabling the <template> element support.
3037
3038         * html/HTMLTagNames.in: Generate type helpers for the <template> element as they're required
3039         by the assertions in the Element type casts for HTMLTemplateElement.
3040
3041 2013-10-07  Ryuan Choi  <ryuan.choi@samsung.com>
3042
3043         [EFL] Build fix after r157002
3044         https://bugs.webkit.org/show_bug.cgi?id=122434
3045
3046         Reviewed by Sam Weinig.
3047
3048         * editing/markup.cpp: Changed override to OVERRIDE.
3049
3050 2013-10-04  Philippe Normand  <pnormand@igalia.com>
3051
3052         MediaStreamTrack can't be FINAL
3053         https://bugs.webkit.org/show_bug.cgi?id=122322
3054
3055         Reviewed by Darin Adler.
3056
3057         Marked the MediaStreamTrack subclasses as final.
3058
3059         * Modules/mediastream/AudioStreamTrack.h:
3060         * Modules/mediastream/MediaStreamTrack.h:
3061         * Modules/mediastream/VideoStreamTrack.h:
3062
3063 2013-10-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3064
3065         Generate toCSSFooValue() for CSSCursorImageValue, CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue
3066         https://bugs.webkit.org/show_bug.cgi?id=122408
3067
3068         Reviewed by Andreas Kling.
3069
3070         As a step to use toCSSFooValue, this patch generates toCSSFooValue() for CSSCursorImageValue,
3071         CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue.
3072         This will help to detect bad type cast.
3073
3074         No new tests, no behavior changes.
3075
3076         * css/CSSCursorImageValue.h:
3077         * css/CSSTimingFunctionValue.h:
3078         * css/CSSToStyleMap.cpp:
3079         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
3080         * css/CSSUnicodeRangeValue.h:
3081         * css/CSSValue.cpp:
3082         (WebCore::CSSValue::destroy):
3083         * css/DeprecatedStyleBuilder.cpp:
3084         (WebCore::ApplyPropertyCursor::applyValue):
3085         * css/StyleResolver.cpp:
3086         (WebCore::StyleResolver::styleImage):
3087         (WebCore::StyleResolver::styleShader):
3088         * rendering/style/StylePendingImage.h:
3089         (WebCore::StylePendingImage::cssCursorImageValue):
3090
3091 2013-10-06  Andreas Kling  <akling@apple.com>
3092
3093         Range constructors should take a Document&.
3094         <https://webkit.org/b/122435>
3095
3096         Reviewed by Sam Weinig.
3097
3098         Make all Range constructors take Document& instead of a PassRefPtr.
3099         This removes one null check at every call site.
3100
3101         Also use a Ref<Document> for storage in Range.
3102
3103 2013-10-06  Antti Koivisto  <antti@apple.com>
3104
3105         Factor text paint style computation out from InlineTextBox
3106         https://bugs.webkit.org/show_bug.cgi?id=122433
3107
3108         Reviewed by Andreas Kling.
3109
3110         Move it to TextPaintStyle.h/cpp. Other parts of the code may use it in the future.
3111
3112 2013-10-06  Darin Adler  <darin@apple.com>
3113
3114         [GTK] Get rid of use of deleteAllValues in GtkDragAndDropHelper
3115         https://bugs.webkit.org/show_bug.cgi?id=122417
3116
3117         Reviewed by Andreas Kling.
3118
3119         * platform/gtk/GtkDragAndDropHelper.cpp: Removed unneeded typedefs.
3120         (WebCore::GtkDragAndDropHelper::~GtkDragAndDropHelper): Removed call to
3121         deleteAllValues.
3122         (WebCore::GtkDragAndDropHelper::handleDragEnd): Use remove directly instead
3123         of using find then remove. I believe this fixes a storage leak.
3124         (WebCore::GtkDragAndDropHelper::handleGetDragData): Use get instead of find.
3125         (WebCore::GtkDragAndDropHelper::handleDragLeaveLater): Remove the explicit
3126         delete since remove will automatically delete.
3127         (WebCore::GtkDragAndDropHelper::handleDragLeave): Use get instead of find.
3128         (WebCore::GtkDragAndDropHelper::handleDragMotion): Use add instead of a
3129         combination of find and set. Also user nullptr instead of 0.
3130         (WebCore::GtkDragAndDropHelper::handleDragDataReceived): Use get instead of find.
3131         (WebCore::GtkDragAndDropHelper::handleDragDrop): Use get instead of find.
3132
3133         * platform/gtk/GtkDragAndDropHelper.h: Use nullptr instead of 0. Change value
3134         type of m_droppingContexts to be a std::unique_ptr.
3135
3136 2013-10-06  Andreas Kling  <akling@apple.com>
3137
3138         Windows build fix attempt.
3139
3140         * page/win/DragControllerWin.cpp:
3141         (WebCore::DragController::declareAndWriteDragImage):
3142
3143 2013-10-06  Antti Koivisto  <antti@apple.com>
3144
3145         Move paint() to RenderElement
3146         https://bugs.webkit.org/show_bug.cgi?id=122371
3147
3148         Reviewed by Darin Adler.
3149
3150         RenderText does not paint itself (text is painted by line boxes). We can move paint() down
3151         to RenderElement.
3152         
3153         This also requires some type tightening elsewhere in the code.
3154
3155 2013-10-06  Antti Koivisto  <antti@apple.com>
3156
3157         Don't try to dispatch resize events for SVG images
3158         https://bugs.webkit.org/show_bug.cgi?id=122410
3159
3160         Reviewed by Darin Adler.
3161
3162         Tested by avoiding assertion in svg/custom/large-image-pattern-crash.html
3163
3164         * page/FrameView.cpp:
3165         (WebCore::FrameView::sendResizeEventIfNeeded):
3166         
3167             Bail out for SVG images. They have scripting disabled so the event wouldn't do anything anyway.
3168             Use of FrameView mechanisms is just an implementation detail for SVG images, they are not
3169             meant to act like real frames.
3170
3171         * rendering/svg/RenderSVGResourcePattern.cpp:
3172         (WebCore::RenderSVGResourcePattern::createTileImage):
3173         
3174             Switch to Element iterator. This will take NoEventDispatchAssertion verifying the change.
3175
3176 2013-10-06  Andreas Kling  <akling@apple.com>
3177
3178         Element ancestor iterator should have a first() for convenience.
3179         <https://webkit.org/b/122425>
3180
3181         Reviewed by Antti Koivisto.
3182
3183         Added an easy way to get the first element ancestor of a certain type
3184         and put it to use in a few places.
3185
3186 2013-10-06  Andreas Kling  <akling@apple.com>
3187
3188         CTTE: FrameLoader::notifier() should return a reference.
3189         <https://webkit.org/b/122424>
3190
3191         Reviewed by Anders Carlsson.
3192
3193         It was just returning the address of an inline member, so we should
3194         use a reference instead. Also made the backpointer to Frame in
3195         ResourceLoadNotifier a reference.
3196
3197 2013-10-06  Andreas Kling  <akling@apple.com>
3198
3199         Avoid layout in window.scroll{Y,X} when at topmost/leftmost position.
3200         <https://webkit.org/b/122423>
3201
3202         Reviewed by Antti Koivisto.
3203
3204         Add a fast path for these properties to skip synchronous layout when
3205         we are just going to return 0 anyway.
3206
3207         * page/DOMWindow.cpp:
3208         (WebCore::DOMWindow::scrollX):
3209         (WebCore::DOMWindow::scrollY):
3210
3211 2013-10-06  Anders Carlsson  <andersca@apple.com>
3212
3213         Clean up ContentData
3214         https://bugs.webkit.org/show_bug.cgi?id=122421
3215
3216         Reviewed by Andreas Kling.
3217
3218         Replace uses of OwnPtr with std::unique_ptr and get rid of the ContentData::create overloads.
3219
3220         * css/StyleResolver.cpp:
3221         (WebCore::StyleResolver::applyProperty):
3222         * rendering/style/ContentData.cpp:
3223         (WebCore::ContentData::clone):
3224         * rendering/style/ContentData.h:
3225         (WebCore::ContentData::setNext):
3226         * rendering/style/RenderStyle.cpp:
3227         (WebCore::RenderStyle::appendContent):
3228         (WebCore::RenderStyle::setContent):
3229         * rendering/style/RenderStyle.h:
3230         * rendering/style/StyleRareNonInheritedData.h:
3231
3232 2013-10-06  Sam Weinig  <sam@webkit.org>
3233
3234         Be a bit shouty about final classes while we look into why the bots don't like it.
3235
3236         * dom/Comment.h:
3237         * dom/ProcessingInstruction.h:
3238         * editing/markup.cpp:
3239         * page/PageSerializer.cpp:
3240         * workers/SharedWorker.h:
3241         * workers/Worker.h:
3242
3243 2013-10-06  Sam Weinig  <sam@webkit.org>
3244
3245         Fix windows build.
3246
3247         * platform/win/ClipboardUtilitiesWin.cpp:
3248         (WebCore::fragmentFromCFHTML):
3249         (WebCore::fragmentFromHTML):
3250         * platform/win/PasteboardWin.cpp:
3251         (WebCore::Pasteboard::writeRangeToDataObject):
3252         (WebCore::Pasteboard::writeSelection):
3253
3254 2013-10-05  Sam Weinig  <sam@webkit.org>
3255
3256         CTTE: Thread references through markup.h
3257         https://bugs.webkit.org/show_bug.cgi?id=122403
3258
3259         Reviewed by Darin Adler and Andreas Kling.
3260
3261         Highlights:
3262         - Removed createFragmentFromMarkupWithContext(), it was unused.
3263         - Moved createFragmentFromNodes() into its one caller (in WebKit/mac)
3264         - Add a bunch more toFoo() overloads.
3265
3266 2013-10-06  Zan Dobersek  <zdobersek@igalia.com>
3267
3268         [WebIDL] Annotate IDL interfaces under Source/WebCore/Modules/ with the OperationsNotDeletable attribute
3269         https://bugs.webkit.org/show_bug.cgi?id=122281
3270
3271         Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
3272         interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
3273         doesn't have any effect, but will keep the operations not configurable after the generator is modified
3274         to preserve the original behavior. The attribute will be removed from each interface after checking
3275         conformity with other browsers (in terms of configurability of operations of that interface) and the
3276         WebKit's existing test suites.
3277
3278         This patch covers IDL interfaces under Source/WebCore/Modules/.
3279
3280         * Modules/battery/BatteryManager.idl:
3281         * Modules/encryptedmedia/MediaKeySession.idl:
3282         * Modules/encryptedmedia/MediaKeys.idl:
3283         * Modules/gamepad/GamepadList.idl:
3284         * Modules/geolocation/Geolocation.idl:
3285         * Modules/indexeddb/IDBCursor.idl:
3286         * Modules/indexeddb/IDBDatabase.idl:
3287         * Modules/indexeddb/IDBFactory.idl:
3288         * Modules/indexeddb/IDBIndex.idl:
3289         * Modules/indexeddb/IDBKeyRange.idl:
3290         * Modules/indexeddb/IDBObjectStore.idl:
3291         * Modules/indexeddb/IDBTransaction.idl:
3292         * Modules/indexeddb/IDBVersionChangeEvent.idl:
3293         * Modules/mediacontrols/MediaControlsHost.idl:
3294         * Modules/mediasource/MediaSource.idl:
3295         * Modules/mediasource/SourceBuffer.idl:
3296         * Modules/mediasource/SourceBufferList.idl:
3297         * Modules/mediasource/WebKitMediaSource.idl:
3298         * Modules/mediasource/WebKitSourceBuffer.idl:
3299         * Modules/mediasource/WebKitSourceBufferList.idl:
3300         * Modules/mediastream/MediaStream.idl:
3301         * Modules/mediastream/MediaStreamTrack.idl:
3302         * Modules/mediastream/RTCDTMFSender.idl:
3303         * Modules/mediastream/RTCDataChannel.idl:
3304         * Modules/mediastream/RTCPeerConnection.idl:
3305         * Modules/mediastream/RTCStatsReport.idl:
3306         * Modules/mediastream/RTCStatsResponse.idl:
3307         * Modules/networkinfo/NetworkInfoConnection.idl:
3308         * Modules/notifications/Notification.idl:
3309         * Modules/notifications/NotificationCenter.idl:
3310         * Modules/proximity/DeviceProximityEvent.idl:
3311         * Modules/quota/StorageInfo.idl:
3312         * Modules/quota/StorageQuota.idl:
3313         * Modules/speech/SpeechGrammarList.idl:
3314         * Modules/speech/SpeechRecognition.idl:
3315         * Modules/speech/SpeechRecognitionResult.idl:
3316         * Modules/speech/SpeechRecognitionResultList.idl:
3317         * Modules/speech/SpeechSynthesis.idl:
3318         * Modules/webaudio/AnalyserNode.idl:
3319         * Modules/webaudio/AudioBuffer.idl:
3320         * Modules/webaudio/AudioBufferSourceNode.idl:
3321         * Modules/webaudio/AudioContext.idl:
3322         * Modules/webaudio/AudioListener.idl:
3323         * Modules/webaudio/AudioNode.idl:
3324         * Modules/webaudio/AudioParam.idl:
3325         * Modules/webaudio/BiquadFilterNode.idl:
3326         * Modules/webaudio/OscillatorNode.idl:
3327         * Modules/webaudio/PannerNode.idl:
3328         * Modules/webdatabase/Database.idl:
3329         * Modules/webdatabase/DatabaseSync.idl:
3330         * Modules/webdatabase/SQLResultSetRowList.idl:
3331         * Modules/webdatabase/SQLTransaction.idl:
3332         * Modules/webdatabase/SQLTransactionSync.idl:
3333         * Modules/websockets/WebSocket.idl:
3334
3335 2013-10-06  Andreas Kling  <akling@apple.com>
3336
3337         Tighten AbstractWorker and subclasses a bit.
3338         <https://webkit.org/b/122402>
3339
3340         Reviewed by Darin Adler.
3341
3342         - Make the Worker and SharedWorker classes final.
3343         - Have constructors take ScriptExecutionContext by reference.
3344         - Remove unnecessary AbstractWorker::contextDestroyed() override.
3345         - Make eventTargetInterface() inline.
3346
3347         Inlining eventTargetInterface() is quite neat - since we only ever
3348         call this on tightly typed pointers from generated code, combining
3349         final and inline turns the virtual call into a compile-time constant.
3350
3351 2013-10-06  Zan Dobersek  <zdobersek@igalia.com>
3352
3353         [WebIDL] Annotate IDL interfaces under Source/WebCore/html/ with the OperationsNotDeletable attribute
3354         https://bugs.webkit.org/show_bug.cgi?id=122280
3355
3356         Reviewed by Darin Adler.
3357
3358         Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
3359         interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
3360         doesn't have any effect, but will keep the operations not configurable after the generator is modified
3361         to preserve the original behavior. The attribute will be removed from each interface after checking
3362         conformity with other browsers (in terms of configurability of operations of that interface) and the
3363         WebKit's existing test suites.
3364
3365         This patch covers IDL interfaces under Source/WebCore/html/.
3366
3367         * html/DOMFormData.idl:
3368         * html/DOMSettableTokenList.idl:
3369         * html/DOMTokenList.idl:
3370         * html/DOMURL.idl:
3371         * html/HTMLAllCollection.idl:
3372         * html/HTMLAnchorElement.idl:
3373         * html/HTMLButtonElement.idl:
3374         * html/HTMLCanvasElement.idl:
3375         * html/HTMLCollection.idl:
3376         * html/HTMLDocument.idl:
3377         * html/HTMLElement.idl:
3378         * html/HTMLEmbedElement.idl:
3379         * html/HTMLFieldSetElement.idl:
3380         * html/HTMLFormControlsCollection.idl:
3381         * html/HTMLFormElement.idl:
3382         * html/HTMLFrameElement.idl:
3383         * html/HTMLIFrameElement.idl:
3384         * html/HTMLInputElement.idl:
3385         * html/HTMLKeygenElement.idl:
3386         * html/HTMLMarqueeElement.idl:
3387         * html/HTMLMediaElement.idl:
3388         * html/HTMLObjectElement.idl:
3389         * html/HTMLOptionsCollection.idl:
3390         * html/HTMLOutputElement.idl:
3391         * html/HTMLSelectElement.idl:
3392         * html/HTMLTableElement.idl:
3393         * html/HTMLTableRowElement.idl:
3394         * html/HTMLTableSectionElement.idl:
3395         * html/HTMLTextAreaElement.idl:
3396         * html/HTMLVideoElement.idl:
3397         * html/MediaController.idl:
3398         * html/RadioNodeList.idl:
3399         * html/TimeRanges.idl:
3400         * html/canvas/CanvasGradient.idl:
3401         * html/canvas/CanvasRenderingContext2D.idl:
3402         * html/canvas/DOMPath.idl:
3403         * html/canvas/EXTDrawBuffers.idl:
3404         * html/canvas/OESVertexArrayObject.idl:
3405         * html/canvas/WebGLDebugShaders.idl:
3406         * html/canvas/WebGLLoseContext.idl:
3407         * html/canvas/WebGLRenderingContext.idl:
3408         * html/track/AudioTrackList.idl:
3409         * html/track/TextTrack.idl:
3410         * html/track/TextTrackCue.idl:
3411         * html/track/TextTrackCueList.idl:
3412         * html/track/TextTrackList.idl:
3413         * html/track/TextTrackRegionList.idl:
3414         * html/track/VideoTrackList.idl:
3415
3416 2013-10-06  Zan Dobersek  <zdobersek@igalia.com>
3417
3418         [WebIIDL] Annotate IDL interfaces under Source/WebCore/svg/ with the OperationsNotDeletable attribute
3419         https://bugs.webkit.org/show_bug.cgi?id=122279
3420
3421         Reviewed by Darin Adler.
3422
3423         Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
3424         interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
3425         doesn't have any effect, but will keep the operations not configurable after the generator is modified
3426         to preserve the original behavior. The attribute will be removed from each interface after checking
3427         conformity with other browsers (in terms of configurability of operations of that interface) and the
3428         WebKit's existing test suites.
3429
3430         This patch covers IDL interfaces under Source/WebCore/svg/.
3431
3432         * svg/SVGAngle.idl:
3433         * svg/SVGAnimationElement.idl:
3434         * svg/SVGColor.idl:
3435         * svg/SVGCursorElement.idl:
3436         * svg/SVGDocument.idl:
3437         * svg/SVGElement.idl:
3438         * svg/SVGElementInstanceList.idl:
3439         * svg/SVGException.idl:
3440         * svg/SVGFEDropShadowElement.idl:
3441         * svg/SVGFEGaussianBlurElement.idl:
3442         * svg/SVGFEMorphologyElement.idl:
3443         * svg/SVGFilterElement.idl:
3444         * svg/SVGGraphicsElement.idl:
3445         * svg/SVGLength.idl:
3446         * svg/SVGLengthList.idl:
3447         * svg/SVGMarkerElement.idl:
3448         * svg/SVGMaskElement.idl:
3449         * svg/SVGMatrix.idl:
3450         * svg/SVGNumberList.idl:
3451         * svg/SVGPaint.idl:
3452         * svg/SVGPathElement.idl:
3453         * svg/SVGPathSegList.idl:
3454         * svg/SVGPatternElement.idl:
3455         * svg/SVGPoint.idl:
3456         * svg/SVGPointList.idl:
3457         * svg/SVGSVGElement.idl:
3458         * svg/SVGStringList.idl:
3459         * svg/SVGTests.idl:
3460         * svg/SVGTextContentElement.idl:
3461         * svg/SVGTransform.idl:
3462         * svg/SVGTransformList.idl:
3463
3464 2013-10-06  Zan Dobersek  <zdobersek@igalia.com>
3465
3466         [WebIDL] Annotate IDL interfaces under Source/WebCore/page/ with the OperationsNotDeletable attribute
3467         https://bugs.webkit.org/show_bug.cgi?id=122278
3468
3469         Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
3470         interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
3471         doesn't have any effect, but will keep the operations not configurable after the generator is modified
3472         to preserve the original behavior. The attribute will be removed from each interface after checking
3473         conformity with other browsers (in terms of configurability of operations of that interface) and the
3474         WebKit's existing test suites.
3475
3476         This patch covers IDL interfaces under Source/WebCore/page/.
3477
3478         * page/Console.idl:
3479         * page/Crypto.idl:
3480         * page/DOMSecurityPolicy.idl:
3481         * page/DOMSelection.idl:
3482         * page/DOMWindow.idl:
3483         * page/EventSource.idl:
3484         * page/History.idl:
3485         * page/Location.idl:
3486         * page/Navigator.idl:
3487         * page/Performance.idl:
3488         * page/PerformanceEntryList.idl:
3489         * page/SpeechInputResultList.idl:
3490         * page/WindowBase64.idl:
3491         * page/WindowTimers.idl:
3492
3493 2013-10-06  Darin Adler  <darin@apple.com>
3494
3495         * rendering/RenderButton.cpp:
3496         (WebCore::RenderButton::setupInnerStyle): Added a comment possibly relevant
3497         to current failures seen on Windows bot.
3498
3499 2013-10-06  Commit Queue  <commit-queue@webkit.org>
3500
3501         Unreviewed, rolling out r156988.
3502         http://trac.webkit.org/changeset/156988
3503         https://bugs.webkit.org/show_bug.cgi?id=122415
3504
3505         Broke debug build (Requested by ap on #webkit).
3506
3507         * css/CSSCursorImageValue.h:
3508         * css/CSSTimingFunctionValue.h:
3509         * css/CSSToStyleMap.cpp:
3510         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
3511         * css/CSSUnicodeRangeValue.h:
3512         * css/CSSValue.cpp:
3513         (WebCore::CSSValue::destroy):
3514         * css/DeprecatedStyleBuilder.cpp:
3515         (WebCore::ApplyPropertyCursor::applyValue):
3516         * css/StyleResolver.cpp:
3517         (WebCore::StyleResolver::styleImage):
3518         (WebCore::StyleResolver::styleShader):
3519         * rendering/style/StylePendingImage.h:
3520         (WebCore::StylePendingImage::cssCursorImageValue):
3521
3522 2013-10-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3523
3524         Add *CSS* prefix to ShadowValue to generate toCSSShadowValue
3525         https://bugs.webkit.org/show_bug.cgi?id=122409
3526
3527         Reviewed by Darin Adler.
3528
3529         To generate toCSSShadowValue(), we need to add *CSS* prefix to ShadowValue.
3530         It is also to be sync with a naming rule of CSS child value.  
3531
3532         No new tests, no behavior changes.
3533
3534         * CMakeLists.txt:
3535         * GNUmakefile.list.am:
3536         * WebCore.vcxproj/WebCore.vcxproj:
3537         * WebCore.vcxproj/WebCore.vcxproj.filters:
3538         * WebCore.xcodeproj/project.pbxproj:
3539         * css/CSSComputedStyleDeclaration.cpp:
3540         (WebCore::ComputedStyleExtractor::valueForShadow):
3541         * css/CSSParser.cpp:
3542         (WebCore::ShadowParseContext::commitValue):
3543         * css/CSSShadowValue.cpp: Renamed from Source/WebCore/css/ShadowValue.cpp.
3544         (WebCore::CSSShadowValue::CSSShadowValue):
3545         (WebCore::CSSShadowValue::customCSSText):
3546         (WebCore::CSSShadowValue::equals):
3547         * css/CSSShadowValue.h: Renamed from Source/WebCore/css/ShadowValue.h.
3548         (WebCore::CSSShadowValue::create):
3549         * css/CSSValue.cpp:
3550         (WebCore::CSSValue::equals):
3551         (WebCore::CSSValue::cssText):
3552         (WebCore::CSSValue::destroy):
3553         * css/SVGCSSStyleSelector.cpp:
3554         (WebCore::StyleResolver::applySVGProperty):
3555         * css/StyleResolver.cpp:
3556         (WebCore::StyleResolver::applyProperty):
3557         (WebCore::StyleResolver::createFilterOperations):
3558
3559 2013-10-06  Darin Adler  <darin@apple.com>
3560
3561         Remove unneeded ScriptGCEvent class
3562         https://bugs.webkit.org/show_bug.cgi?id=122390
3563
3564         Reviewed by Anders Carlsson.
3565
3566         * GNUmakefile.list.am: Removed ScriptGCEvent files.
3567         * Target.pri: Ditto.
3568         * UseJSC.cmake: Ditto.
3569         * WebCore.exp.in: Ditto.
3570         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3571         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3572         * WebCore.xcodeproj/project.pbxproj: Ditto.
3573         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
3574         * bindings/js/ScriptGCEvent.cpp: Removed.
3575         * bindings/js/ScriptGCEvent.h: Removed.
3576
3577         * inspector/InspectorMemoryAgent.cpp: Removed include.
3578
3579         * inspector/InspectorTimelineAgent.cpp:
3580         (WebCore::InspectorTimelineAgent::start): Removed GC event listening.
3581         Some day we might add it back, but for now it is dead code.
3582         (WebCore::InspectorTimelineAgent::stop): Ditto.
3583         (WebCore::usedHeapSize): Renamed from getUsedHeapSize and put the
3584         implementation here instead of indirecting through ScriptGCEvent.
3585         (WebCore::InspectorTimelineAgent::setDOMCounters): Updated for above changes.
3586         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): Ditto.
3587         (WebCore::InspectorTimelineAgent::pushCurrentRecord): Ditto.
3588
3589         * inspector/InspectorTimelineAgent.h: Removed include.
3590
3591         * inspector/ScriptGCEventListener.h: Removed.
3592
3593         * testing/MemoryInfo.h: Updated to get heap capacity and size directly
3594         instead of going through ScriptGCEvent.
3595
3596 2013-10-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3597
3598         Generate toCSSFooValue() for CSSCursorImageValue, CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue
3599         https://bugs.webkit.org/show_bug.cgi?id=122408
3600
3601         Reviewed by Darin Adler.
3602
3603         As a step to use toCSSFooValue, this patch generates toCSSFooValue() for CSSCursorImageValue,
3604         CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue.
3605         This will help to detect bad type cast.
3606
3607         No new tests, no behavior changes.
3608
3609         * css/CSSCursorImageValue.h:
3610         * css/CSSTimingFunctionValue.h:
3611         * css/CSSToStyleMap.cpp:
3612         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
3613         * css/CSSUnicodeRangeValue.h:
3614         * css/CSSValue.cpp:
3615         (WebCore::CSSValue::destroy):
3616         * css/DeprecatedStyleBuilder.cpp:
3617         (WebCore::ApplyPropertyCursor::applyValue):
3618         * css/StyleResolver.cpp:
3619         (WebCore::StyleResolver::styleImage):
3620         (WebCore::StyleResolver::styleShader):
3621         * rendering/style/StylePendingImage.h:
3622         (WebCore::StylePendingImage::cssCursorImageValue):
3623
3624 2013-10-05  Andreas Kling  <akling@apple.com>
3625
3626         CTTE: Teach CompositeEditCommand that link Nodes are always Elements.
3627         <https://webkit.org/b/122400>
3628
3629         Reviewed by Sam Weinig.
3630
3631         Make pushAnchorElementDown() take an Element& instead of a Node* and
3632         tweak the surrounding code a tiny bit.
3633
3634 2013-10-06  Andreas Kling  <akling@apple.com>
3635
3636         CTTE: Node::enclosingLinkEventParentOrSelf() should return an Element.
3637         <https://webkit.org/b/122401>
3638
3639         Reviewed by Sam Weinig.
3640
3641         Only Elements are ever linked, so make enclosingLinkEventParentOrSelf()
3642         return an Element* instead of a Node*. The only call site was already
3643         doing toElement() on the return value without checking, so this makes
3644         things look a bit nicer.
3645
3646 2013-10-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3647
3648         Add *CSS* prefix to FontFeatureValue to generate toCSSFontFeatureValue(), and use it
3649         https://bugs.webkit.org/show_bug.cgi?id=122204
3650
3651         Reviewed by Darin Adler.
3652
3653         *CSS* prefix needs to be added to FontFeatureValue class in order to generate toCSSFontFeatureValue().
3654         static_cast<FontFeatureValue*> is changed with toCSSFontFeatureValue() by using this change.
3655
3656         No new tests, no behavior changes.
3657
3658         * CMakeLists.txt:
3659         * GNUmakefile.list.am:
3660         * Target.pri:
3661         * WebCore.vcxproj/WebCore.vcxproj:
3662         * WebCore.vcxproj/WebCore.vcxproj.filters:
3663         * WebCore.xcodeproj/project.pbxproj:
3664         * css/CSSComputedStyleDeclaration.cpp:
3665         (WebCore::ComputedStyleExtractor::propertyValue):
3666         * css/CSSFontFeatureValue.cpp: Renamed from Source/WebCore/css/FontFeatureValue.cpp.
3667         (WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
3668         (WebCore::CSSFontFeatureValue::customCSSText):
3669         (WebCore::CSSFontFeatureValue::equals):
3670         * css/CSSFontFeatureValue.h: Renamed from Source/WebCore/css/FontFeatureValue.h.
3671         (WebCore::CSSFontFeatureValue::create):
3672         (WebCore::CSSFontFeatureValue::tag):
3673         (WebCore::CSSFontFeatureValue::value):
3674         * css/CSSParser.cpp:
3675         (WebCore::CSSParser::parseFontFeatureTag):
3676         * css/CSSValue.cpp:
3677         (WebCore::CSSValue::equals):
3678         (WebCore::CSSValue::cssText):
3679         (WebCore::CSSValue::destroy):
3680         * css/StyleResolver.cpp:
3681         (WebCore::StyleResolver::applyProperty):
3682
3683 2013-10-05  Andreas Kling  <akling@apple.com>
3684
3685         FrameSelection: Remove two unused member functions.
3686
3687         Rubber-stamped by Anders Carlsson.
3688
3689         - rootEditableElementOrTreeScopeRootNode()
3690         - rootEditableElementRespectingShadowTree()
3691
3692 2013-10-05  Andreas Kling  <akling@apple.com>
3693
3694         CTTE: Node::treeScope() should return a reference.
3695         <https://webkit.org/b/122399>
3696
3697         Reviewed by Superlative Sam.
3698
3699         Every Node belongs to a TreeScope. To enforce this, I've made
3700         treeScope() return a TreeScope&, and setTreeScope() now takes a
3701         TreeScope& so there is no way to clear it.
3702
3703 2013-10-05  Sam Weinig  <sam@webkit.org>
3704
3705         CTTE: Use references more for the Document parser
3706         https://bugs.webkit.org/show_bug.cgi?id=122398
3707
3708         Reviewed by Andreas Kling.
3709
3710         Clarify the construction semantics of Document parsers.
3711
3712 2013-10-05  Daniel Bates  <dabates@apple.com>
3713
3714         [iOS] Default initialize Settings::setFixedPositionCreatesStackingContext() to true
3715         https://bugs.webkit.org/show_bug.cgi?id=122338
3716         <rdar://problem/14908151>
3717
3718         Reviewed by Darin Adler.
3719
3720         On iOS we always want an element with a fixed position to create a stacking context.
3721         See <rdar://problem/9813262> for more details.
3722
3723         * page/Settings.cpp: Define constant defaultFixedPositionCreatesStackingContext to
3724         be true when building for iOS and false otherwise.
3725         * page/Settings.in: Initialize the setting fixedPositionCreatesStackingContext with
3726         the value of the constant defaultFixedPositionCreatesStackingContext.
3727
3728 2013-10-05  Sam Weinig  <sam@webkit.org>
3729
3730         CTTE: Pass DocumentWriter around as a reference
3731         https://bugs.webkit.org/show_bug.cgi?id=122396
3732
3733         Reviewed by Andreas Kling.
3734
3735         * bindings/js/ScriptController.cpp:
3736         (WebCore::ScriptController::executeIfJavaScriptURL):
3737         * dom/DecodedDataDocumentParser.cpp:
3738         (WebCore::DecodedDataDocumentParser::appendBytes):
3739         (WebCore::DecodedDataDocumentParser::flush):
3740         * dom/DecodedDataDocumentParser.h:
3741         * dom/DocumentParser.h:
3742         * dom/RawDataDocumentParser.h:
3743         (WebCore::RawDataDocumentParser::flush):
3744         * html/ImageDocument.cpp:
3745         (WebCore::ImageDocumentParser::appendBytes):
3746         * html/MediaDocument.cpp:
3747         (WebCore::MediaDocumentParser::appendBytes):
3748         (WebCore::MediaDocument::replaceMediaElementTimerFired):
3749         * html/PluginDocument.cpp:
3750         (WebCore::PluginDocumentParser::createDocumentStructure):
3751         (WebCore::PluginDocumentParser::appendBytes):
3752         * inspector/InspectorOverlay.cpp:
3753         (WebCore::InspectorOverlay::overlayPage):
3754         * loader/DocumentLoader.h:
3755         (WebCore::DocumentLoader::writer):
3756         * loader/DocumentWriter.cpp:
3757         (WebCore::DocumentWriter::addData):
3758         (WebCore::DocumentWriter::end):
3759         * loader/FrameLoader.cpp:
3760         (WebCore::FrameLoader::transitionToCommitted):
3761         * loader/SinkDocument.cpp:
3762         (WebCore::SinkDocumentParser::appendBytes):
3763         * svg/graphics/SVGImage.cpp:
3764         (WebCore::SVGImage::dataChanged):
3765
3766 2013-10-05  Andreas Kling  <akling@apple.com>
3767
3768         FrameView: Remove code for disabling repaints.
3769         <https://webkit.org/b/122393>
3770
3771         Reviewed by Sam Weinig.
3772
3773         Nobody uses this mode for anything so let's just remove it.
3774
3775         It was added back in r110469 to fix an issue with SVGImageCache
3776         and its only user disappeard in the cache overhaul in r142765.
3777
3778 2013-10-05  Andreas Kling  <akling@apple.com>
3779
3780         Remove IFrameShimSupport, it was only used by dead ports.
3781
3782         Rubber-stamped by Anders Carlsson.
3783
3784         * plugins/IFrameShimSupport.cpp: Removed.
3785         * plugins/IFrameShimSupport.h: Removed.
3786
3787 2013-10-05  Anders Carlsson  <andersca@apple.com>
3788
3789         Clean up MessageQueue.h
3790         https://bugs.webkit.org/show_bug.cgi?id=122392
3791
3792         Reviewed by Andreas Kling.
3793
3794         Update for changes to MessageQueue, mostly changing create functions to return std::unique_ptr.
3795         I intentionally avoided using std::make_unique in a couple of places because I didn't want to make nested classes
3796         public, and I believe that we can change some of this code to use std::function.
3797
3798         * Modules/webaudio/AsyncAudioDecoder.cpp:
3799         (WebCore::AsyncAudioDecoder::decodeAsync):
3800         (WebCore::AsyncAudioDecoder::runLoop):
3801         (WebCore::AsyncAudioDecoder::DecodingTask::create):
3802         * Modules/webaudio/AsyncAudioDecoder.h:
3803         * Modules/webdatabase/Database.cpp:
3804         (WebCore::Database::markAsDeletedAndClose):
3805         (WebCore::Database::tableNames):
3806         * Modules/webdatabase/DatabaseBackend.cpp:
3807         (WebCore::DatabaseBackend::openAndVerifyVersion):
3808         (WebCore::DatabaseBackend::scheduleTransaction):
3809         (WebCore::DatabaseBackend::scheduleTransactionStep):
3810         * Modules/webdatabase/DatabaseTask.h:
3811         (WebCore::DatabaseBackend::DatabaseOpenTask::create):
3812         (WebCore::DatabaseBackend::DatabaseCloseTask::create):
3813         (WebCore::DatabaseBackend::DatabaseTransactionTask::create):
3814         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create):
3815         * Modules/webdatabase/DatabaseThread.cpp:
3816         (WebCore::DatabaseThread::databaseThread):
3817         (WebCore::DatabaseThread::scheduleTask):
3818         (WebCore::DatabaseThread::scheduleImmediateTask):
3819         (WebCore::SameDatabasePredicate::operator()):
3820         * Modules/webdatabase/DatabaseThread.h:
3821         * dom/default/PlatformMessagePortChannel.cpp:
3822         (WebCore::PlatformMessagePortChannel::EventData::create):
3823         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
3824         * dom/default/PlatformMessagePortChannel.h:
3825         (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
3826         (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
3827         * fileapi/FileThread.cpp:
3828         (WebCore::FileThread::postTask):
3829         (WebCore::SameInstancePredicate::operator()):
3830         (WebCore::FileThread::runLoop):
3831         * fileapi/FileThread.h:
3832         * fileapi/FileThreadTask.h:
3833         (WebCore::createFileThreadTask):
3834         * storage/StorageThread.cpp:
3835         (WebCore::StorageThread::threadEntryPoint):
3836         (WebCore::StorageThread::dispatch):
3837         (WebCore::StorageThread::terminate):
3838         * workers/WorkerRunLoop.cpp:
3839         (WebCore::ModePredicate::operator()):
3840         (WebCore::WorkerRunLoop::runInMode):
3841         (WebCore::WorkerRunLoop::runCleanupTasks):
3842         (WebCore::WorkerRunLoop::Task::create):
3843         * workers/WorkerRunLoop.h:
3844
3845 2013-10-04  Dean Jackson  <dino@apple.com>
3846
3847         [WebGL] program should not be able to link if a bad shader is attached
3848         https://bugs.webkit.org/show_bug.cgi?id=94036
3849
3850         Reviewed by Darin Adler.
3851
3852         If you attempt to link a program when bad shaders are attached, the
3853         link should fail. WebGL also requires that the previously linked
3854         program should remain intact. We were doing the former, but not
3855         the latter.
3856
3857         Fix this by not calling glLinkProgram if we know we have bad
3858         shaders, and synthesize a bad link status instead.
3859
3860         Test: WebGL conformance test conformance/programs/program-test.html
3861         (found in LayoutTests/webgl)
3862
3863         * html/canvas/WebGLRenderingContext.cpp:
3864         (WebCore::WebGLRenderingContext::compileShader): Mark a shader as valid
3865         if it compiled ok.
3866         (WebCore::WebGLRenderingContext::linkProgram): Don't call into GraphicsContext3D::linkProgram
3867         if we know that we don't have valid shaders.
3868         * html/canvas/WebGLShader.cpp:
3869         (WebCore::WebGLShader::WebGLShader): Initialize m_isValid.
3870         * html/canvas/WebGLShader.h:
3871         (WebCore::WebGLShader::isValid): New member variable getter and setter.
3872         (WebCore::WebGLShader::setValid):
3873
3874 2013-10-05  Dean Jackson  <dino@apple.com>
3875
3876         Undo texture unit code refactoring - it is ok to bind a texture to multiple locations
3877         https://bugs.webkit.org/show_bug.cgi?id=122369
3878         <rdar://problem/15158465>
3879
3880         Reviewed by Darin Adler.
3881
3882         The optimisation in r152351 (http://webkit.org/b/117868) incorrectly
3883         assumes that a texture cannot be bound to more than one location.
3884         That's true only within the same program object. It's legal to
3885         address TEXTURE_BINDING_2D and TEXTURE_BINDING_CUBE_MAP with the
3886         same texture in different programs.
3887
3888         See https://github.com/KhronosGroup/WebGL/pull/391 for more information.
3889
3890         This change reverts the optimisation, but also does some minor
3891         cleanup (0 -> nullptr, class -> struct).
3892
3893         Covered by the following Khronos WebGL 1.0.1 tests, which
3894         now pass:
3895         - conformance/more/functions/texImage2DHTML.html
3896         - conformance/more/functions/texSubImage2D.html
3897         - conformance/more/functions/texSubImage2DHTML.html
3898
3899         * html/canvas/WebGLRenderingContext.cpp:
3900         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
3901         (WebCore::WebGLRenderingContext::reshape):
3902         (WebCore::WebGLRenderingContext::bindTexture):
3903         (WebCore::WebGLRenderingContext::deleteTexture):
3904         (WebCore::WebGLRenderingContext::getParameter):
3905         (WebCore::WebGLRenderingContext::handleNPOTTextures):
3906         (WebCore::WebGLRenderingContext::validateTextureBinding):
3907         (WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
3908         * html/canvas/WebGLRenderingContext.h:
3909
3910 2013-10-05  Anders Carlsson  <andersca@apple.com>
3911
3912         Remove createOwned
3913         https://bugs.webkit.org/show_bug.cgi?id=122388
3914
3915         Reviewed by Darin Adler.
3916
3917         * dom/Document.cpp:
3918         (WebCore::Document::Document):
3919         (WebCore::Document::~Document):
3920         (WebCore::Document::createRenderTree):
3921         (WebCore::Document::destroyRenderTree):
3922         * dom/Document.h:
3923         * page/Frame.cpp:
3924         (WebCore::Frame::Frame):
3925         * page/Frame.h:
3926         * page/animation/AnimationController.cpp:
3927         (WebCore::AnimationController::AnimationController):
3928         * page/animation/AnimationController.h:
3929         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
3930         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
3931         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
3932         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
3933         (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack):
3934         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
3935         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
3936         (WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack):
3937         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
3938         * rendering/svg/RenderSVGResourceClipper.cpp:
3939         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3940         * rendering/svg/RenderSVGResourceClipper.h:
3941         * rendering/svg/RenderSVGResourceFilter.cpp:
3942         (WebCore::RenderSVGResourceFilter::applyResource):
3943         * rendering/svg/RenderSVGResourceFilter.h:
3944         * rendering/svg/RenderSVGResourceMasker.cpp:
3945         (WebCore::RenderSVGResourceMasker::applyResource):
3946         * rendering/svg/RenderSVGResourceMasker.h:
3947
3948 2013-10-05  Darin Adler  <darin@apple.com>
3949
3950         Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
3951         https://bugs.webkit.org/show_bug.cgi?id=122387
3952
3953         Reviewed by Anders Carlsson.
3954
3955         * html/canvas/CanvasStyle.h: Take out conditionals.
3956
3957 2013-10-05  Darin Adler  <darin@apple.com>
3958
3959         Add AtomicString::number and use it
3960         https://bugs.webkit.org/show_bug.cgi?id=122384
3961
3962         Reviewed by Anders Carlsson.
3963
3964         * css/CSSGrammar.y.in: Use AtomicString::number instead of String::number since
3965         we are creating an AtomicString. This can save a memory allocation if the string
3966         happens to already be in the atomic string table.
3967         * dom/Element.cpp:
3968         (WebCore::Element::setIntegralAttribute): Ditto.
3969         (WebCore::Element::setUnsignedIntegralAttribute): Ditto.
3970         * editing/BreakBlockquoteCommand.cpp:
3971         (WebCore::BreakBlockquoteCommand::doApply): Ditto.
3972         * html/HTMLBodyElement.cpp:
3973         (WebCore::HTMLBodyElement::insertedInto): Use setIntegralAttribute instead of
3974         a local homegrown equivalent.
3975         * html/HTMLCanvasElement.cpp:
3976         (WebCore::HTMLCanvasElement::setHeight): Ditto.
3977         (WebCore::HTMLCanvasElement::setWidth): Ditto.
3978         * html/HTMLElement.cpp:
3979         (WebCore::HTMLElement::setTabIndex): Ditto.
3980         * html/HTMLImageElement.cpp:
3981         (WebCore::HTMLImageElement::setHeight): Ditto.
3982         (WebCore::HTMLImageElement::setWidth): Ditto.
3983         * html/HTMLInputElement.cpp:
3984         (WebCore::HTMLInputElement::setMaxLength): Ditto.
3985         (WebCore::HTMLInputElement::setSize): Same, but setUnsignedIntegralAttribute.
3986         (WebCore::HTMLInputElement::setHeight): Ditto.
3987         (WebCore::HTMLInputElement::setWidth): Ditto.
3988         * html/HTMLMediaElement.cpp:
3989         (WebCore::HTMLMediaElement::mediaPlayerSetSize): Ditto.
3990         * html/HTMLMeterElement.cpp:
3991         (WebCore::HTMLMeterElement::setMin): More of the same.
3992         (WebCore::HTMLMeterElement::setMax): Ditto.
3993         (WebCore::HTMLMeterElement::setValue): Ditto.
3994         (WebCore::HTMLMeterElement::setLow): Ditto.
3995         (WebCore::HTMLMeterElement::setHigh): Ditto.
3996         (WebCore::HTMLMeterElement::setOptimum): Ditto.
3997         * html/HTMLOListElement.cpp:
3998         (WebCore::HTMLOListElement::setStart): Ditto.
3999         * html/HTMLProgressElement.cpp:
4000         (WebCore::HTMLProgressElement::setValue): Ditto.
4001         (WebCore::HTMLProgressElement::setMax): Ditto.
4002         * html/HTMLSelectElement.cpp:
4003         (WebCore::HTMLSelectElement::parseAttribute): Ditto.
4004         (WebCore::HTMLSelectElement::setSize): Ditto.
4005         * html/HTMLTableCellElement.cpp:
4006         (WebCore::HTMLTableCellElement::setColSpan): Ditto.
4007         (WebCore::HTMLTableCellElement::setRowSpan): Ditto.
4008         * html/HTMLTableColElement.cpp:
4009         (WebCore::HTMLTableColElement::setSpan): Ditto.
4010         * html/HTMLTextAreaElement.cpp:
4011         (WebCore::HTMLTextAreaElement::setMaxLength): Ditto.
4012         (WebCore::HTMLTextAreaElement::setCols): Ditto.
4013         (WebCore::HTMLTextAreaElement::setRows): Ditto.
4014         * html/shadow/MediaControlElements.cpp:
4015         (WebCore::MediaControlTimelineElement::setDuration): Ditto.
4016
4017 2013-10-05  Darin Adler  <darin@apple.com>
4018
4019         Cut down on use of String::number
4020         https://bugs.webkit.org/show_bug.cgi?id=122382
4021
4022         Reviewed by Anders Carlsson.
4023
4024         * css/CSSGradientValue.cpp:
4025         (WebCore::CSSLinearGradientValue::customCSSText): Use StringBuilder::appendNumber,
4026         instead of creating a string and then appending it.
4027         (WebCore::CSSRadialGradientValue::customCSSText): Ditto.
4028         * css/CSSParser.cpp:
4029         (WebCore::CSSParser::createKeyframe): Ditto.
4030         * editing/DeleteButtonController.cpp:
4031         (WebCore::DeleteButtonController::crea