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