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