RunLoop::dispatch should take an std::function
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-10-28  Anders Carlsson  <andersca@apple.com>
2
3         RunLoop::dispatch should take an std::function
4         https://bugs.webkit.org/show_bug.cgi?id=123407
5
6         Reviewed by Andreas Kling.
7
8         * WebCore.exp.in:
9         * platform/RunLoop.cpp:
10         (WebCore::RunLoop::performWork):
11         (WebCore::RunLoop::dispatch):
12         * platform/RunLoop.h:
13
14 2013-10-28  Tim Horton  <timothy_horton@apple.com>
15
16         Make TileController manipulate PlatformCALayers instead of CALayers
17         https://bugs.webkit.org/show_bug.cgi?id=123279
18
19         Reviewed by Simon Fraser.
20
21         In the interest of making TileController more platform-independent
22         (so that it can be used with the remote layer tree, and maybe Windows),
23         move TileController onto our PlatformCALayer abstraction instead of
24         direct manipulation of CALayers.
25
26         Some fallout from this includes getting rid of special Mac-specific
27         TileController-specific CALayer subclasses, and reworking tile
28         painting to work in a more generic way.
29
30         This is a first step, and doesn't get us all the way to a platform independent
31         TileController, but more patches are forthcoming.
32
33         No new tests, just a (largeish) refactor.
34
35         * WebCore.exp.in:
36         The signature of some methods has changed.
37
38         * WebCore.xcodeproj/project.pbxproj:
39         Remove WebTileLayer.*
40
41         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
42         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
43         Use the "isTile" key on the CALayer dictionary instead of the layer's
44         class to determine if it's a tile. TileController will set this on a tile
45         when it is created, for now.
46
47         * platform/graphics/TiledBacking.h:
48         tiledScrollingIndicatorLayer() should return a PlatformCALayer.
49
50         * platform/graphics/ca/GraphicsLayerCA.cpp:
51         (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
52         * platform/graphics/ca/GraphicsLayerCA.h:
53         (WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount):
54         * platform/graphics/ca/PlatformCALayerClient.h:
55         The PlatformCALayerClient paintContents and incrementRepaintCount callbacks
56         should include the platformCALayer that caused the callback.
57
58         * platform/graphics/ca/PlatformCALayer.h:
59         Add LayerTypeSimpleLayer, which is similar to LayerTypeWebLayer
60         except it just calls back its client to paint, instead of doing
61         complicated things with repaint rects. This is so that TileController
62         doesn't re-enter drawLayerContents when asking its GraphicsLayer
63         to paint for each PlatformCALayer (it will be entering drawLayerContents
64         for the first time for each layer). It also happens to be useful
65         for things like the tile controller overlay, which don't need
66         all that complication.
67
68         Add LayerTypeTiledBackingTileLayer, which is used simply to distinguish
69         TileController Tile layers from other LayerTypeSimpleLayers.
70
71         * platform/graphics/ca/mac/LayerPool.h:
72         * platform/graphics/ca/mac/LayerPool.mm:
73         (WebCore::LayerPool::addLayer):
74         (WebCore::LayerPool::takeLayerWithSize):
75         LayerPool should operate on PlatformCALayers now.
76
77         * platform/graphics/ca/mac/PlatformCALayerMac.h:
78         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
79         (PlatformCALayerMac::PlatformCALayerMac):
80         Set the "isTile" key on the CALayer to true for TiledBackingTileLayers,
81         so that the scrolling performance logging can tell a tile apart from
82         any other layer, on the scrolling thread, without touching PlatformCALayers
83         or the TileController or any other main-thread data structures.
84
85         (PlatformCALayerMac::setEdgeAntialiasingMask): Added.
86         * platform/graphics/ca/mac/TileController.h:
87         Remove references to Objective-C classes; instead use PlatformCALayer everywhere.
88         TileController is now a PlatformCALayerClient, and the layers it owns are
89         all PlatformCALayers (and it is constructed with a PlatformCALayer, etc.).
90         Hand in the tile debug border color as a WebCore color, instead of a CGColorRef.
91         blankPixelCountForTiles() now operates on a list of PlatformLayers instead of
92         WebTileLayers specifically, since WebTileLayer is gone.
93         Make drawTileMapContents private because WebTileCacheMapLayer no longer exists.
94
95         (WebCore::TileController::platformCALayerDrawsContent):
96         All of the layers who have TileController as their client paint their contents.
97
98         (WebCore::TileController::platformCALayerContentsOpaque):
99         This will only be called for layers which paint via drawLayerContents,
100         so it's OK that we don't special-case the debugging overlay here.
101
102         (WebCore::TileController::owningGraphicsLayer):
103         Return the GraphicsLayer that owns the TileController's main
104         layer, via its conformance to PlatformCALayerClient. This is
105         a bit strange (because it's not strictly a GraphicsLayer, despite
106         always being so at the moment), but is done for clarity inside
107         TileController itself.
108
109         * platform/graphics/ca/mac/TileController.mm:
110         Remove CALayer (WebCALayerDetails), WebTiledScrollingIndicatorLayer,
111         and a bunch of includes that we don't need anymore.
112
113         (WebCore::TileController::create):
114         (WebCore::TileController::TileController):
115         TileController is passed a PlatformCALayer for the tile cache root layer,
116         instead of a WebTiledBackingLayer. It also creates a PlatformCALayer with
117         LayerTypeLayer instead of a bare CALayer for the container layer.
118         It's OK to remove the transaction because it was only used to stop
119         the implicit animation, which PlatformCALayer will do for us.
120
121         (WebCore::TileController::~TileController):
122         Clear the owner of the PlatformCALayers which the TileController previously owned,
123         so they don't try to call back a destroyed TileController.
124
125         (WebCore::TileController::tileCacheLayerBoundsChanged):
126         (WebCore::TileController::setNeedsDisplay):
127         Straightforward adjustments towards use of PlatformCALayer.
128
129         (WebCore::TileController::setTileNeedsDisplayInRect):
130         Adjustments towards use of PlatformCALayer; we need FloatRects so we can
131         pass pointers to PlatformCALayer::setNeedsDisplay.
132
133         (WebCore::TileController::platformCALayerPaintContents):
134         Replace drawLayer with platformCALayerPaintContents, which will be called
135         back from our various WebSimpleLayers. If the PlatformCALayer is our
136         tiled scrolling debug indicator, paint that. Otherwise, it's a tile.
137         Make use of drawLayerContents() to paint the tile contents.
138         Make use of drawRepaintIndicator() to paint the repaint indicator if needed.
139         Move scrolling performance logging code that used to be in WebTileLayer here.
140
141         (WebCore::TileController::platformCALayerDeviceScaleFactor):
142         (WebCore::TileController::platformCALayerShowDebugBorders):
143         (WebCore::TileController::platformCALayerShowRepaintCounter):
144         Forward these to the owning GraphicsLayerCA, because it will have the right answers.
145
146         (WebCore::TileController::setScale):
147         Adjustments towards use of PlatformCALayer; remove some code that Simon
148         caused to be unused in 156291 but did not remove.
149
150         (WebCore::TileController::setAcceleratesDrawing):
151         (WebCore::TileController::setTilesOpaque):
152         (WebCore::TileController::setVisibleRect):
153         (WebCore::TileController::revalidateTiles):
154         (WebCore::TileController::setTileDebugBorderWidth):
155         (WebCore::TileController::setTileDebugBorderColor):
156         (WebCore::TileController::bounds):
157         (WebCore::TileController::blankPixelCount):
158         (WebCore::TileController::blankPixelCountForTiles):
159         (WebCore::queueTileForRemoval):
160         (WebCore::TileController::setNeedsRevalidateTiles):
161         (WebCore::TileController::ensureTilesForRect):
162         (WebCore::TileController::retainedTileBackingStoreMemory):
163         Straightforward adjustments towards use of PlatformCALayer.
164
165         (WebCore::TileController::updateTileCoverageMap):
166         Adjustments towards use of PlatformCALayer; rename backgroundColor
167         to visibleRectIndicatorColor, since it's actually a border, not a background.
168
169         (WebCore::TileController::tiledScrollingIndicatorLayer):
170         Create a LayerTypeSimpleLayer PlatformCALayer for the tiled scrolling indicator.
171         It will be asked to paint straightforwardly, like a CALayer would.
172         Create a LayerTypeLayer PlatformCALayer for the visible rect indicator.
173         It doesn't need to paint anything, so it doesn't get an owner.
174
175         (WebCore::TileController::createTileLayer):
176         When creating a new tile layer, adopt it by setting its owner.
177         Otherwise, straightforward adjustments towards use of PlatformCALayer.
178
179         (WebCore::TileController::platformCALayerIncrementRepaintCount):
180         Manage repaint counts for tiles in TileController now.
181
182         (WebCore::TileController::drawTileMapContents):
183         Adjustments towards use of PlatformCALayer.
184
185         * platform/graphics/ca/mac/WebTileLayer.h: Removed.
186         * platform/graphics/ca/mac/WebTileLayer.mm: Removed.
187         We don't need WebTileLayer anymore, tiles are now just WebSimpleLayers
188         owned by TileController. Its behavior has been moved into TileController.
189
190         * platform/graphics/ca/mac/WebTiledBackingLayer.h:
191         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
192         (-[WebTiledBackingLayer createTileController:]):
193         Add createTileController: so that the WebTiledBackingLayer's owner can
194         hand the TileController the PlatformCALayer for the WebTiledBackingLayer
195         without propagating additional usage of PlatformCALayer::platformCALayer(),
196         which we need to remove in light of the remote layer tree work.
197
198         (-[WebTiledBackingLayer setBorderColor:]):
199
200         * platform/graphics/ca/win/PlatformCALayerWin.h:
201         Add an empty implementation of setEdgeAntialiasingMask.
202         We'll probably want to implement it before adopting TileController on Windows.
203
204         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
205         (PlatformCALayerWinInternal::displayCallback):
206         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
207         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerPaintContents):
208         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerIncrementRepaintCount):
209         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
210         (WebCore::LayerClient::platformCALayerPaintContents):
211         (WebCore::LayerClient::platformCALayerIncrementRepaintCount):
212         Adjust for new parameters on PlatformCALayerClient callbacks.
213
214         * platform/graphics/mac/WebLayer.h:
215         Add WebSimpleLayer, which inherits directly from CALayer, and make
216         our standard WebLayer (which is used for compositing layers in web content)
217         inherit from that.
218
219         * platform/graphics/mac/WebLayer.mm:
220         Move most of the behavior of WebLayer onto WebSimpleLayer, except for its
221         complex painting code. That stays as an override on WebLayer.
222
223         (WebCore::drawLayerContents):
224         Use the PlatformCALayer's PlatformLayer - if it exists - to extract
225         fine-grained repaint rects. If it doesn't, we'll just use the CGContext's
226         clip rect as our single repaint rect.
227         Rename platformLayer to platformCALayer for accuracy.
228         Remove special code for CATiledLayer since we ought not use it on Mac anymore.
229
230         (WebCore::drawRepaintIndicator):
231         Factor repaint indicator code out into its own function so that TileController
232         can use it. It can't be called from drawLayerContents for TileController, since
233         the PlatformCALayer that TileController passes in to drawLayerContents is actually
234         that of the tile cache's root layer, not the tile itself.
235         Also, add a custom background color parameter so TileController can override
236         the default green color with its own standard purple.
237
238         (-[WebLayer drawInContext:]):
239         (-[WebSimpleLayer drawInContext:]):
240         * platform/graphics/mac/WebTiledLayer.mm:
241         (-[WebTiledLayer drawInContext:]):
242         Removed a param from drawLayerContents because it's trivially acquirable
243         from the PlatformCALayer.
244
245 2013-10-24  Sam Weinig  <sam@webkit.org>
246
247         Move RenderBlock functions only used by RenderBlockFlow to RenderBlockFlow
248         https://bugs.webkit.org/show_bug.cgi?id=123318
249
250         Reviewed by David Hyatt.
251
252         * rendering/LineLayoutState.h:
253         Move FloatWithRect from RenderBlock.
254
255         * rendering/RenderBlock.cpp:
256         * rendering/RenderBlock.h:
257         * rendering/RenderBlockFlow.cpp:
258         * rendering/RenderBlockFlow.h:
259         * rendering/RenderBlockLineLayout.cpp:
260         Move pagination and float functions.
261
262 2013-10-28  Sergio Villar Senin  <svillar@igalia.com>
263
264         [CSS Grid Layout] Add support for order inside grid items
265         https://bugs.webkit.org/show_bug.cgi?id=123208
266
267         Reviewed by Antti Koivisto.
268
269         Based on Blink r153457 and r153536 by <jchaffraix@chromium.org>
270
271         Added support for sorting grid items by using -webkit-order
272         property. Used OrderIterator to implement it so it had to be moved
273         out of RenderFlexibleBox to be shared with RenderGrid.
274
275         Tests: fast/css-grid-layout/grid-item-order-auto-flow-resolution.html
276                fast/css-grid-layout/grid-item-order-paint-order.html
277
278         * CMakeLists.txt: Added new file.
279         * GNUmakefile.list.am: Ditto.
280         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
281         * WebCore.xcodeproj/project.pbxproj: Ditto.
282         * rendering/OrderIterator.cpp: Added. Ripped out of RenderFlexibleBox.
283         (WebCore::OrderIterator::OrderIterator):
284         (WebCore::OrderIterator::setOrderValues): Use std::move semantics.
285         (WebCore::OrderIterator::first): Use an integer as iterator.
286         (WebCore::OrderIterator::next): Ditto.
287         (WebCore::OrderIterator::reset): Ditto.
288         * rendering/OrderIterator.h: Added.
289         (WebCore::OrderIterator::currentChild):
290         * rendering/RenderFlexibleBox.cpp:
291         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
292         (WebCore::RenderFlexibleBox::layoutBlock):
293         * rendering/RenderFlexibleBox.h:
294         * rendering/RenderGrid.cpp:
295         (WebCore::RenderGrid::RenderGrid):
296         (WebCore::RenderGrid::placeItemsOnGrid):
297         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
298         (WebCore::RenderGrid::paintChildren):
299         * rendering/RenderGrid.h:
300
301 2013-10-28  Afonso R. Costa Jr.  <afonso.costa@samsung.com>
302
303         Methods on window.internals shouldn't pass a document.
304         https://bugs.webkit.org/show_bug.cgi?id=107301
305
306         Reviewed by Alexey Proskuryakov.
307
308         Each 'Internals' instance is associated with a 'Document'. So, it
309         is not necessary to pass a document as argument. Only nodesFromRect and
310         layerTreeAsText methods were kept because, in some Layout Tests, the
311         'Document' object is not the same used by Internals::contextDocument.
312
313         * testing/Internals.cpp: Removed 'document' parameter.
314         (WebCore::Internals::animationsAreSuspended):
315         (WebCore::Internals::suspendAnimations):
316         (WebCore::Internals::resumeAnimations):
317         (WebCore::Internals::inspectorHighlightRects):
318         (WebCore::Internals::inspectorHighlightObject):
319         (WebCore::Internals::setScrollViewPosition):
320         (WebCore::Internals::setPagination):
321         (WebCore::Internals::configurationForViewport):
322         (WebCore::Internals::paintControlTints):
323         (WebCore::Internals::setDelegatesScrolling):
324         (WebCore::Internals::touchPositionAdjustedToBestClickableNode):
325         (WebCore::Internals::touchNodeAdjustedToBestClickableNode):
326         (WebCore::Internals::touchPositionAdjustedToBestContextMenuNode):
327         (WebCore::Internals::touchNodeAdjustedToBestContextMenuNode):
328         (WebCore::Internals::bestZoomableAreaForTouchPoint):
329         (WebCore::Internals::lastSpellCheckRequestSequence):
330         (WebCore::Internals::lastSpellCheckProcessedSequence):
331         (WebCore::Internals::wheelEventHandlerCount):
332         (WebCore::Internals::touchEventHandlerCount):
333         (WebCore::Internals::setBatteryStatus):
334         (WebCore::Internals::setNetworkInformation):
335         (WebCore::Internals::setDeviceProximity):
336         (WebCore::Internals::hasSpellingMarker):
337         (WebCore::Internals::hasAutocorrectedMarker):
338         (WebCore::Internals::isOverwriteModeEnabled):
339         (WebCore::Internals::toggleOverwriteModeEnabled):
340         (WebCore::Internals::consoleMessageArgumentCounts):
341         (WebCore::Internals::hasGrammarMarker):
342         (WebCore::Internals::numberOfScrollableAreas):
343         (WebCore::Internals::isPageBoxVisible):
344         (WebCore::Internals::repaintRectsAsText):
345         (WebCore::Internals::scrollingStateTreeAsText):
346         (WebCore::Internals::mainThreadScrollingReasons):
347         (WebCore::Internals::nonFastScrollableRects):
348         (WebCore::Internals::garbageCollectDocumentResources):
349         (WebCore::Internals::insertAuthorCSS):
350         (WebCore::Internals::insertUserCSS):
351         (WebCore::Internals::shortcutIconURLs):
352         (WebCore::Internals::allIconURLs):
353         (WebCore::Internals::setHeaderHeight):
354         (WebCore::Internals::setFooterHeight):
355         (WebCore::Internals::webkitWillEnterFullScreenForElement):
356         (WebCore::Internals::webkitDidEnterFullScreenForElement):
357         (WebCore::Internals::webkitWillExitFullScreenForElement):
358         (WebCore::Internals::webkitDidExitFullScreenForElement):
359         (WebCore::Internals::startTrackingRepaints):
360         (WebCore::Internals::stopTrackingRepaints):
361         (WebCore::Internals::getCurrentCursorInfo):
362         * testing/Internals.h:
363         (WebCore::Internals::setPagination):
364         * testing/Internals.idl:
365
366 2013-10-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
367
368         Remove HTMLMediaElement.startTime
369         https://bugs.webkit.org/show_bug.cgi?id=123264
370
371         Reviewed by Eric Carlson.
372
373         Patch based on one by: philipj@opera.com
374         Blink review URL: https://codereview.chromium.org/32583003
375
376         startTime has been removed from the HTMLMediaElement and its use
377         in the rest of components.
378
379         * Modules/mediacontrols/mediaControlsApple.js:
380         (Controller.prototype.handleRewindButtonClicked):
381         (Controller.prototype.handleTimelineMouseMove):
382         (Controller.prototype.updateDuration):
383         (Controller.prototype.updateTime): Removed used of startTime().
384         * bindings/gobject/WebKitDOMCustom.cpp:
385         (webkit_dom_html_media_element_get_start_time):
386         * bindings/gobject/WebKitDOMCustom.h:
387         * bindings/gobject/WebKitDOMCustom.symbols: Added phony function.
388         * html/HTMLMediaElement.cpp:
389         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
390         (WebCore::HTMLMediaElement::isBlockedOnMediaController): Removed
391         use of startTime()
392         * html/HTMLMediaElement.h:
393         * html/HTMLMediaElement.idl: Removed startTime()
394         * rendering/RenderThemeWinCE.cpp:
395         (WebCore::RenderThemeWinCE::paintSliderThumb): Removed use of
396         startTime()
397
398 2013-10-28  Andreas Kling  <akling@apple.com>
399
400         RenderElement::m_style should be a Ref.
401         <https://webkit.org/b/123401>
402
403         Made RenderElement::m_style a Ref. This codifies the fact that it
404         can never be null after construction.
405
406         Removed a couple of unnecessary null checks that were exposed as
407         compilation failures.
408
409         Reviewed by Antti Koivisto.
410
411 2013-10-28  Bastien Nocera <hadess@hadess.net>
412
413         Name all the GLib timeout sources
414         https://bugs.webkit.org/show_bug.cgi?id=123229
415
416         Reviewed by Anders Carlsson.
417
418         Give a name to GLib timeout sources, this is helpful when
419         profiling WebKitGTK applications.
420
421         No new tests, no change in functionality.
422
423 2013-10-28  Philippe Normand  <pnormand@igalia.com>
424
425         MediaStreamTrackPrivate's m_client uninitialized
426         https://bugs.webkit.org/show_bug.cgi?id=123403
427
428         Reviewed by Eric Carlson.
429
430         No new tests, no change in functionality.
431
432         * platform/mediastream/MediaStreamTrackPrivate.cpp:
433         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
434         Initialize the m_client member variable.
435
436 2013-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
437
438         Unreviewed. Fix make distcheck.
439
440         * GNUmakefile.am: Add crypto idl files to EXTRA_DIST and remove
441         css/fullscreenQuickTime.css that was removed.
442
443 2013-10-28  Antti Koivisto  <antti@apple.com>
444
445         Prepare simple line layout to support multiple runs per line
446         https://bugs.webkit.org/show_bug.cgi?id=123400
447
448         Reviewed by Andreas Kling.
449
450         Bunch of renaming and some refactoring for future support for text runs.
451
452         SimpleLineLayout::Lines -> SimpleLineLayout::Layout and becomes a class instead of a typedef.
453         SimpleLineLayout::Resolver::Line -> SimpleLineLayout::Resolver::Run
454         SimpleLineLayout::createLines() -> SimpleLineLayout::create()
455         RenderBlockFlow::simpleLines() -> RenderBlockFlow::simpleLineLayout()
456         RenderText::simpleLines() -> RenderText::simpleLineLayout()
457         
458         Added resolver construction functions:
459         
460         SimpleLineLayout::runResolver()
461         SimpleLineLayout::lineResolver()
462
463 2013-10-28  Mario Sanchez Prada  <mario.prada@samsung.com>
464
465         [GTK] Expose title and alternative text for links in image maps
466         https://bugs.webkit.org/show_bug.cgi?id=84045
467
468         Reviewed by Chris Fleizach.
469
470         Change the way we decide when the title attribute should be
471         used for the accessible description, by not relying in the
472         titleTagShouldBeUsedInDescriptionField() helper function but
473         in whether we have found a visible text for it or not.
474
475         This actually mimics what the Mac port does and so makes possible
476         to share both the layout test and its expected results.
477
478         * accessibility/atk/WebKitAccessibleUtil.cpp:
479         (accessibilityDescription): Update the method to determine
480         whether the title attribute should be used for the description.
481
482 2013-10-28  Bastien Nocera <hadess@hadess.net>
483
484         Replace 0 timeouts g_timeout_add() by g_idle_add()
485         https://bugs.webkit.org/show_bug.cgi?id=123260
486
487         Reviewed by Carlos Garcia Campos.
488
489         A zero timeout should be equivalent to using g_idle_add_full(G_PRIORITY_DEFAULT, ...)
490         without the nagging feeling that the wrong API was used.
491
492         No new tests, no change in functionality.
493
494         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Use g_idle_add() instead
495         of 0-timer.
496         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
497         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
498         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Ditto.
499         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
500         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
501         * platform/gtk/GtkDragAndDropHelper.cpp: Ditto.
502         (WebCore::GtkDragAndDropHelper::handleDragLeave):
503
504 2013-10-28  Zan Dobersek  <zdobersek@igalia.com>
505
506         Re-enable simple line layout for GTK
507         https://bugs.webkit.org/show_bug.cgi?id=123388
508
509         Reviewed by Andreas Kling.
510
511         * rendering/SimpleLineLayout.cpp:
512         (WebCore::SimpleLineLayout::canUseFor): 8-bit TextRun support is now enabled for the GTK port, so the port
513         can use the simple line layout.
514
515 2013-10-27  Andreas Kling  <akling@apple.com>
516
517         Fix 4 asserting SVG tests after r158097.
518
519         RenderElement::setStyle() is, quite surprisingly, a virtual function
520         with a single override in RenderSVGBlock.
521         To match the old behavior, we have to rewrite the display type from
522         any inline type to block instead.
523
524         * rendering/RenderElement.cpp:
525         (WebCore::RenderElement::initializeStyle):
526
527 2013-10-27  Andreas Kling  <akling@apple.com>
528
529         Tone down overzealous assertion from r158097.
530
531         RenderElement::initializeStyle() really only cares that there are no
532         text renderers that we should be calling styleDidChange() on.
533
534         Tweak the code to only check that there are no text children.
535
536         * rendering/RenderElement.cpp:
537         (WebCore::RenderElement::initializeStyle):
538
539 2013-10-27  Antti Koivisto  <antti@apple.com>
540
541         Enable center and right text alignment for simple lines
542         https://bugs.webkit.org/show_bug.cgi?id=123398
543
544         Reviewed by Andreas Kling.
545
546         Support text-align:center and text-align:right on simple line layout path.
547
548         * rendering/SimpleLineLayout.cpp:
549         (WebCore::SimpleLineLayout::canUseFor):
550         
551             text-align:justify is still not supported.
552
553         (WebCore::SimpleLineLayout::computeLineLeft):
554         (WebCore::SimpleLineLayout::createLines):
555         
556             Do a rounding dance that matches the line boxes.
557
558         * rendering/SimpleLineLayout.h:
559         
560             Add left position to lines.
561
562         * rendering/SimpleLineLayoutResolver.h:
563         (WebCore::SimpleLineLayout::Resolver::Line::rect):
564         
565             We now do rounding during layout.
566
567         (WebCore::SimpleLineLayout::Resolver::Line::baseline):
568
569 2013-10-27  Andreas Kling  <akling@apple.com>
570
571         Renderers should receive their style at construction.
572         <https://webkit.org/b/123396>
573
574         Pass the RenderStyle to all non-text renderer constructors.
575         After construction, initializeStyle() must be called (as a stopgap
576         measure) until we are able to do style-derived initialization
577         without virtual function calls.
578
579         With this change, RenderElement::m_style is never null. Subsequent
580         patches will add enforcement for this and also make style() return
581         a RenderStyle&.
582
583         I'm adding three FIXME's in this patch:
584
585             - createRendererIfNeeded() calls AnimationController to set up
586               the initial style manually instead of asking RenderElement's
587               setAnimatedStyle() to do it. This can probably be done in a
588               nicer way, but it's not clear yet how.
589
590             - ImageContentData::createRenderer() does a bit of unnecessary
591               work. This should be easy to clean up but got too distracting
592               to be part of this patch.
593
594             - Document::createRenderTree() creates the RenderView with an
595               initial dummy RenderStyle. I've done this because resolving
596               the document style assumes we already have a RenderView.
597
598         For styleWillChange() implementations to detect that they are
599         reacting to the initial style, I've added a hasInitializedStyle()
600         function on RenderElement. This will return false until you've
601         called initializeStyle() on the renderer. This should go away
602         along with initializeStyle() eventually.
603
604         Reviewed by Antti Koivisto.
605
606 2013-10-26  Tim Horton  <timothy_horton@apple.com>
607
608         [mac] Remove WebTiledLayer
609         https://bugs.webkit.org/show_bug.cgi?id=123395
610
611         Reviewed by Anders Carlsson.
612
613         Mac doesn't use CATiledLayer at all anymore. We have to keep
614         LayerTypeTiledLayer around for Windows, for now, but we can
615         get rid of WebTiledLayer and some related Mac-specific code.
616
617         No new tests, just removing dead code.
618
619         * WebCore.xcodeproj/project.pbxproj:
620         Remove WebTiledLayer.*
621
622         * platform/graphics/ca/PlatformCALayer.h:
623         * platform/graphics/ca/mac/PlatformCALayerMac.h:
624         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
625         (PlatformCALayerMac::PlatformCALayerMac):
626         Remove synchronouslyDisplayTilesInRect, which was only used for WebTiledLayer on Mac.
627         Remove WebTiledLayer instantiation and setup code.
628
629         * platform/graphics/mac/WebTiledLayer.h: Removed.
630         * platform/graphics/mac/WebTiledLayer.mm: Removed.
631
632 2013-10-26  Andreas Kling  <akling@apple.com>
633
634         CTTE: RenderImageResourceStyleImage always has a StyleImage.
635         <https://webkit.org/b/123390>
636
637         Codify the fact that RenderImageResourceStyleImage always wraps an
638         existing StyleImage object.
639
640         Reviewed by Antti Koivisto.
641
642 2013-10-26  Antti Koivisto  <antti@apple.com>
643
644         Revert some accidental changes.
645
646         * css/CSSFontFaceSource.cpp:
647         (WebCore::CSSFontFaceSource::getFontData):
648         * css/CSSFontSelector.cpp:
649         * css/CSSFontSelector.h:
650
651 2013-10-26  Mark Lam  <mark.lam@apple.com>
652
653         Gardening: fixed broken build.
654         https://bugs.webkit.org/show_bug.cgi?id=123354.
655
656         * css/CSSFontSelector.h:
657
658 2013-10-26  Antti Koivisto  <antti@apple.com>
659
660         fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only
661         https://bugs.webkit.org/show_bug.cgi?id=123354
662
663         Reviewed by Andreas Kling.
664
665         * rendering/SimpleLineLayout.cpp:
666         (WebCore::SimpleLineLayout::canUseFor):
667         
668             Don't enable simple line layout if the primary font is loading. The code expects
669             to use the primary font metrics for all lines but those won't match the fallbacks
670             when font is not loaded.
671
672 2013-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
673
674         [GTK] Deprecate public dispatch_event method in objects implementing EventTarget interface
675         https://bugs.webkit.org/show_bug.cgi?id=123261
676
677         Reviewed by Gustavo Noronha Silva.
678
679         The interface function should be used instead.
680
681         * bindings/scripts/CodeGeneratorGObject.pm:
682         (GetFunctionDeprecationInformation): Helper function to return the
683         version when the function was deprecated and the function
684         replacing the deprecated one.
685         (GenerateFunction): Check if the function is deprecated to mark it
686         as such in the header and API docs.
687         * bindings/scripts/gobject-generate-headers.pl: Replace the unused
688         WEBKIT_OBSOLETE_API macro with new macros to mark function as
689         deprecated, using the glib macros so that we don't need checks for
690         the platform.
691         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
692         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
693         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
694         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
695         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
696         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
697         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
698         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
699         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
700         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
701         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
702
703 2013-10-25  Mark Lam  <mark.lam@apple.com>
704
705         DatabaseManager's ProposedDatabases need to be thread-safe.
706         https://bugs.webkit.org/show_bug.cgi?id=123313.
707
708         Reviewed by Geoffrey Garen.
709
710         No new tests.
711
712         * Modules/webdatabase/DatabaseManager.cpp:
713         (WebCore::DatabaseManager::DatabaseManager):
714         (WebCore::DatabaseManager::existingDatabaseContextFor):
715         (WebCore::DatabaseManager::registerDatabaseContext):
716         (WebCore::DatabaseManager::unregisterDatabaseContext):
717         (WebCore::DatabaseManager::didConstructDatabaseContext):
718         (WebCore::DatabaseManager::didDestructDatabaseContext):
719         (WebCore::DatabaseManager::openDatabaseBackend):
720         (WebCore::DatabaseManager::addProposedDatabase):
721         (WebCore::DatabaseManager::removeProposedDatabase):
722         (WebCore::DatabaseManager::fullPathForDatabase):
723         (WebCore::DatabaseManager::detailsForNameAndOrigin):
724         * Modules/webdatabase/DatabaseManager.h:
725
726 2013-10-25  Joseph Pecoraro  <pecoraro@apple.com>
727
728         Upstream ENABLE(REMOTE_INSPECTOR) and enable on iOS and Mac
729         https://bugs.webkit.org/show_bug.cgi?id=123111
730
731         Reviewed by Timothy Hatcher.
732
733         * Configurations/FeatureDefines.xcconfig:
734         * WebCore.exp.in:
735
736 2013-10-25  Hans Muller  <hmuller@adobe.com>
737
738         [CSS Shapes] CORS-enabled fetch for shape image values
739         https://bugs.webkit.org/show_bug.cgi?id=123114
740
741         Reviewed by Andreas Kling.
742
743         Access to shape images is now controlled by CORS CSS shape per
744         http://dev.w3.org/csswg/css-shapes/#shape-outside-property.
745         Previously shape images had to be same-origin.
746
747         Shape image URL access is defined by the same logic that defines
748         canvas tainting: same-origin and data URLs are allowed and images
749         with a "Access-Control-Allow-Origin:" header that's either "*" or
750         that matches the document's origin.
751
752         A PotentiallyCrossOriginEnabled RequestOriginPolicy was added to
753         ResourceLoaderOptions, to indicate that a "potentially CORS-enabled fetch"
754         was to be undertaken. The CSSImageValue::cachedImage() method handles this
755         option by effectively setting the "Origin:" request header (see
756         updateRequestForAccessControl() in CrossOriginAccessControl.cpp).
757         StyleResolver::loadPendingShapeImage() uses the new ResourceLoaderOption.
758
759         The static ShapeInsideInfo and ShapeOutsideInfo isEnabledFor() method
760         now performs the CORS check for image valued shapes. The private
761         isOriginClean() method from CanvasRenderingContext2D has been moved to
762         the CachedImage class so that it can be shared by the Canvas and Shape
763         implementations. It checks the response headers per the CORS spec.
764
765         Test: http/tests/security/shape-image-cors.html
766
767         * css/CSSImageValue.cpp:
768         (WebCore::CSSImageValue::cachedImage): Handle the new ResourceLoaderOption.
769         * css/StyleResolver.cpp:
770         (WebCore::StyleResolver::loadPendingShapeImage): Set the new ResourceLoaderOption.
771         * html/canvas/CanvasRenderingContext2D.cpp:
772         (WebCore::CanvasRenderingContext2D::createPattern): Use the CachedImage::isOriginClean().
773         * loader/ResourceLoaderOptions.h: Added PotentiallyCrossOriginEnabled to RequestOriginPolicy.
774         * loader/cache/CachedImage.cpp:
775         (WebCore::CachedImage::isOriginClean): Migrated from CanvasRenderingContext2D.
776         * loader/cache/CachedImage.h:
777         * rendering/shapes/ShapeInfo.cpp:
778         (WebCore::::checkImageOrigin): Do the CORS check and log an error message if neccessary.
779         * rendering/shapes/ShapeInfo.h:
780         * rendering/shapes/ShapeInsideInfo.cpp:
781         (WebCore::ShapeInsideInfo::isEnabledFor): Call checkImageOrigin() for images.
782         * rendering/shapes/ShapeOutsideInfo.cpp:
783         (WebCore::ShapeOutsideInfo::isEnabledFor): Ditto.
784
785 2013-10-25  Jer Noble  <jer.noble@apple.com>
786
787         [MSE] Fix runtime errors caused by mediasource IDL attributes.
788         https://bugs.webkit.org/show_bug.cgi?id=123352
789
790         Reviewed by Eric Carlson.
791
792         Due to http://webkit.org/b/123178, MediaSource classes must add a GenerateIsReachable
793         (and also a JSGenerateToJSObject) attribute to avoid runtime asserts and crashes.
794
795         * Modules/mediasource/MediaSource.idl:
796         * Modules/mediasource/SourceBuffer.idl:
797         * Modules/mediasource/SourceBufferList.idl:
798         * Modules/mediasource/WebKitMediaSource.idl:
799         * Modules/mediasource/WebKitSourceBufferList.idl:
800
801 2013-10-25  Jacky Jiang  <zhajiang@blackberry.com>
802
803         [BlackBerry] Browser crashed at PlatformGraphicsContext::addDrawLineForText() when trying to upload a video to youtube
804         https://bugs.webkit.org/show_bug.cgi?id=123349
805
806         Reviewed by George Staikos.
807         Internally reviewed by George Staikos, Konrad Piascik, Eli Fidler and Arvid Nilsson.
808
809         Browser crashed when dereferencing null PlatformGraphicsContext*.
810         In FrameView::paintControlTints(), we intentionally constructed GraphicsContext
811         with null PlatformGraphicsContext* and disabled painting by doing
812         context.setUpdatingControlTints(true). So we should not go further in
813         GraphicsContext::drawLineForText() if painting is disabled.
814         Check paintingDisabled() for the other functions in PathBlackBerry.cpp
815         as well; otherwise, it is likely we will crash at those places.
816
817         * platform/graphics/blackberry/PathBlackBerry.cpp:
818         (WebCore::GraphicsContext::fillPath):
819         (WebCore::GraphicsContext::strokePath):
820         (WebCore::GraphicsContext::drawLine):
821         (WebCore::GraphicsContext::drawLineForDocumentMarker):
822         (WebCore::GraphicsContext::drawLineForText):
823         (WebCore::GraphicsContext::clip):
824         (WebCore::GraphicsContext::clipPath):
825         (WebCore::GraphicsContext::canvasClip):
826         (WebCore::GraphicsContext::clipOut):
827
828 2013-10-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
829
830         Adding platform implementation of MediaStreamTrack
831         https://bugs.webkit.org/show_bug.cgi?id=123301
832
833         Reviewed by Eric Carlson.
834
835         No new tests needed.
836
837         * CMakeLists.txt:
838         * Modules/mediastream/AudioStreamTrack.cpp:
839         (WebCore::AudioStreamTrack::create): Create method now receives a MediaStreamTrackPrivate as parameter.
840
841         (WebCore::AudioStreamTrack::AudioStreamTrack):
842         * Modules/mediastream/AudioStreamTrack.h:
843         * Modules/mediastream/MediaStream.cpp:
844         (WebCore::MediaStream::MediaStream): Constructor now iterates through a set of MediaStreamTrackPrivate
845         instances to create each MediaStreamTrack of MediaStream.
846
847         (WebCore::MediaStream::addRemoteSource): Calling AudioStreamTrack and VideoStreamTrack with
848         MediaStreamTrackPrivate as parameter.
849
850         * Modules/mediastream/MediaStreamTrack.cpp:
851         (WebCore::MediaStreamTrack::MediaStreamTrack): Constructor now receives a MediaStreamTrackPrivate, instead of a
852         MediaStreamSource.
853
854         (WebCore::MediaStreamTrack::~MediaStreamTrack):
855         (WebCore::MediaStreamTrack::kind): Calling method from MediaStreamTrackPrivate.
856
857         (WebCore::MediaStreamTrack::setSource): Ditto.
858
859         (WebCore::MediaStreamTrack::id): Ditto.
860
861         (WebCore::MediaStreamTrack::label): Ditto.
862
863         (WebCore::MediaStreamTrack::enabled): Ditto.
864
865         (WebCore::MediaStreamTrack::setEnabled): Ditto.
866
867         (WebCore::MediaStreamTrack::muted): Ditto.
868
869         (WebCore::MediaStreamTrack::readonly): Ditto.
870
871         (WebCore::MediaStreamTrack::remote): Ditto.
872
873         (WebCore::MediaStreamTrack::readyState): Ditto.
874
875         (WebCore::MediaStreamTrack::states):
876         (WebCore::MediaStreamTrack::capabilities):
877         (WebCore::MediaStreamTrack::clone):
878         (WebCore::MediaStreamTrack::stopProducingData):
879         (WebCore::MediaStreamTrack::ended): Ditto.
880
881         (WebCore::MediaStreamTrack::sourceStateChanged): Ditto.
882
883         (WebCore::MediaStreamTrack::sourceMutedChanged): Ditto.
884
885         (WebCore::MediaStreamTrack::sourceEnabledChanged): Ditto.
886         (WebCore::MediaStreamTrack::configureTrackRendering):
887         (WebCore::MediaStreamTrack::stopped): Ditto.
888
889         (WebCore::MediaStreamTrack::trackDidEnd): Setting Ended ready state in MediaStreamTrackPrivate.
890
891         (WebCore::MediaStreamTrack::trackReadyStateChanged): Dispatches Live or Ended event.
892
893         (WebCore::MediaStreamTrack::trackMutedChanged): Dispatches Muted event.
894
895         * Modules/mediastream/MediaStreamTrack.h: Now inheriting from MediaStreamTrackPrivateClient.
896
897         (WebCore::MediaStreamTrack::source): Calling method from MediaStreamTrackPrivate.
898         (WebCore::MediaStreamTrack::privateTrack):
899         * Modules/mediastream/VideoStreamTrack.cpp:
900         (WebCore::VideoStreamTrack::create):
901         (WebCore::VideoStreamTrack::VideoStreamTrack): Create method now receives a MediaStreamTrackPrivate as parameter.
902         * Modules/mediastream/VideoStreamTrack.h:
903         * platform/mediastream/MediaStreamDescriptor.cpp:
904         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Stores the private tracks in a Vector (property of
905         MediaStreamDescriptor class).
906
907         (WebCore::MediaStreamDescriptor::addTrack): Adds a private track to the tracks' Vector
908
909         (WebCore::MediaStreamDescriptor::removeTrack): Removes a private track from the tracks' Vector
910
911         * platform/mediastream/MediaStreamDescriptor.h:
912         (WebCore::MediaStreamDescriptor::numberOfAudioSources): Renamed from numberOfAudioStreams.
913
914         (WebCore::MediaStreamDescriptor::audioSources): Renamed from audioStreams.
915
916         (WebCore::MediaStreamDescriptor::numberOfVideoSources): Renamed from numberOfVideoStreams.
917
918         (WebCore::MediaStreamDescriptor::videoSources): Renamed from videoStreams.
919
920         (WebCore::MediaStreamDescriptor::numberOfAudioTracks): Returns the number of audio tracks this MediaStreamDescriptor
921         has.
922
923         (WebCore::MediaStreamDescriptor::audioTracks): Returns a audio track, given an index
924
925         (WebCore::MediaStreamDescriptor::numberOfVideoTracks): Returns the number of video tracks this MediaStreamDescriptor
926         has.
927         (WebCore::MediaStreamDescriptor::videoTracks): Returns a video track, given an index
928         * platform/mediastream/MediaStreamTrackPrivate.cpp: Added.
929         * platform/mediastream/MediaStreamTrackPrivate.h: Added.
930
931 2013-10-25  Zoltan Horvath  <zoltan@webkit.org>
932
933         [CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with multiple regions
934         <https://webkit.org/b/123210>
935
936         Reviewed by David Hyatt.
937
938         I simplified the determination of the next region part of updateShapeAndSegmentsForCurrentLineInFlowThread's implementation
939         in order to make the code more straightforward. I also tried to avoid using regionAtBlockOffset(...) function where it's possible,
940         since it's not always that reliable, what I'll will report in a separate bug.
941
942         No new tests, covered by existing tests.
943
944         * rendering/RenderBlockLineLayout.cpp:
945         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
946
947 2013-10-25  Zoltan Horvath  <zoltan@webkit.org>
948
949         [CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with the first lines
950         <https://bugs.webkit.org/show_bug.cgi?id=123275>
951
952         Reviewed by David Hyatt.
953
954         We have a complex condition in updateShapeAndSegmentsForCurrentLineInFlowThread, which is
955         adjusting the first line to the shape's top. This patch adds two boolean to make that clear.
956
957         No new tests, no behavior change.
958
959         * rendering/RenderBlockLineLayout.cpp:
960         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
961
962 2013-10-25  Antti Koivisto  <antti@apple.com>
963
964         Faster way for simple line layout to check if text has fallback fonts
965         https://bugs.webkit.org/show_bug.cgi?id=123342
966
967         Reviewed by Andreas Kling.
968         
969         Don't use RenderText::knownToHaveNoOverflowAndNoFallbackFonts as it is slow.
970
971         Simple text code path test already guarantees there is no overflow. Test for fallback
972         fonts explicitly.
973
974         * platform/graphics/SimpleFontData.h:
975         
976             Make FINAL.
977
978         * rendering/RenderText.cpp:
979         * rendering/RenderText.h:
980         
981             Remove knownToHaveNoOverflowAndNoFallbackFonts() as it has no clients.
982
983         * rendering/SimpleLineLayout.cpp:
984         (WebCore::SimpleLineLayout::canUseFor):
985         
986             Check if all characters can be found from the primary font.
987
988 2013-10-25  Andreas Kling  <akling@apple.com>
989
990         SVGResourcesCache::clientDestroyed() should take a RenderElement&.
991         <https://webkit.org/b/123339>
992
993         This function is always called with an object, and that object
994         is guaranteed to never be a text renderer.
995
996         Reviewed by Antti Koivisto.
997
998 2013-10-25  Andreas Kling  <akling@apple.com>
999
1000         SVGResourcesCache::clientLayoutChanged() should take a RenderElement&.
1001         <https://webkit.org/b/123336>
1002
1003         This function is always called with an object, and that object
1004         is guaranteed to never be a text renderer.
1005
1006         Reviewed by Antti Koivisto.
1007
1008 2013-10-25  Andreas Kling  <akling@apple.com>
1009
1010         SVGResourcesCache::clientStyleChanged() should take a RenderElement&.
1011         <https://webkit.org/b/123335>
1012
1013         This function is always called with an object, and that object
1014         is guaranteed to never be a text renderer.
1015
1016         Reviewed by Antti Koivisto.
1017
1018 2013-10-25  Andreas Kling  <akling@apple.com>
1019
1020         SVG: postApplyResource() should take a RenderElement&.
1021         <https://webkit.org/b/123334>
1022
1023         This function is always called with an object, and that object
1024         is guaranteed to never be a text renderer.
1025
1026         Reviewed by Antti Koivisto.
1027
1028 2013-10-25  Antti Koivisto  <antti@apple.com>
1029
1030         REGRESSION(r157950): It made many tests assert on Windows, EFL, GTK
1031         https://bugs.webkit.org/show_bug.cgi?id=123309
1032
1033         Reviewed by Andreas Kling.
1034
1035         Disable simple line layout on non-Mac plaforms for now.
1036
1037         * rendering/SimpleLineLayout.cpp:
1038         (WebCore::SimpleLineLayout::canUseFor):
1039
1040 2013-10-24  Andreas Kling  <akling@apple.com>
1041
1042         SVG: applyResource() should take a RenderElement&.
1043         <https://webkit.org/b/123286>
1044
1045         This function is always called with an object, and that object
1046         is guaranteed to never be a text renderer.
1047
1048         Reviewed by Antti Koivisto.
1049
1050 2013-10-25  Andreas Kling  <akling@apple.com>
1051
1052         RenderElement::styleWillChange() should pass newStyle as reference.
1053         <https://webkit.org/b/123332>
1054
1055         When styleWillChange() is called, there is always a new style getting
1056         set so there's no need to handle the null style case.
1057         This flushed out a couple of unnecessary checks.
1058
1059         Reviewed by Antti Koivisto.
1060
1061 2013-10-25  peavo@outlook.com  <peavo@outlook.com>
1062
1063         [WinCairo] Compile fixes.
1064         https://bugs.webkit.org/show_bug.cgi?id=123269
1065
1066         Reviewed by Csaba Osztrogon√°c.
1067
1068         * platform/graphics/win/ImageCairoWin.cpp: Added new parameter to BitmapImage::draw() calls.
1069         (WebCore::BitmapImage::getHBITMAPOfSize):
1070         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1071
1072 2013-10-25  Sergio Villar Senin  <svillar@igalia.com>
1073
1074         Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
1075         https://bugs.webkit.org/show_bug.cgi?id=118620
1076
1077         Reviewed by Antti Koivisto.
1078
1079         Turns out that order is extremelly uncommon so using a Vector is
1080         much less expensive. This also special-cases the much common case
1081         of only having order of value 0 by using Vectors with just one
1082         preallocated member.
1083
1084         Also added the performance test that shows a ~1% win when using a
1085         vector instead of the HashSet.
1086
1087         * rendering/RenderFlexibleBox.cpp:
1088         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
1089         (WebCore::RenderFlexibleBox::layoutBlock):
1090         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1091         * rendering/RenderFlexibleBox.h:
1092
1093 2013-10-25  Sergio Villar Senin  <svillar@igalia.com>
1094
1095         Non-SVG build broken after r157950
1096         https://bugs.webkit.org/show_bug.cgi?id=123328
1097
1098         Reviewed by Xan Lopez.
1099
1100         The isSVGInlineTest() check should be done only if SVG is enabled.
1101
1102         * rendering/SimpleLineLayout.cpp:
1103         (WebCore::SimpleLineLayout::canUseFor):
1104
1105 2013-10-24  Jer Noble  <jer.noble@apple.com>
1106
1107         [Mac] Add helper methods to convert CMTime <--> MediaTime
1108         https://bugs.webkit.org/show_bug.cgi?id=123285
1109
1110         Reviewed by Eric Carlson.
1111
1112         Add utility methods to convert between CMTime (a rational time class) and MediaTime.
1113         Once there, PlatformClockCM can now vend and accept MediaTimes for currentTime.
1114
1115         * platform/mac/MediaTimeMac.h:
1116         * platform/mac/MediaTimeMac.cpp:
1117         (WebCore::toMediaTime): Added conversion utility method.
1118         (WebCore::toCMTime): Ditto.
1119
1120         * platform/mac/PlatformClockCM.h:
1121         * platform/mac/PlatformClockCM.mm:
1122         (PlatformClockCM::setCurrentMediaTime): Added.
1123         (PlatformClockCM::currentMediaTime): Added.
1124
1125         * WebCore.xcodeproj/project.pbxproj: Add new files to project.
1126
1127 2013-10-24  Mark Rowe  <mrowe@apple.com>
1128
1129         Remove references to OS X 10.7 from Xcode configuration settings.
1130
1131         Now that we're not building for OS X 10.7 they're no longer needed.
1132
1133         Reviewed by Anders Carlsson.
1134
1135
1136         * Configurations/Base.xcconfig:
1137         * Configurations/DebugRelease.xcconfig:
1138         * Configurations/FeatureDefines.xcconfig:
1139         * Configurations/Version.xcconfig:
1140
1141 2013-10-24  Antti Koivisto  <antti@apple.com>
1142
1143         Cache line layout path
1144         https://bugs.webkit.org/show_bug.cgi?id=123298
1145
1146         Reviewed by Sam Weinig.
1147         
1148         Determining the path can be non-trivial. Avoid computing it repeatedly on relayouts.
1149
1150         * rendering/RenderBlock.cpp:
1151         (WebCore::RenderBlock::RenderBlock):
1152         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
1153         (WebCore::RenderBlock::invalidateLineLayoutPath):
1154         (WebCore::RenderBlock::removeChild):
1155         
1156             Invalidate the path when children change.
1157
1158         * rendering/RenderBlock.h:
1159         * rendering/RenderBlockFlow.cpp:
1160         (WebCore::RenderBlockFlow::layoutInlineChildren):
1161         (WebCore::RenderBlockFlow::styleDidChange):
1162         
1163             Invalidate the path when style changes.
1164
1165         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
1166         (WebCore::RenderBlockFlow::ensureLineBoxes):
1167         * rendering/RenderText.cpp:
1168         (WebCore::RenderText::setText):
1169         
1170             Invalidate the path when text changes.
1171
1172 2013-10-24  Mark Rowe  <mrowe@apple.com>
1173
1174         <rdar://problem/15312643> Prepare for the mysterious future.
1175
1176         Reviewed by David Kilzer.
1177
1178
1179         * Configurations/Base.xcconfig:
1180         * Configurations/DebugRelease.xcconfig:
1181         * Configurations/FeatureDefines.xcconfig:
1182         * Configurations/Version.xcconfig:
1183
1184 2013-10-24  Andreas Kling  <akling@apple.com>
1185
1186         DocumentLoader::cachedResourceLoader() should return a reference.
1187         <https://webkit.org/b/123303>
1188
1189         ..and while we're at it, make DocumentLoader::m_cachedResourceLoader
1190         a Ref, and have CachedResourceLoader::create return a PassRef.
1191
1192         Reviewed by Sam Weinig.
1193
1194 2013-10-24  Anders Carlsson  <andersca@apple.com>
1195
1196         Stop bringing in the std namespace
1197         https://bugs.webkit.org/show_bug.cgi?id=123273
1198
1199         Reviewed by Andreas Kling.
1200
1201         * Modules/webaudio/AudioBufferSourceNode.cpp:
1202         (WebCore::AudioBufferSourceNode::renderFromBuffer):
1203         (WebCore::AudioBufferSourceNode::startGrain):
1204         (WebCore::AudioBufferSourceNode::totalPitchRate):
1205         * Modules/webaudio/AudioNodeInput.cpp:
1206         (WebCore::AudioNodeInput::numberOfChannels):
1207         * Modules/webaudio/AudioParamTimeline.cpp:
1208         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
1209         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1210         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
1211         (WebCore::AudioScheduledSourceNode::stop):
1212         * Modules/webaudio/AudioSummingJunction.cpp:
1213         * Modules/webaudio/DelayDSPKernel.cpp:
1214         (WebCore::DelayDSPKernel::process):
1215         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1216         (WebCore::OfflineAudioDestinationNode::offlineRender):
1217         * Modules/webaudio/OscillatorNode.cpp:
1218         * Modules/webaudio/PannerNode.cpp:
1219         (WebCore::PannerNode::dopplerRate):
1220         * Modules/webaudio/WaveShaperDSPKernel.cpp:
1221         (WebCore::WaveShaperDSPKernel::processCurve):
1222         * Modules/webdatabase/DatabaseTracker.cpp:
1223         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
1224         * Modules/websockets/WebSocket.cpp:
1225         (WebCore::saturateAdd):
1226         * Modules/websockets/WebSocketChannel.cpp:
1227         * Modules/websockets/WebSocketFrame.cpp:
1228         (WebCore::WebSocketFrame::parseFrame):
1229         * accessibility/AccessibilityARIAGrid.cpp:
1230         * accessibility/AccessibilityARIAGridCell.cpp:
1231         * accessibility/AccessibilityARIAGridRow.cpp:
1232         * accessibility/AccessibilityList.cpp:
1233         * accessibility/AccessibilityListBox.cpp:
1234         * accessibility/AccessibilityListBoxOption.cpp:
1235         * accessibility/AccessibilityNodeObject.cpp:
1236         * accessibility/AccessibilityObject.cpp:
1237         * accessibility/AccessibilityRenderObject.cpp:
1238         * accessibility/AccessibilityTable.cpp:
1239         (WebCore::AccessibilityTable::addChildren):
1240         * accessibility/AccessibilityTableCell.cpp:
1241         * accessibility/AccessibilityTableColumn.cpp:
1242         * accessibility/AccessibilityTableHeaderContainer.cpp:
1243         * accessibility/AccessibilityTableRow.cpp:
1244         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1245         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1246         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
1247         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1248         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
1249         * bindings/js/JSGeolocationCustom.cpp:
1250         (WebCore::setTimeout):
1251         (WebCore::setMaximumAge):
1252         * bindings/js/ScriptController.cpp:
1253         * bindings/js/SerializedScriptValue.cpp:
1254         (WebCore::writeLittleEndian):
1255         (WebCore::CloneSerializer::write):
1256         (WebCore::CloneDeserializer::deserialize):
1257         (WebCore::CloneDeserializer::readString):
1258         * css/CSSComputedStyleDeclaration.cpp:
1259         (WebCore::ComputedStyleExtractor::propertyValue):
1260         * css/CSSFontSelector.cpp:
1261         (WebCore::CSSFontSelector::getFontFace):
1262         * css/CSSGradientValue.cpp:
1263         (WebCore::CSSRadialGradientValue::createGradient):
1264         * css/CSSParser.cpp:
1265         (WebCore::CSSParser::parseValue):
1266         (WebCore::CSSParser::parseColorParameters):
1267         (WebCore::CSSParser::parseHSLParameters):
1268         * css/CSSReflectValue.cpp:
1269         * css/DeprecatedStyleBuilder.cpp:
1270         (WebCore::ApplyPropertyFontSize::applyValue):
1271         * css/PropertySetCSSStyleDeclaration.cpp:
1272         * css/SVGCSSParser.cpp:
1273         * css/StylePropertySet.cpp:
1274         (WebCore::StylePropertySet::getLayeredShorthandValue):
1275         * css/StyleResolver.cpp:
1276         (WebCore::StyleResolver::viewportPercentageValue):
1277         * dom/CharacterData.cpp:
1278         (WebCore::CharacterData::parserAppendData):
1279         * dom/ContainerNode.cpp:
1280         * dom/Document.cpp:
1281         (WebCore::Document::minimumLayoutDelay):
1282         * dom/Node.cpp:
1283         (WebCore::Node::compareDocumentPosition):
1284         * dom/Range.cpp:
1285         (WebCore::Range::toString):
1286         (WebCore::Range::textRects):
1287         (WebCore::Range::textQuads):
1288         * dom/ScriptedAnimationController.cpp:
1289         (WebCore::ScriptedAnimationController::scheduleAnimation):
1290         * dom/StyledElement.cpp:
1291         (WebCore::StyledElement::makePresentationAttributeCacheKey):
1292         * dom/Text.cpp:
1293         * dom/ViewportArguments.cpp:
1294         (WebCore::clampLengthValue):
1295         (WebCore::clampScaleValue):
1296         (WebCore::ViewportArguments::resolve):
1297         (WebCore::computeMinimumScaleFactorForContentContained):
1298         (WebCore::restrictMinimumScaleFactorToViewportSize):
1299         * editing/AlternativeTextController.cpp:
1300         * editing/ApplyStyleCommand.cpp:
1301         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1302         * editing/CompositeEditCommand.cpp:
1303         (WebCore::CompositeEditCommand::deleteInsignificantText):
1304         * editing/Editor.cpp:
1305         (WebCore::Editor::setComposition):
1306         (WebCore::Editor::compositionRange):
1307         * editing/EditorCommand.cpp:
1308         (WebCore::verticalScrollDistance):
1309         * editing/TextIterator.cpp:
1310         (WebCore::TextIterator::handleTextNode):
1311         (WebCore::TextIterator::handleTextBox):
1312         (WebCore::CharacterIterator::string):
1313         (WebCore::SearchBuffer::SearchBuffer):
1314         (WebCore::SearchBuffer::append):
1315         (WebCore::SearchBuffer::prependContext):
1316         (WebCore::SearchBuffer::search):
1317         * editing/VisibleUnits.cpp:
1318         (WebCore::startOfParagraph):
1319         * editing/htmlediting.cpp:
1320         * editing/markup.cpp:
1321         * fileapi/FileReaderLoader.cpp:
1322         (WebCore::FileReaderLoader::didReceiveResponse):
1323         (WebCore::FileReaderLoader::didReceiveData):
1324         * history/BackForwardList.cpp:
1325         (WebCore::BackForwardList::backListWithLimit):
1326         (WebCore::BackForwardList::forwardListWithLimit):
1327         * history/PageCache.cpp:
1328         (WebCore::PageCache::setCapacity):
1329         * html/BaseDateAndTimeInputType.cpp:
1330         * html/FTPDirectoryDocument.cpp:
1331         * html/HTMLAreaElement.cpp:
1332         (WebCore::HTMLAreaElement::getRegion):
1333         * html/HTMLElement.cpp:
1334         (WebCore::HTMLElement::parseAttribute):
1335         (WebCore::parseColorStringWithCrazyLegacyRules):
1336         * html/HTMLFormControlElement.cpp:
1337         * html/HTMLFormElement.cpp:
1338         (WebCore::HTMLFormElement::getTextFieldValues):
1339         * html/HTMLImageElement.cpp:
1340         * html/HTMLInputElement.cpp:
1341         * html/HTMLMapElement.cpp:
1342         * html/HTMLMediaElement.cpp:
1343         (WebCore::HTMLMediaElement::HTMLMediaElement):
1344         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1345         (WebCore::HTMLMediaElement::textTrackAddCue):
1346         (WebCore::HTMLMediaElement::textTrackRemoveCue):
1347         (WebCore::HTMLMediaElement::rewind):
1348         (WebCore::HTMLMediaElement::seek):
1349         (WebCore::HTMLMediaElement::duration):
1350         * html/HTMLSelectElement.cpp:
1351         (WebCore::HTMLSelectElement::parseAttribute):
1352         (WebCore::HTMLSelectElement::updateListBoxSelection):
1353         * html/HTMLSourceElement.cpp:
1354         * html/HTMLTableCellElement.cpp:
1355         (WebCore::HTMLTableCellElement::colSpan):
1356         (WebCore::HTMLTableCellElement::rowSpan):
1357         * html/HTMLTableElement.cpp:
1358         (WebCore::HTMLTableElement::parseAttribute):
1359         * html/HTMLTextFormControlElement.cpp:
1360         (WebCore::HTMLTextFormControlElement::setSelectionStart):
1361         (WebCore::HTMLTextFormControlElement::setSelectionEnd):
1362         (WebCore::HTMLTextFormControlElement::select):
1363         (WebCore::HTMLTextFormControlElement::setSelectionRange):
1364         * html/HTMLTrackElement.cpp:
1365         * html/ImageDocument.cpp:
1366         (WebCore::ImageDocument::scale):
1367         * html/InputType.cpp:
1368         (WebCore::InputType::valueAsDouble):
1369         * html/MediaController.cpp:
1370         (MediaController::duration):
1371         (MediaController::currentTime):
1372         (MediaController::setCurrentTime):
1373         (MediaController::updateReadyState):
1374         * html/NumberInputType.cpp:
1375         (WebCore::NumberInputType::setValueAsDouble):
1376         (WebCore::NumberInputType::setValueAsDecimal):
1377         (WebCore::NumberInputType::createStepRange):
1378         * html/RangeInputType.cpp:
1379         (WebCore::RangeInputType::handleKeydownEvent):
1380         * html/SearchInputType.cpp:
1381         (WebCore::SearchInputType::startSearchEventTimer):
1382         * html/StepRange.cpp:
1383         (WebCore::StepRange::clampValue):
1384         (WebCore::StepRange::parseStep):
1385         * html/TimeRanges.cpp:
1386         * html/ValidationMessage.cpp:
1387         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
1388         (WebCore::adjustBubblePosition):
1389         * html/canvas/CanvasRenderingContext2D.cpp:
1390         (WebCore::normalizeRect):
1391         * html/canvas/WebGLRenderingContext.cpp:
1392         (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
1393         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
1394         * html/shadow/MediaControlElements.cpp:
1395         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
1396         * html/shadow/MediaControlsApple.cpp:
1397         * html/shadow/SliderThumbElement.cpp:
1398         (WebCore::SliderThumbElement::setPositionFromPoint):
1399         * inspector/ContentSearchUtils.cpp:
1400         * inspector/DOMEditor.cpp:
1401         * inspector/DOMPatchSupport.cpp:
1402         (WebCore::DOMPatchSupport::diff):
1403         * inspector/InjectedScriptHost.cpp:
1404         * loader/ProgressTracker.cpp:
1405         (WebCore::ProgressTracker::incrementProgress):
1406         * loader/cache/CachedImage.cpp:
1407         * page/DOMWindow.cpp:
1408         (WebCore::DOMWindow::adjustWindowRect):
1409         * page/EventHandler.cpp:
1410         (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
1411         * page/FrameTree.cpp:
1412         * page/FrameView.cpp:
1413         (WebCore::FrameView::adjustedDeferredRepaintDelay):
1414         (WebCore::FrameView::autoSizeIfEnabled):
1415         * page/PrintContext.cpp:
1416         (WebCore::PrintContext::computeAutomaticScaleFactor):
1417         * page/SpatialNavigation.cpp:
1418         (WebCore::entryAndExitPointsForDirection):
1419         * page/animation/CSSPropertyAnimation.cpp:
1420         (WebCore::blendFilterOperations):
1421         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
1422         * platform/graphics/FloatRect.cpp:
1423         (WebCore::FloatRect::FloatRect):
1424         (WebCore::FloatRect::intersect):
1425         (WebCore::FloatRect::uniteEvenIfEmpty):
1426         (WebCore::FloatRect::extend):
1427         (WebCore::FloatRect::fitToPoints):
1428         * platform/graphics/GlyphPageTreeNode.cpp:
1429         (WebCore::GlyphPageTreeNode::initializePage):
1430         (WebCore::GlyphPageTreeNode::getChild):
1431         * platform/graphics/IntRect.cpp:
1432         (WebCore::IntRect::intersect):
1433         (WebCore::IntRect::unite):
1434         (WebCore::IntRect::uniteIfNonZero):
1435         * platform/graphics/LayoutRect.cpp:
1436         (WebCore::LayoutRect::intersect):
1437         (WebCore::LayoutRect::unite):
1438         (WebCore::LayoutRect::uniteIfNonZero):
1439         * platform/graphics/filters/FEMorphology.cpp:
1440         (WebCore::FEMorphology::platformApplyGeneric):
1441         (WebCore::FEMorphology::platformApplySoftware):
1442         * platform/mac/MemoryPressureHandlerMac.mm:
1443         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1444         * platform/text/TextCodecICU.cpp:
1445         * rendering/LineWidth.cpp:
1446         (WebCore::LineWidth::fitBelowFloats):
1447         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
1448         * rendering/RenderBlock.h:
1449         (WebCore::RenderBlock::availableLogicalWidthForLine):
1450         (WebCore::RenderBlock::availableLogicalWidthForContent):
1451         * rendering/RenderFieldset.cpp:
1452         (WebCore::RenderFieldset::computePreferredLogicalWidths):
1453         (WebCore::RenderFieldset::layoutSpecialExcludedChild):
1454         (WebCore::RenderFieldset::paintBoxDecorations):
1455         * rendering/RenderFlowThread.cpp:
1456         (WebCore::RenderFlowThread::updateLogicalWidth):
1457         (WebCore::RenderFlowThread::addForcedRegionBreak):
1458         * rendering/RenderFrameBase.cpp:
1459         (WebCore::RenderFrameBase::layoutWithFlattening):
1460         * rendering/RenderFrameSet.cpp:
1461         (WebCore::RenderFrameSet::layOutAxis):
1462         * rendering/RenderSlider.cpp:
1463         (WebCore::RenderSlider::computePreferredLogicalWidths):
1464         * rendering/RenderTableCell.h:
1465         * rendering/RenderTreeAsText.cpp:
1466         (WebCore::writeLayers):
1467         * rendering/RootInlineBox.h:
1468         (WebCore::RootInlineBox::selectionHeight):
1469         (WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock):
1470         * rendering/mathml/RenderMathMLRow.cpp:
1471         (WebCore::RenderMathMLRow::layout):
1472         * rendering/mathml/RenderMathMLScripts.cpp:
1473         (WebCore::RenderMathMLScripts::layout):
1474         * rendering/style/RenderStyle.h:
1475         * rendering/style/StyleGeneratedImage.cpp:
1476         (WebCore::StyleGeneratedImage::imageSize):
1477         * style/StyleFontSizeFunctions.cpp:
1478         (WebCore::Style::fontSizeForKeyword):
1479         * svg/SVGSVGElement.cpp:
1480         (WebCore::SVGSVGElement::setCurrentTime):
1481
1482 2013-10-24  Andreas Kling  <akling@apple.com>
1483
1484         Uncomplicate some of SVGTextRunRenderingContext.
1485         <https://webkit.org/b/123294>
1486
1487         This class was weird about a few things, so I've taken these steps
1488         to clear things up:
1489
1490         - FINAL and OVERRIDE all the things.
1491         - Constructor now takes a RenderObject&.
1492         - renderer() now returns a RenderObject&.
1493         - drawSVGGlyphs() no longer takes a TextRun.
1494         - glyphDataForCharacter() no longer takes a TextRun.
1495
1496         To expand on the last two, there was also some awkward hoop-jumping
1497         where we'd go through the TextRun passed by argument to find its
1498         rendering context, which was really just |this| all along.
1499
1500         Reviewed by Antti Koivisto.
1501
1502 2013-10-24  Roger Fong  <roger_fong@apple.com>
1503
1504         Add texture level dependent size checks to textureImage2D calls.
1505         https://bugs.webkit.org/show_bug.cgi?id=123290
1506         <rdar://problem/15201382>
1507
1508         Reviewed by Dean Jackson
1509
1510         Test covered by WebGL Conformance suite 1.0.2 test, textures/texture-size-limit.html.
1511
1512         There are different size limits when calling textureImage2D on different texture levels.
1513         We should be throwing an error if our texture size exceeds these limits.
1514
1515         * html/canvas/WebGLRenderingContext.cpp:
1516         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
1517
1518 2013-10-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1519
1520         [MediaStream API] allow a stream source to be shared
1521         https://bugs.webkit.org/show_bug.cgi?id=121954
1522
1523         Reviewed by Eric Carlson.
1524
1525         Now, the MediaStreamSource don't know about the MediaStream that owns it,
1526         since there can be more than one MediaStream that has it as source for some track.
1527         MediaStreamTrack classes now have observers registered, in case there are more than
1528         one MediaStream owning that track
1529
1530         No new tests, no change in functionality.
1531
1532         * Modules/mediastream/MediaStream.cpp:
1533         (WebCore::MediaStream::MediaStream): Adding the MediaStream as an observer for each track it owns.
1534
1535         (WebCore::MediaStream::addTrack): Now adding the MediaStream as an observer the new added track
1536         and adding the source to the MediaStreamDescriptor.
1537
1538         (WebCore::MediaStream::removeTrack): Instead of removing the source right away, we first check if
1539         there isn't any other track using that source, if not we remove the source.
1540
1541         (WebCore::MediaStream::haveTrackWithSource):
1542         (WebCore::MediaStream::addRemoteSource): MediaStreamSource has no information about the MediaStream
1543         that uses it, so now we don't set the stream in the source anymore.
1544
1545         (WebCore::MediaStream::removeRemoteSource): There can be more than on track using the source. So we
1546         get each track that is using the source and then remove it and fire the ended event.
1547
1548         * Modules/mediastream/MediaStream.h:
1549         * Modules/mediastream/MediaStreamTrack.cpp:
1550         (WebCore::MediaStreamTrack::addObserver):
1551         (WebCore::MediaStreamTrack::removeObserver):
1552         (WebCore::MediaStreamTrack::trackDidEnd): Does not get the client from the MediaStreamDescriptor, it now
1553         notify each of its observers that the track ended.
1554
1555         * Modules/mediastream/MediaStreamTrack.h: Adding Observer class.
1556
1557         * platform/mediastream/MediaStreamDescriptor.cpp: Destructor now does nothing. Previously it was setting
1558         each MediaStreamSource's descriptor to null.
1559
1560         (WebCore::MediaStreamDescriptor::removeSource): Not setting the stream in source anymore.
1561
1562         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
1563
1564         (WebCore::MediaStreamDescriptor::setEnded): Not setting the state of the source to Ended
1565
1566         * platform/mediastream/MediaStreamDescriptor.h:
1567         (WebCore::MediaStreamDescriptor::~MediaStreamDescriptor):
1568         * platform/mediastream/MediaStreamSource.cpp: Removing references to MediaStream object
1569         (WebCore::MediaStreamSource::MediaStreamSource):
1570         (WebCore::MediaStreamSource::reset):
1571         * platform/mediastream/MediaStreamSource.h:
1572
1573 2013-10-24  Daniel Bates  <dabates@apple.com>
1574
1575         Crash in WebCore::NavigationScheduler::startTimer()
1576         https://bugs.webkit.org/show_bug.cgi?id=123288
1577         <rdar://problem/14055644>
1578
1579         Reviewed by Alexey Proskuryakov.
1580
1581         Currently NavigationScheduler::startTimer() synchronously notifies the client
1582         before the Web Inspector of a scheduled redirect. If a client cancels this
1583         redirect then NavigationScheduler::m_redirect will become null and we'll
1584         subsequently crash when informing the Web Inspector of this formerly scheduled
1585         redirect. Instead, NavigationScheduler::startTimer() should notify the Web
1586         Inspector before it notifies the client of a scheduled redirect.
1587
1588         As a side benefit of this change, the Web Inspector is notified of a scheduled
1589         redirect before being notified of it being canceled when a client chooses to cancel
1590         a scheduled redirect.
1591
1592         * loader/NavigationScheduler.cpp:
1593         (WebCore::NavigationScheduler::startTimer):
1594
1595 2013-10-24  Antti Koivisto  <antti@apple.com>
1596
1597         Try to fix build without CSS_SHAPES.
1598
1599         * rendering/SimpleLineLayout.cpp:
1600         (WebCore::SimpleLineLayout::canUseFor):
1601
1602 2013-10-24  Antti Koivisto  <antti@apple.com>
1603
1604         Simple line layout
1605         https://bugs.webkit.org/show_bug.cgi?id=122458
1606
1607         Reviewed by Darin Adler.
1608
1609         Line box based inline layout is powerful but also rather slow and memory intensive. Simple line layout
1610         is a compact alternative data structure and fast code path to cover common cases without requiring line
1611         boxes.
1612         
1613         This patch handles a case single left-aligned text renderer inside flow with no floats. Even this very basic
1614         case is sufficiently common to handle up to 25% of all text lines on some popular new sites. The decision
1615         which path to use is made per block flow (paragraph).
1616         
1617         Simple line layout aims to produce pixel-exact rendering result when compared to the line box layout.
1618         
1619         The goal is to handle everything that requires line level access in cases that allow use of simple lines.
1620         This is not quite the case yet. For example selections and outline painting are not supported. In these
1621         cases we seamlessly switch to the line boxes.
1622
1623         The simple line data structure currently uses 12 bytes per line. Lineboxes take ~160 bytes minimum per line.
1624         Laying out the lines is also several times faster as is iterating over them.
1625
1626         * CMakeLists.txt:
1627         * GNUmakefile.list.am:
1628         * WebCore.vcxproj/WebCore.vcxproj:
1629         * WebCore.xcodeproj/project.pbxproj:
1630         * dom/Position.cpp:
1631         (WebCore::Position::upstream):
1632         (WebCore::Position::downstream):
1633         (WebCore::Position::getInlineBoxAndOffset):
1634         
1635             Creating positions within a simple line flow causes switch to line boxes.
1636
1637         * editing/TextIterator.cpp:
1638         (WebCore::TextIterator::handleTextNode):
1639         
1640             TextIterator traverses line boxes if available. In case simple line case we need to replicate the
1641             same results (for compatibility but especially to avoid changing test results). This is done here
1642             by just traversing the string without actually using the layout.
1643
1644         * rendering/RenderBlock.cpp:
1645         (WebCore::RenderBlock::RenderBlock):
1646         (WebCore::RenderBlock::layoutShapeInsideInfo):
1647         * rendering/RenderBlock.h:
1648         * rendering/RenderBlockFlow.cpp:
1649         (WebCore::RenderBlockFlow::layoutInlineChildren):
1650         
1651             Select the layout path to use.
1652
1653         (WebCore::RenderBlockFlow::deleteLines):
1654         (WebCore::RenderBlockFlow::hitTestInlineChildren):
1655         (WebCore::RenderBlockFlow::adjustForBorderFit):
1656         (WebCore::RenderBlockFlow::firstLineBaseline):
1657         (WebCore::RenderBlockFlow::inlineBlockBaseline):
1658         (WebCore::RenderBlockFlow::inlineSelectionGaps):
1659         (WebCore::RenderBlockFlow::clearTruncation):
1660         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
1661         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
1662         (WebCore::RenderBlockFlow::paintInlineChildren):
1663         (WebCore::RenderBlockFlow::hasLines):
1664         (WebCore::RenderBlockFlow::layoutSimpleLines):
1665         
1666             Do simple layout.
1667
1668         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
1669         (WebCore::RenderBlockFlow::ensureLineBoxes):
1670         
1671             This function switches from simple lines to line boxes. The switching can be done outside normal layout.
1672             This is used to cover some cases that are not yet supported by simple lines (like selections).
1673
1674         * rendering/RenderBlockFlow.h:
1675         (WebCore::RenderBlockFlow::simpleLines):
1676         * rendering/RenderBlockLineLayout.cpp:
1677         (WebCore::RenderBlockFlow::layoutLineBoxes):
1678         
1679             Rename the line box layout function.
1680
1681         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
1682         * rendering/RenderText.cpp:
1683         (WebCore::RenderText::deleteLineBoxesBeforeSimpleLineLayout):
1684         (WebCore::RenderText::absoluteRects):
1685         (WebCore::RenderText::absoluteRectsForRange):
1686         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
1687         (WebCore::RenderText::absoluteQuads):
1688         (WebCore::RenderText::absoluteQuadsForRange):
1689         (WebCore::RenderText::positionForPoint):
1690         (WebCore::RenderText::knownToHaveNoOverflowAndNoFallbackFonts):
1691         (WebCore::RenderText::setSelectionState):
1692         (WebCore::RenderText::setTextWithOffset):
1693         (WebCore::RenderText::ensureLineBoxes):
1694         (WebCore::RenderText::simpleLines):
1695         (WebCore::RenderText::linesBoundingBox):
1696         (WebCore::RenderText::linesVisualOverflowBoundingBox):
1697         (WebCore::RenderText::selectionRectForRepaint):
1698         (WebCore::RenderText::caretMinOffset):
1699         (WebCore::RenderText::caretMaxOffset):
1700         (WebCore::RenderText::countRenderedCharacterOffsetsUntil):
1701         (WebCore::RenderText::containsRenderedCharacterOffset):
1702         (WebCore::RenderText::containsCaretOffset):
1703         (WebCore::RenderText::hasRenderedText):
1704         * rendering/RenderText.h:
1705         * rendering/RenderTreeAsText.cpp:
1706         (WebCore::RenderTreeAsText::writeRenderObject):
1707         (WebCore::writeSimpleLine):
1708         (WebCore::write):
1709         * rendering/SimpleLineLayout.cpp: Added.
1710         (WebCore::SimpleLineLayout::canUseFor):
1711         
1712             This check for the cases supported by the simple line layout path.
1713
1714         (WebCore::SimpleLineLayout::isWhitespace):
1715         (WebCore::SimpleLineLayout::skipWhitespaces):
1716         (WebCore::SimpleLineLayout::textWidth):
1717         (WebCore::SimpleLineLayout::createLines):
1718         
1719             The main layout functions that breaks text to lines. It only handles the cases allowed by 
1720             SimpleLineLayout::canUseFor. What it handles it aims to break exactly as line box layout does.
1721
1722         * rendering/SimpleLineLayout.h: Added.
1723         * rendering/SimpleLineLayoutFunctions.cpp: Added.
1724         (WebCore::SimpleLineLayout::paintFlow):
1725         (WebCore::SimpleLineLayout::hitTestFlow):
1726         (WebCore::SimpleLineLayout::collectFlowOverflow):
1727         (WebCore::SimpleLineLayout::computeTextBoundingBox):
1728         * rendering/SimpleLineLayoutFunctions.h: Added.
1729         (WebCore::SimpleLineLayout::computeFlowHeight):
1730         (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
1731         (WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
1732         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
1733         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
1734         (WebCore::SimpleLineLayout::containsTextCaretOffset):
1735         (WebCore::SimpleLineLayout::isTextRendered):
1736         (WebCore::SimpleLineLayout::lineHeightFromFlow):
1737         
1738             Support functions called from RenderBlockFlow and RenderText. They are equivalent to
1739             similar line box functions.
1740
1741         (WebCore::SimpleLineLayout::baselineFromFlow):
1742         * rendering/SimpleLineLayoutResolver.h: Added.
1743         (WebCore::SimpleLineLayout::Resolver::Line::Line):
1744         (WebCore::SimpleLineLayout::Resolver::Line::rect):
1745         (WebCore::SimpleLineLayout::Resolver::Line::baseline):
1746         (WebCore::SimpleLineLayout::Resolver::Line::text):
1747         (WebCore::SimpleLineLayout::Resolver::Iterator::Iterator):
1748         (WebCore::SimpleLineLayout::Resolver::Iterator::operator++):
1749         (WebCore::SimpleLineLayout::Resolver::Iterator::operator--):
1750         (WebCore::SimpleLineLayout::Resolver::Iterator::operator==):
1751         (WebCore::SimpleLineLayout::Resolver::Iterator::operator!=):
1752         (WebCore::SimpleLineLayout::Resolver::Iterator::operator*):
1753         
1754             Lazy iterator for deriving line metrics. This keeps the line data structure small as
1755             we don't need to keep easily derived values around.
1756
1757         (WebCore::SimpleLineLayout::Resolver::Resolver):
1758         (WebCore::SimpleLineLayout::Resolver::size):
1759         (WebCore::SimpleLineLayout::Resolver::begin):
1760         (WebCore::SimpleLineLayout::Resolver::end):
1761         (WebCore::SimpleLineLayout::Resolver::last):
1762         (WebCore::SimpleLineLayout::Resolver::operator[]):
1763
1764 2013-10-24  Myles C. Maxfield  <mmaxfield@apple.com>
1765
1766         Gaps between underlines in adjacent underlined text runs
1767         https://bugs.webkit.org/show_bug.cgi?id=123236
1768
1769         Reviewed by Simon Fraser and Darin Adler.
1770
1771         There are two pieces to this change. The first piece is in
1772         InlineTextBox::paint(). We were putting floating-point
1773         extents into a LayoutSize, which simply uses ints (for now),
1774         and then immediately converting this back to a FloatSize.
1775         Instead, we should be using floats throughout all of
1776         this code.
1777
1778         In addition, inside GraphicsContext::drawLineForText(), we are
1779         rounding the underline to pixel boundaries so that it appears
1780         very crisp on the screen. However, we should round once after
1781         performing computations, rather than rounding twice and then
1782         performing computations on the rounded numbers.
1783
1784         Test: fast/css3-text/css3-text-decoration/no-gap-between-two-rounded-textboxes.html
1785
1786         * platform/graphics/cg/GraphicsContextCG.cpp:
1787         (WebCore::GraphicsContext::drawLineForText): Change rounding mode
1788             to perform computations before rounding
1789         * rendering/InlineTextBox.cpp:
1790         (WebCore::InlineTextBox::paint): Don't convert to a LayoutSize
1791             just to convert to a FloatSize
1792
1793 2013-10-24  Andreas Kling  <akling@apple.com>
1794
1795         SVGRenderingContext should wrap a RenderElement.
1796         <https://webkit.org/b/123283>
1797
1798         The SVG rendering context class is never used with text renderers
1799         so we can have it wrap a RenderElement for tighter code.
1800
1801         Also renamed SVGRenderingContext::m_object to m_renderer.
1802
1803         Reviewed by Antti Koivisto.
1804
1805 2013-10-24  Santosh Mahto  <santosh.ma@samsung.com>
1806
1807         [contenteditable] Content after non-editable element disappears when merging lines using backspace
1808         https://bugs.webkit.org/show_bug.cgi?id=122748
1809
1810         Reviewed by Ryosuke Niwa.
1811
1812         In case of paragraph merging after deletion if second paragraph
1813         contains non-editable element, then content after the non-editable
1814         element(including non-editable element) will be removed while the
1815         content before the element will be merged with the first paragraph.
1816         This happens becasue endOfParagraphToMove calculation in merging function
1817         stop at editing boundary so endOfParagraphToMove becomes position just
1818         before non-editable content.
1819         With this patch now endOfParagraphToMove is calculated by skipping
1820         over the non-editable element.
1821
1822         Test: editing/deleting/merge-paragraph-contatining-noneditable.html
1823
1824         * editing/DeleteSelectionCommand.cpp:
1825         (WebCore::DeleteSelectionCommand::mergeParagraphs): use CanSkipOverEditingBoundary
1826         condition while calculating endOfParagraphToMove.
1827
1828 2013-10-24  Antoine Quint  <graouts@apple.com>
1829
1830         Web Inspector: Inspector doesn't show webkitTransitionEnd events in the timeline
1831         https://bugs.webkit.org/show_bug.cgi?id=123263
1832
1833         Reviewed by Timothy Hatcher.
1834
1835         A legacy event type is only set on an event in EventTarget::fireEventListeners(Event*)
1836         which is called after we used to call InspectorInstrumentation::willDispatchEvent(), the method
1837         that would ultimately yield the creation of a TimelineRecord for the event in the Web Inspector
1838         frontend, and as a result we would try to dispatch an event with an unprefixed event type to
1839         the frontend, which wouldn't even happen because most likely it wouldn't have listeners for this
1840         unprefixed type.
1841
1842         We now move the call to InspectorInstrumentation::willDispatchEvent() in
1843         EventTarget::fireEventListeners(Event*, EventTargetData*, EventListenerVector&) such that the
1844         correct event type and list of listeners is used to determine what event to dispatch to the frontend.
1845
1846         * dom/EventDispatcher.cpp:
1847         (WebCore::EventDispatcher::dispatchEvent):
1848         Remove calls to InspectorInstrumentation::willDispatchEvent() and InspectorInstrumentation::didDispatchEvent().
1849
1850         * dom/EventTarget.cpp:
1851         (WebCore::EventTarget::fireEventListeners):
1852         Add call to InspectorInstrumentation::willDispatchEvent() before we go through each listener and
1853         call InspectorInstrumentation::willHandleEvent(). Additionally, we refactor some code since we're
1854         getting references to the ScriptExecutionContext and Document upfront now.
1855
1856 2013-10-24  Andreas Kling  <akling@apple.com>
1857
1858         SVG: RenderElement-ize intersectRepaintRectWithResources().
1859         <https://webkit.org/b/123278>
1860
1861         SVGRenderSupport::intersectRepaintRectWithResources() is only ever
1862         called with non-text renderers so make it take RenderElement&.
1863
1864         Had to tweak RenderSVGResource::resourceBoundingBox() to take the
1865         renderer by reference.
1866
1867         Reviewed by Antti Koivisto.
1868
1869 2013-10-24  Joseph Pecoraro  <pecoraro@apple.com>
1870
1871         Web Inspector: Breakpoints in sourceURL named scripts do not work
1872         https://bugs.webkit.org/show_bug.cgi?id=123231
1873
1874         Reviewed by Timothy Hatcher.
1875
1876         Remember a Script's sourceURL and sourceMappingURL. When setting a
1877         breakpoint by URL, check it against the sourceURL or original URL.
1878         If a script had a sourceURL that would have been the only URL sent
1879         to the frontend, so that receives priority.
1880
1881         Test: inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html
1882
1883         * inspector/InspectorDebuggerAgent.cpp:
1884         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1885         (WebCore::InspectorDebuggerAgent::didParseSource):
1886         * inspector/InspectorDebuggerAgent.h:
1887         * inspector/ScriptDebugListener.h:
1888
1889 2013-10-23  Alexey Proskuryakov  <ap@apple.com>
1890
1891         Add CryptoKey base class and bindings
1892         https://bugs.webkit.org/show_bug.cgi?id=123216
1893
1894         Reviewed by Sam Weinig.
1895
1896         * crypto/CryptoKey.idl: Added.
1897
1898         * CMakeLists.txt:
1899         * DerivedSources.make:
1900         * GNUmakefile.list.am:
1901         Process the IDL.
1902
1903         * WebCore.xcodeproj/project.pbxproj: Added files.
1904
1905         * bindings/js/JSCryptoKeyCustom.cpp: Added.
1906         (WebCore::JSCryptoKey::algorithm): Use a visitor to build algorithm dictionary
1907         for the key.
1908
1909         * crypto/CryptoAlgorithmDescriptionBuilder.cpp: Added.
1910         * crypto/CryptoAlgorithmDescriptionBuilder.h: Added.
1911         An interface for a visitor we'll use to expose CrytoKey.algorithm in bindings,
1912         and possibly also for storage serialization. Not complete yet, we'll need support
1913         for a few more simple types, and less trivially, for nested algorithms.
1914
1915         * bindings/js/JSCryptoAlgorithmBuilder.cpp: Added.
1916         * bindings/js/JSCryptoAlgorithmBuilder.h: Added.
1917         An implementation that builds an algorithm description dictionary for JS bindings.
1918
1919         * crypto/CryptoKey.cpp: Added.
1920         (WebCore::CryptoKey::~CryptoKey):
1921         (WebCore::CryptoKey::buildAlgorithmDescription):
1922         * crypto/CryptoKey.h: Added.
1923         Added an almost empty implementation. Some of the functions that are currently
1924         marked as pure virtual will likely be implemented in this base class.
1925
1926 2013-10-24  Commit Queue  <commit-queue@webkit.org>
1927
1928         Unreviewed, rolling out r157916.
1929         http://trac.webkit.org/changeset/157916
1930         https://bugs.webkit.org/show_bug.cgi?id=123274
1931
1932         Broke Layout/flexbox-lots-of-data.html on perfbot (Requested
1933         by ap on #webkit).
1934
1935         * rendering/RenderFlexibleBox.cpp:
1936         (WebCore::RenderFlexibleBox::OrderHashTraits::emptyValue):
1937         (WebCore::RenderFlexibleBox::OrderHashTraits::constructDeletedValue):
1938         (WebCore::RenderFlexibleBox::OrderHashTraits::isDeletedValue):
1939         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
1940         (WebCore::RenderFlexibleBox::layoutBlock):
1941         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1942         * rendering/RenderFlexibleBox.h:
1943
1944 2013-10-24  Zan Dobersek  <zdobersek@igalia.com>
1945
1946         Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose
1947         https://bugs.webkit.org/show_bug.cgi?id=123252
1948
1949         Reviewed by Darin Adler.
1950
1951         Shorten the comment about the crash avoidance in ScopedEventQueue::dispatchEvent due to
1952         the calling convention in C++ is left unspecified. The problem was already fixed in r157219
1953         and later adjusted in r157401, but the comment could have been shorter and simpler in both cases.
1954
1955         * dom/ScopedEventQueue.cpp:
1956         (WebCore::ScopedEventQueue::dispatchEvent):
1957
1958 2013-10-24  Alex Christensen  <achristensen@webkit.org>
1959
1960         Removed unused ThreadSafeCoordinatedSurface and CertificateInfoCurl files.
1961         https://bugs.webkit.org/show_bug.cgi?id=123246
1962
1963         Reviewed by Noam Rosenthal.
1964
1965         * WebCore.vcxproj/WebCore.vcxproj:
1966         * WebCore.vcxproj/WebCore.vcxproj.filters:
1967         Removed references to ThreadSafeCoordinatedSurface and CertificateInfoCurl.
1968         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Removed.
1969         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Removed.
1970         * platform/network/curl/CertificateInfoCurl.cpp: Removed.
1971
1972 2013-10-24  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1973
1974         Removed Qt workaround.
1975         https://bugs.webkit.org/show_bug.cgi?id=123258
1976
1977         Reviewed by Csaba Osztrogon√°c.
1978
1979         No change of functionality, no new tests needed.
1980
1981         !$defines case can be removed, because Qt and Android aren't in WebKit trunk,
1982         all ports (Mac,EFL,GTK,Windows) call this script with --defines option now
1983
1984         * css/make-css-file-arrays.pl:
1985
1986 2013-10-24  Antti Koivisto  <antti@apple.com>
1987
1988         Remove a stray space.
1989         
1990         Not reviewed.
1991
1992         * accessibility/AccessibilityRenderObject.cpp:
1993         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1994
1995 2013-10-24  Antti Koivisto  <antti@apple.com>
1996
1997         Element iterator functions should take reference
1998         https://bugs.webkit.org/show_bug.cgi?id=123267
1999
2000         Reviewed by Andreas Kling.
2001
2002         The argument has to be non-null.
2003
2004 2013-10-24  Ryuan Choi  <ryuan.choi@samsung.com>
2005
2006         [EFL] Build break with latest EFL 1.8 libraries.
2007         https://bugs.webkit.org/show_bug.cgi?id=123245
2008
2009         Reviewed by Gyuyoung Kim.
2010
2011         After fixed build break on EFL 1.8 at r138326, EFL libraries are changed
2012         Eo typedef and splitted header files which contain version macro.
2013
2014         * platform/Widget.h: Changed Eo typedef.
2015         * platform/efl/EflScreenUtilities.h: Ditto.
2016         * platform/graphics/Image.h: Ditto.
2017
2018 2013-10-24  Andreas Kling  <akling@apple.com>
2019
2020         RenderSVGResource: Pass RenderElement to fill/strokePaintingResource.
2021         <https://webkit.org/b/123242>
2022
2023         We never pass text renderers to these functions, so make them take
2024         RenderElement instead.
2025
2026         Reviewed by Anders Carlsson.
2027
2028 2013-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2029
2030         [GObject bindings] Make EventTarget interface introspectable
2031         https://bugs.webkit.org/show_bug.cgi?id=77835
2032
2033         Reviewed by Gustavo Noronha Silva.
2034
2035         Add webkit_dom_event_target_add_event_listener_with_closure and
2036         webkit_dom_event_target_remove_event_listener_with_closure to be
2037         used by GObject instrospection bindings. Instead of receving a
2038         GCallback, which makes the function not introspectable, they
2039         receive a GClosure.
2040
2041         * bindings/gobject/GObjectEventListener.cpp:
2042         (WebCore::GObjectEventListener::GObjectEventListener):
2043         (WebCore::GObjectEventListener::~GObjectEventListener):
2044         (WebCore::GObjectEventListener::gobjectDestroyed):
2045         (WebCore::GObjectEventListener::handleEvent):
2046         (WebCore::GObjectEventListener::operator==):
2047         * bindings/gobject/GObjectEventListener.h:
2048         (WebCore::GObjectEventListener::addEventListener):
2049         (WebCore::GObjectEventListener::removeEventListener):
2050         * bindings/gobject/WebKitDOMEventTarget.cpp:
2051         (webkit_dom_event_target_dispatch_event):
2052         (webkit_dom_event_target_add_event_listener):
2053         (webkit_dom_event_target_remove_event_listener):
2054         (webkit_dom_event_target_add_event_listener_with_closure):
2055         (webkit_dom_event_target_remove_event_listener_with_closure):
2056         * bindings/gobject/WebKitDOMEventTarget.h:
2057         * bindings/scripts/CodeGeneratorGObject.pm:
2058         (GenerateEventTargetIface):
2059         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2060         (webkit_dom_test_event_target_dispatch_event):
2061         (webkit_dom_test_event_target_add_event_listener):
2062         (webkit_dom_test_event_target_remove_event_listener):
2063         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
2064         (webkit_dom_test_node_dispatch_event):
2065         (webkit_dom_test_node_add_event_listener):
2066         (webkit_dom_test_node_remove_event_listener):
2067
2068 2013-10-14  Sergio Villar Senin  <svillar@igalia.com>
2069
2070         Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
2071         https://bugs.webkit.org/show_bug.cgi?id=118620
2072
2073         Reviewed by Antti Koivisto.
2074
2075         Turns out that order is extremelly uncommon so using a Vector is
2076         much less expensive. This also special-cases the much common case
2077         of only having order of value 0 by using Vectors with just one
2078         preallocated member.
2079
2080         Also added the performance test that shows a ~1% win when using a
2081         vector instead of the HashSet.
2082
2083         * rendering/RenderFlexibleBox.cpp:
2084         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
2085         (WebCore::RenderFlexibleBox::layoutBlock):
2086         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
2087         * rendering/RenderFlexibleBox.h:
2088
2089 2013-10-23  ChangSeok Oh  <changseok.oh@collabora.com>
2090
2091         Unreviewed build fix since r157823.
2092         FilterOperation::getOperationType() is renamed FilterOperation::type().
2093
2094         * platform/graphics/texmap/TextureMapperGL.cpp:
2095         (WebCore::prepareFilterProgram):
2096         (WebCore::TextureMapperGL::drawTexture):
2097         (WebCore::TextureMapperGL::drawUsingCustomFilter):
2098         (WebCore::TextureMapperGL::drawFiltered):
2099         (WebCore::BitmapTextureGL::applyFilters):
2100         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2101         (WebCore::CoordinatedGraphicsScene::injectCachedCustomFilterPrograms):
2102
2103 2013-10-23  Ryuan Choi  <ryuan.choi@samsung.com>
2104
2105         Unreviewed build fix on CMake based ports when CMAKE_BUILD_TYPE is not given.
2106
2107         When CMAKE_BUILD_TYPE is empty, FIND command will be failed.
2108
2109         * CMakeLists.txt:
2110
2111 2013-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2112
2113         Integrate css3-images image-orientation with existing EXIF support
2114         https://bugs.webkit.org/show_bug.cgi?id=91566
2115
2116         Reviewed by Beth Dakin.
2117
2118         Original patch by David Barr(davidbarr@chromium.org).
2119
2120         This patch passes an information of image orientation into existing EXIF support functions
2121         (draw() functions of image classes mainly). We need to let the functions to know the information
2122         in order to meet the image-orientation requirement.
2123
2124         Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation
2125         The css3-images module specification is at last call.
2126
2127         Test: fast/css/image-orientation/image-orientation.html
2128         Image orientation test is to check if incorrect rotation value can be fixed with correct orientation.
2129
2130         * loader/cache/CachedImage.cpp:
2131         (WebCore::CachedImage::imageSizeForRenderer):
2132         * page/DragController.cpp:
2133         (WebCore::DragController::doImageDrag):
2134         * page/Frame.cpp:
2135         (WebCore::Frame::nodeImage):
2136         * platform/graphics/BitmapImage.cpp:
2137         (WebCore::BitmapImage::updateSize):
2138         (WebCore::BitmapImage::sizeRespectingOrientation):
2139         (WebCore::BitmapImage::drawPattern):
2140         * platform/graphics/BitmapImage.h:
2141         * platform/graphics/CrossfadeGeneratedImage.cpp:
2142         (WebCore::CrossfadeGeneratedImage::draw):
2143         * platform/graphics/CrossfadeGeneratedImage.h:
2144         * platform/graphics/GeneratedImage.h:
2145         * platform/graphics/GradientImage.cpp:
2146         (WebCore::GradientImage::draw):
2147         * platform/graphics/GradientImage.h:
2148         * platform/graphics/Image.cpp:
2149         (WebCore::Image::draw):
2150         (WebCore::Image::drawTiled):
2151         * platform/graphics/Image.h:
2152         * platform/graphics/blackberry/ImageBlackBerry.cpp:
2153         * platform/graphics/cairo/BitmapImageCairo.cpp:
2154         (WebCore::BitmapImage::draw):
2155         * platform/graphics/cg/BitmapImageCG.cpp:
2156         * platform/graphics/cg/PDFDocumentImage.cpp:
2157         (WebCore::PDFDocumentImage::draw):
2158         * platform/graphics/cg/PDFDocumentImage.h:
2159         * platform/graphics/win/ImageCGWin.cpp:
2160         (WebCore::BitmapImage::getHBITMAPOfSize):
2161         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2162         * platform/graphics/wince/ImageBufferWinCE.cpp:
2163         (WebCore::BufferedImage::draw):
2164         * platform/graphics/wince/ImageWinCE.cpp:
2165         (WebCore::BitmapImage::draw):
2166         * platform/mac/DragImageMac.mm:
2167         (WebCore::createDragImageFromImage):
2168         * rendering/RenderEmbeddedObject.cpp:
2169         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2170         * rendering/RenderImage.cpp:
2171         (WebCore::RenderImage::styleDidChange):
2172         * rendering/RenderSnapshottedPlugIn.cpp:
2173         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2174         * rendering/style/RenderStyle.cpp:
2175         (WebCore::RenderStyle::changeRequiresLayout):
2176         * svg/graphics/SVGImage.cpp:
2177         (WebCore::SVGImage::drawForContainer):
2178         (WebCore::SVGImage::nativeImageForCurrentFrame):
2179         (WebCore::SVGImage::draw):
2180         * svg/graphics/SVGImage.h:
2181         * svg/graphics/SVGImageForContainer.cpp:
2182         (WebCore::SVGImageForContainer::draw):
2183         * svg/graphics/SVGImageForContainer.h:
2184
2185 2013-10-23  Andreas Kling  <akling@apple.com>
2186
2187         Tighten typing in SVGInlineTextBox a bit.
2188         <https://webkit.org/b/123238>
2189
2190         Use RenderBoxModelObject& instead of generic RenderObject* in some
2191         places where it happens as a natural consequence of keeping the
2192         original return type from InlineBox::parent()->renderer().
2193
2194         Reviewed by Anders Carlsson.
2195
2196 2013-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2197
2198         Introduce RENDER_OBJECT_TYPE_CASTS to replace manual toFoo() in child render object
2199         https://bugs.webkit.org/show_bug.cgi?id=123150
2200
2201         Reviewed by Andreas Kling.
2202
2203         As a step to let toFoo use TYPE_CASTS_BASE, toRenderFoo() can use it for child render object.
2204         So, this patch introduces RENDER_OBJECT_TYPE_CASTS based on the TYPE_CASTS_BASE. This will
2205         generate plenty more helper functions for render object type cast.
2206
2207         Some unnecessary type casts are fixed by this change.
2208
2209         No new tests, no behavior changes.
2210
2211         * rendering/RenderBlock.h:
2212         * rendering/RenderBlockFlow.h:
2213         * rendering/RenderBox.h:
2214         * rendering/RenderBoxModelObject.h:
2215         * rendering/RenderButton.h:
2216         * rendering/RenderCounter.h:
2217         * rendering/RenderElement.h:
2218         (WebCore::RenderElement::generatingElement):
2219         * rendering/RenderEmbeddedObject.h:
2220         * rendering/RenderFieldset.h:
2221         * rendering/RenderFileUploadControl.h:
2222         * rendering/RenderFlexibleBox.h:
2223         * rendering/RenderFlowThread.h:
2224         * rendering/RenderFrame.h:
2225         * rendering/RenderFrameSet.h:
2226         * rendering/RenderFullScreen.h:
2227         * rendering/RenderHTMLCanvas.h:
2228         * rendering/RenderIFrame.h:
2229         * rendering/RenderImage.h:
2230         * rendering/RenderInline.h:
2231         * rendering/RenderLayerModelObject.h:
2232         * rendering/RenderLineBreak.h:
2233         * rendering/RenderListBox.h:
2234         * rendering/RenderListItem.h:
2235         * rendering/RenderMedia.h:
2236         * rendering/RenderMenuList.h:
2237         * rendering/RenderMeter.h:
2238         * rendering/RenderMultiColumnBlock.h:
2239         * rendering/RenderMultiColumnSet.h:
2240         * rendering/RenderNamedFlowFragment.h:
2241         * rendering/RenderNamedFlowThread.h:
2242         * rendering/RenderObject.h:
2243         * rendering/RenderProgress.h:
2244         * rendering/RenderQuote.h:
2245         * rendering/RenderRegion.h:
2246         * rendering/RenderReplaced.h:
2247         * rendering/RenderRubyRun.h:
2248         * rendering/RenderScrollbarPart.h:
2249         * rendering/RenderSearchField.h:
2250         * rendering/RenderSlider.h:
2251         * rendering/RenderSnapshottedPlugIn.h:
2252         * rendering/RenderTable.h:
2253         * rendering/RenderTableCaption.h:
2254         * rendering/RenderTableCell.h:
2255         * rendering/RenderTableCol.h:
2256         * rendering/RenderTableRow.h:
2257         * rendering/RenderTableSection.h:
2258         * rendering/RenderText.h:
2259         * rendering/RenderTextControl.h:
2260         * rendering/RenderTextControlMultiLine.h:
2261         * rendering/RenderTextControlSingleLine.h:
2262         * rendering/RenderWidget.h:
2263         * rendering/mathml/RenderMathMLBlock.h:
2264         * rendering/svg/RenderSVGContainer.h:
2265         * rendering/svg/RenderSVGGradientStop.h:
2266         * rendering/svg/RenderSVGImage.h:
2267         * rendering/svg/RenderSVGInlineText.h:
2268         * rendering/svg/RenderSVGPath.h:
2269         * rendering/svg/RenderSVGResourceFilter.h:
2270         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
2271         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
2272         * rendering/svg/RenderSVGRoot.h:
2273         * rendering/svg/RenderSVGShape.h:
2274         * rendering/svg/RenderSVGText.h:
2275         * rendering/svg/RenderSVGTextPath.h:
2276         * rendering/svg/RenderSVGViewportContainer.h:
2277         * rendering/svg/SVGInlineFlowBox.cpp:
2278         (WebCore::SVGInlineFlowBox::paint):
2279
2280 2013-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
2281
2282         Include misspelling dot gap width when centering misspelling dots
2283         https://bugs.webkit.org/show_bug.cgi?id=122365
2284
2285         Reviewed by Simon Fraser.
2286
2287         When calculating where to place the misspelling dots, we find the
2288         maximum number of full dots that can fit under the misspelled word,
2289         and then center a run of that many dots. However, when we're
2290         centering the run, we are only considering the size of the extra
2291         fractional dot that we cut off. However, the dot image has a "gap"
2292         of transparent pixels (which visually provide tracking for the dots)
2293         which visually appears to be empty space. We should take this gap
2294         space into consideration when centering the run of dots. We also
2295         should make sure that our dots start on integral pixel boundaries
2296         because otherwise we can't set the phase of the dot run properly.
2297
2298         Test: editing/spelling/centering-misspelling-dots.html
2299
2300         * platform/graphics/mac/GraphicsContextMac.mm:
2301         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2302
2303 2013-10-23  Andreas Kling  <akling@apple.com>
2304
2305         SVGFilterBuilder should not be ref-counted.
2306         <https://webkit.org/b/123222>
2307
2308         These objects are singly-owned and do not need ref counting.
2309
2310         Reviewed by Anders Carlsson.
2311
2312 2013-10-23  Brady Eidson  <beidson@apple.com>
2313
2314         Remove unused IDBBackingStoreLevelDB default constructor.
2315
2316         Rubberstamped by Anders Carlsson.
2317
2318         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2319         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2320
2321 2013-10-23  Alex Christensen  <achristensen@webkit.org>
2322
2323         Added Texture Mapper and Coordinated Graphics to Windows build for WinCairo.
2324         https://bugs.webkit.org/show_bug.cgi?id=123215
2325
2326         Reviewed by Brent Fulgham.
2327
2328         * WebCore.vcxproj/WebCore.vcxproj:
2329         * WebCore.vcxproj/WebCore.vcxproj.filters:
2330         Added source files for Texture Mapper to Windows build.
2331         * WebCore.vcxproj/WebCoreCairo.props:
2332         Added Texture Mapper include directories for WinCairo.
2333
2334 2013-10-23  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2335
2336         Adding mock class to test RTCDataChannelHandler
2337         https://bugs.webkit.org/show_bug.cgi?id=123205
2338
2339         Reviewed by Eric Carlson.
2340
2341         Now RTCPeerConnectionHandler-datachannel LayouTest can run properly.
2342         Also updated the expected file, removing the reliable property check (which was removed in the spec)
2343
2344         Existing tests updated.
2345
2346         * CMakeLists.txt:
2347         * platform/mediastream/RTCDataChannelHandlerClient.h:
2348         * platform/mock/RTCDataChannelHandlerMock.cpp: Added.
2349         * platform/mock/RTCDataChannelHandlerMock.h: Added.
2350         * platform/mock/RTCNotifiersMock.cpp:
2351         (WebCore::RemoteDataChannelNotifier::RemoteDataChannelNotifier):
2352         (WebCore::RemoteDataChannelNotifier::fire):
2353         (WebCore::DataChannelStateNotifier::DataChannelStateNotifier):
2354         (WebCore::DataChannelStateNotifier::fire):
2355         * platform/mock/RTCNotifiersMock.h:
2356         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2357         (WebCore::RTCPeerConnectionHandlerMock::createDataChannel):
2358
2359 2013-10-23  Andreas Kling  <akling@apple.com>
2360
2361         Clock should not be ref-counted.
2362         <https://webkit.org/b/123217>
2363
2364         The Clock object is only ever owned by the MediaController,
2365         so remove the ref counting and store it in a std::unique_ptr.
2366
2367         Also slapped the Clock subclasses with FINAL and OVERRIDE.
2368
2369         Reviewed by Anders Carlsson.
2370
2371 2013-10-23  Mark Lam  <mark.lam@apple.com>
2372
2373         Fix assertion in DatabaseManager::detailsForNameAndOrigin() to be iOS friendly.
2374         https://bugs.webkit.org/show_bug.cgi?id=123218.
2375
2376         Reviewed by Joseph Pecoraro.
2377
2378         No new tests.
2379
2380         * Modules/webdatabase/DatabaseManager.cpp:
2381         (WebCore::DatabaseManager::detailsForNameAndOrigin):
2382
2383 2013-10-23  Alex Christensen  <achristensen@webkit.org>
2384
2385         Separated USE(CA) from USE(ACCELERATED_COMPOSITING) to prepare WinCairo for accelerated compositing.
2386         https://bugs.webkit.org/show_bug.cgi?id=123214
2387
2388         Reviewed by Brent Fulgham.
2389
2390         * platform/graphics/PlatformLayer.h:
2391         Added TextureMapperPlatformLayer PlatformLayer declaration for WinCairo.
2392         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2393         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow):
2394         (WebCore::MediaPlayerPrivateFullscreenWindow::wndProc):
2395         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
2396         Added USE(CA) where necessary to compile WinCairo with accelerated compositing.
2397
2398 2013-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
2399
2400         Antialias underlines if they're not axis-aligned
2401         https://bugs.webkit.org/show_bug.cgi?id=123004
2402
2403         Reviewed by Simon Fraser.
2404
2405         In order to make underlines crisp, GraphicsContext:drawLineForText
2406         modifies the bounds of the underline rect in order to make the rect
2407         device-pixel-aligned, and then turns off antialiasing when drawing
2408         the line. This makes sense when the underline is axis-aligned, but
2409         doesn't when the rect is rotated or skewed. Therefore, we should
2410         only opt-in to this behavior if the underline we're about to draw
2411         is axis-aligned. This requires figuring out whether or not the
2412         current transformation is axis-aligned every time
2413         GraphicsContext::drawLineForText is called, which will incur a small
2414         performance hit. However, this is justified by underlines looking
2415         much better (antialiased) when the context is rotated or skewed.
2416
2417         Tests: svg/custom/foreign-object-skew.html
2418                svg/zoom/page/zoom-foreignObject.html
2419                svg/zoom/text/zoom-foreignObject.html:
2420
2421         * platform/graphics/cg/GraphicsContextCG.cpp:
2422         (WebCore::GraphicsContext::drawLineForText):
2423
2424 2013-10-23  Mark Lam  <mark.lam@apple.com>
2425
2426         Re-instate ProposedDatabases needed by detailsForNameAndOrigin().
2427         https://bugs.webkit.org/show_bug.cgi?id=123131.
2428
2429         Reviewed by Geoffrey Garen.
2430
2431         Test: storage/websql/open-database-expand-quota.html
2432
2433         If a webpage tries to create a database that exceeds the database size
2434         quota for that security origin, the WebKit1 quota request mechanism
2435         uses detailsForNameAndOrigin() to get the requested size of the database
2436         (that the webpage is attempting to open) in order to determine whether
2437         to increase the quota or not.
2438
2439         Previously, detailsForNameAndOrigin() relies on the ProposedDatabase
2440         mechanism to provide this size information. This change re-instates the
2441         ProposedDatabase mechanism so that WebKit1 client code that relies on
2442         this behavior will continue to work.
2443
2444         * Modules/webdatabase/DatabaseManager.cpp:
2445         (WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
2446         (WebCore::DatabaseManager::ProposedDatabase::~ProposedDatabase):
2447         (WebCore::DatabaseManager::DatabaseManager):
2448         (WebCore::DatabaseManager::openDatabaseBackend):
2449         (WebCore::DatabaseManager::fullPathForDatabase):
2450         (WebCore::DatabaseManager::detailsForNameAndOrigin):
2451         * Modules/webdatabase/DatabaseManager.h:
2452         (WebCore::DatabaseManager::ProposedDatabase::origin):
2453         (WebCore::DatabaseManager::ProposedDatabase::details):
2454
2455 2013-10-23  Tim Horton  <timothy_horton@apple.com>
2456
2457         [cg] Fix the capitalization of kCGImageSourceSkipMetaData (-> Metadata)
2458         https://bugs.webkit.org/show_bug.cgi?id=122918
2459
2460         Reviewed by Anders Carlsson.
2461
2462         * platform/graphics/cg/ImageSourceCG.cpp:
2463         (WebCore::imageSourceOptions):
2464         The capitalization of kCGImageSourceSkipMetaData changed to
2465         kCGImageSourceSkipMetadata in Mountain Lion.
2466
2467 2013-10-23  Brady Eidson  <beidson@apple.com>
2468
2469         Make IDBDatabaseBackendLevelDB.cpp be cross platform
2470         https://bugs.webkit.org/show_bug.cgi?id=123027
2471
2472         Attentively reviewed by Dean Jackson.
2473
2474         Move it out of the indexeddb/leveldb directory, and rename it to IDBDatabaseBackendImpl.
2475
2476         Project files:
2477         * CMakeLists.txt:
2478         * GNUmakefile.list.am:
2479         * WebCore.vcxproj/WebCore.vcxproj:
2480         * WebCore.vcxproj/WebCore.vcxproj.filters:
2481         * WebCore.xcodeproj/project.pbxproj:
2482
2483         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp.
2484         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h.
2485
2486         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2487         (WebCore::IDBDatabaseBackendInterface::isIDBDatabaseBackendImpl): Add to support a required cast in LevelDB code.
2488
2489         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2490
2491         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
2492         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
2493
2494         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2495         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
2496         (WebCore::IDBFactoryBackendLevelDB::open):
2497         (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
2498         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2499
2500         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
2501         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
2502
2503         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2504         (WebCore::IDBTransactionBackendLevelDB::create):
2505         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
2506         (WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation):
2507         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2508
2509         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
2510         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
2511         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
2512         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
2513
2514 2013-10-23  Daniel Bates  <dabates@apple.com>
2515
2516         [iOS] Upstream more ARMv7s bits
2517         https://bugs.webkit.org/show_bug.cgi?id=123052
2518
2519         Reviewed by Joseph Pecoraro.
2520
2521         Define exported symbol file for armv7s and arm64.
2522
2523         * Configurations/WebCore.xcconfig:
2524
2525 2013-10-23  Krzysztof Wolanski  <k.wolanski@samsung.com>
2526
2527         [GTK] accessibility/self-referencing-aria-labelledby.html is failing
2528         https://bugs.webkit.org/show_bug.cgi?id=121594
2529
2530         Reviewed by Mario Sanchez Prada.
2531
2532         According to http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG
2533         description of image element should be determined by alt attribute, then
2534         if it is empty by title attributte.
2535
2536         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2537         (webkitAccessibleGetDescription):
2538
2539 2013-10-15  Andreas Kling  <akling@apple.com>
2540
2541         Tighten animation-driven restyle to operate on Element only.
2542         <https://webkit.org/b/122820>
2543
2544         Text nodes are never directly animated, so we can tighten this code
2545         to work on Element only. This happens naturally since the code was
2546         already working with RenderElement everywhere.
2547
2548         Reviewed by Antti Koivisto.
2549
2550 2013-10-22  Andreas Kling  <akling@apple.com>
2551
2552         Even more PassRef<RenderStyle>!
2553         <https://webkit.org/b/123147>
2554
2555         Convert more of the WebCore code to use PassRef for RenderStyle
2556         in places where they are known to be non-null.
2557
2558         Re-landing this without region styling since that caused some
2559         assertions last time.
2560
2561         Reviewed by Antti Koivisto.
2562
2563 2013-10-22  Zoltan Horvath  <zoltan@webkit.org>
2564
2565         Refactor LineBreaker::nextSegmentBreak, add BreakingContext that holds all its state
2566         https://bugs.webkit.org/show_bug.cgi?id=123038
2567
2568         Reviewed by David Hyatt.
2569
2570         I followed Levi's logic on Blink's nextSegmentBreak refactoring (https://chromiumcodereview.appspot.com/25054004). 
2571         I mostly did the same changes, but the code is too diverged at this point to just apply that patch on our trunk. The patch
2572         introduces BreakingContext as a separate class. I added new methods for each condition, which were originally located in
2573         nextSegmentBreak. I also removed the goto-s from the code. All the new methods are inline in order to avoid introducing any
2574         performance regression. The change makes the code so much cleaner and understandable.
2575
2576         This change would be the first step of the nextSegmentBreak refactoring, I wanted to keep things in place in RenderBlockLineLayout.cpp
2577         for now, but I'm planning to separate BreakingContext into a new file and do additional changes to make things nicer. I'm tracking
2578         the entire progress under http://webkit.org/b/121261 meta bug.
2579
2580         No new tests, covered by existing tests.
2581         - I updated 1 expected result, because there was a 1 pixel difference on the result, which I believe comes from a rounding situation.
2582
2583         * rendering/RenderBlockFlow.h:
2584         * rendering/RenderBlockLineLayout.cpp:
2585         (WebCore::BreakingContext::BreakingContext):
2586         (WebCore::BreakingContext::currentObject):
2587         (WebCore::BreakingContext::lineBreak):
2588         (WebCore::BreakingContext::lineBreakRef):
2589         (WebCore::BreakingContext::lineWidth):
2590         (WebCore::BreakingContext::atEnd):
2591         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
2592         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
2593         (WebCore::BreakingContext::initializeForCurrentObject):
2594         (WebCore::BreakingContext::increment):
2595         (WebCore::BreakingContext::handleBR):
2596         (WebCore::BreakingContext::handleOutOfFlowPositioned):
2597         (WebCore::BreakingContext::handleFloat):
2598         (WebCore::BreakingContext::handleEmptyInline):
2599         (WebCore::BreakingContext::handleReplaced):
2600         (WebCore::nextCharacter):
2601         (WebCore::BreakingContext::handleText):
2602         (WebCore::textBeginsWithBreakablePosition):
2603         (WebCore::BreakingContext::canBreakAtThisPosition):
2604         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2605         (WebCore::BreakingContext::handleEndOfLine):
2606         (WebCore::LineBreaker::nextSegmentBreak):
2607
2608 2013-10-22  Commit Queue  <commit-queue@webkit.org>
2609
2610         Unreviewed, rolling out r157826.
2611         http://trac.webkit.org/changeset/157826
2612         https://bugs.webkit.org/show_bug.cgi?id=123197
2613
2614         Caused some regions tests to assert (Requested by smfr on
2615         #webkit).
2616
2617         * dom/Document.cpp:
2618         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
2619         * dom/Document.h:
2620         * dom/Element.cpp:
2621         (WebCore::Element::styleForRenderer):
2622         * dom/Element.h:
2623         * dom/ElementRareData.h:
2624         (WebCore::ElementRareData::setComputedStyle):
2625         (WebCore::ElementRareData::resetComputedStyle):
2626         * html/HTMLTitleElement.cpp:
2627         (WebCore::HTMLTitleElement::textWithDirection):
2628         * page/animation/AnimationController.cpp:
2629         (WebCore::AnimationController::updateAnimations):
2630         * page/animation/CompositeAnimation.cpp:
2631         (WebCore::CompositeAnimation::animate):
2632         * page/animation/CompositeAnimation.h:
2633         * rendering/RenderElement.cpp:
2634         (WebCore::RenderElement::createFor):
2635         * rendering/RenderElement.h:
2636         (WebCore::RenderElement::setStyleInternal):
2637         * rendering/RenderRegion.cpp:
2638         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
2639         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
2640         (WebCore::RenderRegion::computeStyleInRegion):
2641         (WebCore::RenderRegion::computeChildrenStyleInRegion):
2642         (WebCore::RenderRegion::setObjectStyleInRegion):
2643         * rendering/RenderRegion.h:
2644         * style/StyleResolveTree.cpp:
2645         (WebCore::Style::resolveLocal):
2646
2647 2013-10-22  Ryuan Choi  <ryuan.choi@samsung.com>
2648
2649         [EFL] Remove HAVE_GLX macro
2650         https://bugs.webkit.org/show_bug.cgi?id=123191
2651
2652         Reviewed by Gyuyoung Kim.
2653
2654         Since r138313, HAVE(GLX) was replaced to USE(GLX) except in GraphicsSurfaceToken.h.
2655
2656         * platform/graphics/surfaces/GraphicsSurfaceToken.h:
2657         Replace HAVE(GLX) to USE(GLX)
2658
2659 2013-10-22  Mark Lam  <mark.lam@apple.com>
2660
2661         Gardening: fix broken build on Windows.
2662         https://bugs.webkit.org/show_bug.cgi?id=123174.
2663
2664         Not reviewed.
2665
2666         No new tests.
2667
2668         * WebCore.vcxproj/WebCore.vcxproj:
2669         * WebCore.vcxproj/WebCore.vcxproj.filters:
2670
2671 2013-10-22  Brady Eidson  <beidson@apple.com>
2672
2673         Get rid of IDBObjectStoreBackendLevelDB
2674         https://bugs.webkit.org/show_bug.cgi?id=123174
2675
2676         Reviewed by Tim Horton.
2677
2678         This file was kind of a dumping ground.
2679         Its contents can be merged into IDBBackingStoreInterface and a new IDBIndexWriter class.
2680
2681         Also took the opportunity to do a little bit of RefPtr<> and pointer-vs-reference cleanup.
2682
2683         * CMakeLists.txt:
2684         * GNUmakefile.list.am:
2685         * WebCore.xcodeproj/project.pbxproj:
2686
2687         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Removed.
2688         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Removed.
2689
2690         * Modules/indexeddb/IDBIndexWriter.cpp: Added.
2691         (WebCore::IDBIndexWriter::IDBIndexWriter):
2692         (WebCore::IDBIndexWriter::writeIndexKeys):
2693         (WebCore::IDBIndexWriter::verifyIndexKeys):
2694         (WebCore::IDBIndexWriter::addingKeyAllowed):
2695         * Modules/indexeddb/IDBIndexWriter.h: Added.
2696         (WebCore::IDBIndexWriter::create):
2697
2698         * Modules/indexeddb/IDBBackingStoreInterface.h:
2699         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2700
2701         * Modules/indexeddb/IDBMetadata.h:
2702         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2703
2704         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2705         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
2706         (WebCore::IDBBackingStoreLevelDB::generateKey):
2707         (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
2708         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2709
2710         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
2711         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
2712         (WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
2713         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
2714
2715         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2716         (WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
2717         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2718
2719         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
2720         (WebCore::PutOperation::perform):
2721         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
2722         (WebCore::PutOperation::create):
2723         (WebCore::PutOperation::PutOperation):
2724
2725 2013-10-22  Dean Jackson  <dino@apple.com>
2726
2727         [WebGL] Implement a software rendering option on Mac
2728         https://bugs.webkit.org/show_bug.cgi?id=123177
2729
2730         Reviewed by Tim Horton.
2731
2732         Implement a way to force software OpenGL rendering
2733         for WebGL, via a Setting/Preference.
2734
2735         No new tests. We intentionally hide the capabilities of
2736         the renderer from the content, so you can't test for
2737         this setting. However, manual inspection is pretty
2738         obvious. Just go to a page with a complex shader
2739         such as https://www.shadertoy.com/view/lss3WS.
2740
2741         * html/canvas/WebGLRenderingContext.cpp:
2742         (WebCore::WebGLRenderingContext::create): If we're forcing software
2743         rendering, mark the context attributes as such.
2744         * page/Settings.in: New setting key.
2745         * platform/graphics/GraphicsContext3D.h: New flag in Attributes.
2746         (WebCore::GraphicsContext3D::Attributes::Attributes):
2747         * platform/graphics/mac/GraphicsContext3DMac.mm:
2748         (WebCore::GraphicsContext3D::GraphicsContext3D): Slight update to the
2749         algorithm that sets a pixel format. If we're forcing software rendering,
2750         obviously we never want to create an accelerated pixel format.
2751         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
2752         (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): Set the attribute
2753         here before trying to create the context.
2754         * platform/graphics/filters/CustomFilterGlobalContext.h: Add a forceSoftwareRendering
2755         flag to prepareContextIfNeeded.
2756         * rendering/FilterEffectRenderer.cpp:
2757         (WebCore::createCustomFilterEffect): Check the Setting before creating a custom
2758         filter context.
2759
2760 2013-10-22  Anders Carlsson  <andersca@apple.com>
2761
2762         Revert r157445 since it broke certificates on Mac.
2763         <rdar://problem/15246926&15254017&15269117>
2764
2765         * GNUmakefile.list.am:
2766         * PlatformEfl.cmake:
2767         * WebCore.exp.in:
2768         * WebCore.vcxproj/WebCore.vcxproj:
2769         * WebCore.vcxproj/WebCore.vcxproj.filters:
2770         * WebCore.xcodeproj/project.pbxproj:
2771         * platform/network/ResourceErrorBase.h:
2772         * platform/network/ResourceResponseBase.h:
2773         * platform/network/cf/CertificateInfoCFNet.cpp: Removed.
2774         * platform/network/cf/ResourceResponse.h:
2775         * platform/network/mac/ResourceResponseMac.mm:
2776         (WebCore::ResourceResponse::setCertificateChain):
2777         (WebCore::ResourceResponse::certificateChain):
2778         * platform/network/soup/ResourceError.h:
2779         (WebCore::ResourceError::ResourceError):
2780         (WebCore::ResourceError::tlsErrors):
2781         (WebCore::ResourceError::setTLSErrors):
2782         (WebCore::ResourceError::certificate):
2783         (WebCore::ResourceError::setCertificate):
2784         * platform/network/soup/ResourceErrorSoup.cpp:
2785         (WebCore::ResourceError::tlsError):
2786         (WebCore::ResourceError::platformCopy):
2787         (WebCore::ResourceError::platformCompare):
2788         * platform/network/soup/ResourceResponse.h:
2789         (WebCore::ResourceResponse::ResourceResponse):
2790         (WebCore::ResourceResponse::soupMessageCertificate):
2791         (WebCore::ResourceResponse::setSoupMessageCertificate):
2792         (WebCore::ResourceResponse::soupMessageTLSErrors):
2793         (WebCore::ResourceResponse::setSoupMessageTLSErrors):
2794         * platform/network/soup/ResourceResponseSoup.cpp:
2795         (WebCore::ResourceResponse::toSoupMessage):
2796         (WebCore::ResourceResponse::updateFromSoupMessage):
2797
2798 2013-10-22  Jer Noble  <jer.noble@apple.com>
2799
2800         [Media] Refactor supportsType() factory method to take a parameters object.
2801         https://bugs.webkit.org/show_bug.cgi?id=122489
2802
2803         Reviewed by Eric Carlson.
2804
2805         In order to support adding new conditional properties with which to decide
2806         what MediaPlayerPrivate subclass to create, replace the two versions of the
2807         supportsType() factory method with a single one taking a parameters object.
2808
2809         At the same time, add a 'isMediaSource' parameter to that object, allowing
2810         MediaPlayerPrivate subclasses which support the same type and codecs but
2811         which do not both support MediaSource to be distinguised.
2812
2813         * platform/graphics/MediaPlayer.cpp:
2814         (WebCore::bestMediaEngineForSupportParameters): Renamed from
2815             bestMediaEngineForTypeAndCodecs.
2816         (WebCore::MediaPlayer::nextBestMediaEngine): Added convenience function.
2817         (WebCore::MediaPlayer::loadWithNextMediaEngine): Call nextBestMediaEngine()
2818         (WebCore::MediaPlayer::supportsType): Pass parameter object.
2819         (WebCore::MediaPlayer::networkStateChanged): Call nextBestMediaEngine().
2820         * platform/graphics/MediaPlayer.h:
2821         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2822         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Handle parameter object.
2823         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2824         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2825         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2826         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Remove extraneous
2827             extendedSupportsType method.
2828         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Handle parameter object.
2829         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2830         (WebCore::MediaPlayerPrivate::supportsType): Ditto.
2831         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2832         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2833         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2834         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2835         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2836         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Remove extraneous
2837             extendedSupportsType method.
2838         (WebCore::MediaPlayerPrivateQTKit::supportsType): Handle parameter object.
2839         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2840         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType): Ditto.
2841         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
2842         * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
2843
2844 2013-10-22  Andreas Kling  <akling@apple.com>
2845
2846         Merge SVGRenderBlock::styleWillChange() into styleDidChange().
2847         <https://webkit.org/b/123181>
2848
2849         I meant to do this one in r157787, but better late than never.
2850
2851         Reviewed by Geoffrey Garen.
2852
2853 2013-10-22  Sam Weinig  <sam@webkit.org>
2854
2855         CTTE: Modernize RenderBlock a bit
2856         https://bugs.webkit.org/show_bug.cgi?id=123162
2857
2858         Reviewed by Andreas Kling.
2859
2860         Start threading references through RenderBlock. While we 
2861         are here, do some selective modernization as well.
2862
2863 2013-10-22  Andreas Kling  <akling@apple.com>
2864
2865         Even more PassRef<RenderStyle>!
2866         <https://webkit.org/b/123147>
2867
2868         Convert the remaining WebCore code to use PassRef for RenderStyle
2869         wherever they are known to be non-null.
2870
2871         Reviewed by Antti Koivisto.
2872
2873 2013-10-22  Commit Queue  <commit-queue@webkit.org>
2874
2875         Unreviewed, rolling out r157819.
2876         http://trac.webkit.org/changeset/157819
2877         https://bugs.webkit.org/show_bug.cgi?id=123180
2878
2879         Broke 32-bit builds (Requested by smfr on #webkit).
2880
2881         * Configurations/WebCore.xcconfig:
2882
2883 2013-10-22  Antti Koivisto  <antti@apple.com>
2884
2885         Rename deleteLineBoxTree to deleteLines
2886         https://bugs.webkit.org/show_bug.cgi?id=123176
2887
2888         Reviewed by Andreas Kling.
2889
2890         RenderBlock::deleteLineBoxTree -> RenderBlock::deleteLines
2891         RenderInline::deleteLineBoxTree -> RenderInline::deleteLines
2892
2893 2013-10-22  Tim Horton  <timothy_horton@apple.com>
2894
2895         {ClipPathOperation, FilterOperation}::getOperationType() should not include 'get'
2896         https://bugs.webkit.org/show_bug.cgi?id=123172
2897
2898         Reviewed by Simon Fraser.
2899
2900         No new tests, just a rename.
2901
2902         "get" in WebCore tends to mean that the function has out arguments; these have no arguments.
2903         Rename FilterOperation::getOperationType() to FilterOperation::type().
2904         I noticed that ClipPathOperation had the same mistake, so I fixed it there too.
2905
2906         Removed long and useless list of files.
2907
2908 2013-10-22  Samuel White  <samuel_white@apple.com>
2909
2910         AX: Add paramAttrs to fetch start and end text markers in a given rect.
2911         https://bugs.webkit.org/show_bug.cgi?id=122164
2912
2913         Reviewed by Chris Fleizach.
2914
2915         Added ability to fetch end and start text markers inside a given bounds. This gives ScreenReaders
2916         like VoiceOver a way to retrieve the text markers for a specified column of page text.
2917
2918         Test: platform/mac/accessibility/text-marker-for-bounds.html
2919
2920         * accessibility/AccessibilityObject.cpp:
2921         (WebCore::AccessibilityObject::mainFrame):
2922         (WebCore::AccessibilityObject::topDocument):
2923         (WebCore::AccessibilityObject::visiblePositionForBounds):
2924         * accessibility/AccessibilityObject.h:
2925         * accessibility/AccessibilityRenderObject.cpp:
2926         * accessibility/AccessibilityRenderObject.h:
2927         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2928         (-[WebAccessibilityObjectWrapper screenToContents:]):
2929         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2930         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2931
2932 2013-10-22  Zoltan Horvath  <zoltan@webkit.org>
2933
2934         [CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementation with Blink's
2935         https://bugs.webkit.org/show_bug.cgi?id=123033
2936
2937         Reviewed by David Hyatt.
2938
2939         In Blink I made this function in a bit different way. This change modifies it
2940         to be identical, which helps a lot in the future cross-merging patches.
2941
2942         No new tests, covered by existing texts.
2943
2944         * rendering/RenderBlockLineLayout.cpp:
2945         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
2946
2947 2013-10-22  Daniel Bates  <dabates@apple.com>
2948
2949         [iOS] Upstream more ARMv7s bits
2950         https://bugs.webkit.org/show_bug.cgi?id=123052
2951
2952         Reviewed by Joseph Pecoraro.
2953
2954         * Configurations/WebCore.xcconfig:
2955
2956 2013-10-22  Simon Fraser  <simon.fraser@apple.com>
2957
2958         Try to fix Mavericks build; use <> for framework include.
2959
2960         * page/CaptionUserPreferencesMediaAF.cpp:
2961
2962 2013-10-22  Tim Horton  <timothy_horton@apple.com>
2963
2964         GammaFilterOperation seems to be dead code
2965         https://bugs.webkit.org/show_bug.cgi?id=123173
2966
2967         Reviewed by Simon Fraser.
2968
2969         * platform/graphics/filters/FilterOperation.cpp:
2970         * platform/graphics/filters/FilterOperation.h:
2971         Remove dead code.
2972
2973 2013-10-22  Antti Koivisto  <antti@apple.com>
2974
2975         Rename some line box functions to be just about lines
2976         https://bugs.webkit.org/show_bug.cgi?id=123168
2977
2978         Reviewed by Dave Hyatt.
2979
2980         firstLineBoxBaseline -> firstLineBaseline
2981         hasInlineBoxChildren -> hasLines
2982         
2983         Also use hasLines in a bunch of places where firstLineBox() was used.
2984
2985         * accessibility/AccessibilityRenderObject.cpp:
2986         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2987         
2988             Also use hasRenderedText() instead of firstTextBox()
2989
2990         * rendering/RenderFullScreen.cpp:
2991         
2992             Fix namespace.
2993
2994 2013-10-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2995
2996         Adding Mock class to test RTCPeerConnection
2997         https://bugs.webkit.org/show_bug.cgi?id=122848
2998
2999         Reviewed by Eric Carlson.
3000
3001         The following tests can be run:
3002
3003             RTCPeerConnection-createAnswer.html
3004             RTCPeerConnection-createOffer.html
3005             RTCPeerConnection-ice.html
3006             RTCPeerConnection-localDescription.html
3007             RTCPeerConnection-remoteDescription.html
3008             RTCPeerConnection-state.html
3009
3010         Tests that require a MediaStream object, by invoking getUserMedia,
3011         are not ready to run yet.
3012
3013         No new tests needed.
3014
3015         * CMakeLists.txt:
3016         * platform/mediastream/RTCPeerConnectionHandler.cpp:
3017         (WebCore::createHandler):
3018         * platform/mediastream/RTCPeerConnectionHandler.h:
3019         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3020         * platform/mock/RTCNotifiersMock.cpp: Added.
3021         * platform/mock/RTCNotifiersMock.h: Added.
3022         * platform/mock/RTCPeerConnectionHandlerMock.cpp: Added.
3023         * platform/mock/RTCPeerConnectionHandlerMock.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
3024         * platform/mock/TimerEventBasedMock.h: Added.
3025         * testing/Internals.cpp:
3026         (WebCore::Internals::Internals):
3027         (WebCore::Internals::enableMockRTCPeerConnectionHandler):
3028         * testing/Internals.h:
3029
3030 2013-10-22  Zan Dobersek  <zdobersek@igalia.com>
3031
3032         WebCore::fillWithEmptyClients adopts new empty clients before leaking their pointers
3033         https://bugs.webkit.org/show_bug.cgi?id=122945
3034
3035         Reviewed by Anders Carlsson.
3036
3037         * loader/EmptyClients.cpp:
3038         (WebCore::fillWithEmptyClients): Store the static empty clients as NeverDestroyed, rather than
3039         adopting the pointer of each heap-allocated object and then immediately leaking that pointer.
3040
3041 2013-10-22  Zan Dobersek  <zdobersek@igalia.com>
3042
3043         Simplify HRTFDatabaseLoader's load map
3044         https://bugs.webkit.org/show_bug.cgi?id=122944
3045
3046         Reviewed by Eric Carlson.
3047
3048         * platform/audio/HRTFDatabaseLoader.cpp:
3049         (WebCore::loaderMap): Return a reference to a NeverDestroyed HashMap that maps sample rates to loaders.
3050         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
3051         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
3052         * platform/audio/HRTFDatabaseLoader.h: Remove the LoaderMap type definition, the private singleton of that type
3053         and the singleton's unused getter.
3054
3055 2013-10-22  Tim Horton  <timothy_horton@apple.com>
3056
3057         Remote Layer Tree: Support hardware accelerated filters
3058         https://bugs.webkit.org/show_bug.cgi?id=123139
3059
3060         Reviewed by Anders Carlsson.
3061
3062         * WebCore.exp.in:
3063         Export a variety of filter-related things.
3064
3065         * platform/graphics/ca/PlatformCAFilters.h:
3066         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
3067         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3068         (PlatformCALayerMac::setFilters):
3069         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
3070         (PlatformCAFilters::setFiltersOnLayer):
3071         setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer
3072         as its argument, because it doesn't need a PlatformCALayer, and this way
3073         we can share code with the RemoteLayerTreeHost, which only has PlatformLayers
3074         and not PlatformCALayers.
3075
3076 2013-10-22  Brendan Long  <b.long@cablelabs.com>
3077
3078         cue.text fails for some track element cues
3079         https://bugs.webkit.org/show_bug.cgi?id=81123
3080
3081         Reviewed by Eric Carlson.
3082
3083         Test: media/track/track-long-captions-file.html
3084
3085         * html/track/WebVTTParser.cpp:
3086         (WebCore::WebVTTParser::parseBytes): Use buffer when we don't have full lines.
3087         (WebCore::WebVTTParser::fileFinished): Force file to finish parsing.
3088         (WebCore::WebVTTParser::hasRequiredFileIdentifier): Simplify due to using String.
3089         (WebCore::WebVTTParser::collectCueText): Don't automatically create cues when we run out of data.
3090         (WebCore::WebVTTParser::collectNextLine): Use buffer.
3091         * html/track/WebVTTParser.h: Add m_buffer and Finished state.
3092         * loader/TextTrackLoader.cpp:
3093         (WebCore::TextTrackLoader::notifyFinished): Call m_parser->fileFinished() when done.
3094
3095 2013-10-22  peavo@outlook.com  <peavo@outlook.com>
3096
3097         [WinCairo] Compile error.
3098         https://bugs.webkit.org/show_bug.cgi?id=123161
3099
3100         Reviewed by Brent Fulgham.
3101
3102         * rendering/RenderFlowThread.h: Move USE(ACCELERATED_COMPOSITING) guard to expose needed type.
3103
3104 2013-10-21  Brady Eidson  <beidson@apple.com>
3105
3106         Add a cross-platform IDBRecordIdentifier
3107         https://bugs.webkit.org/show_bug.cgi?id=123138
3108
3109         Reviewed by Andreas Kling.
3110
3111         Add the cross-platform header:
3112         * Modules/indexeddb/IDBRecordIdentifier.h: Added.
3113         (WebCore::IDBRecordIdentifier::create):
3114         (WebCore::IDBRecordIdentifier::encodedPrimaryKey):
3115         (WebCore::IDBRecordIdentifier::version):
3116         (WebCore::IDBRecordIdentifier::reset):
3117         (WebCore::IDBRecordIdentifier::IDBRecordIdentifier):
3118         * WebCore.xcodeproj/project.pbxproj:
3119         * GNUmakefile.list.am:
3120
3121         Remove the old abstract and LevelDB classes:
3122         * Modules/indexeddb/IDBBackingStoreInterface.h:
3123         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3124
3125         Use the cross-platform one everywhere:
3126         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3127         (WebCore::IDBBackingStoreLevelDB::putRecord):
3128         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3129         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3130         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3131         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
3132         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
3133
3134         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
3135         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
3136
3137         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
3138         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
3139
3140         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
3141         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
3142         (WebCore::PutOperation::perform):
3143
3144 2013-10-22  Andrei Bucur  <abucur@adobe.com>
3145
3146         [CSS Regions] Possible performance regression after r157567
3147         https://bugs.webkit.org/show_bug.cgi?id=123016
3148
3149         Reviewed by Andreas Kling.
3150
3151         The revision 157567 http://trac.webkit.org/changeset/157567 may have regressed
3152         Parser/html5-full-render by ~1.1% and Parser/html-parser by ~2%. These changes
3153         try to optimize the initial patch, based on Andreas Kling's review.
3154
3155         The patch also adds a couple of refactorings that should make the code easier to read:
3156         - the CSS Shapes functions are now wrapped in a single #if clause
3157         - the CSS Shapes and CSS Regions pre-layout preparations are wrapped in a helper function
3158
3159         The RenderFlowThread::logicalWidthChangedInRegionsForBlock function is optimized by passing
3160         it information about the state of the relayout children flag. If the flag is true already,
3161         some of the steps are skipped.
3162
3163         Tests: no new tests.
3164
3165         * dom/Element.cpp:
3166         (WebCore::Element::webkitGetRegionFlowRanges):
3167         * inspector/InspectorOverlay.cpp:
3168         (WebCore::buildObjectForElementInfo):
3169         * rendering/RenderBlock.cpp:
3170         (WebCore::shapeInfoRequiresRelayout):
3171         (WebCore::RenderBlock::updateShapesBeforeBlockLayout):
3172         (WebCore::RenderBlock::computeShapeSize):
3173         (WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout):
3174         * rendering/RenderBlock.h:
3175         * rendering/RenderBlockFlow.cpp:
3176         (WebCore::RenderBlockFlow::layoutBlock):
3177         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
3178         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
3179         (WebCore::RenderBlockFlow::ensureRareData):
3180         * rendering/RenderBlockFlow.h:
3181         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
3182         (WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
3183         * rendering/RenderDeprecatedFlexibleBox.cpp:
3184         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
3185         * rendering/RenderElement.h:
3186         (WebCore::RenderElement::generatingElement):
3187         * rendering/RenderFlexibleBox.cpp:
3188         (WebCore::RenderFlexibleBox::layoutBlock):
3189         * rendering/RenderFlowThread.cpp:
3190         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
3191         * rendering/RenderFlowThread.h:
3192         * rendering/RenderGrid.cpp:
3193         (WebCore::RenderGrid::layoutBlock):
3194         * rendering/RenderNamedFlowFragment.h:
3195         * rendering/RenderObject.cpp:
3196         * rendering/RenderObject.h:
3197         * rendering/RenderTreeAsText.cpp:
3198         (WebCore::write):
3199         * style/StyleResolveTree.cpp:
3200         (WebCore::Style::elementInsideRegionNeedsRenderer):
3201
3202 2013-10-22  Andreas Kling  <akling@apple.com>
3203
3204         CSSStyleSheet constructor functions should return PassRef.
3205         <https://webkit.org/b/123156>
3206
3207         Make CSSStyleSheet::create*() return PassRef and tighten some call
3208         sites that were using them. Most callers didn't need any tweaks to
3209         take advantage of PassRef.
3210
3211         Reviewed by Antti Koivisto.
3212
3213 2013-10-22  Andreas Kling  <akling@apple.com>
3214
3215         CTTE: RenderMathMLFraction always has a MathMLInlineContainerElement.
3216         <https://webkit.org/b/123154>
3217
3218         This renderer is never anonymous and always has a corresponding
3219         MathMLInlineContainerElement. Overload element() with a tighter
3220         return type.
3221
3222         Also marked the class FINAL and made most member functions private.
3223
3224         Reviewed by Antti Koivisto.
3225
3226 2013-10-22  Andreas Kling  <akling@apple.com>
3227
3228         FontGlyphs constructor functions should return PassRef.
3229         <https://webkit.org/b/123159>
3230
3231         Made the two FontGlyphs creator functions return PassRef and tweaked
3232         the FontGlyphsCache in Font.cpp to make more efficient use of it.
3233
3234         Reviewed by Antti Koivisto.
3235
3236 2013-10-22  Andreas Kling  <akling@apple.com>
3237
3238         Fix some more code to use RenderElement instead of RenderObject.
3239         <https://webkit.org/b/123149>
3240
3241         Using RenderElement where possible lets us skip the isRenderElement()
3242         branch in RenderObject::style() and generates much tighter code.
3243
3244         Reviewed by Antti Koivisto.
3245
3246 2013-10-22  Andreas Kling  <akling@apple.com>
3247
3248         Merge SVG renderers' styleWillChange() into styleDidChange().
3249         <https://webkit.org/b/123108>
3250
3251         This work can just as well be done after setting the style.
3252         Three more styleWillChange() overloads gone.
3253
3254         Reviewed by Antti Koivisto.
3255
3256 2013-10-22  Andreas Kling  <akling@apple.com>
3257
3258         CSSValueList constructor functions should return PassRef.
3259         <https://webkit.org/b/123151>
3260
3261         These functions always return objects, and thus can return PassRef.
3262         Also made CSSValueList::createFromParserValueList() take a reference
3263         since that function is only ever called with a non-null value.
3264
3265         Reviewed by Antti Koivisto.
3266
3267 2013-10-22  Andreas Kling  <akling@apple.com>
3268
3269         Avoid parent style ref churn in createTextRendererIfNeeded().
3270         <https://webkit.org/b/123148>
3271
3272         There's no need to take a temporary ref on the parent's RenderStyle
3273         while creating a text renderer. It's not going away, and the text
3274         renderer is not going to participate in ownership afterwards.
3275
3276         Reviewed by Antti Koivisto.
3277
3278 2013-10-22  Andreas Kling  <akling@apple.com>
3279
3280         Remove some unnecessary null checks in RenderElement::setStyle().
3281         <https://webkit.org/b/123146>
3282
3283         After assigning the new style to RenderElement::m_style, we know that
3284         it'll be non-null, so remove all the checking for this.
3285
3286         Reviewed by Antti Koivisto.
3287
3288 2013-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3289
3290         Introduce ACCESSIBILITY_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class
3291         https://bugs.webkit.org/show_bug.cgi?id=123140
3292
3293         Reviewed by Andreas Kling.
3294
3295         As a step to let toFoo use TYPE_CASTS_BASE, DEFINE_TYPE_CASTS can be used for toFoo() in accessibility
3296         child class. The DEFINE_TYPE_CASTS will generate plenty more helper functions for accessibility type cast.
3297
3298         No new tests, no behavior changes.
3299
3300         * accessibility/AccessibilityList.h:
3301         * accessibility/AccessibilityMenuList.h:
3302         * accessibility/AccessibilityMockObject.h:
3303         * accessibility/AccessibilityNodeObject.h:
3304         * accessibility/AccessibilityObject.h:
3305         * accessibility/AccessibilityRenderObject.h:
3306         * accessibility/AccessibilitySVGRoot.h:
3307         * accessibility/AccessibilityScrollView.h:
3308         * accessibility/AccessibilitySpinButton.h:
3309         * accessibility/AccessibilityTable.h:
3310
3311 2013-10-22  Brian Holt  <brian.holt@samsung.com>
3312
3313         [GTK] Add WebKit2 API for TLS errors
3314         https://bugs.webkit.org/show_bug.cgi?id=120160
3315
3316         Reviewed by Carlos Garcia Campos.
3317
3318         Added a new constructor for CertificateInfo under Soup.
3319
3320         * platform/network/CertificateInfo.h:
3321         * platform/network/soup/CertificateInfoSoup.cpp:
3322         (WebCore::CertificateInfo::CertificateInfo): New constructor using
3323         GTlsCertificateFlags and GTlsCertificate.
3324
3325 2013-10-22  Mihnea Ovidenie  <mihnea@adobe.com>
3326
3327         [CSSRegions] Use RenderStyle::hasFlowFrom when needed
3328         https://bugs.webkit.org/show_bug.cgi?id=122543
3329
3330         Reviewed by David Hyatt.
3331
3332         Rename RenderStyle::hasStyleRegion -> RenderStyle::hasFlowFrom.
3333         Use RenderStyle::hasFlowFrom() helper function instead of directly
3334         checking the value of RenderStyle::regionThread().
3335
3336         No change of functionality, covered by existing tests.
3337
3338         * css/CSSComputedStyleDeclaration.cpp:
3339         (WebCore::contentToCSSValue):
3340         (WebCore::ComputedStyleExtractor::propertyValue):
3341         * css/StyleResolver.cpp:
3342         (WebCore::StyleResolver::adjustRenderStyle):
3343         * dom/PseudoElement.cpp:
3344         (WebCore::PseudoElement::didAttachRenderers):
3345         * dom/PseudoElement.h:
3346         (WebCore::pseudoElementRendererIsNeeded):
3347         * rendering/RenderBlockFlow.cpp:
3348         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
3349         * rendering/RenderLayer.cpp:
3350         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
3351         * rendering/style/RenderStyle.h:
3352
3353 2013-10-21  Brent Fulgham  <bfulgham@apple.com>
3354
3355         [WIN] Properly support reverse animations without needing software fallback.
3356         https://bugs.webkit.org/show_bug.cgi?id=85121
3357
3358         Reviewed by Dean Jackson.
3359
3360         Testing is provided by existing animation tests.
3361
3362         * platform/animation/TimingFunction.h:
3363         (WebCore::CubicBezierTimingFunction::createReversed): Added.
3364         * platform/graphics/ca/GraphicsLayerCA.cpp:
3365         (WebCore::GraphicsLayerCA::addAnimation): The early return when performing a reverse or
3366         autoreverse animation is no longer needed.
3367         * platform/graphics/ca/PlatformCAAnimation.h:
3368         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
3369         (toCAMediaTimingFunction): Use new reversed function.
3370         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
3371         (toCACFTimingFunction): Ditto.
3372         (PlatformCAAnimation::setTimingFunction): Pass 'reverse' flag.
3373         (PlatformCAAnimation::setTimingFunctions): Ditto.
3374
3375 2013-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3376
3377         Use TYPE_CASTS_BASE for CSS_VALUE_TYPE_CASTS
3378         https://bugs.webkit.org/show_bug.cgi?id=123126
3379
3380         Reviewed by Andreas Kling.
3381
3382         TYPE_CASTS_BASE was moved to common place to be used by all toFoo().
3383         CSS_VALUE_TYPE_CASTS starts to use it for CSS child value. This change
3384         generates plenty more helper functions for toCSSFooValue().
3385
3386         Additionally, this use support that toWebKitCSSFooValue, which couldn't
3387         use CSS_VALUE_TYPE_CASTS macro.
3388
3389         No new tests, no behavior change.
3390
3391         * css/CSSAspectRatioValue.h:
3392         * css/CSSBorderImageSliceValue.h:
3393         * css/CSSCalculationValue.h:
3394         * css/CSSCanvasValue.h:
3395         * css/CSSCrossfadeValue.h:
3396         * css/CSSCursorImageValue.h:
3397         * css/CSSFilterImageValue.h:
3398         * css/CSSFontFaceSrcValue.h:
3399         * css/CSSFontFeatureValue.h:
3400         * css/CSSFontValue.h:
3401         * css/CSSFunctionValue.h:
3402         * css/CSSGradientValue.h:
3403         * css/CSSGridTemplateValue.h:
3404         * css/CSSImageSetValue.h:
3405         * css/CSSImageValue.h:
3406         * css/CSSInheritedValue.h:
3407         * css/CSSInitialValue.h:
3408         * css/CSSLineBoxContainValue.h:
3409         * css/CSSPrimitiveValue.h:
3410         * css/CSSReflectValue.h:
3411         * css/CSSShadowValue.h:
3412         * css/CSSTimingFunctionValue.h:
3413         * css/CSSUnicodeRangeValue.h:
3414         * css/CSSValue.h:
3415         * css/CSSValueList.h:
3416         * css/CSSVariableValue.h:
3417         * css/WebKitCSSArrayFunctionValue.h:
3418         * css/WebKitCSSFilterValue.h:
3419         * css/WebKitCSSMatFunctionValue.h:
3420         * css/WebKitCSSMixFunctionValue.h:
3421         * css/WebKitCSSSVGDocumentValue.h:
3422         * css/WebKitCSSShaderValue.h:
3423
3424 2013-10-21  Joone Hur  <joone.hur@intel.com>
3425
3426         Bad cast with toRenderBoxModelObject in RenderBlock::updateFirstLetter()
3427         https://bugs.webkit.org/show_bug.cgi?id=123013
3428
3429         Reviewed by Andreas Kling.
3430
3431         No new tests because this was reported by Google ClusterFuzz.
3432         https://codereview.chromium.org/25713009/
3433
3434         There is a case that toRenderBoxModelObject causes a crash in RenderBlock::updateFirstLetter() 
3435         due to bad cast, so we need to check whether the RenderObject is a RenderBoxModelObject 
3436         by running isBoxModelObject() before calling toRenderBoxModelObject.  
3437
3438         * rendering/RenderBlock.cpp:
3439         (WebCore::RenderBlock::updateFirstLetter):
3440
3441 2013-10-21  Brady Eidson  <beidson@apple.com>
3442
3443         Make IDBTransactionCoordinatorLevelDB cross platform
3444         https://bugs.webkit.org/show_bug.cgi?id=123124
3445
3446         Enthusiastically reviewed by Tim Horton.
3447
3448         * CMakeLists.txt:
3449         * GNUmakefile.list.am:
3450         * WebCore.xcodeproj/project.pbxproj:
3451
3452         Make more methods pure virtual in the interface:
3453         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3454         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3455         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3456
3457         Update the name of the class, and use IDBTransactionBackendInterface instead of IDBTransactionBackendLeveDB:
3458         * Modules/indexeddb/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp.
3459         (WebCore::IDBTransactionCoordinator::create):
3460         (WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
3461         (WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator):
3462         (WebCore::IDBTransactionCoordinator::didCreateTransaction):
3463         (WebCore::IDBTransactionCoordinator::didStartTransaction):
3464         (WebCore::IDBTransactionCoordinator::didFinishTransaction):
3465         (WebCore::IDBTransactionCoordinator::isActive):
3466         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
3467         (WebCore::doScopesOverlap):
3468         (WebCore::IDBTransactionCoordinator::canRunTransaction):
3469         * Modules/indexeddb/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h.
3470
3471         Update the name of the class elsewhere:
3472         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
3473         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
3474         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
3475         (WebCore::IDBDatabaseBackendLevelDB::transactionCoordinator):
3476         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3477
3478 2013-10-21  Daniel Bates  <dabates@apple.com>
3479
3480         [iOS] Upstream JSGlobalObject::shouldInterruptScriptBeforeTimeout()
3481         https://bugs.webkit.org/show_bug.cgi?id=123045
3482
3483         Reviewed by Joseph Pecoraro.
3484
3485         * bindings/js/JSDOMWindowBase.cpp:
3486         (WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage): Added.
3487         (WebCore::JSDOMWindowBase::shouldInterruptScript): Extracted comment and assertion
3488         about null Page object into WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage()
3489         so that it can be shared by both this function and JSDOMWindowBase::shouldInterruptScriptBeforeTimeout().
3490         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
3491         * bindings/js/JSDOMWindowBase.h:
3492         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3493         (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout): Added.
3494         * bindings/js/JSWorkerGlobalScopeBase.h:
3495         * loader/EmptyClients.h: Added isStopping(). We'll land the iOS chrome client implementation
3496         in a subsequent patch.
3497         * page/ChromeClient.h: Added isStopping().
3498
3499 2013-10-21  Anders Carlsson  <andersca@apple.com>
3500
3501         Navigation policy callback not called when performing the same fragment navigation twice
3502         https://bugs.webkit.org/show_bug.cgi?id=123121
3503         <rdar://problem/15230466>
3504
3505         Reviewed by Beth Dakin.
3506
3507         There's code in PolicyChecker::checkNavigationPolicy that will call the decision function right away 
3508         if the requests are equal, without consulting any policy client. Because of this, make sure to empty out
3509         the last checked request of the document loader when doing a fragment navigation.
3510
3511         * loader/FrameLoader.cpp:
3512         (WebCore::FrameLoader::loadURL):
3513         (WebCore::FrameLoader::loadWithDocumentLoader):
3514
3515 2013-10-21  Jer Noble  <jer.noble@apple.com>
3516
3517         Unreviewed build fix; unprotect the declaration of updateSleepDisabling();
3518
3519         * html/HTMLMediaElement.h:
3520
3521 2013-10-20  Mark Lam  <mark.lam@apple.com>
3522
3523         Avoid JSC debugger overhead unless needed.
3524         https://bugs.webkit.org/show_bug.cgi?id=123084.
3525
3526         Reviewed by Geoffrey Garen.
3527
3528         No new tests.
3529
3530         - If no breakpoints are set, we now avoid calling the debug hook callbacks.
3531         - If no break on exception is set, we also avoid exception event debug callbacks.
3532         - When we return from the ScriptDebugServer to the JSC::Debugger, we may no
3533           longer call the debug hook callbacks if not needed. Hence, the m_currentCallFrame
3534           pointer in the ScriptDebugServer may become stale. To avoid this issue, before
3535           returning, the ScriptDebugServer will clear its m_currentCallFrame if
3536           needsOpDebugCallbacks() is false.
3537
3538         * bindings/js/ScriptDebugServer.cpp:
3539         (WebCore::ScriptDebugServer::setBreakpoint):
3540         (WebCore::ScriptDebugServer::removeBreakpoint):
3541         (WebCore::ScriptDebugServer::clearBreakpoints):
3542         (WebCore::ScriptDebugServer::setPauseOnExceptionsState):
3543         (WebCore::ScriptDebugServer::setPauseOnNextStatement):
3544         (WebCore::ScriptDebugServer::breakProgram):
3545         (WebCore::ScriptDebugServer::stepIntoStatement):
3546         (WebCore::ScriptDebugServer::dispatchDidContinue):
3547         (WebCore::ScriptDebugServer::exception):
3548         (WebCore::ScriptDebugServer::didReachBreakpoint):
3549         * inspector/InspectorDebuggerAgent.cpp:
3550         (WebCore::InspectorDebuggerAgent::reset):
3551
3552 2013-10-21  Myles C. Maxfield  <mmaxfield@apple.com>
3553
3554         Grammar markers are not updated when switching between 1x and 2x
3555         https://bugs.webkit.org/show_bug.cgi?id=122146
3556
3557         Reviewed by Dean Jackson.
3558
3559         When running editing/spelling/grammar-markers-hidpi.html, the 2x
3560         grammar/spelling dot resources are cached. If you then run
3561         editing/spelling/grammar-markers.html without tearing down WebKit,
3562         it re-uses the 2x dots. The difference between the two tests is a call
3563         to testRunner.setBackingScaleFactor().
3564
3565         We create a NSColor from an NSImage, and remember it in a static
3566         variable. However, NSColor inspects the current graphics context to
3567         determine which resolution to use, and then remembers that decision.
3568         Therefore, we want to recreate the NSColor whenever the device pixel
3569         ratio changes. This patch adds a new static function to GraphicsContext
3570         which recreates this NSColor every time the ratio changes.
3571
3572         Tests: editing/spelling/grammar-markers.html
3573                editing/spelling/inline_spelling_markers.html
3574
3575         * platform/graphics/mac/GraphicsContextMac.mm:
3576         (WebCore::makePattern):
3577         (WebCore::GraphicsContext::drawLineForDocumentMarker):
3578
3579 2013-10-21  Simon Fraser  <simon.fraser@apple.com>
3580
3581         Use pink layer borders for compositing layers with a contents layer
3582         https://bugs.webkit.org/show_bug.cgi?id=123118
3583
3584         Reviewed by Dean Jackson.
3585
3586         With the existing layer border colors, it's not possible to distinguish an empty
3587         layer from one with solid color, image or video contents. So use a pink color
3588         for those. This makes it easier to diagnose bugs like 122784.
3589
3590         * platform/graphics/GraphicsLayer.cpp:
3591         (WebCore::GraphicsLayer::getDebugBorderInfo):
3592
3593 2013-10-21  Jer Noble  <jer.noble@apple.com>
3594
3595         Limit use of display sleep assertion when <video> element is off-screen.
3596         https://bugs.webkit.org/show_bug.cgi?id=123041
3597
3598         Reviewed by Darin Adler.
3599
3600         Use page visibility changes to suspend and resume the use of sleep assertions in
3601         HTMLMediaElement.
3602
3603         Page will propogate the page visibility change notifications to its Documents, which
3604         will further propogate those notifications to registered elements.  Upon receiving
3605         these notifications, HTMLMediaElement will release or take a DisplaySleepDisabler
3606         token if necessary.
3607
3608         Also, rename HTMLMediaElement's updateDisableSleep() to updateSleepDisabling() and wrap
3609         the implementation in a PLATFORM(MAC) guard rather than at each call site.
3610
3611         * dom/Document.cpp:
3612         (WebCore::Document::registerForVisibilityStateCallbacks): Added registration method.
3613         (WebCore::Document::unregisterForVisibilityStateCallbacks): Added unregistration method.
3614         (WebCore::Document::visibilityStateChanged): Call all registered clients.
3615         * dom/Document.h:
3616         * dom/Element.h:
3617         (WebCore::Element::visibilityStateChanged): Added default virtual method to be overridden
3618             by subclasses.
3619         * html/HTMLMediaElement.cpp:
3620         (WebCore::HTMLMediaElement::HTMLMediaElement): Register for the notification, and check the
3621             current status of Document::hidden().
3622         (WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister for the notification.
3623         (WebCore::HTMLMediaElement::visibilityStateChanged): Set m_displaySleepDisablingSuspended
3624             and call updateSleepDisabling().
3625         (WebCore::HTMLMediaElement::shouldDisableSleep): Add a check for m_displaySleepDisablingSuspended.
3626         * html/HTMLMediaElement.h:
3627         * page/Page.cpp:
3628         (WebCore::Page::setVisibilityState): Pass to every child document.
3629
3630         Rename updateDisableSleep() -> updateSleepDisabling():
3631         * html/HTMLMediaElement.cpp:
3632         (WebCore::HTMLMediaElement::HTMLMediaElement):
3633         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3634         (WebCore::HTMLMediaElement::parseAttribute):
3635         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
3636         (WebCore::HTMLMediaElement::clearMediaPlayer):
3637         (WebCore::HTMLMediaElement::stop):
3638
3639 2013-10-21  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3640
3641         MediaStreamTrack now tracks its own state
3642         https://bugs.webkit.org/show_bug.cgi?id=123025
3643
3644         Reviewed by Jer Noble.
3645
3646         The spec says that a MediaStreamSource can be shared by different tracks,
3647         so a track must have its own state tracking, synchronizing with its MediaStreamSource when
3648         the underlying MediaStreamSource changes the readyState.
3649         In the old implementation if a user invoked the stop method, its readyState method was still
3650         returning the MediaStreamSource state, which was wrong.
3651         This also adds a setEnabled method, which can be used to set the state of a track when a
3652         remote peer ends it, for instance.
3653
3654         No new tests needed.
3655
3656         * Modules/mediastream/MediaStreamTrack.cpp:
3657         (WebCore::MediaStreamTrack::readyState):
3658         (WebCore::MediaStreamTrack::setState):
3659         (WebCore::MediaStreamTrack::stopProducingData):
3660         (WebCore::MediaStreamTrack::ended):
3661         (WebCore::MediaStreamTrack::sourceStateChanged):
3662         (WebCore::MediaStreamTrack::trackDidEnd):
3663         * Modules/mediastream/MediaStreamTrack.h:
3664
3665 2013-10-21  Tim Horton  <timothy_horton@apple.com>
3666
3667         Remote Layer Tree: Clean up transaction logging
3668         https://bugs.webkit.org/show_bug.cgi?id=123116
3669
3670         Reviewed by Anders Carlsson.
3671
3672         * WebCore.exp.in:
3673         Export some TextStream functions.
3674
3675 2013-10-21  Brady Eidson  <beidson@apple.com>
3676
3677         Transition most use of IDBBackingStoreLevelDB to IDBBackingStoreInterface
3678         https://bugs.webkit.org/show_bug.cgi?id=123105
3679
3680         Reviewed by Anders Carlsson.
3681
3682         Export more required headers:
3683         * WebCore.xcodeproj/project.pbxproj:
3684
3685         Flesh out many of the pure virtual methods on IDBBackingStoreInterface, as well as
3686         the RecordIdentifier and Cursor classes:
3687
3688         * Modules/indexeddb/IDBBackingStoreInterface.h:
3689         (WebCore::IDBBackingStoreInterface::RecordIdentifier::~RecordIdentifier):
3690         (WebCore::IDBBackingStoreInterface::Cursor::~Cursor):
3691
3692         Use IDBBackingStoreInterface, IDBBackingStoreInterface::RecordIdentifier, and
3693         IDBBackingStoreInterface::Cursor wherever possible:
3694
3695         * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
3696         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3697
3698         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3699         (WebCore::IDBBackingStoreLevelDB::putRecord):
3700         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3701         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3702         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3703         (WebCore::ObjectStoreKeyCursorImpl::clone):
3704         (WebCore::ObjectStoreCursorImpl::clone):
3705         (WebCore::IndexKeyCursorImpl::clone):
3706         (WebCore::IndexCursorImpl::clone):
3707         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3708         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3709         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3710         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3711         (WebCore::IDBBackingStoreLevelDB::Transaction::Transaction):
3712         (WebCore::IDBBackingStoreLevelDB::Transaction::begin):
3713         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3714         (WebCore::IDBBackingStoreLevelDB::RecordIdentifier::RecordIdentifier):
3715
3716         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
3717         (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
3718         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3719
3720         (WebCore::IDBCursorBackendLevelDB::create):
3721         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
3722         (WebCore::IDBDatabaseBackendLevelDB::create):
3723         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
3724         (WebCore::IDBDatabaseBackendLevelDB::backingStore):
3725         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
3726         (WebCore::IDBDatabaseBackendLevelDB::createTransaction):
3727         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
3728
3729         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3730         (WebCore::IDBFactoryBackendLevelDB::createTransactionBackend):
3731         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3732
3733         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
3734         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
3735         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
3736         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
3737         (WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
3738         (WebCore::IDBObjectStoreBackendLevelDB::generateKey):
3739         (WebCore::IDBObjectStoreBackendLevelDB::updateKeyGenerator):
3740         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
3741
3742         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3743         (WebCore::IDBTransactionBackendLevelDB::create):
3744         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
3745         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3746
3747         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
3748         (WebCore::GetOperation::perform):
3749         (WebCore::OpenCursorOperation::perform):
3750         (WebCore::CountOperation::perform):
3751         (WebCore::DeleteRangeOperation::perform):
3752         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
3753         (WebCore::CreateObjectStoreOperation::create):
3754         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
3755         (WebCore::DeleteObjectStoreOperation::create):
3756         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
3757         (WebCore::CreateIndexOperation::create):
3758         (WebCore::CreateIndexOperation::CreateIndexOperation):
3759         (WebCore::DeleteIndexOperation::create):
3760         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
3761         (WebCore::GetOperation::create):
3762         (WebCore::GetOperation::GetOperation):
3763         (WebCore::PutOperation::create):
3764         (WebCore::PutOperation::PutOperation):
3765         (WebCore::OpenCursorOperation::create):
3766         (WebCore::OpenCursorOperation::OpenCursorOperation):
3767         (WebCore::CountOperation::create):
3768         (WebCore::CountOperation::CountOperation):
3769         (WebCore::DeleteRangeOperation::create):
3770         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
3771         (WebCore::ClearOperation::create):
3772         (WebCore::ClearOperation::ClearOperation):
3773
3774 2013-10-21  Zoltan Horvath  <zoltan@webkit.org>
3775
3776         [CSS Shapes][CSS Regions] Don't apply shape-inside when we have multiple auto-height regions and the height is not resolved
3777         https://bugs.webkit.org/show_bug.cgi?id=123103
3778
3779         Reviewed by David Hyatt.
3780
3781         When we have multiple regions with auto-height, the region's height is not resolved from other elements we can't apply the
3782         the shape on the region. This patch prevents to apply the shape and fixes the behavior for these cases.
3783
3784         Test: fast/regions/shape-inside/shape-inside-on-multiple-autoheight-regions.html
3785
3786         * rendering/RenderBlock.cpp:
3787         (WebCore::RenderBlock::layoutShapeInsideInfo):
3788         * rendering/RenderBlockLineLayout.cpp:
3789         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
3790
3791 2013-10-21  Tim Horton  <timothy_horton@apple.com>
3792
3793         Remote Layer Tree: Backing store should take contentsScale into account
3794         https://bugs.webkit.org/show_bug.cgi?id=123106
3795
3796         Reviewed by Simon Fraser.
3797
3798         * WebCore.exp.in:
3799         Export FloatRect::scale.
3800
3801 2013-10-21  Andreas Kling  <akling@apple.com>
3802
3803         RenderScrollbarPart doesn't need styleWillChange().
3804         <https://webkit.org/b/123113>
3805
3806         We will call setInline(false) in styleDidChange(), there's no need
3807         to override styleWillChange() just to do it twice.
3808
3809         Reviewed by Darin Adler.
3810
3811 2013-10-21  Mihai Maerean  <mmaerean@adobe.com>
3812
3813         [CSS Regions] The layers from the flow thread should be collected under the regions' layers.
3814         https://bugs.webkit.org/show_bug.cgi?id=120457
3815
3816         Reviewed by David Hyatt.
3817
3818         This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
3819
3820         The composited layers inside the named flow threads are collected as part of the regions (as children of the
3821         GraphicsLayer of the layer that corresponds to the region (which is attached to the parent renderer of
3822         RenderNameFlowFragment)).
3823         When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
3824         that region too (inside RenderLayerCompositor::computeRegionCompositingRequirements).
3825
3826         This patch has landed before (as http://trac.webkit.org/changeset/156451), but was reverted because
3827         fast/multicol/mixed-positioning-stacking-order.html failed. The fix is inside RenderLayerCompositor::canBeComposited
3828         that only enables compositing for layers inside flow threads that collect the graphics layers under the regions.
3829
3830         Another change from changeset #156451 is that now the region renderers are created as anonymous renderers under
3831         the element that has the flow-from property. When a composited layer is needed for the region, it sits in it's
3832         parent renderer, not in the region renderer (RenderNamedFlowFragment).
3833
3834         Tests: compositing/regions/crash-transform-inside-region.html
3835                compositing/regions/floated-region-with-transformed-child.html
3836                compositing/regions/move-layer-from-one-region-to-another.html
3837                compositing/regions/propagate-region-box-shadow-border-padding-for-video.html
3838                compositing/regions/propagate-region-box-shadow-border-padding.html
3839                compositing/regions/region-as-layer-in-another-flowthread.html
3840                compositing/regions/transform-transparent-positioned-video-inside-region.html
3841                compositing/regions/transformed-layer-inside-transformed-layer.html
3842                compositing/regions/z-index-update.html
3843                compositing/regions/z-index.html
3844
3845         * rendering/FlowThreadController.cpp:
3846         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
3847         * rendering/RenderElement.cpp:
3848         (WebCore::RenderElement::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
3849         through the RenderView::styleDidChange function.
3850         * rendering/RenderFlowThread.cpp:
3851         (WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
3852         we update all the mappings between the layers inside the flow thread and the regions where those layers will be
3853         painted.
3854         (WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
3855         (WebCore::RenderFlowThread::getLayerListForRegion):
3856         (WebCore::RenderFlowThread::regionForCompositedLayer):
3857         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
3858         (WebCore::RenderFlowThread::collectsGraphicsLayersUnderRegions):
3859         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
3860         from a region to another since the last update.
3861         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
3862         * rendering/RenderFlowThread.h:
3863         * rendering/RenderGeometryMap.cpp:
3864         (WebCore::RenderGeometryMap::pushRenderFlowThread):
3865         * rendering/RenderGeometryMap.h:
3866         * rendering/RenderLayer.cpp:
3867         (WebCore::RenderLayer::paintList):
3868         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
3869         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
3870         (WebCore::RenderLayer::hitTestList):
3871         (WebCore::RenderLayer::calculateLayerBounds): When we calculate the bounds of the RenderView, we ignore those
3872         flow threads that collect the graphics layers under the regions.
3873         (WebCore::RenderLayer::dirtyZOrderLists):
3874         (WebCore::RenderLayer::dirtyNormalFlowList):
3875         * rendering/RenderLayer.h:
3876         * rendering/RenderLayerBacking.cpp:
3877         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's a flow thread that collects the graphics
3878         layers under the regions
3879         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
3880         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
3881         its borders, paddings, outlines or box-shadows to layers inside it.
3882         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3883         * rendering/RenderLayerBacking.h:
3884         * rendering/RenderLayerCompositor.cpp:
3885         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
3886         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
3887         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly if
3888         we are going to collect the composited layers as part of regions.
3889         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
3890         (WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
3891         use composited RenderRegions to render the background of the RenderFlowThread.
3892         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a container of a css region.
3893         * rendering/RenderLayerCompositor.h:
3894         * rendering/RenderMultiColumnSet.cpp:
3895         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
3896         * rendering/RenderMultiColumnSet.h:
3897         * rendering/RenderNamedFlowFragment.h:
3898         (WebCore::RenderNamedFlowFragment::layerOwner): When the content inside the region requires the region to have a
3899         layer, the layer will be created on the region's parent renderer instead. This method returns that renderer
3900         holding the layer. The return value may be null.
3901         * rendering/RenderNamedFlowThread.cpp:
3902         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3903         (WebCore::RenderNamedFlowThread::nextRendererForNode):
3904         (WebCore::RenderNamedFlowThread::previousRendererForNode):
3905         (WebCore::RenderNamedFlowThread::addFlowChild):
3906         (WebCore::RenderNamedFlowThread::removeFlowChild):
3907         (WebCore::RenderNamedFlowThread::collectsGraphicsLayersUnderRegions):
3908         * rendering/RenderNamedFlowThread.h: m_flowThreadChildList is now allocated through an OwnPtr to keep the render
3909         arena under the size limit.
3910         * rendering/RenderRegion.cpp:
3911         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
3912         * rendering/RenderRegion.h:
3913         (WebCore::toRenderRegion):
3914         * rendering/RenderTreeAsText.cpp:
3915         (WebCore::writeLayers):
3916         * WebCore.exp.in: WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions
3917
3918 2013-10-21  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3919
3920         Fixing mediastream debug build
3921         https://bugs.webkit.org/show_bug.cgi?id=123104
3922
3923         Reviewed by Andreas Kling.
3924
3925         No new tests needed.
3926
3927         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
3928         (WebCore::RTCDTMFToneChangeEvent::create):
3929
3930 2013-10-21  Andreas Kling  <akling@apple.com>
3931
3932         Merge RenderListMarker::styleWillChange() into styleDidChange().
3933         <https://webkit.org/b/123098>
3934
3935         If the marker's list-style-type or list-style-position changed, we
3936         need to dirty the layout. Move this logic to styleDidChange() so we
3937         can get rid of one styleWillChange() overload.
3938
3939         Reviewed by Antti Koivisto.
3940
3941 2013-10-21  Mihai Maerean  <mmaerean@adobe.com>
3942
3943         [CSS Regions] Fix WHITESPACE issues in the CSS grammar.
3944         https://bugs.webkit.org/show_bug.cgi?id=123082
3945
3946         Reviewed by Andreas Kling.
3947
3948         This is a port of Rune Lillesveen's patch from https://codereview.chromium.org/25607005
3949
3950         Fix WHITESPACE issues in the CSS grammar.
3951
3952         A single WHITESPACE token consumes consecutive spaces, but does not consume
3953         spaces separated by comments. That means S* and S+ in CSS grammars need to
3954         accept multiple WHITESPACE tokens. Additionally, white spaces are not
3955         mandatory to separate an @-symbol and the rest of the prelude.
3956
3957         Use space non-terminal instead of WHITESPACE for S+ in calc expressions.
3958
3959         Use maybe_space non-terminal instead of WHITESPACE for S* after @-webkit-filter
3960         and @-webkit-region.
3961
3962         Tests: fast/css/calc-comments-allowed.html
3963                fast/regions/webkit-region-syntax-space.html
3964
3965         * css/CSSGrammar.y.in:
3966
3967 2013-10-21  Anton Obzhirov  <a.obzhirov@samsung.com>
3968
3969         [ATK] Use atk_object_notify_state_change instead of manually emitting signals
3970         https://bugs.webkit.org/show_bug.cgi?id=122968
3971
3972         Reviewed by Mario Sanchez Prada.
3973
3974         Refactor emitting "state-change" event to use atk_object_notify_state_change
3975         instead of using g_signal_emit_by_name.
3976
3977         * accessibility/atk/AXObjectCacheAtk.cpp:
3978         (WebCore::notifyChildrenSelectionChange):
3979         (WebCore::AXObjectCache::postPlatformNotification):
3980         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
3981         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
3982         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3983         (webkitAccessibleDetach):
3984         * editing/atk/FrameSelectionAtk.cpp:
3985         (WebCore::maybeEmitTextFocusChange):
3986
3987 2013-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3988
3989         Make TYPE_CASTS_BASE more flexible
3990         https://bugs.webkit.org/show_bug.cgi?id=122951
3991
3992         Reviewed by Andreas Kling.
3993
3994         TYPE_CASTS_BASE is being used by node|element type casts. However, it is difficult
3995         to be used by other type casts. For instance, CSSValue, Accessibility and so on.
3996         This patch modifies TYPE_CASTS_BASE which can support other type casts.
3997
3998         Besides TYPE_CASTS_BASE body is moved from node.h to Assertions.h.
3999
4000         No new tests, no behavior changes.
4001
4002         * dom/Document.h:
4003         * dom/Node.h:
4004
4005 2013-10-21  Santosh Mahto  <santosh.ma@samsung.com>
4006
4007         ASSERTION FAILED: !style->propertyIsImportant(propertyID) in WebCore::setTextDecorationProperty
4008         https://bugs.webkit.org/show_bug.cgi?id=122097
4009
4010         Reviewed by Ryosuke Niwa.
4011
4012         When remove format command is called we pushdown the ancestor style
4013         down to its children. Currently applying inline style to iframe
4014         while pushing down style which causes iframe to be reinserted in tree and
4015         triggres again subframe loading which repeats everytime and finally
4016         crash happens. So we should avoid applying inline style to iframe
4017         element as it doesnot reflect in its content while pushing down style
4018         on it.
4019
4020         And ASSERT call has been removed from setTextDecoration property as
4021         the scenario is perfectly valid case.
4022
4023         Test: editing/execCommand/remove-format-textdecoration-in-iframe.html
4024
4025         * editing/ApplyStyleCommand.cpp:
4026         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Return if
4027         element is iframe.
4028         * editing/EditingStyle.cpp:
4029         (WebCore::StyleChange::setTextDecorationProperty): Remove ASSERT.
4030
4031 2013-10-20  Sam Weinig  <sam@webkit.org>
4032
4033         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 5)
4034         https://bugs.webkit.org/show_bug.cgi?id=122969
4035
4036 &nb