Move ValueToString out to its own header file to remove duplication
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-12  Bem Jones-Bey  <bjonesbe@adobe.com>
2
3         Move ValueToString out to its own header file to remove duplication
4         https://bugs.webkit.org/show_bug.cgi?id=124237
5
6         Reviewed by Alexandru Chiculita.
7
8         The ValueToString struct is used in many places for debugging. Move it
9         out to its own header file to remove all the duplicated definitions
10         and make it possible for the specializations to be placed in the
11         header files with the implementation of the classes they print.
12
13         No new tests, no behavior change.
14
15         * GNUmakefile.list.am:
16         * WebCore.xcodeproj/project.pbxproj:
17         * html/HTMLMediaElement.h:
18         * platform/LayoutUnit.h:
19         * platform/PODInterval.h:
20         * platform/PODIntervalTree.h:
21         * platform/PODRedBlackTree.h:
22         * platform/ValueToString.h: Added.
23         * platform/graphics/FloatPolygon.h:
24         * rendering/FloatingObjects.cpp:
25         * rendering/FloatingObjects.h:
26         * rendering/RenderBlock.h:
27         * rendering/RenderBlockFlow.h:
28         * rendering/RenderFlowThread.h:
29
30 2013-11-11  David Hyatt  <hyatt@apple.com>
31
32         Make RenderBlockRareData be in a hashtable instead of being a member variable.
33         https://bugs.webkit.org/show_bug.cgi?id=124056
34
35         Reviewed by Anders Carlsson.
36
37         Right now RenderBlock has 4 bytes taken up by a m_rareData member that is almost
38         never allocated. This is better off in a separate hash, so that RenderBlock can
39         get 4 bytes back.
40         
41         Since RenderBlockFlow's rare data member was recently removed and folded into
42         RenderBlock, we need to undo that change and put the rare data member back in
43         RenderBlockFlow. RenderBlockFlowRareData inheriting from RenderBlockRareData
44         was not a good idea anyway, since RenderBlockFlows also very rarely need the
45         RenderBlockRareData members, and were thus paying a heavier cost when the rare
46         data was created than was necessary.
47  
48         * rendering/RenderBlock.cpp:
49         (WebCore::RenderBlockRareData::RenderBlockRareData):
50         (WebCore::RenderBlock::~RenderBlock):
51         (WebCore::RenderBlock::hasRareData):
52         (WebCore::getRareData):
53         (WebCore::ensureRareData):
54         (WebCore::RenderBlock::ensureShapeInsideInfo):
55         (WebCore::RenderBlock::shapeInsideInfo):
56         (WebCore::RenderBlock::setShapeInsideInfo):
57         (WebCore::RenderBlock::paginationStrut):
58         (WebCore::RenderBlock::pageLogicalOffset):
59         (WebCore::RenderBlock::setPaginationStrut):
60         (WebCore::RenderBlock::setPageLogicalOffset):
61         * rendering/RenderBlock.h:
62         * rendering/RenderBlockFlow.cpp:
63         (WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
64         (WebCore::RenderBlockFlow::setMaxMarginAfterValues):
65         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
66         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
67         (WebCore::RenderBlockFlow::mustDiscardMarginBefore):
68         (WebCore::RenderBlockFlow::mustDiscardMarginAfter):
69         (WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
70         (WebCore::RenderBlockFlow::setDidBreakAtLineToAvoidWidow):
71         (WebCore::RenderBlockFlow::clearDidBreakAtLineToAvoidWidow):
72         (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):
73         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
74         (WebCore::RenderBlockFlow::ensureRareBlockFlowData):
75         (WebCore::RenderBlockFlow::materializeRareBlockFlowData):
76         * rendering/RenderBlockFlow.h:
77         (WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow):
78         (WebCore::RenderBlockFlow::lineBreakToAvoidWidow):
79         (WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow):
80         (WebCore::RenderBlockFlow::lineGridBox):
81         (WebCore::RenderBlockFlow::setLineGridBox):
82         (WebCore::RenderBlockFlow::renderNamedFlowFragment):
83         (WebCore::RenderBlockFlow::maxPositiveMarginBefore):
84         (WebCore::RenderBlockFlow::maxNegativeMarginBefore):
85         (WebCore::RenderBlockFlow::maxPositiveMarginAfter):
86         (WebCore::RenderBlockFlow::maxNegativeMarginAfter):
87         (WebCore::RenderBlockFlow::initMaxMarginValues):
88         (WebCore::RenderBlockFlow::hasRareBlockFlowData):
89         (WebCore::RenderBlockFlow::rareBlockFlowData):
90
91 2013-11-12  Alex Christensen  <achristensen@webkit.org>
92
93         Build GStreamer files on Windows.
94         https://bugs.webkit.org/show_bug.cgi?id=124180
95
96         Reviewed by Brent Fulgham.
97
98         * WebCore.vcxproj/WebCore.vcxproj:
99         * WebCore.vcxproj/WebCore.vcxproj.filters:
100         * WebCore.vcxproj/copyForwardingHeaders.cmd:
101         Include gstreamer files in WinCairo build.
102
103 2013-11-12  Brady Eidson  <beidson@apple.com>
104
105         Introduce IDBServerConnection (and start moving things to it).
106         https://bugs.webkit.org/show_bug.cgi?id=124193
107
108         Reviewed by Alexey Proskuryakov.
109
110         IDBServerConnection will be a purely asynchronous interface for database connections, transactions, and cursors.
111         Its interface will be 100% asynchronous and callback based - Perfect for an IPC divide.
112         Eventually none of the IDB<Foo>Backend classes will need IDBBackingStore<Foo> classes at all, 
113         and they’ll all use IDBServerConnection directly.
114
115         * CMakeLists.txt:
116         * GNUmakefile.list.am:
117         * WebCore.xcodeproj/project.pbxproj:
118
119         * Modules/indexeddb/IDBServerConnection.h: Added.
120         (WebCore::IDBServerConnection::~IDBServerConnection):
121
122         Concrete implementation that - for now - wraps an IDBBackingStoreLevelDB:
123         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Added.
124         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
125         (WebCore::IDBServerConnectionLevelDB::deprecatedBackingStore):
126         (WebCore::IDBServerConnectionLevelDB::isClosed):
127         (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
128         (WebCore::IDBServerConnectionLevelDB::deleteDatabase):
129         (WebCore::IDBServerConnectionLevelDB::close):
130         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Added.
131
132         LevelDB created databases get LevelDB server connections:
133         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
134         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
135         (WebCore::IDBFactoryBackendLevelDB::open):
136
137         Replace most uses of IDBBackingStore with server connection:
138         * Modules/indexeddb/IDBDatabaseBackend.cpp:
139         (WebCore::IDBDatabaseBackend::create):
140         (WebCore::IDBDatabaseBackend::IDBDatabaseBackend):
141         (WebCore::IDBDatabaseBackend::openInternalAsync):
142         (WebCore::IDBDatabaseBackend::setIndexKeys):
143         (WebCore::IDBDatabaseBackend::openConnectionInternal):
144         (WebCore::IDBDatabaseBackend::deleteDatabaseAsync):
145         (WebCore::IDBDatabaseBackend::close):
146         * Modules/indexeddb/IDBDatabaseBackend.h:
147         (WebCore::IDBDatabaseBackend::serverConnection):
148
149         Change all the operations to access their DatabaseBackend’s server connection instead
150         if hanging on to a backing store directly:
151         * Modules/indexeddb/IDBTransactionBackend.cpp:
152         (WebCore::IDBTransactionBackend::IDBTransactionBackend):
153         (WebCore::IDBTransactionBackend::scheduleCreateObjectStoreOperation):
154         (WebCore::IDBTransactionBackend::scheduleDeleteObjectStoreOperation):
155         (WebCore::IDBTransactionBackend::scheduleCreateIndexOperation):
156         (WebCore::IDBTransactionBackend::scheduleDeleteIndexOperation):
157         (WebCore::IDBTransactionBackend::scheduleGetOperation):
158         (WebCore::IDBTransactionBackend::schedulePutOperation):
159         (WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
160         (WebCore::IDBTransactionBackend::scheduleCountOperation):
161         (WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
162         (WebCore::IDBTransactionBackend::scheduleClearOperation):
163         * Modules/indexeddb/IDBTransactionBackend.h:
164
165         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
166         (WebCore::CreateObjectStoreOperation::perform):
167         (WebCore::CreateIndexOperation::perform):
168         (WebCore::DeleteIndexOperation::perform):
169         (WebCore::GetOperation::perform):
170         (WebCore::PutOperation::perform):
171         (WebCore::OpenCursorOperation::perform):
172         (WebCore::CountOperation::perform):
173         (WebCore::DeleteRangeOperation::perform):
174         (WebCore::ClearOperation::perform):
175         (WebCore::DeleteObjectStoreOperation::perform):
176         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
177         * Modules/indexeddb/IDBTransactionBackendOperations.h:
178         (WebCore::CreateObjectStoreOperation::create):
179         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
180         (WebCore::DeleteObjectStoreOperation::create):
181         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
182         (WebCore::CreateIndexOperation::create):
183         (WebCore::CreateIndexOperation::CreateIndexOperation):
184         (WebCore::DeleteIndexOperation::create):
185         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
186         (WebCore::GetOperation::create):
187         (WebCore::GetOperation::GetOperation):
188         (WebCore::PutOperation::create):
189         (WebCore::PutOperation::PutOperation):
190         (WebCore::OpenCursorOperation::create):
191         (WebCore::OpenCursorOperation::OpenCursorOperation):
192         (WebCore::CountOperation::create):
193         (WebCore::CountOperation::CountOperation):
194         (WebCore::DeleteRangeOperation::create):
195         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
196         (WebCore::ClearOperation::create):
197         (WebCore::ClearOperation::ClearOperation):
198         * Modules/indexeddb/IDBTransactionCoordinator.h:
199
200 2013-11-12  Brent Fulgham  <bfulgham@apple.com>
201
202         [Win] Unreviewed gardening.
203
204         * WebCore.vcxproj/WebCore.vcxproj.filters: Correct filter file so that source
205         files show up in their proper directories in Visual Studio.
206
207 2013-11-12  Alex Christensen  <achristensen@webkit.org>
208
209         [WinCairo] Preparation for ENABLE(VIDEO).
210         https://bugs.webkit.org/show_bug.cgi?id=57420
211
212         Reviewed by Martin Robinson.
213
214         * platform/FileSystem.h:
215         * platform/graphics/MediaPlayer.cpp:
216         * rendering/RenderMediaControls.cpp:
217         * rendering/RenderThemeWin.cpp:
218         (WebCore::RenderThemeWin::adjustSliderThumbSize):
219         Separated CG code from GStreamer code.
220
221 2013-11-12  Tibor Meszaros  <mtibor@inf.u-szeged.hu>
222
223         Fix reported build warnings for GTK
224         https://bugs.webkit.org/show_bug.cgi?id=123439
225
226         Reviewed by Carlos Garcia Campos.
227
228         There was a void method, that has return value in it's documentation, so I removed it.
229
230         * bindings/gobject/WebKitDOMCustom.h:
231
232 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
233
234         Manage StorageThread through std::unique_ptr
235         https://bugs.webkit.org/show_bug.cgi?id=124197
236
237         Reviewed by Anders Carlsson.
238
239         New StorageThread objects are crafted through std::make_unique. This removes the need for the static
240         StorageThread::create() method but requires that the StorageThread constructor is made public.
241
242         * storage/StorageSyncManager.cpp:
243         (WebCore::StorageSyncManager::StorageSyncManager):
244         * storage/StorageSyncManager.h:
245         * storage/StorageThread.cpp:
246         * storage/StorageThread.h:
247         * storage/StorageTracker.cpp:
248         (WebCore::StorageTracker::StorageTracker):
249         * storage/StorageTracker.h:
250
251 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
252
253         Remove unnecessary PassOwnPtr.h header includes under Source/WebCore/fileapi
254         https://bugs.webkit.org/show_bug.cgi?id=124196
255
256         Reviewed by Anders Carlsson.
257
258         PassOwnPtr is not used anywhere under Source/WebCore/fileapi/, so PassOwnPtr.h inclusions can be removed.
259
260         * fileapi/Blob.h:
261         * fileapi/FileThread.h:
262         * fileapi/FileThreadTask.h:
263
264 2013-11-12  Antti Koivisto  <antti@apple.com>
265
266         Text on simple lines sometimes paints one pixel off
267         https://bugs.webkit.org/show_bug.cgi?id=124200
268
269         Reviewed by Andreas Kling.
270
271         Test: fast/text/line-runs-simple-lines.html
272
273         * rendering/SimpleLineLayout.cpp:
274         (WebCore::SimpleLineLayout::adjustRunOffsets):
275         
276             Don't round on run construction time.
277
278         (WebCore::SimpleLineLayout::createTextRuns):
279         * rendering/SimpleLineLayoutResolver.h:
280         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
281         
282             Instead round when generating rects.
283
284         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
285         
286             Provide the baseline (used by painting) as unrounded FloatPoint.
287
288 2013-11-11  Andreas Kling  <akling@apple.com>
289
290         Elements with class names automatically get unique ElementData.
291         <https://webkit.org/b/124184>
292
293         We were calling Element::ensureUniqueElementData() for all Elements
294         with a non-empty list of class names. Doing that on parser-fresh
295         Elements caused us to upgrade them to UniqueElementData despite not
296         needing it (ElementData::setClass() is a const function for caching
297         the "cooked" class and can be called on ShareableElementData.)
298
299         1.09 MB progression on HTML5 spec at <http://whatwg.org/c>
300
301         Reviewed by Antti Koivisto.
302
303 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
304
305         JSC bindings generator should generate deletable JSC functions
306         https://bugs.webkit.org/show_bug.cgi?id=122422
307
308         Reviewed by Geoffrey Garen.
309
310         The JSC functions that the JSC bindings generator generates should be deletable to conform to
311         the WebIDL specification, which instructs that the WebIDL operations must be configurable (which
312         translates to the JSC functions being deletable).
313
314         The generator will still produce a non-deletable JSC function for operations under almost all
315         Web-facing interfaces since they're annotated with the OperationsNotDeletable attribute. The
316         exception here is the Node interface that is having the attribute removed, with the provided
317         test case testing that all the functions on the Node prototype object are writable, enumerable
318         and configurable. This behavior conforms to the WebIDL specification and the behaviors of IE
319         and Firefox. Chrome at the moment still provides non-configurable functions.
320
321         Test: fast/dom/webidl-operations-on-node-prototype.html
322
323         * bindings/scripts/CodeGeneratorJS.pm:
324         (GenerateImplementation): Enforce the non-deletable behavior of the JSC function if either the
325         operation's interface is annotated with the OperationsNotDeletable attribute or the operation itself
326         is annotated with the NotDeletable attribute.
327         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Update the JSC generator test baselines.
328         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
329         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
330         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
331         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
332         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
333         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
334         * dom/Node.idl: Remove the OperationsNotDeletable attribute.
335
336 2013-11-11  Brady Eidson  <beidson@apple.com>
337
338         Make IDBTransaction tasks asynchronous
339         https://bugs.webkit.org/show_bug.cgi?id=124183
340
341         Reviewed by Tim Horton.
342
343         This is an almost zero-change in behavior.
344
345         The one thing that is different is that previously, IDBTransactionBackends would synchronously
346         run through their entire set of IDBOperation’s without ever returning control to the runloop.
347
348         Now, they start one task and then wait for its completion to schedule the start of the next task.
349
350         Change IDBOperation’s perform() to take a completion handler so it can be asynchronous.
351         Add an IDBSynchronousOperation class to handle "Abort" tasks, which never need to perform i/o
352         and therefore can be entirely synchronous.
353         * Modules/indexeddb/IDBOperation.h:
354         (WebCore::IDBSynchronousOperation::~IDBSynchronousOperation):
355
356         * Modules/indexeddb/IDBTransactionBackend.cpp:
357         (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
358         (WebCore::IDBTransactionBackend::abort):
359         (WebCore::IDBTransactionBackend::taskTimerFired): Instead of running through the entire set of tasks,
360           perform a single task asynchronously. The completion handler for the task will reset the task timer
361           to asynchronously start the next task.
362         * Modules/indexeddb/IDBTransactionBackend.h:
363         (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
364
365         Update all operations to take completion handlers.
366         For now, perform things synchronously like before, calling the completion handler when complete.
367         * Modules/indexeddb/IDBCursorBackend.cpp:
368         (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called perform() exits.
369         (WebCore::CallOnDestruct::~CallOnDestruct):
370         (WebCore::IDBCursorBackend::CursorIterationOperation::create):
371         (WebCore::IDBCursorBackend::CursorAdvanceOperation::create):
372         (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::create):
373         (WebCore::IDBCursorBackend::CursorAdvanceOperation::perform):
374         (WebCore::IDBCursorBackend::CursorIterationOperation::perform):
375         (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::perform):
376
377         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
378         (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called when perform() exits.
379         (WebCore::CallOnDestruct::~CallOnDestruct):
380         (WebCore::CreateObjectStoreOperation::perform):
381         (WebCore::CreateIndexOperation::perform):
382         (WebCore::DeleteIndexOperation::perform):
383         (WebCore::GetOperation::perform):
384         (WebCore::PutOperation::perform):
385         (WebCore::SetIndexesReadyOperation::perform):
386         (WebCore::OpenCursorOperation::perform):
387         (WebCore::CountOperation::perform):
388         (WebCore::DeleteRangeOperation::perform):
389         (WebCore::ClearOperation::perform):
390         (WebCore::DeleteObjectStoreOperation::perform):
391         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
392
393         * Modules/indexeddb/IDBTransactionBackendOperations.h:
394         (WebCore::CreateObjectStoreOperation::create):
395         (WebCore::DeleteObjectStoreOperation::create):
396         (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
397         (WebCore::CreateObjectStoreAbortOperation::create):
398         (WebCore::DeleteObjectStoreAbortOperation::create):
399         (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
400         (WebCore::CreateIndexOperation::create):
401         (WebCore::CreateIndexAbortOperation::create):
402         (WebCore::DeleteIndexOperation::create):
403         (WebCore::DeleteIndexAbortOperation::create):
404         (WebCore::GetOperation::create):
405         (WebCore::PutOperation::create):
406         (WebCore::SetIndexesReadyOperation::create):
407         (WebCore::OpenCursorOperation::create):
408         (WebCore::CountOperation::create):
409         (WebCore::DeleteRangeOperation::create):
410         (WebCore::ClearOperation::create):
411
412 2013-11-11  Joseph Pecoraro  <pecoraro@apple.com>
413
414         Web Inspector: Remove some unused generated code
415         https://bugs.webkit.org/show_bug.cgi?id=124179
416
417         Reviewed by Timothy Hatcher.
418
419         * inspector/CodeGeneratorInspectorStrings.py:
420
421 2013-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
422
423         Clean up static_cast<Element*> usage
424         https://bugs.webkit.org/show_bug.cgi?id=124133
425
426         Reviewed by Andreas Kling.
427
428         We need to use toFoo cast function instead of static_cast<>. Though there is toElement(),
429         static_cast<Element*> is still being used.
430
431         No new tests, no behavior changes.
432
433         * bindings/gobject/WebKitDOMPrivate.cpp:
434         (WebKit::wrap):
435         * dom/ElementTraversal.h:
436         (WebCore::::lastWithinTemplate):
437         (WebCore::::nextTemplate):
438         (WebCore::::previousTemplate):
439
440 2013-11-11  Anders Carlsson  <andersca@apple.com>
441
442         FrameFilter can just be an std::function instead
443         https://bugs.webkit.org/show_bug.cgi?id=124176
444
445         Reviewed by Tim Horton.
446
447         * WebCore.exp.in:
448         * loader/archive/cf/LegacyWebArchive.cpp:
449         (WebCore::LegacyWebArchive::create):
450         * loader/archive/cf/LegacyWebArchive.h:
451
452 2013-11-11  Simon Fraser  <simon.fraser@apple.com>
453
454         REGRESSION (r155660): box-shadow causes overlay scrollbars to be in the wrong position when element is composited (85647)
455         https://bugs.webkit.org/show_bug.cgi?id=124090
456
457         Reviewed by Beth Dakin.
458         
459         After r155660 we did fewer layouts, so were left with overlay scrollbars in the
460         wrong locations because nothing would update them after RenderLayerBacking
461         computed a new offsetFromRenderer.
462         
463         First part of the fix is to wean positionOverflowControlsLayers() off of
464         an absolute offset from the root. Do this by not using Widget::frameRect()
465         to position the layers, but instead RenderLayer::rectFor{Horizontal|Vertical}Scrollbar
466         which is what we used to position the scrollbars in the first place.
467         
468         Second part of the fix is to call positionOverflowControlsLayers() from
469         RenderLayerBacking::updateGraphicsLayerGeometry() if the offsetFromRenderer
470         changed.
471
472         Test: compositing/overflow/overflow-scrollbar-layer-positions.html
473
474         * rendering/RenderLayer.cpp:
475         (WebCore::RenderLayer::positionOverflowControls):
476         * rendering/RenderLayerBacking.cpp:
477         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
478         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
479         * rendering/RenderLayerBacking.h:
480
481 2013-11-11  Brent Fulgham  <bfulgham@apple.com>
482
483         [Win] m_isCompositeFontReference is uninitialized.
484         https://bugs.webkit.org/show_bug.cgi?id=124170
485
486         Reviewed by Tim Horton.
487
488         Initialize value to false, as is done in the other constructors for this data type.
489
490         * platform/graphics/win/FontPlatformDataCGWin.cpp:
491         (WebCore::FontPlatformData::FontPlatformData): 
492         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
493         (WebCore::FontPlatformData::FontPlatformData):
494         * platform/graphics/win/FontPlatformDataWin.cpp:
495         (WebCore::FontPlatformData::FontPlatformData):
496
497 2013-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
498
499         [Mac] Characters too close together in complex Arabic text
500         https://bugs.webkit.org/show_bug.cgi?id=124057
501
502         Reviewed by Darin Adler.
503
504         We weren't updating our total width variable with run's initial
505         advance information, leading to widths that were too narrow.
506
507         In addition, while initial advances for runs that aren't the first
508         run are accounted for by baking in the initial advances into the
509         previous character's advance, the initial advance for the first run
510         has to be accounted for in ComplexTextController::offsetForPosition.
511
512         Test: fast/text/complex-grapheme-cluster-with-initial-advance.html
513         Test: fast/text/selection-in-initial-advance-region.html
514
515         * platform/graphics/mac/ComplexTextController.cpp:
516         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Update
517         total width variable
518         (WebCore::ComplexTextController::offsetOfPosition): Account for
519         the first run's initial advance.
520
521 2013-11-11  Brady Eidson  <beidson@apple.com>
522
523         Make IDBBackingStoreTransaction be RefCounted
524         https://bugs.webkit.org/show_bug.cgi?id=124168
525
526         Reviewed by Tim Horton.
527
528         This is necessarily to safely add a fully asynchronous interface into the IDB mechanism.
529
530         * Modules/indexeddb/IDBBackingStoreInterface.h:
531         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h:
532         * Modules/indexeddb/IDBTransactionBackend.h:
533
534         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
535         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
536         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
537         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
538
539 2013-11-11  Antti Koivisto  <antti@apple.com>
540
541         End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases
542         https://bugs.webkit.org/show_bug.cgi?id=124158
543
544         Reviewed by Dave Hyatt.
545         
546         If a word just fits the line but the following space overflows we fail to collapse whitespaces 
547         at the end of the line. This happens because with break-word we end up taking word breaking
548         code path that does not have pre-wrap whitespace handling.
549         
550         This patch makes the behavior consistent and also matches Firefox.
551
552         Test: fast/text/break-word-pre-wrap.html
553
554         * rendering/RenderBlockLineLayout.cpp:
555         (WebCore::BreakingContext::handleText):
556         
557             Don't take the word break code path if we are pre-wrap and the current character is space.
558             Instead proceed to break the line normally as this is a valid break position.
559
560 2013-11-11  Bear Travis  <betravis@adobe.com>
561
562         Web Inspector: [CSS Shapes] Highlight shape-outside when its element is selected in the Web Inspector
563         https://bugs.webkit.org/show_bug.cgi?id=124071
564
565         Reviewed by Timothy Hatcher.
566
567         Adding code to pass computed shape information (path and bounds) to the Inspector overlay
568         canvas, and the code to display it. The code creates a path based on ShapeInfo's computed
569         shape. The shape highlight draws whenever an element is highlighted, via selection in
570         the Inspector elements view.
571
572         Test: inspector-protocol/model/highlight-shape-outside.html
573
574         * inspector/InspectorOverlay.cpp:
575         (WebCore::localPointToRoot): Convert a local point to be relative to the root view.
576         (WebCore::appendPathCommandAndPoints): Helper for building a single segment's worth
577         of the overall path.
578         (WebCore::appendPathSegment): Build a single segment's worth of the overall path.
579         (WebCore::buildObjectForShapeOutside): Build an object to pass to the Inspector overlay
580         that represents the shape.
581         (WebCore::buildObjectForElementInfo): Call buildObjectForShapeOutside and pass the
582         resulting object along.
583         * inspector/InspectorOverlayPage.js:
584         (pathCommand): Draw a single path command.
585         (drawPath): Draw the overall path.
586         (_drawShapeHighlight): Draw the highlight for the given shapeInfo.
587         (drawNodeHighlight): Call _drawShapeHighlight.
588         * rendering/shapes/PolygonShape.h:
589         (WebCore::PolygonShape::polygon): Expose the underlying vertex information for a
590         PolygonShape.
591         * rendering/shapes/RasterShape.h:
592         * rendering/shapes/RectangleShape.h:
593         (WebCore::RectangleShape::logicalRx): Expose the logical radii for a shape.
594         (WebCore::RectangleShape::logicalRy): Ditto.
595         * rendering/shapes/Shape.h:
596         * rendering/shapes/ShapeInfo.h:
597         (WebCore::ShapeInfo::computedShapePhysicalBoundingBox): The physical bounds of a
598         shape in renderer coordinates.
599         (WebCore::ShapeInfo::shapeToRendererPoint): Convert shape coordinates to renderer
600         coordinates.
601         (WebCore::ShapeInfo::shapeToRendererSize): Ditto.
602         (WebCore::ShapeInfo::ShapeInfo):
603
604 2013-11-11  Alexey Proskuryakov  <ap@apple.com>
605
606         Support WebCrypto KeyPair interface
607         https://bugs.webkit.org/show_bug.cgi?id=124161
608
609         Reviewed by Geoffrey Garen.
610
611         No new tests yet, will be tested once generateKey is implemented for any RSA algorithms.
612
613         * CMakeLists.txt:
614         * DerivedSources.make:
615         * GNUmakefile.list.am:
616         * WebCore.xcodeproj/project.pbxproj:
617         Added new files.
618
619         * bindings/js/JSDOMPromise.h: Support returning a key pair via a promise.
620
621         * bindings/js/JSCryptoKeyPairCustom.cpp: Added.
622         (WebCore::JSCryptoKeyPair::visitChildren):
623         * crypto/CryptoKey.idl:
624         CryptoKey wrapper is reachable through KeyPair, but it doesn't have (or need)
625         a back pointer.
626
627         * crypto/CryptoKeyPair.cpp: Added.
628         (WebCore::CryptoKeyPair::CryptoKeyPair):
629         (WebCore::CryptoKeyPair::~CryptoKeyPair):
630         * crypto/CryptoKeyPair.h: Added.
631         (WebCore::CryptoKeyPair::create):
632         (WebCore::CryptoKeyPair::publicKey):
633         (WebCore::CryptoKeyPair::privateKey):
634         * crypto/CryptoKeyPair.idl: Added.
635
636 2013-11-11  Nick Diego Yamane  <nick.yamane@openbossa.org>
637
638         Fix build after r158967
639         https://bugs.webkit.org/show_bug.cgi?id=124160
640
641         Reviewed by Anders Carlsson.
642
643         After r158967, gcc debug builds with "-Werror=type-limits" enabled
644         fail. This patch fixes it.
645
646         * rendering/shapes/RasterShape.h:
647         (WebCore::RasterShapeIntervals::intervalsAt):
648
649 2013-11-11  Zan Dobersek  <zdobersek@igalia.com>
650
651         Remove the OperationsNotDeletable attribute from most of the WebIDL interfaces
652         https://bugs.webkit.org/show_bug.cgi?id=124151
653
654         Reviewed by Geoffrey Garen.
655
656         The OperationsNotDeletable attribute currently doesn't have any effect, but will soon enforce
657         non-configurability of operations on the interface that uses the attribute. Non-configurability
658         of operations is the default behavior at the moment, but will be changed to follow the WebIDL
659         specification which requires that the operations are configurable (i.e. -- in JSC terms -- deletable).
660         IE and Firefox already exhibit this behavior in the majority of cases, while Chrome and Opera don't.
661
662         The attribute remains in use on the Location interface to mimic the Unforgeable attribute which
663         also makes operations of an interface non-configurable. Unforgeable attribute will be used instead
664         when support for it will be added to the JSC bindings generator.
665
666         * Modules/battery/BatteryManager.idl:
667         * Modules/encryptedmedia/MediaKeySession.idl:
668         * Modules/encryptedmedia/MediaKeys.idl:
669         * Modules/gamepad/GamepadList.idl:
670         * Modules/geolocation/Geolocation.idl:
671         * Modules/indexeddb/IDBCursor.idl:
672         * Modules/indexeddb/IDBDatabase.idl:
673         * Modules/indexeddb/IDBFactory.idl:
674         * Modules/indexeddb/IDBIndex.idl:
675         * Modules/indexeddb/IDBKeyRange.idl:
676         * Modules/indexeddb/IDBObjectStore.idl:
677         * Modules/indexeddb/IDBTransaction.idl:
678         * Modules/indexeddb/IDBVersionChangeEvent.idl:
679         * Modules/mediacontrols/MediaControlsHost.idl:
680         * Modules/mediasource/MediaSource.idl:
681         * Modules/mediasource/SourceBuffer.idl:
682         * Modules/mediasource/SourceBufferList.idl:
683         * Modules/mediastream/MediaStream.idl:
684         * Modules/mediastream/MediaStreamTrack.idl:
685         * Modules/mediastream/RTCDTMFSender.idl:
686         * Modules/mediastream/RTCDataChannel.idl:
687         * Modules/mediastream/RTCPeerConnection.idl:
688         * Modules/mediastream/RTCStatsReport.idl:
689         * Modules/mediastream/RTCStatsResponse.idl:
690         * Modules/networkinfo/NetworkInfoConnection.idl:
691         * Modules/notifications/Notification.idl:
692         * Modules/notifications/NotificationCenter.idl:
693         * Modules/proximity/DeviceProximityEvent.idl:
694         * Modules/quota/StorageInfo.idl:
695         * Modules/quota/StorageQuota.idl:
696         * Modules/speech/SpeechGrammarList.idl:
697         * Modules/speech/SpeechRecognition.idl:
698         * Modules/speech/SpeechRecognitionResult.idl:
699         * Modules/speech/SpeechRecognitionResultList.idl:
700         * Modules/speech/SpeechSynthesis.idl:
701         * Modules/webaudio/AnalyserNode.idl:
702         * Modules/webaudio/AudioBuffer.idl:
703         * Modules/webaudio/AudioBufferSourceNode.idl:
704         * Modules/webaudio/AudioContext.idl:
705         * Modules/webaudio/AudioListener.idl:
706         * Modules/webaudio/AudioNode.idl:
707         * Modules/webaudio/AudioParam.idl:
708         * Modules/webaudio/BiquadFilterNode.idl:
709         * Modules/webaudio/OscillatorNode.idl:
710         * Modules/webaudio/PannerNode.idl:
711         * Modules/webdatabase/Database.idl:
712         * Modules/webdatabase/DatabaseSync.idl:
713         * Modules/webdatabase/SQLResultSetRowList.idl:
714         * Modules/webdatabase/SQLTransaction.idl:
715         * Modules/webdatabase/SQLTransactionSync.idl:
716         * Modules/websockets/WebSocket.idl:
717         * crypto/CryptoKey.idl:
718         * crypto/SubtleCrypto.idl:
719         * css/CSSHostRule.idl:
720         * css/CSSMediaRule.idl:
721         * css/CSSPrimitiveValue.idl:
722         * css/CSSRuleList.idl:
723         * css/CSSStyleDeclaration.idl:
724         * css/CSSStyleSheet.idl:
725         * css/CSSSupportsRule.idl:
726         * css/CSSValueList.idl:
727         * css/DOMWindowCSS.idl:
728         * css/FontLoader.idl:
729         * css/MediaList.idl:
730         * css/MediaQueryList.idl:
731         * css/MediaQueryListListener.idl:
732         * css/StyleMedia.idl:
733         * css/StyleSheet.idl:
734         * css/StyleSheetList.idl:
735         * css/WebKitCSSFilterValue.idl:
736         * css/WebKitCSSKeyframesRule.idl:
737         * css/WebKitCSSMatrix.idl:
738         * css/WebKitCSSTransformValue.idl:
739         * dom/CharacterData.idl:
740         * dom/ChildNode.idl:
741         * dom/ClientRectList.idl:
742         * dom/Clipboard.idl:
743         * dom/CompositionEvent.idl:
744         * dom/CustomEvent.idl:
745         * dom/DOMCoreException.idl:
746         * dom/DOMImplementation.idl:
747         * dom/DOMNamedFlowCollection.idl:
748         * dom/DOMStringList.idl:
749         * dom/DOMStringMap.idl:
750         * dom/DataTransferItem.idl:
751         * dom/DataTransferItemList.idl:
752         * dom/DeviceMotionEvent.idl:
753         * dom/DeviceOrientationEvent.idl:
754         * dom/Document.idl:
755         * dom/DocumentFragment.idl:
756         * dom/DocumentType.idl:
757         * dom/Element.idl:
758         * dom/Event.idl:
759         * dom/EventException.idl:
760         * dom/EventListener.idl:
761         * dom/EventTarget.idl:
762         * dom/HashChangeEvent.idl:
763         * dom/KeyboardEvent.idl:
764         * dom/MessageEvent.idl:
765         * dom/MessagePort.idl:
766         * dom/MouseEvent.idl:
767         * dom/MutationEvent.idl:
768         * dom/MutationObserver.idl:
769         * dom/NamedNodeMap.idl:
770         * dom/Node.idl:
771         * dom/NodeFilter.idl:
772         * dom/NodeIterator.idl:
773         * dom/NodeList.idl:
774         * dom/Range.idl:
775         * dom/RangeException.idl:
776         * dom/ShadowRoot.idl:
777         * dom/Text.idl:
778         * dom/TextEvent.idl:
779         * dom/TouchEvent.idl:
780         * dom/TouchList.idl:
781         * dom/TreeWalker.idl:
782         * dom/UIEvent.idl:
783         * dom/WebKitNamedFlow.idl:
784         * dom/WheelEvent.idl:
785         * fileapi/Blob.idl:
786         * fileapi/FileException.idl:
787         * fileapi/FileList.idl:
788         * fileapi/FileReader.idl:
789         * fileapi/FileReaderSync.idl:
790         * html/DOMFormData.idl:
791         * html/DOMSettableTokenList.idl:
792         * html/DOMTokenList.idl:
793         * html/DOMURL.idl:
794         * html/HTMLAllCollection.idl:
795         * html/HTMLAnchorElement.idl:
796         * html/HTMLButtonElement.idl:
797         * html/HTMLCanvasElement.idl:
798         * html/HTMLCollection.idl:
799         * html/HTMLDocument.idl:
800         * html/HTMLElement.idl:
801         * html/HTMLEmbedElement.idl:
802         * html/HTMLFieldSetElement.idl:
803         * html/HTMLFormControlsCollection.idl:
804         * html/HTMLFormElement.idl:
805         * html/HTMLFrameElement.idl:
806         * html/HTMLIFrameElement.idl:
807         * html/HTMLInputElement.idl:
808         * html/HTMLKeygenElement.idl:
809         * html/HTMLMarqueeElement.idl:
810         * html/HTMLMediaElement.idl:
811         * html/HTMLObjectElement.idl:
812         * html/HTMLOptionsCollection.idl:
813         * html/HTMLOutputElement.idl:
814         * html/HTMLSelectElement.idl:
815         * html/HTMLTableElement.idl:
816         * html/HTMLTableRowElement.idl:
817         * html/HTMLTableSectionElement.idl:
818         * html/HTMLTextAreaElement.idl:
819         * html/HTMLVideoElement.idl:
820         * html/MediaController.idl:
821         * html/RadioNodeList.idl:
822         * html/TimeRanges.idl:
823         * html/canvas/CanvasGradient.idl:
824         * html/canvas/CanvasRenderingContext2D.idl:
825         * html/canvas/DOMPath.idl:
826         * html/canvas/EXTDrawBuffers.idl:
827         * html/canvas/OESVertexArrayObject.idl:
828         * html/canvas/WebGLDebugShaders.idl:
829         * html/canvas/WebGLLoseContext.idl:
830         * html/canvas/WebGLRenderingContext.idl:
831         * html/track/AudioTrackList.idl:
832         * html/track/TextTrack.idl:
833         * html/track/TextTrackCue.idl:
834         * html/track/TextTrackCueList.idl:
835         * html/track/TextTrackList.idl:
836         * html/track/TextTrackRegionList.idl:
837         * html/track/VideoTrackList.idl:
838         * loader/appcache/DOMApplicationCache.idl:
839         * page/Console.idl:
840         * page/Crypto.idl:
841         * page/DOMSecurityPolicy.idl:
842         * page/DOMSelection.idl:
843         * page/DOMWindow.idl:
844         * page/EventSource.idl:
845         * page/History.idl:
846         * page/Navigator.idl:
847         * page/Performance.idl:
848         * page/PerformanceEntryList.idl:
849         * page/SpeechInputResultList.idl:
850         * page/WindowBase64.idl:
851         * page/WindowTimers.idl:
852         * plugins/DOMMimeTypeArray.idl:
853         * plugins/DOMPlugin.idl:
854         * plugins/DOMPluginArray.idl:
855         * storage/Storage.idl:
856         * storage/StorageEvent.idl:
857         * svg/SVGAngle.idl:
858         * svg/SVGAnimationElement.idl:
859         * svg/SVGColor.idl:
860         * svg/SVGCursorElement.idl:
861         * svg/SVGDocument.idl:
862         * svg/SVGElement.idl:
863         * svg/SVGElementInstanceList.idl:
864         * svg/SVGException.idl:
865         * svg/SVGFEDropShadowElement.idl:
866         * svg/SVGFEGaussianBlurElement.idl:
867         * svg/SVGFEMorphologyElement.idl:
868         * svg/SVGFilterElement.idl:
869         * svg/SVGGraphicsElement.idl:
870         * svg/SVGLength.idl:
871         * svg/SVGLengthList.idl:
872         * svg/SVGMarkerElement.idl:
873         * svg/SVGMaskElement.idl:
874         * svg/SVGMatrix.idl:
875         * svg/SVGNumberList.idl:
876         * svg/SVGPaint.idl:
877         * svg/SVGPathElement.idl:
878         * svg/SVGPathSegList.idl:
879         * svg/SVGPatternElement.idl:
880         * svg/SVGPoint.idl:
881         * svg/SVGPointList.idl:
882         * svg/SVGSVGElement.idl:
883         * svg/SVGStringList.idl:
884         * svg/SVGTests.idl:
885         * svg/SVGTextContentElement.idl:
886         * svg/SVGTransform.idl:
887         * svg/SVGTransformList.idl:
888         * workers/DedicatedWorkerGlobalScope.idl:
889         * workers/Worker.idl:
890         * workers/WorkerGlobalScope.idl:
891         * workers/WorkerLocation.idl:
892         * xml/DOMParser.idl:
893         * xml/XMLHttpRequest.idl:
894         * xml/XMLHttpRequestException.idl:
895         * xml/XMLHttpRequestUpload.idl:
896         * xml/XMLSerializer.idl:
897         * xml/XPathEvaluator.idl:
898         * xml/XPathException.idl:
899         * xml/XPathExpression.idl:
900         * xml/XPathNSResolver.idl:
901         * xml/XPathResult.idl:
902         * xml/XSLTProcessor.idl:
903
904 2013-11-11  Javier Fernandez  <jfernandez@igalia.com>
905
906         [CSS Regions] Selection focusNode set to the "region" block, instead of the "source" block
907         https://bugs.webkit.org/show_bug.cgi?id=120769
908
909         Reviewed by David Hyatt.
910
911         When a point hits a Region block, current positionForPoint algorithm determines its
912         position in the DOM and returns either the start or end offset for such block, since
913         Region blocks have no children in the DOM.
914
915         It's necessary to map the point into Flow Thread coordinates in order to determine
916         the DOM position of the specific element rendered by the Region.
917
918         Top margin, padding and border points should be mapped to the beginning of the Region
919         block, while bottom points are mapped to the block end. The Left coordinate its just
920         adjusted to fit in the Flow Thread boundaries, since its not affected by the Flow
921         direction.
922
923         Besides, when inspecting the Flow Thread blocks looking for the last candidate box,
924         the Region originally associated to the point might be taken into account. Only the
925         blocks/boxes rendered by the Region are potential candidates.
926
927         Tests: fast/regions/selection/position-for-point-1-vert-lr.html
928                fast/regions/selection/position-for-point-1-vert-rl.html
929                fast/regions/selection/position-for-point-1.html
930                fast/regions/selection/position-for-point-vert-lr.html
931                fast/regions/selection/position-for-point-vert-rl.html
932                fast/regions/selection/position-for-point.html
933
934         * rendering/RenderBlock.cpp:
935         (WebCore::isChildHitTestCandidate):
936         (WebCore::RenderBlock::positionForPoint):
937         * rendering/RenderBlockFlow.cpp:
938         (WebCore::RenderBlockFlow::positionForPoint): Added.
939         It just redirects the call to the associated RenderNamedFlowFragment instance.
940         * rendering/RenderBlockFlow.h:
941         * rendering/RenderRegion.cpp:
942         (WebCore::RenderRegion::mapRegionPointIntoFlowThreadCoordinates): Added.
943         It performs the coordinates mapping.
944         (WebCore::RenderRegion::positionForPoint): Added.
945         It determines the corresponding LayoutPoint in the FlowThread the Region
946         is associated to, forwarding the call to the RenderBlock class using the
947         FlowThread's first child block and such new point.
948         * rendering/RenderRegion.h:
949
950 2013-11-11  Gergo Balogh  <geryxyz@inf.u-szeged.hu>
951
952         [curl] Remove unused includes.
953         https://bugs.webkit.org/show_bug.cgi?id=120415
954
955         Reviewed by Csaba Osztrogonác.
956
957         Original patch by 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
958
959         * platform/network/curl/ProxyServerCurl.cpp:
960         * platform/network/curl/ResourceHandleCurl.cpp:
961         * platform/network/curl/ResourceHandleManager.cpp:
962
963 2013-11-11  Csaba Osztrogonác  <ossy@webkit.org>
964
965         URTBF after r159027 to make Apple Windows build happy.
966
967         * platform/graphics/cg/ImageSourceCG.cpp:
968         (WebCore::sharedBufferGetBytesAtPosition):
969
970 2013-11-11  Andreas Kling  <akling@apple.com>
971
972         Kill InlineFlowBox::rendererLineBoxes().
973         <https://webkit.org/b/124141>
974
975         We only ever used this to access the RenderLineBoxList for non-root
976         boxes, and those always have a RenderInline renderer.
977
978         Tighten things up by losing the virtual rendererLineBoxes() and
979         calling RenderInline::lineBoxes() directly.
980
981         Reviewed by Antti Koivisto.
982
983 2013-11-11  Andreas Kling  <akling@apple.com>
984
985         Bring the LineFragmentationData back to RootInlineBox.
986         <https://webkit.org/b/124136>
987
988         Now that we have the simple line layout path, almost all the root
989         line boxes end up with some kind of fragmentation data, so we might
990         as well put the members back on RootInlineBox and avoid the extra
991         allocation (and indirection.)
992
993         1.74 MB progression on HTML5 spec at <http://whatwg.org/c>
994
995         Reviewed by Antti Koivisto.
996
997 2013-11-10  Andreas Kling  <akling@apple.com>
998
999         Shrink RenderInline.
1000         <https://webkit.org/b/124134>
1001
1002         Move the "always create line boxes" bit from RenderInline up to
1003         RenderElement. I didn't do this earlier because there were no bits
1004         free on RenderObject but thanks to RenderElement we now have tons!
1005
1006         540 kB progression on HTML5 spec at <http://whatwg.org/c>
1007
1008         Reviewed by Anders Carlsson.
1009
1010 2013-11-10  Sam Weinig  <sam@webkit.org>
1011
1012         Make childShouldCreateRenderer() take a Node reference
1013         https://bugs.webkit.org/show_bug.cgi?id=124132
1014
1015         Reviewed by Andreas Kling.
1016
1017         The Node passed to childShouldCreateRenderer() is never null.
1018
1019 2013-11-10  Frédéric Wang  <fred.wang@free.fr>
1020
1021         CSS direction must be reset to ltr on <math> element.
1022         <https://webkit.org/b/124121>
1023
1024         Reviewed by Darin Adler.
1025
1026         Test: mathml/presentation/direction.html
1027
1028         * css/mathml.css:
1029         (math): set direction: ltr; on the <math> element.
1030
1031 2013-11-10  Sam Weinig  <sam@webkit.org>
1032
1033         Reduce the size of RenderBlockFlow by making its rare data inherit from RenderBlockRareData
1034         https://bugs.webkit.org/show_bug.cgi?id=124124
1035
1036         Reviewed by Anders Carlsson.
1037
1038         Reduce RenderBlockFlow by one word.
1039
1040         * rendering/RenderBlock.cpp:
1041         * rendering/RenderBlock.h:
1042         * rendering/RenderBlockFlow.cpp:
1043         * rendering/RenderBlockFlow.h:
1044
1045 2013-11-10  Antti Koivisto  <antti@apple.com>
1046
1047         Use start/end instead of textOffset/textLength for simple text runs
1048         https://bugs.webkit.org/show_bug.cgi?id=124130
1049
1050         Reviewed by Oliver Hunt.
1051         
1052         The code reads better this way.
1053
1054         * rendering/SimpleLineLayout.cpp:
1055         (WebCore::SimpleLineLayout::createTextRuns):
1056         * rendering/SimpleLineLayout.h:
1057         (WebCore::SimpleLineLayout::Run::Run):
1058         * rendering/SimpleLineLayoutFunctions.h:
1059         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
1060         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
1061         (WebCore::SimpleLineLayout::containsTextCaretOffset):
1062         (WebCore::SimpleLineLayout::isTextRendered):
1063         * rendering/SimpleLineLayoutResolver.h:
1064         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1065
1066 2013-11-10  Antti Koivisto  <antti@apple.com>
1067
1068         Implement white-space property on simple line layout path
1069         https://bugs.webkit.org/show_bug.cgi?id=124122
1070
1071         Reviewed by Andreas Kling.
1072         
1073         Support all values of the white-space property and the tab-size property.
1074
1075         Tests: fast/forms/basic-textareas-simple-lines.html
1076                fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html
1077                fast/text/whitespace/pre-wrap-line-test-simple-lines.html
1078                fast/text/whitespace/pre-wrap-long-word-simple-lines.html
1079                fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html
1080
1081         * rendering/SimpleLineLayout.cpp:
1082         (WebCore::SimpleLineLayout::canUseFor):
1083         (WebCore::SimpleLineLayout::isWhitespace):
1084         (WebCore::SimpleLineLayout::skipWhitespaces):
1085         (WebCore::SimpleLineLayout::textWidth):
1086         (WebCore::SimpleLineLayout::measureWord):
1087         (WebCore::SimpleLineLayout::createTextRuns):
1088         * rendering/SimpleLineLayoutFunctions.cpp:
1089         (WebCore::SimpleLineLayout::paintDebugBorders):
1090         (WebCore::SimpleLineLayout::paintFlow):
1091
1092 2013-11-10  Sergio Correia  <sergio.correia@openbossa.org>
1093
1094         Fix EFL build after r159027
1095         https://bugs.webkit.org/show_bug.cgi?id=124127
1096
1097         Reviewed by Anders Carlsson.
1098
1099         No new tests, build fix.
1100
1101         * page/Settings.in: Add std to numeric_limits, since we don't have
1102         'using std' directives anymore.
1103
1104 2013-11-10  Anders Carlsson  <andersca@apple.com>
1105
1106         Fix build.
1107
1108         * rendering/RenderMultiColumnBlock.cpp:
1109         (WebCore::RenderMultiColumnBlock::computeColumnCountAndWidth):
1110         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
1111
1112 2013-11-10  Anders Carlsson  <andersca@apple.com>
1113
1114         Remove all 'std' using directives from WebCore
1115         https://bugs.webkit.org/show_bug.cgi?id=124125
1116
1117         Reviewed by Sam Weinig.
1118
1119         As per the coding style guidelines.
1120
1121         * loader/CrossOriginPreflightResultCache.cpp:
1122         (WebCore::CrossOriginPreflightResultCache::appendEntry):
1123         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
1124         * loader/WorkerThreadableLoader.cpp:
1125         * loader/appcache/ApplicationCacheStorage.cpp:
1126         (WebCore::ApplicationCacheStorage::loadCache):
1127         * loader/appcache/ManifestParser.cpp:
1128         (WebCore::parseManifest):
1129         * loader/cache/MemoryCache.cpp:
1130         (WebCore::MemoryCache::deadCapacity):
1131         (WebCore::MemoryCache::lruListFor):
1132         * page/CaptionUserPreferencesMediaAF.cpp:
1133         * page/Chrome.cpp:
1134         * page/DOMTimer.cpp:
1135         (WebCore::DOMTimer::intervalClampedToMinimum):
1136         * page/FocusController.cpp:
1137         * page/Frame.cpp:
1138         (WebCore::Frame::resizePageRectsKeepingRatio):
1139         * page/PageGroupLoadDeferrer.cpp:
1140         * page/Settings.cpp:
1141         * page/animation/AnimationBase.cpp:
1142         (WebCore::solveStepsFunction):
1143         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1144         (WebCore::AnimationBase::timeToNextService):
1145         (WebCore::AnimationBase::fractionalTime):
1146         (WebCore::AnimationBase::getTimeToNextEvent):
1147         * page/animation/KeyframeAnimation.cpp:
1148         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
1149         * platform/DateComponents.cpp:
1150         * platform/ScrollAnimator.cpp:
1151         (WebCore::ScrollAnimator::handleWheelEvent):
1152         * platform/ScrollView.cpp:
1153         (WebCore::ScrollView::unscaledVisibleContentSize):
1154         (WebCore::ScrollView::setScrollOffset):
1155         (WebCore::ScrollView::updateScrollbars):
1156         (WebCore::ScrollView::scrollContents):
1157         * platform/Scrollbar.cpp:
1158         (WebCore::Scrollbar::moveThumb):
1159         * platform/ScrollbarThemeComposite.cpp:
1160         (WebCore::usedTotalSize):
1161         (WebCore::ScrollbarThemeComposite::thumbPosition):
1162         (WebCore::ScrollbarThemeComposite::thumbLength):
1163         * platform/SharedBuffer.cpp:
1164         (WebCore::SharedBuffer::append):
1165         (WebCore::SharedBuffer::copyBufferAndClear):
1166         (WebCore::SharedBuffer::getSomeData):
1167         * platform/ThreadTimers.cpp:
1168         (WebCore::ThreadTimers::updateSharedTimer):
1169         * platform/Timer.cpp:
1170         (WebCore::TimerHeapLessThanFunction::operator()):
1171         (WebCore::TimerBase::heapPop):
1172         (WebCore::TimerBase::nextUnalignedFireInterval):
1173         * platform/URL.cpp:
1174         (WebCore::findHostnamesInMailToURL):
1175         (WebCore::portAllowed):
1176         * platform/audio/AudioResampler.cpp:
1177         (WebCore::AudioResampler::setRate):
1178         * platform/audio/AudioResamplerKernel.cpp:
1179         (WebCore::AudioResamplerKernel::process):
1180         * platform/audio/Distance.cpp:
1181         (WebCore::DistanceEffect::gain):
1182         * platform/audio/DynamicsCompressorKernel.cpp:
1183         (WebCore::DynamicsCompressorKernel::process):
1184         * platform/audio/EqualPowerPanner.cpp:
1185         (WebCore::EqualPowerPanner::pan):
1186         * platform/audio/HRTFDatabase.cpp:
1187         (WebCore::HRTFDatabase::indexFromElevationAngle):
1188         * platform/audio/HRTFElevation.cpp:
1189         (WebCore::HRTFElevation::createForSubject):
1190         * platform/audio/HRTFKernel.cpp:
1191         (WebCore::HRTFKernel::HRTFKernel):
1192         (WebCore::HRTFKernel::createInterpolatedKernel):
1193         * platform/audio/HRTFPanner.cpp:
1194         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
1195         * platform/audio/Reverb.cpp:
1196         * platform/audio/SincResampler.cpp:
1197         (WebCore::SincResampler::process):
1198         * platform/cf/URLCF.cpp:
1199         * platform/graphics/Color.cpp:
1200         (WebCore::makeRGB):
1201         (WebCore::makeRGBA):
1202         (WebCore::colorFloatToRGBAByte):
1203         (WebCore::Color::light):
1204         (WebCore::Color::dark):
1205         * platform/graphics/CrossfadeGeneratedImage.cpp:
1206         * platform/graphics/FloatQuad.cpp:
1207         (WebCore::min4):
1208         (WebCore::max4):
1209         (WebCore::withinEpsilon):
1210         * platform/graphics/FloatSize.cpp:
1211         (WebCore::FloatSize::isZero):
1212         * platform/graphics/FontFastPath.cpp:
1213         (WebCore::Font::floatWidthForSimpleText):
1214         * platform/graphics/FontPlatformData.cpp:
1215         * platform/graphics/GraphicsContext.cpp:
1216         * platform/graphics/RoundedRect.cpp:
1217         (WebCore::RoundedRect::Radii::expand):
1218         * platform/graphics/ShadowBlur.cpp:
1219         (WebCore::calculateLobes):
1220         (WebCore::computeSliceSizesFromRadii):
1221         * platform/graphics/SimpleFontData.cpp:
1222         (WebCore::SimpleFontData::initCharWidths):
1223         * platform/graphics/WidthIterator.cpp:
1224         (WebCore::WidthIterator::WidthIterator):
1225         (WebCore::WidthIterator::advanceInternal):
1226         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1227         (WebCore::InbandTextTrackPrivateAVF::processCue):
1228         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1229         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
1230         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1231         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1232         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
1233         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
1234         * platform/graphics/ca/GraphicsLayerCA.cpp:
1235         (WebCore::GraphicsLayerCA::setOpacity):
1236         (WebCore::GraphicsLayerCA::setNeedsDisplay):
1237         (WebCore::GraphicsLayerCA::setupAnimation):
1238         (WebCore::clampedContentsScaleForScale):
1239         * platform/graphics/ca/mac/TileController.mm:
1240         (WebCore::TileController::getTileIndexRangeForRect):
1241         (WebCore::TileController::computeTileCoverageRect):
1242         * platform/graphics/cg/GraphicsContextCG.cpp:
1243         (WebCore::GraphicsContext::setPlatformShadow):
1244         (WebCore::computeLineBoundsAndAntialiasingModeForText):
1245         * platform/graphics/cg/ImageBufferCG.cpp:
1246         * platform/graphics/cg/ImageBufferDataCG.cpp:
1247         (WebCore::ImageBufferData::getData):
1248         * platform/graphics/cg/ImageSourceCG.cpp:
1249         * platform/graphics/filters/FEDropShadow.cpp:
1250         * platform/graphics/filters/FEGaussianBlur.cpp:
1251         (WebCore::boxBlur):
1252         (WebCore::FEGaussianBlur::platformApplyGeneric):
1253         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
1254         (WebCore::FEGaussianBlur::calculateStdDeviation):
1255         * platform/graphics/gpu/Texture.cpp:
1256         (WebCore::Texture::updateSubRect):
1257         * platform/graphics/gpu/TilingData.cpp:
1258         (WebCore::computeNumTiles):
1259         (WebCore::TilingData::tileXIndexFromSrcCoord):
1260         (WebCore::TilingData::tileYIndexFromSrcCoord):
1261         * platform/graphics/mac/ComplexTextController.cpp:
1262         (WebCore::ComplexTextController::ComplexTextController):
1263         (WebCore::ComplexTextController::offsetForPosition):
1264         (WebCore::ComplexTextController::advance):
1265         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1266         * platform/graphics/mac/FontComplexTextMac.cpp:
1267         (WebCore::Font::floatWidthForComplexText):
1268         * platform/graphics/mac/FontMac.mm:
1269         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1270         (WebCore::MediaPlayerPrivateQTKit::duration):
1271         * platform/graphics/mac/SimpleFontDataMac.mm:
1272         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
1273         * platform/graphics/transforms/MatrixTransformOperation.cpp:
1274         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1275         * platform/graphics/transforms/RotateTransformOperation.cpp:
1276         * platform/graphics/transforms/TransformOperations.cpp:
1277         (WebCore::TransformOperations::blendByMatchingOperations):
1278         * platform/graphics/transforms/TransformationMatrix.cpp:
1279         (WebCore::clampEdgeValue):
1280         * platform/mac/ScrollAnimatorMac.mm:
1281         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
1282         * platform/mac/ScrollViewMac.mm:
1283         (WebCore::ScrollView::platformSetContentsSize):
1284         (WebCore::ScrollView::platformSetScrollPosition):
1285         * platform/mac/ScrollbarThemeMac.mm:
1286         * platform/mac/ThemeMac.mm:
1287         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1288         (-[WebVideoFullscreenHUDWindowController incrementVolume]):
1289         (timeToString):
1290         * platform/network/HTTPHeaderMap.cpp:
1291         (WebCore::HTTPHeaderMap::copyData):
1292         * platform/network/ResourceRequestBase.cpp:
1293         * platform/network/ResourceResponseBase.cpp:
1294         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
1295         * platform/network/cf/ResourceResponseCFNet.cpp:
1296         * platform/network/mac/ResourceResponseMac.mm:
1297         (WebCore::ResourceResponse::initNSURLResponse):
1298         * platform/text/TextBreakIteratorICU.cpp:
1299         (WebCore::textClone):
1300         (WebCore::textLatin1MoveInPrimaryContext):
1301         (WebCore::textLatin1MoveInPriorContext):
1302         (WebCore::textInChunkOrOutOfRange):
1303         (WebCore::textOpenLatin1):
1304         (WebCore::textUTF16MoveInPrimaryContext):
1305         (WebCore::textUTF16MoveInPriorContext):
1306         (WebCore::textOpenUTF16):
1307         * platform/text/TextCodecUTF16.cpp:
1308         (WebCore::TextCodecUTF16::encode):
1309         * platform/text/TextCodecUTF8.cpp:
1310         (WebCore::TextCodecUTF8::encode):
1311         * platform/text/TextStream.cpp:
1312         * platform/text/mac/LocaleMac.mm:
1313         * platform/text/mac/TextCodecMac.cpp:
1314         (WebCore::TextCodecMac::decode):
1315         * rendering/AutoTableLayout.cpp:
1316         (WebCore::AutoTableLayout::recalcColumn):
1317         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
1318         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
1319         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1320         (WebCore::AutoTableLayout::layout):
1321         * rendering/FixedTableLayout.cpp:
1322         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
1323         * rendering/FloatingObjects.cpp:
1324         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
1325         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
1326         (WebCore::FloatingObjects::logicalRightOffset):
1327         * rendering/InlineBox.cpp:
1328         * rendering/InlineFlowBox.cpp:
1329         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
1330         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
1331         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1332         (WebCore::InlineFlowBox::computeMaxLogicalTop):
1333         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
1334         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
1335         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1336         (WebCore::InlineFlowBox::nodeAtPoint):
1337         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
1338         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
1339         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
1340         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
1341         * rendering/InlineTextBox.cpp:
1342         (WebCore::InlineTextBox::isSelected):
1343         (WebCore::InlineTextBox::localSelectionRect):
1344         (WebCore::InlineTextBox::placeEllipsisBox):
1345         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
1346         (WebCore::InlineTextBox::paint):
1347         (WebCore::InlineTextBox::selectionStartEnd):
1348         (WebCore::InlineTextBox::paintSelection):
1349         (WebCore::InlineTextBox::paintCompositionBackground):
1350         (WebCore::computeUnderlineOffset):
1351         (WebCore::InlineTextBox::paintDecoration):
1352         (WebCore::InlineTextBox::paintDocumentMarker):
1353         (WebCore::InlineTextBox::paintTextMatchMarker):
1354         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1355         (WebCore::InlineTextBox::paintCompositionUnderline):
1356         * rendering/RenderBlock.cpp:
1357         (WebCore::RenderBlock::computeOverflow):
1358         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
1359         (WebCore::RenderBlock::paintChild):
1360         (WebCore::RenderBlock::blockSelectionGap):
1361         (WebCore::RenderBlock::logicalLeftSelectionGap):
1362         (WebCore::RenderBlock::logicalRightSelectionGap):
1363         (WebCore::RenderBlock::calcColumnWidth):
1364         (WebCore::RenderBlock::adjustRectForColumns):
1365         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
1366         (WebCore::RenderBlock::computePreferredLogicalWidths):
1367         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
1368         (WebCore::updatePreferredWidth):
1369         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1370         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1371         * rendering/RenderBlockFlow.cpp:
1372         (WebCore::RenderBlockFlow::clearFloats):
1373         (WebCore::RenderBlockFlow::layoutBlock):
1374         (WebCore::RenderBlockFlow::layoutBlockChild):
1375         (WebCore::RenderBlockFlow::collapseMargins):
1376         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
1377         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
1378         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
1379         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
1380         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
1381         (WebCore::calculateMinimumPageHeight):
1382         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
1383         (WebCore::RenderBlockFlow::removeFloatingObject):
1384         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
1385         (WebCore::RenderBlockFlow::positionNewFloats):
1386         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
1387         (WebCore::RenderBlockFlow::addOverhangingFloats):
1388         (WebCore::RenderBlockFlow::getClearDelta):
1389         (WebCore::RenderBlockFlow::adjustForBorderFit):
1390         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
1391         (WebCore::RenderBlockFlow::updateLogicalHeight):
1392         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
1393         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
1394         (WebCore::RenderBlockFlow::relayoutForPagination):
1395         * rendering/RenderBlockLineLayout.cpp:
1396         (WebCore::updateLogicalWidthForLeftAlignedBlock):
1397         (WebCore::updateLogicalWidthForRightAlignedBlock):
1398         (WebCore::updateLogicalWidthForCenterAlignedBlock):
1399         (WebCore::setLogicalWidthForTextRun):
1400         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
1401         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1402         (WebCore::RenderBlockFlow::layoutLineBoxes):
1403         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
1404         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
1405         (WebCore::tryHyphenating):
1406         * rendering/RenderBox.cpp:
1407         (WebCore::RenderBox::scrollWidth):
1408         (WebCore::RenderBox::scrollHeight):
1409         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
1410         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
1411         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
1412         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
1413         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
1414         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
1415         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
1416         (WebCore::RenderBox::repaintLayerRectsForImage):
1417         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1418         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
1419         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
1420         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
1421         (WebCore::RenderBox::computeLogicalWidthInRegion):
1422         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
1423         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1424         (WebCore::RenderBox::computeInlineDirectionMargins):
1425         (WebCore::RenderBox::computeLogicalHeight):
1426         (WebCore::RenderBox::computePercentageLogicalHeight):
1427         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1428         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
1429         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1430         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1431         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1432         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1433         (WebCore::RenderBox::applyVisualEffectOverflow):
1434         (WebCore::RenderBox::addLayoutOverflow):
1435         * rendering/RenderBoxModelObject.cpp:
1436         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1437         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
1438         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
1439         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
1440         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1441         (WebCore::RenderBoxModelObject::paintOneBorderSide):
1442         (WebCore::calculateAdjustedInnerBorder):
1443         (WebCore::RenderBoxModelObject::paintBoxShadow):
1444         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
1445         * rendering/RenderDeprecatedFlexibleBox.cpp:
1446         (WebCore::FlexBoxIterator::next):
1447         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
1448         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
1449         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1450         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1451         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1452         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
1453         * rendering/RenderFileUploadControl.cpp:
1454         (WebCore::RenderFileUploadControl::maxFilenameWidth):
1455         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
1456         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1457         * rendering/RenderImage.cpp:
1458         (WebCore::RenderImage::setImageSizeForAltText):
1459         * rendering/RenderInline.cpp:
1460         (WebCore::computeMargin):
1461         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
1462         (WebCore::RenderInline::paintOutline):
1463         (WebCore::RenderInline::paintOutlineForLine):
1464         * rendering/RenderLayer.cpp:
1465         (WebCore::RenderLayer::clampScrollOffset):
1466         (WebCore::RenderLayer::scrollRectToVisible):
1467         (WebCore::RenderLayer::visibleContentRect):
1468         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1469         (WebCore::RenderLayer::hitTestOverflowControls):
1470         (WebCore::RenderLayer::hitTestLayer):
1471         (WebCore::RenderLayer::calculateLayerBounds):
1472         * rendering/RenderLayerBacking.cpp:
1473         * rendering/RenderLayerModelObject.cpp:
1474         * rendering/RenderLineBoxList.cpp:
1475         (WebCore::RenderLineBoxList::rangeIntersectsRect):
1476         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
1477         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
1478         (WebCore::RenderLineBoxList::paint):
1479         * rendering/RenderListBox.cpp:
1480         (WebCore::RenderListBox::updateFromElement):
1481         (WebCore::RenderListBox::layout):
1482         (WebCore::RenderListBox::computePreferredLogicalWidths):
1483         (WebCore::RenderListBox::size):
1484         (WebCore::RenderListBox::numVisibleItems):
1485         (WebCore::RenderListBox::panScroll):
1486         (WebCore::RenderListBox::scrollHeight):
1487         * rendering/RenderListItem.cpp:
1488         * rendering/RenderListMarker.cpp:
1489         * rendering/RenderMarquee.cpp:
1490         (WebCore::RenderMarquee::marqueeSpeed):
1491         (WebCore::RenderMarquee::computePosition):
1492         (WebCore::RenderMarquee::timerFired):
1493         * rendering/RenderMediaControls.cpp:
1494         * rendering/RenderMenuList.cpp:
1495         (WebCore::RenderMenuList::updateOptionsWidth):
1496         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
1497         (WebCore::RenderMenuList::computePreferredLogicalWidths):
1498         * rendering/RenderMeter.cpp:
1499         * rendering/RenderMultiColumnBlock.cpp:
1500         * rendering/RenderMultiColumnSet.cpp:
1501         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
1502         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
1503         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
1504         * rendering/RenderNamedFlowFragment.cpp:
1505         * rendering/RenderObject.cpp:
1506         (WebCore::RenderObject::drawLineForBoxSide):
1507         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1508         (WebCore::RenderObject::caretMaxOffset):
1509         * rendering/RenderProgress.cpp:
1510         * rendering/RenderRegion.cpp:
1511         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1512         * rendering/RenderReplaced.cpp:
1513         (WebCore::RenderReplaced::shouldPaint):
1514         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1515         (WebCore::RenderReplaced::computePreferredLogicalWidths):
1516         * rendering/RenderRubyBase.cpp:
1517         * rendering/RenderRubyRun.cpp:
1518         (WebCore::RenderRubyRun::getOverhang):
1519         * rendering/RenderRubyText.cpp:
1520         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
1521         * rendering/RenderScrollbarPart.cpp:
1522         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
1523         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
1524         * rendering/RenderSearchField.cpp:
1525         (WebCore::RenderSearchField::computeControlLogicalHeight):
1526         * rendering/RenderTable.cpp:
1527         (WebCore::RenderTable::updateLogicalWidth):
1528         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1529         (WebCore::RenderTable::layout):
1530         (WebCore::RenderTable::computePreferredLogicalWidths):
1531         (WebCore::RenderTable::calcBorderStart):
1532         (WebCore::RenderTable::calcBorderEnd):
1533         (WebCore::RenderTable::outerBorderBefore):
1534         (WebCore::RenderTable::outerBorderAfter):
1535         (WebCore::RenderTable::outerBorderStart):
1536         (WebCore::RenderTable::outerBorderEnd):
1537         * rendering/RenderTableCell.cpp:
1538         (WebCore::RenderTableCell::parseColSpanFromDOM):
1539         (WebCore::RenderTableCell::parseRowSpanFromDOM):
1540         (WebCore::RenderTableCell::logicalWidthFromColumns):
1541         (WebCore::RenderTableCell::computePreferredLogicalWidths):
1542         (WebCore::RenderTableCell::layout):
1543         (WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
1544         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
1545         (WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
1546         (WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
1547         * rendering/RenderTableSection.cpp:
1548         (WebCore::RenderTableSection::ensureRows):
1549         (WebCore::RenderTableSection::calcRowLogicalHeight):
1550         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
1551         (WebCore::RenderTableSection::layoutRows):
1552         (WebCore::RenderTableSection::firstLineBaseline):
1553         (WebCore::RenderTableSection::removeCachedCollapsedBorders):
1554         (WebCore::RenderTableSection::setCachedCollapsedBorder):
1555         (WebCore::RenderTableSection::cachedCollapsedBorder):
1556         * rendering/RenderText.cpp:
1557         (WebCore::makeCapitalized):
1558         (WebCore::RenderText::absoluteRectsForRange):
1559         (WebCore::RenderText::absoluteQuadsForRange):
1560         (WebCore::maxWordFragmentWidth):
1561         (WebCore::RenderText::computePreferredLogicalWidths):
1562         * rendering/RenderTextControl.cpp:
1563         (WebCore::RenderTextControl::computePreferredLogicalWidths):
1564         * rendering/RenderTextControlSingleLine.cpp:
1565         * rendering/RenderThemeMac.mm:
1566         (WebCore::RenderThemeMac::paintProgressBar):
1567         (WebCore::RenderThemeMac::paintMenuListButton):
1568         * rendering/RenderWidget.cpp:
1569         * rendering/RootInlineBox.cpp:
1570         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1571         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
1572         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
1573         (WebCore::RootInlineBox::blockDirectionPointInLine):
1574         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
1575         (WebCore::setAscentAndDescent):
1576         (WebCore::RootInlineBox::ascentAndDescentForBox):
1577         * rendering/mathml/RenderMathMLRoot.cpp:
1578         (WebCore::RenderMathMLRoot::layout):
1579         * rendering/style/RenderStyle.cpp:
1580         (WebCore::calcConstraintScaleFor):
1581         (WebCore::RenderStyle::setFontSize):
1582         (WebCore::RenderStyle::getShadowExtent):
1583         (WebCore::RenderStyle::getShadowInsetExtent):
1584         (WebCore::RenderStyle::getShadowHorizontalExtent):
1585         (WebCore::RenderStyle::getShadowVerticalExtent):
1586         * rendering/style/SVGRenderStyle.cpp:
1587         * rendering/style/ShadowData.cpp:
1588         (WebCore::calculateShadowExtent):
1589         * rendering/svg/RenderSVGResourceFilter.cpp:
1590         * rendering/svg/RenderSVGRoot.cpp:
1591         * rendering/svg/SVGInlineFlowBox.cpp:
1592         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1593         * rendering/svg/SVGInlineTextBox.cpp:
1594         (WebCore::SVGInlineTextBox::localSelectionRect):
1595         * svg/SVGAnimatedNumber.cpp:
1596         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1597         * svg/animation/SMILTimeContainer.cpp:
1598         (WebCore::SMILTimeContainer::startTimer):
1599         (WebCore::SMILTimeContainer::updateAnimations):
1600         * svg/animation/SVGSMILElement.cpp:
1601         (WebCore::SVGSMILElement::simpleDuration):
1602         (WebCore::SVGSMILElement::repeatingDuration):
1603         (WebCore::SVGSMILElement::resolveActiveEnd):
1604         (WebCore::SVGSMILElement::resolveInterval):
1605         (WebCore::SVGSMILElement::resolveFirstInterval):
1606         (WebCore::SVGSMILElement::resolveNextInterval):
1607         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
1608         * xml/XMLTreeViewer.cpp:
1609         * xml/parser/XMLDocumentParser.cpp:
1610         * xml/parser/XMLDocumentParserLibxml2.cpp:
1611         (WebCore::OffsetBuffer::readOutBytes):
1612
1613 2013-11-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1614
1615         [AX] Clean up static_cast<> to cast from AccessibilityObject 
1616         https://bugs.webkit.org/show_bug.cgi?id=124032
1617
1618         Reviewed by Mario Sanchez Prada.
1619
1620         ACCESSIBILITY_OBJECT_TYPE_CASTS can support more helpful casting functions.
1621         So, we need to use them as much as possible. This patch cleans up all static_cast<> in accessibility.
1622
1623         This patch generates toAccessibilityFoo() in order to replace static_cast<> with it. Below toAccessibilityFoo()
1624         are generated.
1625
1626         - toAccessibilityARIAGridRow()
1627         - toAccessibilityImageMapLink()
1628         - toAccessibilityListBox()
1629         - toAccessibilityListBoxOption()
1630         - toAccessibilityMenuListOption()
1631         - toAccessibilityMenuListPopup()
1632         - toAccessibilityScrollbar()
1633         - toAccessibilitySlider()
1634
1635         No new tests, no behavior changes.
1636
1637         * accessibility/AXObjectCache.cpp:
1638         (WebCore::AXObjectCache::focusedImageMapUIElement):
1639         * accessibility/AccessibilityARIAGridRow.h:
1640         * accessibility/AccessibilityImageMapLink.h:
1641         * accessibility/AccessibilityListBox.cpp:
1642         (WebCore::AccessibilityListBox::setSelectedChildren):
1643         (WebCore::AccessibilityListBox::selectedChildren):
1644         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
1645         * accessibility/AccessibilityListBox.h:
1646         * accessibility/AccessibilityListBoxOption.h:
1647         * accessibility/AccessibilityMenuList.cpp:
1648         (WebCore::AccessibilityMenuList::addChildren):
1649         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
1650         * accessibility/AccessibilityMenuListOption.h:
1651         * accessibility/AccessibilityMenuListPopup.cpp:
1652         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
1653         * accessibility/AccessibilityMenuListPopup.h:
1654         * accessibility/AccessibilityObject.h:
1655         (WebCore::AccessibilityObject::isListBoxOption):
1656         (WebCore::AccessibilityObject::isSliderThumb):
1657         * accessibility/AccessibilityRenderObject.cpp:
1658         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1659         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1660         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
1661         * accessibility/AccessibilityScrollView.cpp:
1662         (WebCore::AccessibilityScrollView::addChildScrollbar):
1663         * accessibility/AccessibilityScrollbar.h:
1664         * accessibility/AccessibilitySlider.cpp:
1665         (WebCore::AccessibilitySlider::addChildren):
1666         * accessibility/AccessibilitySlider.h:
1667         * accessibility/AccessibilitySpinButton.cpp:
1668         (WebCore::AccessibilitySpinButton::addChildren):
1669         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1670         (webkitAccessibleSelectionClearSelection):
1671         (webkitAccessibleSelectionSelectAllSelection):
1672         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1673         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1674         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1675         * rendering/RenderMenuList.cpp:
1676         (WebCore::RenderMenuList::didUpdateActiveOption):
1677
1678 2013-11-10  Andreas Kling  <akling@apple.com>
1679
1680         Rebaseline bindings tests after r158997.
1681
1682         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1683
1684 2013-11-10  Brendan Long  <b.long@cablelabs.com>
1685
1686         [GStreamer] Consolidate more code into TrackPrivateBaseGStreamer
1687         https://bugs.webkit.org/show_bug.cgi?id=124020
1688
1689         Reviewed by Philippe Normand.
1690
1691         No new tests because this is just refactoring.
1692
1693         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
1694         (WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): Don't pass playbin to TrackPrivateBaseGStreamer, and do pass a pointer to "this".
1695         (WebCore::AudioTrackPrivateGStreamer::disconnect): Clear m_playbin().
1696         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Move labelChanged() and languageChanged() to TrackPrivateBaseGStreamer. Move m_playbin to this class (along with disconnect() to clear it).
1697         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Move tag handling, pad and index to TrackPrivateBaseGStreamer.
1698         (WebCore::textTrackPrivateEventCallback):
1699         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
1700         (WebCore::InbandTextTrackPrivateGStreamer::disconnect):
1701         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1702         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Add WebKitTextCombinerPad with "tags" property, set in the same was as input-selector's pads.
1703         (webkit_text_combiner_pad_init): Initialize tags to 0.
1704         (webkitTextCombinerPadFinalize): Clear tags.
1705         (webkitTextCombinerPadGetProperty): Handling "tags" property.
1706         (webkitTextCombinerPadEvent): Changed to be a pad event function instead of a pad probe, and now intercepts tags and merges them (like input-selector pads do).
1707         (webkitTextCombinerRequestNewPad): Using WebKitTextCombinerPad instead of just GhostPad.
1708         (webkit_text_combiner_pad_class_init): Setup WebKitTextCombinerPad.
1709         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Remove superfluous code.
1710         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1711         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Use "notify::active" so we don't need a playbin, and immediately check for tags after the constructor.
1712         (WebCore::TrackPrivateBaseGStreamer::disconnect): Remove m_playbin.
1713         (WebCore::TrackPrivateBaseGStreamer::getTag): Refactored out from notifyTrackOfTagsChanged.
1714         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Simplify using m_owner (so we can call labelChanged() and languageChanged() directly), and use getTag() above.
1715         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_owner to we can access the owning track, and change some functions to match our needs better.
1716         (WebCore::TrackPrivateBaseGStreamer::setActive): Add empty default since InbandTextTrackPrivateGStreamer doesn't need this.
1717         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Same as AudioTrackPrivateGStreamer.
1718         (WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
1719         (WebCore::VideoTrackPrivateGStreamer::disconnect):
1720         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same as AudioTrackPrivateGStreamer.
1721
1722 2013-11-10  Andreas Kling  <akling@apple.com>
1723
1724         Generate type casting helpers for Widget classes.
1725         <https://webkit.org/b/124120>
1726
1727         Add a WIDGET_TYPE_CASTS macro and replace all the hand-written
1728         toFoo() helpers we had for Widget subclasses. Fixed up a handful
1729         of places that were still using static_cast.
1730
1731         Reviewed by Antti Koivisto.
1732
1733 2013-11-10  Andreas Kling  <akling@apple.com>
1734
1735         Remove unused FragmentationDisabler class.
1736         <https://webkit.org/b/124118>
1737
1738         This RAII object was added in r144744 to avoid a crash when using
1739         MathML inside CSS regions. Its only user was removed in r157070.
1740
1741         Reviewed by Antti Koivisto.
1742
1743 2013-11-10  Andreas Kling  <akling@apple.com>
1744
1745         Simplify some is-this-a-MathML-element? checks.
1746         <https://webkit.org/b/124119>
1747
1748         As of r158198, the MathML-ness of an Element is determined by
1749         a Node flag, so there's no need to cast to Element before checking
1750         on this. Simplify accordingly.
1751
1752         Reviewed by Antti Koivisto.
1753
1754 2013-11-10  Andreas Kling  <akling@apple.com>
1755
1756         Remove RenderTheme::shouldOpenPickerWithF4Key().
1757
1758         Rubber-stamped by Anders Carlsson.
1759
1760 2013-11-09  Andreas Kling  <akling@apple.com>
1761
1762         CSSValuePool::createFontFamilyValue() should return PassRef.
1763         <https://webkit.org/b/124114>
1764
1765         Unlike createFontFaceValue(), createFontFamilyValue() can never
1766         fail to return an object and thus should return PassRef.
1767
1768         Reviewed by Anders Carlsson.
1769
1770 2013-11-09  Andreas Kling  <akling@apple.com>
1771
1772         RenderIFrame should display its name correctly in DRT output.
1773         <https://webkit.org/b/124117>
1774
1775         Nuke an age-old FIXME about making RenderIFrame show its true name
1776         in DRT output. No more "RenderPartObject {IFRAME}"!
1777
1778         Reviewed by Anders Carlsson.
1779
1780 2013-11-09  Andreas Kling  <akling@apple.com>
1781
1782         SVGTextMetricsBuilder::walkTree() should take a RenderElement.
1783         <https://webkit.org/b/124105>
1784
1785         Make walkTree() take a RenderElement so we can use the non-virtual
1786         firstChild() internally. All call sites had pointers to compatible
1787         objects already.
1788
1789         Reviewed by Anders Carlsson.
1790
1791 2013-11-09  Andreas Kling  <akling@apple.com>
1792
1793         RenderMathMLFenced should pass around operators in tighter types.
1794         <https://webkit.org/b/124115>
1795
1796         Store operator renderers in RenderMathMLOperator pointers instead
1797         of passing them around as RenderObject.
1798
1799         Reviewed by Martin Robinson.
1800
1801 2013-11-09  Andreas Kling  <akling@apple.com>
1802
1803         Use RENDER_OBJECT_TYPE_CASTS for more types.
1804         <https://webkit.org/b/124112>
1805
1806         Generate toRenderFoo() type casting helpers for these classes:
1807
1808             - RenderCombineText
1809             - RenderDetailsMarker
1810             - RenderListMarker
1811             - RenderVideo
1812             - RenderView
1813
1814         Reviewed by Anders Carlsson.
1815
1816 2013-11-09  Andreas Kling  <akling@apple.com>
1817
1818         Move MathML type checking virtuals to RenderObject.
1819         <https://webkit.org/b/124111>
1820
1821         Previously, checking the type of a MathML renderer would require
1822         that you first check if it's a RenderMathMLBlock, and then casting
1823         to that type to access the check you really wanted.
1824
1825         This change moves all the isRenderMathMLFoo() virtual functions
1826         to RenderObject. I also made sure all the overloads were private
1827         and marked them OVERRIDE/FINAL as appropriate.
1828
1829         Finally I replaced all the hand-written casting functions with
1830         autogenerated ones using RENDER_OBJECT_TYPE_CASTS.
1831
1832         Reviewed by Anders Carlsson.
1833
1834 2013-11-09  Martin Robinson  <mrobinson@igalia.com>
1835
1836         [MathML] Poor spacing around delimiters in MathML Torture Test 14
1837         https://bugs.webkit.org/show_bug.cgi?id=122837
1838
1839         Reviewed by Brent Fulgham.
1840
1841         Instead of stretching the vertical bar with the stretchable version, just repeat
1842         the normal vertical bar. This follows what Gecko does when rendering tall vertical
1843         bars and also works around an issue with STIX fonts leading to poor spacing in
1844         formulas.
1845
1846         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
1847         normal variant.
1848
1849 2013-11-09  Anders Carlsson  <andersca@apple.com>
1850
1851         Encode form data using the KeyedEncoder
1852         https://bugs.webkit.org/show_bug.cgi?id=124107
1853
1854         Reviewed by Sam Weinig.
1855
1856         * platform/KeyedCoding.h:
1857         (WebCore::KeyedEncoder::encodeEnum):
1858         * platform/network/FormData.cpp:
1859         (WebCore::encodeElement):
1860         (WebCore::FormData::encode):
1861         * platform/network/FormData.h:
1862
1863 2013-11-09  Sam Weinig  <sam@webkit.org>
1864
1865         Modernize CanvasObserverProxy
1866         https://bugs.webkit.org/show_bug.cgi?id=124106
1867
1868         Reviewed by Anders Carlsson.
1869
1870         * css/CSSCanvasValue.h:
1871
1872 2013-11-09  Patrick Gansterer  <paroga@webkit.org>
1873
1874         Move RunLoop from WebCore to WTF
1875         https://bugs.webkit.org/show_bug.cgi?id=116606
1876
1877         Reviewed by Anders Carlsson.
1878
1879         * CMakeLists.txt:
1880         * GNUmakefile.list.am:
1881         * PlatformBlackBerry.cmake:
1882         * PlatformEfl.cmake:
1883         * PlatformGTK.cmake:
1884         * PlatformWin.cmake:
1885         * WebCore.exp.in:
1886         * WebCore.vcxproj/WebCore.vcxproj:
1887         * WebCore.xcodeproj/project.pbxproj:
1888         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1889         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1890
1891 2013-11-09  Andreas Kling  <akling@apple.com>
1892
1893         Tighten typing in SVGResourcesCycleSolver a bit.
1894         <https://webkit.org/b/124104>
1895
1896         Make the SVGResourcesCycleSolver constructor take a RenderElement&
1897         and a SVGResources&.
1898
1899         While I was in the neighborhood, also converted one loop to use a
1900         renderer iterator instead of walking siblings manually.
1901
1902         Finally used "auto" to clean up some overly wordy loops.
1903
1904         Reviewed by Anders Carlsson.
1905
1906 2013-11-09  Andreas Kling  <akling@apple.com>
1907
1908         Beat SVGRenderSupport with the RenderElement stick.
1909         <https://webkit.org/b/124102>
1910
1911         Tighten up all the SVGRenderSupport helper functions by making them
1912         take const RenderElements references instead of raw RenderObject
1913         pointers as much as possible.
1914
1915         This tunes up a bunch of branchy style() calls.
1916
1917         The patch looks big but it's mostly mechanical. I just changed the
1918         signatures and then worked backwards until everything built again.
1919
1920         Reviewed by Antti Koivisto.
1921
1922 2013-11-09  Andreas Kling  <akling@apple.com>
1923
1924         SVGTextLayoutAttributes always has a RenderSVGInlineText.
1925         <https://webkit.org/b/124101>
1926
1927         No SVGTextLayoutAttributes object is without a RenderSVGInlineText
1928         "context" so make context() return a reference.
1929
1930         Reviewed by Antti Koivisto.
1931
1932 2013-11-09  Andreas Kling  <akling@apple.com>
1933
1934         Move BindingSecurity stuff under JSDOMBinding umbrella.
1935         <https://webkit.org/b/124099>
1936
1937         We are hitting shouldAllowAccessToDOMWindow() pretty hard on the
1938         demo here: <http://www.jasondavies.com/maps/rotate/>
1939
1940         Putting it together with the rest of the JSDOMBinding code takes
1941         CPU time spent in there from 8.7% to 6.5%. The abstraction was
1942         only used to support alternate JS engines in the past.
1943
1944         Reviewed by Antti Koivisto.
1945
1946 2013-11-08  Brady Eidson  <beidson@apple.com>
1947
1948         Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
1949         https://bugs.webkit.org/show_bug.cgi?id=124088
1950
1951         Reviewed by Tim Horton.
1952 +
1953         * CMakeLists.txt:
1954         * GNUmakefile.list.am:
1955         * WebCore.vcxproj/WebCore.vcxproj:
1956         * WebCore.xcodeproj/project.pbxproj:
1957
1958         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
1959
1960         * Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
1961         * Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
1962
1963         * Modules/indexeddb/IDBBackingStoreInterface.h:
1964         * Modules/indexeddb/IDBCallbacks.h:
1965         * Modules/indexeddb/IDBCursor.cpp:
1966         * Modules/indexeddb/IDBCursorBackend.cpp:
1967         * Modules/indexeddb/IDBCursorBackend.h:
1968         * Modules/indexeddb/IDBDatabase.cpp:
1969         * Modules/indexeddb/IDBDatabase.h:
1970         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1971         * Modules/indexeddb/IDBIndex.cpp:
1972         * Modules/indexeddb/IDBIndex.h:
1973         * Modules/indexeddb/IDBIndexWriter.h:
1974         * Modules/indexeddb/IDBObjectStore.cpp:
1975         * Modules/indexeddb/IDBObjectStore.h:
1976         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1977         * Modules/indexeddb/IDBOpenDBRequest.h:
1978         * Modules/indexeddb/IDBPendingDeleteCall.h:
1979         * Modules/indexeddb/IDBRequest.cpp:
1980         * Modules/indexeddb/IDBRequest.h:
1981         * Modules/indexeddb/IDBTransaction.cpp:
1982         * Modules/indexeddb/IDBTransaction.h:
1983         * Modules/indexeddb/IDBTransactionBackend.cpp:
1984         * Modules/indexeddb/IDBTransactionBackend.h:
1985         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1986         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1987         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1988         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1989         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1990         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
1991
1992 2013-11-08  Andreas Kling  <akling@apple.com>
1993
1994         Reindent JSDOMBinding.h (finally.)
1995
1996         Rubber-stamped by Sam Weinig.
1997
1998 2013-11-08  Sam Weinig  <sam@webkit.org>
1999
2000         Change collectStyleForPresentationAttribute and related functions to take a MutableStylePropertySet by reference
2001         https://bugs.webkit.org/show_bug.cgi?id=124096
2002
2003         Reviewed by Andreas Kling.
2004
2005         Pass MutableStylePropertySet by reference. It is never null.
2006
2007 2013-11-08  Anders Carlsson  <andersca@apple.com>
2008
2009         Implement encoding of arrays of objects
2010         https://bugs.webkit.org/show_bug.cgi?id=124091
2011
2012         Reviewed by Beth Dakin.
2013
2014         * history/HistoryItem.cpp:
2015         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2016         Encode the rest of the members.
2017
2018         * platform/KeyedCoding.h:
2019         (WebCore::KeyedEncoder::encodeObjects):
2020         Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.
2021
2022 2013-11-08  Tim Horton  <timothy_horton@apple.com>
2023
2024         Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
2025         https://bugs.webkit.org/show_bug.cgi?id=123944
2026
2027         Reviewed by Simon Fraser.
2028
2029         Ensure that the tile cache retrieves repaint rects from the tile layer,
2030         not from the tiled backing layer.
2031
2032         * platform/graphics/ca/PlatformCALayer.h:
2033         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2034         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2035         (PlatformCALayerMac::enumerateRectsBeingDrawn):
2036         Allow the PlatformCALayer to decide how to enumerate rects to paint.
2037
2038         * WebCore.exp.in:
2039         * platform/graphics/mac/WebLayer.h:
2040         Add RepaintRectList, remove some unnecessary WebCore::s.
2041
2042         * platform/graphics/mac/WebLayer.mm:
2043         (WebCore::collectRectsToPaint):
2044         Factor collectRectsToPaint out; it just grabs the rects from
2045         the layer and makes the decision whether to repaint the bounds
2046         of the dirty region or just the subregions.
2047
2048         Move calls to collectRectsToPaint() to callers of drawLayerContents(),
2049         so that TileController can collect rects from the appropriate source
2050         (the Tile layer) and other layers just continue grabbing them from
2051         their relevant layers.
2052
2053         Make sure that the list that comes from collectRectsToPaint() always
2054         has at least one rect in it (appending the clip bounds if we don't
2055         want to repaint subregions) so we can simplify logic in drawLayerContents.
2056
2057         (WebCore::drawLayerContents):
2058         Remove code to support CompositingCoordinatesBottomUp, as it's only
2059         used on Windows, so this Mac-specific code doesn't need to support it.
2060
2061         Simplify logic given that dirtyRects will always be non-empty.
2062
2063         (-[WebLayer drawInContext:]):
2064         (-[WebSimpleLayer setNeedsDisplayInRect:]):
2065         * platform/graphics/ca/mac/TileController.mm:
2066         (WebCore::TileController::platformCALayerPaintContents):
2067         Adopt collectRectsToPaint.
2068
2069 2013-11-08  Anders Carlsson  <andersca@apple.com>
2070
2071         Implement more KeyedEncoder functionality
2072         https://bugs.webkit.org/show_bug.cgi?id=124089
2073
2074         Reviewed by Beth Dakin.
2075
2076         * bindings/js/SerializedScriptValue.h:
2077         * history/HistoryItem.cpp:
2078         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2079         * platform/KeyedCoding.h:
2080         (WebCore::KeyedEncoder::encodeConditionalObject):
2081
2082 2013-11-08  Eric Carlson  <eric.carlson@apple.com>
2083
2084         getCueAsHTML() on an empty cue should return a document fragment
2085         https://bugs.webkit.org/show_bug.cgi?id=124084
2086
2087         Reviewed by Darin Adler.
2088
2089         Test: media/track/track-cue-empty-cue-text.html
2090
2091         * html/track/WebVTTParser.cpp:
2092         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): Don't return early when the
2093             passed an empty string.
2094
2095 2013-11-08  Anders Carlsson  <andersca@apple.com>
2096
2097         KeyedEncoder should be able to encoder objects
2098         https://bugs.webkit.org/show_bug.cgi?id=124085
2099
2100         Reviewed by Sam Weinig.
2101
2102         * history/HistoryItem.cpp:
2103         (WebCore::HistoryItem::encodeBackForwardTree):
2104         Encode the root object.
2105
2106         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2107         Encode the target.
2108
2109         * history/HistoryItem.h:
2110         Add new members.
2111
2112         * platform/KeyedCoding.h:
2113         (WebCore::KeyedEncoder::encodeObject):
2114         Call beginObject, call the functor and then call endObject().
2115
2116 2013-11-08  Sam Weinig  <sam@webkit.org>
2117
2118         Teach CanvasObserver about references
2119         https://bugs.webkit.org/show_bug.cgi?id=124082
2120
2121         Reviewed by Anders Carlsson.
2122
2123         * css/CSSCanvasValue.cpp:
2124         * css/CSSCanvasValue.h:
2125         * html/HTMLCanvasElement.cpp:
2126         * html/HTMLCanvasElement.h:
2127
2128 2013-11-08  Anders Carlsson  <andersca@apple.com>
2129
2130         Begin stubbing out a KeyedEncoder class in WebCore
2131         https://bugs.webkit.org/show_bug.cgi?id=124079
2132
2133         Reviewed by Sam Weinig.
2134
2135         * WebCore.exp.in:
2136         Add symbol needed by WebCore.
2137
2138         * WebCore.xcodeproj/project.pbxproj:
2139         Add new header file.
2140
2141         * history/HistoryItem.cpp:
2142         (WebCore::HistoryItem::encodeBackForwardTree):
2143         * history/HistoryItem.h:
2144         Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
2145
2146         * platform/KeyedCoding.h:
2147         Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
2148
2149 2013-11-08  Brady Eidson  <beidson@apple.com>
2150
2151         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
2152         https://bugs.webkit.org/show_bug.cgi?id=124077
2153
2154         Reviewed by Alexey Proskuryakov.
2155
2156         The abstraction is no longer needed.
2157
2158         * CMakeLists.txt:
2159         * GNUmakefile.list.am:
2160         * WebCore.xcodeproj/project.pbxproj:
2161
2162         * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
2163
2164         * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
2165         * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
2166
2167         * Modules/indexeddb/IDBBackingStoreInterface.h:
2168         * Modules/indexeddb/IDBCursorBackend.cpp:
2169         * Modules/indexeddb/IDBCursorBackend.h:
2170         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2171         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2172         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2173         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2174         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
2175         * Modules/indexeddb/IDBTransactionCoordinator.h:
2176         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2177         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2178         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2179         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2180
2181 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
2182
2183         REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
2184         https://bugs.webkit.org/show_bug.cgi?id=124075
2185
2186         Reviewed by Beth Dakin.
2187         
2188         In r155660 I removed some scrollbar-related layouts when scrollbars
2189         are in overlay mode.
2190         
2191         However, ScrollView::updateScrollbars() has a case where we still need
2192         to do multiple pases, related to its "Never ever try to both gain/lose a
2193         scrollbar in the same pass" comment. When we avoid making a new scrollbar
2194         because the other was removed, we need to do another pass to bring the
2195         correct scrollbar back.
2196
2197         Can't test overlay scrollbars in tests.
2198
2199         * platform/ScrollView.cpp:
2200         (WebCore::ScrollView::updateScrollbars):
2201
2202 2013-11-08  Hans Muller  <hmuller@adobe.com>
2203
2204         [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
2205         https://bugs.webkit.org/show_bug.cgi?id=123769
2206
2207         Reviewed by Dirk Schulze.
2208
2209         Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
2210         and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
2211         method now generates intervals with Y coordinates that begin at the image shape's
2212         bounds.y - shape-margin, which may be less than 0.
2213
2214         The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
2215         by the shape-margin. A non-const overload of the method was added to centralize all
2216         access to m_intervalLists.
2217
2218         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
2219               fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
2220
2221         * rendering/shapes/RasterShape.cpp:
2222         (WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
2223         (WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
2224         (WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
2225         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
2226         * rendering/shapes/RasterShape.h:
2227         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
2228         (WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
2229
2230 2013-11-08  Piotr Grad  <p.grad@samsung.com>
2231
2232         Ended event should work also when playback rate is negative
2233         https://bugs.webkit.org/show_bug.cgi?id=123879
2234
2235         Reviewed by Eric Carlson.
2236
2237         According to W3C specification playback is ended also when playback rate is
2238         negative and position is the earliest possible position.
2239
2240         Test: media/video-ended-event-negative-playback.html
2241
2242         * html/HTMLMediaElement.cpp:
2243         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2244
2245 2013-11-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2246
2247         Checking for TypeError in RTCPeerConnection object creation
2248         https://bugs.webkit.org/show_bug.cgi?id=124049
2249
2250         Reviewed by Eric Carlson.
2251
2252         If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
2253         According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
2254
2255         Please notice that this patch does not make every tests run as expected,
2256         RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
2257
2258         Existing tests were updated.
2259
2260         * GNUmakefile.list.am:
2261         * Modules/mediastream/RTCPeerConnection.idl:
2262         * UseJSC.cmake:
2263         * WebCore.vcxproj/WebCore.vcxproj:
2264         * WebCore.vcxproj/WebCore.vcxproj.filters:
2265         * WebCore.xcodeproj/project.pbxproj:
2266         * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
2267         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
2268
2269 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
2270
2271         Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
2272         https://bugs.webkit.org/show_bug.cgi?id=124074
2273
2274         Reviewed by Sam Weinig.
2275
2276         Just a straightforward conversion from const pointers to const references.
2277
2278         Also, remove unneeded argument from FloatingObjects constructor.
2279
2280         No new tests, no behavior change.
2281
2282         * rendering/FloatingObjects.cpp:
2283         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
2284         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
2285         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
2286         (WebCore::FloatingObjects::FloatingObjects):
2287         (WebCore::FloatingObjects::clearLineBoxTreePointers):
2288         (WebCore::FloatingObjects::computePlacedFloatsTree):
2289         (WebCore::shapeInfoForFloat):
2290         (WebCore::::updateOffsetIfNeeded):
2291         (WebCore::::collectIfNeeded):
2292         (WebCore::::heightRemaining):
2293         * rendering/FloatingObjects.h:
2294         * rendering/RenderBlockFlow.cpp:
2295         (WebCore::RenderBlockFlow::createFloatingObjects):
2296
2297 2013-11-08  Sam Weinig  <sam@webkit.org>
2298
2299         Teach SubframeLoader a bit about references
2300         https://bugs.webkit.org/show_bug.cgi?id=124076
2301
2302         Reviewed by Anders Carlsson.
2303
2304         * html/HTMLAppletElement.cpp:
2305         * html/HTMLFrameElementBase.cpp:
2306         * html/HTMLMediaElement.cpp:
2307         * loader/SubframeLoader.cpp:
2308         * loader/SubframeLoader.h:
2309
2310 2013-11-08  Brady Eidson  <beidson@apple.com>
2311
2312         Blind Windows build-fix attempt after r158959
2313
2314         * WebCore.vcxproj/WebCore.vcxproj:
2315
2316 2013-11-08  Brady Eidson  <beidson@apple.com>
2317
2318         Merge IDBCursorBackendInterface and IDBCursorBackendImpl
2319         https://bugs.webkit.org/show_bug.cgi?id=124068
2320
2321         Reviewed by Anders Carlsson.
2322
2323         * CMakeLists.txt:
2324         * GNUmakefile.list.am:
2325         * WebCore.xcodeproj/project.pbxproj:
2326
2327         * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
2328
2329         * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
2330         * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
2331
2332         * Modules/indexeddb/IDBCallbacks.h:
2333         * Modules/indexeddb/IDBCursor.cpp:
2334         * Modules/indexeddb/IDBCursor.h:
2335         * Modules/indexeddb/IDBCursorWithValue.cpp:
2336         * Modules/indexeddb/IDBCursorWithValue.h:
2337         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2338         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2339         * Modules/indexeddb/IDBRequest.cpp:
2340         * Modules/indexeddb/IDBRequest.h:
2341         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2342         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2343         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2344         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2345         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2346         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2347
2348 2013-11-08  Sam Weinig  <sam@webkit.org>
2349
2350         Modernize FrameLoader a bit
2351         https://bugs.webkit.org/show_bug.cgi?id=124073
2352
2353         Reviewed by Anders Carlsson.
2354
2355         * loader/FrameLoader.cpp:
2356         * loader/FrameLoader.h:
2357         Use std::unique_ptrs rather than OwnPtrs.
2358
2359         * loader/MixedContentChecker.cpp:
2360         * loader/MixedContentChecker.h:
2361         Switch to hold a Frame& rather than Frame*.
2362
2363 2013-11-08  Zan Dobersek  <zdobersek@igalia.com>
2364
2365         Remove code guarded with ENABLE(STREAM)
2366         https://bugs.webkit.org/show_bug.cgi?id=123667
2367
2368         Reviewed by Anders Carlsson.
2369
2370         Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
2371         no port enables the feature and the work on this feature has wound down after the Chromium port forked,
2372         leaving this code unmaintained.
2373
2374         * fileapi/FileReaderLoader.cpp:
2375         * fileapi/FileReaderLoader.h:
2376
2377 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
2378
2379         RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
2380         https://bugs.webkit.org/show_bug.cgi?id=123931
2381
2382         Reviewed by Sam Weinig.
2383
2384         Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
2385         the search and to not need ShapeOutsideFloatOffsetMode anymore. This
2386         moves almost all of the logic into FloatingObjects, making a small
2387         reduction in the amount that RenderBlockFlow needs to know about the
2388         implementation of FloatingObjects.
2389
2390         In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
2391         and roundToInt itself so that all of it's callers can be simplified.
2392
2393         No new tests, no new behavior.
2394
2395         * rendering/FloatingObjects.cpp:
2396         (WebCore::rangesIntersect):
2397         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
2398         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
2399         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
2400         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
2401         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
2402         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
2403         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
2404         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
2405         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
2406         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
2407         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
2408         (WebCore::FloatingObjects::logicalLeftOffset):
2409         (WebCore::FloatingObjects::logicalRightOffset):
2410         * rendering/FloatingObjects.h:
2411         * rendering/LineWidth.cpp:
2412         (WebCore::LineWidth::fitBelowFloats):
2413         * rendering/RenderBlockFlow.cpp:
2414         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
2415         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
2416         (WebCore::RenderBlockFlow::getClearDelta):
2417         * rendering/RenderBlockFlow.h:
2418
2419 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
2420
2421         https://bugs.webkit.org/show_bug.cgi?id=124064
2422         Some WebCrypto files are not in correct directories
2423
2424         Rubber-stamped by Anders Carlsson.
2425
2426         * WebCore.xcodeproj/project.pbxproj:
2427         * crypto/CryptoAlgorithmAesCbcParams.h: Removed.
2428         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
2429         * crypto/CryptoKeyAES.cpp: Removed.
2430         * crypto/CryptoKeyAES.h: Removed.
2431         * crypto/CryptoKeyMac.cpp: Removed.
2432         * crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
2433         * crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
2434         * crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
2435         * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
2436         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
2437
2438 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
2439
2440         Implement JWK key import for HMAC and AES-CBC
2441         https://bugs.webkit.org/show_bug.cgi?id=124059
2442
2443         Reviewed by Anders Carlsson.
2444
2445         Tests: crypto/subtle/aes-cbc-import-jwk.html
2446                crypto/subtle/hmac-import-jwk.html
2447                crypto/subtle/import-jwk.html
2448
2449         WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
2450         we'll transform these into parsed KeyData subclasses before passing to algorithms.
2451
2452         CryptoKeySerialization is a base class for handling all these formats.
2453
2454         * WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
2455         
2456         * bindings/js/JSCryptoKeySerializationJWK.h: Added.
2457         * bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
2458         (WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
2459         a nice freshly parsed JSON, no getters or anything.
2460         (WebCore::getBooleanFromJSON): Ditto.
2461         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
2462         (WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
2463         (WebCore::createHMACParameters): A simple helper.
2464         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
2465         you can have algorithm parameters both inside a JWK key and passed as importKey()
2466         arguments. They need to agree, whatever that means for specific serialization's
2467         algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
2468         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
2469         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
2470         both JWK and the caller agree.
2471         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
2472         (WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
2473         subclass.
2474
2475         * bindings/js/JSSubtleCryptoCustom.cpp:
2476         (WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
2477         (WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
2478         (WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
2479
2480         * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
2481         * crypto/CryptoAlgorithm.h:
2482         Updated signature for importKey to one that makes more sense. Decoding formats all
2483         the way from a binary blob is not something that CryptoAlgorithm subclasses should
2484         do, we now pass a KeyData subclass instead.
2485         Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
2486         signatures will be.
2487
2488         * crypto/CryptoKeyData.h: Added.
2489         (WebCore::CryptoKeyData::ENUM_CLASS):
2490         (WebCore::CryptoKeyData::CryptoKeyData):
2491         (WebCore::CryptoKeyData::~CryptoKeyData):
2492         (WebCore::CryptoKeyData::format):
2493         A base class for passing key material to algorithms. Currently, only one type is
2494         supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
2495         complicated, and secret/public ones are different too.
2496
2497         * crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
2498         confusingly floating around, and this was only needed in one file for parsing.
2499
2500         * crypto/CryptoKeySerialization.h: Added.
2501         Base class for handling raw/pkcs8/spki/jwk keys.
2502
2503         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2504         (WebCore::CryptoAlgorithmAES_CBC::importKey):
2505         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2506         Updated to use CryptoKeyData.
2507
2508         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2509         (WebCore::CryptoAlgorithmHMAC::importKey):
2510         * crypto/algorithms/CryptoAlgorithmHMAC.h:
2511         Updated to use CryptoKeyData.
2512
2513         * crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
2514         (WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
2515         (WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
2516         * crypto/keys/CryptoKeyDataOctetSequence.h: Added.
2517         (WebCore::asCryptoKeyDataOctetSequence):
2518         * crypto/keys/CryptoKeySerializationRaw.cpp: Added.
2519         (WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
2520         (WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
2521         (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
2522         (WebCore::CryptoKeySerializationRaw::reconcileUsages):
2523         (WebCore::CryptoKeySerializationRaw::reconcileExtractable):
2524         (WebCore::CryptoKeySerializationRaw::keyData):
2525         * crypto/keys/CryptoKeySerializationRaw.h: Added.
2526         Much code to pass around a Vector<char>.
2527
2528 2013-11-08  Mark Lam  <mark.lam@apple.com>
2529
2530         Move breakpoint (and exception break) functionality into JSC::Debugger.
2531         https://bugs.webkit.org/show_bug.cgi?id=121796.
2532
2533         Reviewed by Geoffrey Garen.
2534
2535         No new tests.
2536
2537         - In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
2538           now numeric tokens.
2539
2540         - JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
2541           record. Previously, this info is tracked in the ScriptBreakpoint record
2542           in ScriptDebugServer. The only element of ScriptBreakpoint that is not
2543           being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
2544              The ScriptBreakpointAction is still tracked by the ScriptDebugServer
2545           in a list keyed on the corresponding BreakpointID.
2546              The ScriptBreakpoint record is now only used as a means of passing
2547           breakpoint paramaters to the ScriptDebugServer.
2548
2549         - ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
2550           It always goes through the DebuggerCallFrame.
2551
2552         * GNUmakefile.list.am:
2553         * WebCore.vcxproj/WebCore.vcxproj:
2554         * WebCore.vcxproj/WebCore.vcxproj.filters:
2555         * WebCore.xcodeproj/project.pbxproj:
2556         * bindings/js/BreakpointID.h: Added.
2557         * bindings/js/ScriptDebugServer.cpp:
2558         (WebCore::ScriptDebugServer::ScriptDebugServer):
2559         (WebCore::ScriptDebugServer::setBreakpoint):
2560         (WebCore::ScriptDebugServer::removeBreakpoint):
2561         (WebCore::ScriptDebugServer::clearBreakpoints):
2562         (WebCore::ScriptDebugServer::dispatchDidPause):
2563         (WebCore::ScriptDebugServer::dispatchDidContinue):
2564         (WebCore::ScriptDebugServer::dispatchDidParseSource):
2565         (WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
2566         (WebCore::ScriptDebugServer::needPauseHandling):
2567         (WebCore::ScriptDebugServer::handleBreakpointHit):
2568         (WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
2569         (WebCore::ScriptDebugServer::handlePause):
2570         * bindings/js/ScriptDebugServer.h:
2571         * bindings/js/SourceID.h: Added.
2572         * bindings/js/WorkerScriptDebugServer.cpp:
2573         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
2574         * bindings/js/WorkerScriptDebugServer.h:
2575         * inspector/InspectorDebuggerAgent.cpp:
2576         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2577         (WebCore::parseLocation):
2578         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2579         (WebCore::InspectorDebuggerAgent::continueToLocation):
2580         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2581         (WebCore::InspectorDebuggerAgent::searchInContent):
2582         (WebCore::InspectorDebuggerAgent::getScriptSource):
2583         (WebCore::InspectorDebuggerAgent::didParseSource):
2584         (WebCore::InspectorDebuggerAgent::didPause):
2585         (WebCore::InspectorDebuggerAgent::clear):
2586         * inspector/InspectorDebuggerAgent.h:
2587         * inspector/ScriptDebugListener.h:
2588
2589 2013-11-08  László Langó  <lango@inf.u-szeged.hu>
2590
2591         InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
2592         https://bugs.webkit.org/show_bug.cgi?id=114316
2593
2594         Reviewed by Timothy Hatcher.
2595
2596         InspectorConsoleAgent::didFinishXHRLoading creates a ConsoleMessage with a line number, 
2597         but it should also include a column number. It looks like ultimately the line number comes from
2598         JSXMLHttpRequest::send, it should also be possible to get the column number at the time.
2599         The column number would be needed by the Web Inspector to jump to the proper place in source code 
2600         to show where the XHR originated from.
2601
2602         * bindings/js/JSXMLHttpRequestCustom.cpp:
2603         (WebCore::SendFunctor::SendFunctor):
2604         (WebCore::SendFunctor::column):
2605         (WebCore::SendFunctor::operator()):
2606         (WebCore::JSXMLHttpRequest::send):
2607         * inspector/InspectorConsoleAgent.cpp:
2608         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
2609         * inspector/InspectorConsoleAgent.h:
2610         * inspector/InspectorInstrumentation.cpp:
2611         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
2612         * inspector/InspectorInstrumentation.h:
2613         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
2614         * xml/XMLHttpRequest.cpp:
2615         (WebCore::XMLHttpRequest::XMLHttpRequest):
2616         (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber):
2617         (WebCore::XMLHttpRequest::didFinishLoading):
2618         * xml/XMLHttpRequest.h:
2619
2620 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
2621
2622         Left sidebar on cubic-bezier.com flickers
2623         https://bugs.webkit.org/show_bug.cgi?id=123128
2624
2625         Reviewed by Dean Jackson.
2626         
2627         The logic that determined whether position:fixed elements outside the viewport
2628         should be composited was incorrect if the fixed element also had a transform.
2629         
2630         layer.calculateLayerBounds() only takes into account painted transforms (since they
2631         affect layer bounds). So we need to compute the bounds relative to the layer
2632         itself, then use localToContainerQuad() to map them to document coordinates,
2633         but only to the RenderView so that we don't hit the page scale transform.
2634
2635         Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
2636                compositing/layer-creation/fixed-position-transformed-outside-view.html
2637
2638         * rendering/RenderLayerCompositor.cpp:
2639         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2640
2641 2013-11-08  Martin Robinson  <mrobinson@igalia.com>
2642
2643         [MathML] Center of stretched curly bracket not always vertically centered
2644         https://bugs.webkit.org/show_bug.cgi?id=123715
2645
2646         Reviewed by Brent Fulgham.
2647
2648         * rendering/mathml/RenderMathMLOperator.cpp:
2649         (WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Update an assertion and
2650         handle the case where two glyph pieces abut.
2651         (WebCore::RenderMathMLOperator::paint): Do not offset the center glyph by y().
2652
2653 2013-10-30  Jer Noble  <jer.noble@apple.com>
2654
2655         [MSE] Bring SourceBuffer.append up to the most recent spec.
2656         https://bugs.webkit.org/show_bug.cgi?id=123377
2657
2658         Reviewed by Eric Carlson.
2659
2660         Test: media/media-source/media-source-append-failed.html
2661
2662         Bring the MediaSource append() implementation up to the current spec.
2663
2664         * Modules/mediasource/SourceBuffer.cpp:
2665         (WebCore::SourceBuffer::appendBufferInternal):
2666         (WebCore::SourceBuffer::appendBufferTimerFired):
2667         * platform/graphics/SourceBufferPrivate.h:
2668         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2669         (WebCore::MockSourceBufferPrivate::append):
2670         (WebCore::MockSourceBufferPrivate::evictCodedFrames):
2671         (WebCore::MockSourceBufferPrivate::isFull):
2672         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2673
2674 2013-11-07  Jer Noble  <jer.noble@apple.com>
2675
2676         [Mac] Crash at com.apple.WebCore: WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange + 26
2677         https://bugs.webkit.org/show_bug.cgi?id=124031
2678
2679         Reviewed by Eric Carlson.
2680
2681         WTF::bind() causes errors when given a bare id pointer as a parameter,
2682         when that parameter is casted to a specific NS type pointer (in this
2683         case, a NSArray*) in order to pass it as a parameter to the bound
2684         function.
2685
2686         Instead of passing around bare id pointers, wrap them in RetainPtr<>
2687         objects before passing them to WTF::bind().
2688
2689         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2690         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2691         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
2692         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
2693         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2694         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2695
2696 2013-11-08  Antti Koivisto  <antti@apple.com>
2697
2698         Templated LChar/UChar paths for simple line layout
2699         https://bugs.webkit.org/show_bug.cgi?id=124035
2700
2701         Reviewed by Andreas Kling.
2702
2703         * rendering/SimpleLineLayout.cpp:
2704         (WebCore::SimpleLineLayout::canUseForText):
2705         (WebCore::SimpleLineLayout::canUseFor):
2706         
2707             Use a templated function to check for illegal characters.
2708
2709         (WebCore::SimpleLineLayout::skipWhitespaces):
2710         
2711             Make a template function.
2712
2713         (WebCore::SimpleLineLayout::textWidth):
2714         
2715             Make a template function plus some argument changes.
2716
2717         (WebCore::SimpleLineLayout::createTextRuns):
2718         
2719             Template function for creating runs while operating with either LChars or UChar.
2720             Also simplified line breaking and text width measuring logic.
2721
2722         (WebCore::SimpleLineLayout::create):
2723         
2724             Pick the template.
2725
2726         * rendering/break_lines.cpp:
2727         * rendering/break_lines.h:
2728         
2729             Move the implementation to the header (except for the table) so we can use the template
2730             versions directly.
2731
2732         (WebCore::isBreakableSpace):
2733         (WebCore::shouldBreakAfter):
2734         (WebCore::needsLineBreakIterator):
2735         (WebCore::nextBreakablePosition):
2736         (WebCore::nextBreakablePositionIgnoringNBSP):
2737
2738 2013-11-08  Mario Sanchez Prada  <mario.prada@samsung.com>
2739
2740         AX: [ATK] <span> elements exposed through ATK when not needed
2741         https://bugs.webkit.org/show_bug.cgi?id=123885
2742
2743         Reviewed by Chris Fleizach.
2744
2745         As per SVN r158195, the way it's decided whether <span> elements
2746         should be ignored or not has slightly changed, causing that the
2747         GTK/EFL ports expose them in cases that they should be ignored,
2748         such as for text elements that neither are focusable (e.g. by
2749         explicitly setting tabindex) nor have a meaningful accessible name
2750         suggesting they should be exposed.
2751
2752         As a result, the flattening that ATK based ports normally do for
2753         this kind of elements (by folding them into their parents) do not
2754         work correctly anymore, making two tests to fail:
2755
2756             platform/gtk/accessibility/spans-paragraphs-and-divs.html
2757             platform/gtk/accessibility/spans.html
2758
2759         This patch encapsulates the part of the logic that affects this in
2760         the computeAccessibilityIsIgnored() method, placing it in a
2761         new method of AccessibilityObject that we can call from ATK's
2762         accessibilityPlatformIncludesObject() to ensure we hide those
2763         <span> elements when they don't fulfill those requirements.
2764
2765         * accessibility/AccessibilityObject.cpp:
2766         (WebCore::AccessibilityObject::hasAttributesRequiredForInclusion):
2767         New virtual method encapsulating part of the logic from the function
2768         that computes whether accessibility should be ignored or not.
2769         * accessibility/AccessibilityObject.h:
2770
2771         * accessibility/AccessibilityNodeObject.cpp:
2772         (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion):
2773         Override of the new method adding additional checks, as extracted from
2774         the original bits in computeAccessibilityIsIgnored().
2775         * accessibility/AccessibilityNodeObject.h:
2776
2777         * accessibility/AccessibilityRenderObject.cpp:
2778         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2779         Use the newly added function where we had the original code before.
2780
2781         * accessibility/atk/AccessibilityObjectAtk.cpp:
2782         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2783         Make sure <span> elements are ignored if they are not focusable
2784         and they don't have a meaningful accessible name.
2785
2786 2013-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2787
2788         [GTK] Add missing symbols to WebKitDOMEventTarget.symbols
2789         https://bugs.webkit.org/show_bug.cgi?id=123990
2790
2791         Reviewed by Philippe Normand.
2792
2793         Add webkit_dom_event_target_add_event_listener_with_closure and
2794         webkit_dom_event_target_remove_event_listener_with_closure to the
2795         symbols files.
2796
2797         * bindings/gobject/WebKitDOMEventTarget.symbols:
2798         * bindings/gobject/webkitdom.symbols:
2799
2800 2013-11-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2801
2802         [GTK] Use deprecation guards around deprecated API in GObject DOM bindings
2803         https://bugs.webkit.org/show_bug.cgi?id=123899
2804
2805         Reviewed by Martin Robinson.
2806
2807         Do not include deprecated API when compiling with
2808         WEBKIT_DISABLE_DEPRECATED option.
2809
2810         * bindings/scripts/CodeGeneratorGObject.pm:
2811         (GenerateFunction):
2812         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2813         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2814
2815 2013-11-07  Brady Eidson  <beidson@apple.com>
2816
2817         Enhance SQL journal_mode setting code to be less likely to log an error.
2818         <rdar://problem/15418577> and https://bugs.webkit.org/show_bug.cgi?id=124018
2819
2820         Reviewed by Anders Carlsson.
2821
2822         Even though the docs says SQLITE_ROW will always be returned, apparently SQLITE_OK is sometimes returned.
2823         Change the code to handle that.
2824
2825         * platform/sql/SQLiteDatabase.cpp:
2826         (WebCore::SQLiteDatabase::open): Save the statement result value, and accept SQLITE_OK as a non-error condition.
2827
2828 2013-11-07  Brady Eidson  <beidson@apple.com>
2829
2830         Update an out-dated ASSERT in IconDatabase code.
2831         <rdar://problem/15171118> and https://bugs.webkit.org/show_bug.cgi?id=124030.
2832
2833         Reviewed by Andreas Kling.
2834
2835         With the asynchronous interfaces that have been added and the support for WK2 that has been added, 
2836         this ASSERT can incorrectly fire if an icon is asked for before database cleanup is allowed.
2837
2838         * loader/icon/IconDatabase.cpp:
2839         (WebCore::IconDatabase::synchronousIconForPageURL): Update an invalid ASSERT.
2840
2841 2013-11-07  Andreas Kling  <akling@apple.com>
2842
2843         RenderSVGResource helpers should take RenderStyle by const reference.
2844         <https://webkit.org/b/124029>
2845
2846         Take const RenderStyle& instead of RenderStyle* in a few more places
2847         so we can get rid of some ampersands and assertions.
2848
2849         Reviewed by Anders Carlsson.
2850
2851 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2852
2853         [AX] Generate toAccessibilityTableRow|Column|Cell to detect bad type casts
2854         https://bugs.webkit.org/show_bug.cgi?id=123984
2855
2856         Reviewed by Mario Sanchez Prada.
2857
2858         As a step to let static_cast<> use TYPE_CASTS_BASE, AccessibilityTableRow|Column|Cell use
2859         ACCESSIBILITY_OBJECT_TYPE_CASTS which can support more helper functions rather than manual
2860         static_cast<>. This change will help to detect bad type casts further.
2861
2862         No new tests, no behavior changes.
2863
2864         * accessibility/AccessibilityARIAGrid.cpp:
2865         (WebCore::AccessibilityARIAGrid::addTableCellChild):
2866         (WebCore::AccessibilityARIAGrid::addChildren):
2867         * accessibility/AccessibilityARIAGridCell.cpp:
2868         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
2869         * accessibility/AccessibilityTable.cpp:
2870         (WebCore::AccessibilityTable::addChildren):
2871         (WebCore::AccessibilityTable::rowHeaders):
2872         (WebCore::AccessibilityTable::columnHeaders):
2873         (WebCore::AccessibilityTable::cellForColumnAndRow):
2874         * accessibility/AccessibilityTableCell.h:
2875         * accessibility/AccessibilityTableColumn.h:
2876         * accessibility/AccessibilityTableRow.cpp:
2877         (WebCore::AccessibilityTableRow::headerObject):
2878         * accessibility/AccessibilityTableRow.h:
2879         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2880         (cellAtIndex):
2881         (webkitAccessibleTableGetColumnHeader):
2882         (webkitAccessibleTableGetRowHeader):
2883         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2884         (-[WebAccessibilityObjectWrapper tableCellParent]):
2885         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2886         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2887
2888 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2889
2890         REGRESSION (r154375): Image is oriented incorrectly
2891         https://bugs.webkit.org/show_bug.cgi?id=123831
2892
2893         Reviewed by Antonio Gomes.
2894
2895         r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
2896         It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
2897         value by default.
2898
2899         * rendering/RenderImage.cpp:
2900         (WebCore::RenderImage::paintReplaced):
2901         (WebCore::RenderImage::paintIntoRect):
2902
2903 2013-11-07  Hans Muller  <hmuller@adobe.com>
2904
2905         [CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly
2906         https://bugs.webkit.org/show_bug.cgi?id=123934
2907
2908         Reviewed by Andreas Kling.
2909
2910         RasterShapeIntervals::getExcludedIntervals() was returning an empty
2911         list when the line overlapped any vertical gap in the image. This short-circuit
2912         had been mistakenly copied from getIncludedIntervals(), where it makes sense.
2913
2914         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap.html
2915
2916         * rendering/shapes/RasterShape.cpp:
2917         (WebCore::RasterShapeIntervals::getExcludedIntervals):
2918
2919 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2920
2921         Make contents layer borders more visible
2922         https://bugs.webkit.org/show_bug.cgi?id=124025
2923
2924         Reviewed by Tim Horton.
2925
2926         Layer borders for contents layers are impossible to see when the
2927         contentsLayer has the same bounds as its parent; make the contents
2928         layer border 4px thick to make it more visible.
2929
2930         * platform/graphics/ca/GraphicsLayerCA.cpp:
2931         (WebCore::GraphicsLayerCA::setupContentsLayer):
2932
2933 2013-11-07  Andreas Kling  <akling@apple.com>
2934
2935         InlineFlowBox always has a RenderBoxModelObject, take advantage.
2936         <https://webkit.org/b/124024>
2937
2938         Since InlineFlowBox already has the branch-less renderer() returning
2939         a RenderBoxModelObject&, avoid using InlineBox::boxModelObject()
2940         wherever we have a tightly-typed box. One branch disappears from
2941         every call site.
2942
2943         Deleted boxModelObject() on InlineFlowBox to prevent new code from
2944         calling the less efficient function.
2945
2946         Reviewed by Anders Carlsson.
2947
2948 2013-11-07  Andreas Kling  <akling@apple.com>
2949
2950         CTTE: Scrolling tree nodes should always have a ScrollingTree&.
2951         <https://webkit.org/b/124022>
2952
2953         Let ScrollingTreeNode and subclasses store the backpointer to the
2954         tree as a ScrollingTree& reference.
2955
2956         Reviewed by Anders Carlsson.
2957
2958 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2959
2960         Lots of layers get solid color but transparent contents layers now
2961         https://bugs.webkit.org/show_bug.cgi?id=123537
2962
2963         Reviewed by Tim Horton.
2964         
2965         We call rendererBackgroundColor() to determine the layer's background color,
2966         but on most elements this returns the transparent color (a valid color).
2967         This caused us to allocate a contentsLayer, and use the transparent color as its
2968         backgroundColor, which was wasteful.
2969         
2970         Fix by only making a background-color layer if the color is not transparent (zero alpha).
2971         
2972         Also avoid making a new contents layer on every color change, and make sure that
2973         we don't do implicit animations for backgroundColor, and some other properties
2974         that were omitted by mistake.
2975
2976         Layer tree dumps don't dump content layers, so no way to test easily.
2977
2978         * platform/graphics/ca/GraphicsLayerCA.cpp:
2979         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
2980         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2981         (nullActionsDictionary):
2982
2983 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2984
2985         DOMTokenList::add can add duplicated values if arguments had duplicated values
2986         https://bugs.webkit.org/show_bug.cgi?id=123962
2987
2988         Reviewed by Benjamin Poulain.
2989
2990         Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305
2991
2992         In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
2993         See http://dom.spec.whatwg.org/#dom-domtokenlist-add
2994
2995         * html/DOMTokenList.cpp:
2996         (WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.
2997
2998 2013-11-07  Eric Carlson  <eric.carlson@apple.com>
2999
3000         Remove npr.org specific hack in HTMLMediaElement
3001         https://bugs.webkit.org/show_bug.cgi?id=123859
3002
3003         Reviewed by Jer Noble.
3004
3005         Remove the site specific hack added in r57820, it is no longer necessary.
3006
3007         * html/HTMLMediaElement.cpp:
3008         (WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
3009         (HTMLMediaElement::play): Don't special case npr.org.
3010         * html/HTMLMediaElement.h:
3011
3012 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
3013
3014         Attempt to fix the 32-bit build. Virtual thunks seem to have different
3015         symbol names between 32- and 64-bit.
3016         
3017         * WebCore.exp.in:
3018
3019 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
3020
3021         Crash in HTMLMediaElement::contextDestroyed
3022         https://bugs.webkit.org/show_bug.cgi?id=123963
3023
3024         Reviewed by Eric Carlson.
3025
3026         Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278
3027
3028         * html/HTMLMediaElement.cpp:
3029         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3030
3031 2013-11-07  Jer Noble  <jer.noble@apple.com>
3032
3033         [Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084 
3034         https://bugs.webkit.org/show_bug.cgi?id=124012
3035
3036         Reviewed by Eric Carlson.
3037
3038         The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.
3039
3040         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3041         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3042
3043 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
3044
3045         Crash when submitting form in a document with null encoding
3046         https://bugs.webkit.org/show_bug.cgi?id=123975
3047
3048         Reviewed by Alexey Proskuryakov.
3049
3050         Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f
3051         
3052         The CString object which is passed to normalizeLineEndingsToCRLF() can be
3053         a null string. It is created in FormDataList::appendString(), and it
3054         produces a null CString if FormDataList::m_encoding is a null encoding.
3055
3056         Test: fast/forms/form-submit-in-image-document.html
3057
3058         * platform/text/LineEnding.cpp:
3059         (internalNormalizeLineEndingsToCRLF):
3060
3061 2013-11-07  Anders Carlsson  <andersca@apple.com>
3062
3063         Use std::function for all policy continuation functions
3064         https://bugs.webkit.org/show_bug.cgi?id=124011
3065
3066         Reviewed by Sam Weinig.
3067
3068         * loader/DocumentLoader.cpp:
3069         (WebCore::DocumentLoader::willSendRequest):
3070         (WebCore::DocumentLoader::responseReceived):
3071         * loader/DocumentLoader.h:
3072         * loader/FrameLoader.cpp:
3073         (WebCore::FrameLoader::loadURL):
3074         (WebCore::FrameLoader::load):
3075         (WebCore::FrameLoader::loadWithDocumentLoader):
3076         (WebCore::FrameLoader::loadPostRequest):
3077         * loader/PolicyCallback.cpp:
3078         (WebCore::PolicyCallback::clear):
3079         (WebCore::PolicyCallback::set):
3080         (WebCore::PolicyCallback::call):
3081         (WebCore::PolicyCallback::clearRequest):
3082         (WebCore::PolicyCallback::cancel):
3083         * loader/PolicyCallback.h:
3084         * loader/PolicyChecker.cpp:
3085         (WebCore::PolicyChecker::checkNavigationPolicy):
3086         (WebCore::PolicyChecker::checkNewWindowPolicy):
3087         (WebCore::PolicyChecker::checkContentPolicy):
3088         * loader/PolicyChecker.h:
3089
3090 2013-11-07  Brady Eidson  <beidson@apple.com>
3091
3092         Use SQLite journal mode WAL (WriteAheadLogging)
3093         https://bugs.webkit.org/show_bug.cgi?id=124009
3094
3095         Reviewed by Anders Carlsson.
3096
3097         WriteAheadLogging journalling is better than the traditional rollback model.
3098
3099         * platform/sql/SQLiteDatabase.cpp:
3100         (WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.
3101
3102 2013-11-07  Mark Lam  <mark.lam@apple.com>
3103
3104         Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
3105         https://bugs.webkit.org/show_bug.cgi?id=123945.
3106
3107         Reviewed by Geoffrey Garen.
3108
3109         No new tests.
3110
3111         * bindings/js/JSInjectedScriptHostCustom.cpp:
3112         (WebCore::JSInjectedScriptHost::functionDetails):
3113         * bindings/js/JavaScriptCallFrame.h:
3114         (WebCore::JavaScriptCallFrame::sourceID):
3115         * bindings/js/ScriptDebugServer.cpp:
3116         (WebCore::ScriptDebugServer::ScriptDebugServer):
3117         (WebCore::ScriptDebugServer::setBreakpoint):
3118         (WebCore::ScriptDebugServer::removeBreakpoint):
3119         (WebCore::ScriptDebugServer::hasBreakpoint):
3120         (WebCore::ScriptDebugServer::clearBreakpoints):
3121         (WebCore::ScriptDebugServer::updateCallFrame):
3122         (WebCore::ScriptDebugServer::pauseIfNeeded):
3123         * bindings/js/ScriptDebugServer.h:
3124         * inspector/InspectorConsoleAgent.cpp:
3125         (WebCore::InspectorConsoleAgent::addMessageToConsole):
3126         * inspector/InspectorConsoleAgent.h:
3127         * inspector/InspectorConsoleInstrumentation.h:
3128         (WebCore::InspectorInstrumentation::addMessageToConsole):
3129         * inspector/InspectorDOMAgent.cpp:
3130         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3131         * inspector/InspectorDebuggerAgent.cpp:
3132         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3133         (WebCore::parseLocation):
3134         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3135         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
3136         (WebCore::InspectorDebuggerAgent::continueToLocation):
3137         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3138         (WebCore::InspectorDebuggerAgent::searchInContent):
3139         (WebCore::InspectorDebuggerAgent::setScriptSource):
3140         (WebCore::InspectorDebuggerAgent::getScriptSource):
3141         (WebCore::InspectorDebuggerAgent::compileScript):
3142         (WebCore::InspectorDebuggerAgent::runScript):
3143         (WebCore::InspectorDebuggerAgent::didParseSource):
3144         (WebCore::InspectorDebuggerAgent::didPause):
3145         (WebCore::InspectorDebuggerAgent::clear):
3146         (WebCore::InspectorDebuggerAgent::reset):
3147         * inspector/InspectorDebuggerAgent.h:
3148         * inspector/InspectorInstrumentation.cpp:
3149         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
3150         * inspector/InspectorInstrumentation.h:
3151         * inspector/ScriptDebugListener.h:
3152
3153 2013-11-07  Cidorvan Leite  <cidorvan.leite@openbossa.org>
3154
3155         Avoid invalid cairo matrix when drawing surfaces too small
3156         https://bugs.webkit.org/show_bug.cgi?id=123810
3157
3158         Drawing surfaces too small makes inverse matrix with values too big,
3159         when this happen, cairo context is not valid anymore and it stops to draw anything.
3160
3161         Reviewed by Martin Robinson.
3162
3163         Test: fast/canvas/drawImage-with-small-values.html
3164
3165         * platform/graphics/cairo/PlatformContextCairo.cpp:
3166         (WebCore::PlatformContextCairo::drawSurfaceToContext):
3167
3168 2013-11-07  Antti Koivisto  <antti@apple.com>
3169
3170         Simple line layout crashes with SVG fonts
3171         https://bugs.webkit.org/show_bug.cgi?id=124002
3172
3173         Reviewed by Simon Fraser.
3174         
3175         Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.
3176
3177         Test: fast/text/svg-font-simple-line-crash.html
3178
3179         * platform/graphics/Font.h:
3180         (WebCore::Font::isSVGFont):
3181         
3182             Add isSVGFont() so callers don't need to go via primaryFont().
3183
3184         * rendering/InlineTextBox.cpp:
3185         (WebCore::InlineTextBox::constructTextRun):
3186         * rendering/RenderBlock.cpp:
3187         (WebCore::constructTextRunInternal):
3188         * rendering/SimpleLineLayout.cpp:
3189         (WebCore::SimpleLineLayout::canUseFor):
3190         
3191             Disallow SVG fonts.
3192
3193         * rendering/svg/SVGInlineTextBox.cpp:
3194         (WebCore::SVGInlineTextBox::constructTextRun):
3195         * rendering/svg/SVGTextMetrics.cpp:
3196         (WebCore::SVGTextMetrics::constructTextRun):
3197         (WebCore::SVGTextMetrics::SVGTextMetrics):
3198         * rendering/svg/SVGTextRunRenderingContext.h:
3199         
3200             Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().
3201
3202 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
3203
3204         Allow customization of the contentsScale of TileController tiles
3205         https://bugs.webkit.org/show_bug.cgi?id=124004
3206
3207         Reviewed by Tim Horton.
3208
3209         On some platorms, zooming out on pages with TiledBacking compositing
3210         layers can cause very high memory use, because the TiledBacking retains
3211         the original page scale while the zoom is in flight, but can be asked
3212         to cover a large area.
3213         
3214         Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
3215         to provide an additional scale factor for newly created tiles. Platforms can
3216         then customize this to create low-res tiles when necessary.
3217
3218         * WebCore.exp.in:
3219         * platform/graphics/GraphicsLayerClient.h:
3220         (WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
3221         * platform/graphics/ca/GraphicsLayerCA.cpp:
3222         (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
3223         * platform/graphics/ca/GraphicsLayerCA.h:
3224         * platform/graphics/ca/PlatformCALayerClient.h:
3225         (WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
3226         * platform/graphics/ca/mac/TileController.h:
3227         * platform/graphics/ca/mac/TileController.mm:
3228         (WebCore::TileController::TileController):
3229         (WebCore::TileController::setScale):
3230         (WebCore::TileController::createTileLayer):
3231         * rendering/RenderLayerBacking.cpp:
3232         (WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
3233         * rendering/RenderLayerBacking.h:
3234         * rendering/RenderLayerCompositor.cpp:
3235         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
3236         * rendering/RenderLayerCompositor.h:
3237
3238 2013-11-07  Jer Noble  <jer.noble@apple.com>
3239
3240         Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.
3241
3242         * rendering/FloatingObjects.cpp:
3243
3244 2013-11-07  Bem Jones-Bey  <bjonesbe@adobe.com>
3245
3246         Refactor logical left/right offset for line methods
3247         https://bugs.webkit.org/show_bug.cgi?id=123898
3248
3249         Reviewed by David Hyatt.
3250
3251         Simplify the logical left/right offset for line methods and their
3252         implementation, including the ComputeFloatOffsetAdapter. This also
3253         reduces the number of line offset methods in RenderBlock.
3254
3255         No new tests, no behavior change.
3256
3257         * rendering/FloatingObjects.cpp:
3258         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
3259         (WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
3260             the offset instead of using a confusing out parameter.
3261         (WebCore::::shapeOffset): Method to return the offset modified by the
3262             shape delta. Moving the computation to this method allowed for
3263             simplification of the users of ComputeFloatOffsetAdapter.
3264         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
3265             method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
3266             offset based on the float margin box.
3267         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
3268         (WebCore::FloatingObjects::logicalLeftOffset): This now only returns
3269             the offset based on the shape's contour.
3270         (WebCore::FloatingObjects::logicalRightOffset): Ditto.
3271         (WebCore::::heightRemaining): Rename to properly follow the getter
3272             naming convention.
3273         * rendering/FloatingObjects.h:
3274         * rendering/RenderBlock.h:
3275         (WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
3276             use of ShapeOutsideFloatOffsetMode and heightRemaining.
3277         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
3278         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
3279         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
3280         * rendering/RenderBlockFlow.cpp:
3281         (WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
3282             Positioning a float is the only case where the float margin box
3283             should be used, and also the only case where heightRemaining is
3284             needed. This handles that case.
3285         (WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
3286             Ditto.
3287         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
3288             use logical(Left|Right)OffsetForPositioningFloatOnLine.
3289         (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
3290             remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
3291         (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
3292         * rendering/RenderBlockFlow.h:
3293
3294 2013-11-07  Alexandru Chiculita  <achicu@adobe.com>
3295
3296         Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
3297         https://bugs.webkit.org/show_bug.cgi?id=123577
3298
3299         Reviewed by Timothy Hatcher.
3300
3301         Test: inspector-protocol/model/content-flow-content-removal.html
3302
3303         Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
3304         anymore. We already send an unbind event, so the inspector is already notified that the node was removed.
3305
3306         * inspector/InspectorCSSAgent.cpp:
3307         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
3308
3309 2013-10-30  Jer Noble  <jer.noble@apple.com>
3310
3311         [MSE] Add mock MediaSource classes for testing.
3312         https://bugs.webkit.org/show_bug.cgi?id=123322
3313
3314         Reviewed by Eric Carlson.
3315
3316         Tests: media/media-source/media-source-addsourcebuffer.html
3317                media/media-source/media-source-append-buffer.html
3318                media/media-source/media-source-canplaythrough.html
3319                media/media-source/media-source-closed.html
3320                media/media-source/media-source-play.html
3321                media/media-source/media-source-track-enabled.html
3322                media/media-source/media-source-tracks.html
3323
3324
3325         Add mock implementation of platform MediaSource classes, allowing ports to test the
3326         MediaSource API without having a platform implementation.
3327
3328         The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
3329         format with an initialization segment containing a number of tracks, followed by a list of
3330         samples.
3331
3332         Add a means to insert a new media engine factory at runtime, so the internals object can add
3333         a MockMediaSourceMediaPlayer:
3334         * platform/graphics/MediaPlayer.cpp:
3335         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
3336         * platform/graphics/MediaPlayer.h:
3337         * testing/Internals.cpp:
3338         (WebCore::Internals::initializeMockMediaSource):
3339         * testing/Internals.h:
3340         * testing/Internals.idl:
3341
3342         For non-media-source supporting media engines, fail immediately when asked to load a media
3343         source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
3344         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3345         (WebCore::MediaPlayerPrivateAVFoundation::load):
3346         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3347         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3348         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
3349         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3350         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3351         (WebCore::MediaPlayerPrivateQTKit::load):
3352         (WebCore::MediaPlayerPrivateQTKit::supportsType):
3353
3354         Add new files to the project:
3355         * WebCore.xcodeproj/project.pbxproj:
3356         * Source/WebCore/WebCore.exp.in:
3357
3358         Update the MediaSource implementation:
3359         * Modules/mediasource/MediaSource.cpp:
3360         (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
3361         * Modules/mediasource/SourceBuffer.cpp:
3362         (WebCore::SourceBuffer::buffered): Ditto.
3363         (WebCore::SourceBuffer::setTimestampOffset): Ditto.
3364         (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
3365         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
3366             bring the implementation up to date with part of the spec.
3367         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
3368             SampleIsRandomAccessPredicate.
3369
3370         Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
3371         * platform/mock/mediasource/MockBox.cpp: Added.
3372         (WebCore::MockBox::MockBox):
3373         (WebCore::MockBox::peekType):
3374         (WebCore::MockBox::peekLength):
3375         (WebCore::MockTrackBox::MockTrackBox):
3376         (WebCore::MockTrackBox::type):
3377         (WebCore::MockInitializationBox::MockInitializationBox):
3378         (WebCore::MockInitializationBox::type):
3379         (WebCore::MockSampleBox::MockSampleBox):
3380         (WebCore::MockSampleBox::type):
3381         * platform/mock/mediasource/MockBox.h: Added.
3382         (WebCore::MockBox::length):
3383         (WebCore::MockBox::type):
3384         (WebCore::MockTrackBox::trackID):
3385         (WebCore::MockTrackBox::codec):
3386         (WebCore::MockTrackBox::kind):
3387         (WebCore::MockInitializationBox::duration):
3388         (WebCore::MockInitializationBox::tracks):
3389         (WebCore::MockSampleBox::presentationTimestamp):
3390         (WebCore::MockSampleBox::decodeTimestamp):
3391         (WebCore::MockSampleBox::duration):
3392         (WebCore::MockSampleBox::trackID):
3393         (WebCore::MockSampleBox::flags):
3394         (WebCore::MockSampleBox::isSync):
3395
3396         Add a MediaPlayerPrivate implementation which uses MockMediaSource:
3397         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
3398         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
3399         (WebCore::MockMediaPlayerMediaSource::create):
3400         (WebCore::mimeTypeCache):
3401         (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
3402         (WebCore::MockMediaPlayerMediaSource::supportsType):
3403         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
3404         (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
3405         (WebCore::MockMediaPlayerMediaSource::load):
3406         (WebCore::MockMediaPlayerMediaSource::cancelLoad):
3407         (WebCore::MockMediaPlayerMediaSource::play):
3408         (WebCore::MockMediaPlayerMediaSource::pause):
3409         (WebCore::MockMediaPlayerMediaSource::naturalSize):
3410         (WebCore::MockMediaPlayerMediaSource::hasVideo):
3411         (WebCore::MockMediaPlayerMediaSource::hasAudio):
3412         (WebCore::MockMediaPlayerMediaSource::setVisible):
3413         (WebCore::MockMediaPlayerMediaSource::seeking):
3414         (WebCore::MockMediaPlayerMediaSource::paused):
3415         (WebCore::MockMediaPlayerMediaSource::networkState):
3416         (WebCore::MockMediaPlayerMediaSource::readyState):
3417         (WebCore::MockMediaPlayerMediaSource::buffered):
3418         (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
3419         (WebCore::MockMediaPlayerMediaSource::setSize):
3420         (WebCore::MockMediaPlayerMediaSource::paint):
3421         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
3422         (WebCore::MockMediaPlayerMediaSource::durationDouble):
3423         (WebCore::MockMediaPlayerMediaSource::seekDouble):
3424         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
3425         (WebCore::MockMediaPlayerMediaSource::updateDuration):
3426         (WebCore::MockMediaPlayerMediaSource::setReadyState):
3427         * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
3428
3429         Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
3430         * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
3431         (WebCore::MockMediaSourcePrivate::create):
3432         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
3433         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
3434         (WebCore::MockMediaSourcePrivate::addSourceBuffer):
3435         (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
3436         (WebCore::MockMediaSourcePrivate::duration):
3437         (WebCore::MockMediaSourcePrivate::setDuration):
3438         (WebCore::MockMediaSourcePrivate::markEndOfStream):
3439         (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
3440         (WebCore::MockMediaSourcePrivate::readyState):
3441         (WebCore::MockMediaSourcePrivate::setReadyState):
3442         (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
3443         (WebCore::MockSourceBufferPrivateHasAudio):
3444         (WebCore::MockMediaSourcePrivate::hasAudio):
3445         (WebCore::MockSourceBufferPrivateHasVideo):
3446         (WebCore::MockMediaSourcePrivate::hasVideo):
3447         * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
3448         (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
3449         (WebCore::MockMediaSourcePrivate::player):
3450
3451         Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
3452         bytestream provided by SourceBuffer:
3453         * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.