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