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