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