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