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