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