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