SVGTextMetricsBuilder::walkTree() should take a RenderElement.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-09  Andreas Kling  <akling@apple.com>
2
3         SVGTextMetricsBuilder::walkTree() should take a RenderElement.
4         <https://webkit.org/b/124105>
5
6         Make walkTree() take a RenderElement so we can use the non-virtual
7         firstChild() internally. All call sites had pointers to compatible
8         objects already.
9
10         Reviewed by Anders Carlsson.
11
12 2013-11-09  Andreas Kling  <akling@apple.com>
13
14         RenderMathMLFenced should pass around operators in tighter types.
15         <https://webkit.org/b/124115>
16
17         Store operator renderers in RenderMathMLOperator pointers instead
18         of passing them around as RenderObject.
19
20         Reviewed by Martin Robinson.
21
22 2013-11-09  Andreas Kling  <akling@apple.com>
23
24         Use RENDER_OBJECT_TYPE_CASTS for more types.
25         <https://webkit.org/b/124112>
26
27         Generate toRenderFoo() type casting helpers for these classes:
28
29             - RenderCombineText
30             - RenderDetailsMarker
31             - RenderListMarker
32             - RenderVideo
33             - RenderView
34
35         Reviewed by Anders Carlsson.
36
37 2013-11-09  Andreas Kling  <akling@apple.com>
38
39         Move MathML type checking virtuals to RenderObject.
40         <https://webkit.org/b/124111>
41
42         Previously, checking the type of a MathML renderer would require
43         that you first check if it's a RenderMathMLBlock, and then casting
44         to that type to access the check you really wanted.
45
46         This change moves all the isRenderMathMLFoo() virtual functions
47         to RenderObject. I also made sure all the overloads were private
48         and marked them OVERRIDE/FINAL as appropriate.
49
50         Finally I replaced all the hand-written casting functions with
51         autogenerated ones using RENDER_OBJECT_TYPE_CASTS.
52
53         Reviewed by Anders Carlsson.
54
55 2013-11-09  Martin Robinson  <mrobinson@igalia.com>
56
57         [MathML] Poor spacing around delimiters in MathML Torture Test 14
58         https://bugs.webkit.org/show_bug.cgi?id=122837
59
60         Reviewed by Brent Fulgham.
61
62         Instead of stretching the vertical bar with the stretchable version, just repeat
63         the normal vertical bar. This follows what Gecko does when rendering tall vertical
64         bars and also works around an issue with STIX fonts leading to poor spacing in
65         formulas.
66
67         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
68         normal variant.
69
70 2013-11-09  Anders Carlsson  <andersca@apple.com>
71
72         Encode form data using the KeyedEncoder
73         https://bugs.webkit.org/show_bug.cgi?id=124107
74
75         Reviewed by Sam Weinig.
76
77         * platform/KeyedCoding.h:
78         (WebCore::KeyedEncoder::encodeEnum):
79         * platform/network/FormData.cpp:
80         (WebCore::encodeElement):
81         (WebCore::FormData::encode):
82         * platform/network/FormData.h:
83
84 2013-11-09  Sam Weinig  <sam@webkit.org>
85
86         Modernize CanvasObserverProxy
87         https://bugs.webkit.org/show_bug.cgi?id=124106
88
89         Reviewed by Anders Carlsson.
90
91         * css/CSSCanvasValue.h:
92
93 2013-11-09  Patrick Gansterer  <paroga@webkit.org>
94
95         Move RunLoop from WebCore to WTF
96         https://bugs.webkit.org/show_bug.cgi?id=116606
97
98         Reviewed by Anders Carlsson.
99
100         * CMakeLists.txt:
101         * GNUmakefile.list.am:
102         * PlatformBlackBerry.cmake:
103         * PlatformEfl.cmake:
104         * PlatformGTK.cmake:
105         * PlatformWin.cmake:
106         * WebCore.exp.in:
107         * WebCore.vcxproj/WebCore.vcxproj:
108         * WebCore.xcodeproj/project.pbxproj:
109         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
110         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
111
112 2013-11-09  Andreas Kling  <akling@apple.com>
113
114         Tighten typing in SVGResourcesCycleSolver a bit.
115         <https://webkit.org/b/124104>
116
117         Make the SVGResourcesCycleSolver constructor take a RenderElement&
118         and a SVGResources&.
119
120         While I was in the neighborhood, also converted one loop to use a
121         renderer iterator instead of walking siblings manually.
122
123         Finally used "auto" to clean up some overly wordy loops.
124
125         Reviewed by Anders Carlsson.
126
127 2013-11-09  Andreas Kling  <akling@apple.com>
128
129         Beat SVGRenderSupport with the RenderElement stick.
130         <https://webkit.org/b/124102>
131
132         Tighten up all the SVGRenderSupport helper functions by making them
133         take const RenderElements references instead of raw RenderObject
134         pointers as much as possible.
135
136         This tunes up a bunch of branchy style() calls.
137
138         The patch looks big but it's mostly mechanical. I just changed the
139         signatures and then worked backwards until everything built again.
140
141         Reviewed by Antti Koivisto.
142
143 2013-11-09  Andreas Kling  <akling@apple.com>
144
145         SVGTextLayoutAttributes always has a RenderSVGInlineText.
146         <https://webkit.org/b/124101>
147
148         No SVGTextLayoutAttributes object is without a RenderSVGInlineText
149         "context" so make context() return a reference.
150
151         Reviewed by Antti Koivisto.
152
153 2013-11-09  Andreas Kling  <akling@apple.com>
154
155         Move BindingSecurity stuff under JSDOMBinding umbrella.
156         <https://webkit.org/b/124099>
157
158         We are hitting shouldAllowAccessToDOMWindow() pretty hard on the
159         demo here: <http://www.jasondavies.com/maps/rotate/>
160
161         Putting it together with the rest of the JSDOMBinding code takes
162         CPU time spent in there from 8.7% to 6.5%. The abstraction was
163         only used to support alternate JS engines in the past.
164
165         Reviewed by Antti Koivisto.
166
167 2013-11-08  Brady Eidson  <beidson@apple.com>
168
169         Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
170         https://bugs.webkit.org/show_bug.cgi?id=124088
171
172         Reviewed by Tim Horton.
173 +
174         * CMakeLists.txt:
175         * GNUmakefile.list.am:
176         * WebCore.vcxproj/WebCore.vcxproj:
177         * WebCore.xcodeproj/project.pbxproj:
178
179         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
180
181         * Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
182         * Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
183
184         * Modules/indexeddb/IDBBackingStoreInterface.h:
185         * Modules/indexeddb/IDBCallbacks.h:
186         * Modules/indexeddb/IDBCursor.cpp:
187         * Modules/indexeddb/IDBCursorBackend.cpp:
188         * Modules/indexeddb/IDBCursorBackend.h:
189         * Modules/indexeddb/IDBDatabase.cpp:
190         * Modules/indexeddb/IDBDatabase.h:
191         * Modules/indexeddb/IDBFactoryBackendInterface.h:
192         * Modules/indexeddb/IDBIndex.cpp:
193         * Modules/indexeddb/IDBIndex.h:
194         * Modules/indexeddb/IDBIndexWriter.h:
195         * Modules/indexeddb/IDBObjectStore.cpp:
196         * Modules/indexeddb/IDBObjectStore.h:
197         * Modules/indexeddb/IDBOpenDBRequest.cpp:
198         * Modules/indexeddb/IDBOpenDBRequest.h:
199         * Modules/indexeddb/IDBPendingDeleteCall.h:
200         * Modules/indexeddb/IDBRequest.cpp:
201         * Modules/indexeddb/IDBRequest.h:
202         * Modules/indexeddb/IDBTransaction.cpp:
203         * Modules/indexeddb/IDBTransaction.h:
204         * Modules/indexeddb/IDBTransactionBackend.cpp:
205         * Modules/indexeddb/IDBTransactionBackend.h:
206         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
207         * Modules/indexeddb/IDBTransactionBackendOperations.h:
208         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
209         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
210         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
211         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
212
213 2013-11-08  Andreas Kling  <akling@apple.com>
214
215         Reindent JSDOMBinding.h (finally.)
216
217         Rubber-stamped by Sam Weinig.
218
219 2013-11-08  Sam Weinig  <sam@webkit.org>
220
221         Change collectStyleForPresentationAttribute and related functions to take a MutableStylePropertySet by reference
222         https://bugs.webkit.org/show_bug.cgi?id=124096
223
224         Reviewed by Andreas Kling.
225
226         Pass MutableStylePropertySet by reference. It is never null.
227
228 2013-11-08  Anders Carlsson  <andersca@apple.com>
229
230         Implement encoding of arrays of objects
231         https://bugs.webkit.org/show_bug.cgi?id=124091
232
233         Reviewed by Beth Dakin.
234
235         * history/HistoryItem.cpp:
236         (WebCore::HistoryItem::encodeBackForwardTreeNode):
237         Encode the rest of the members.
238
239         * platform/KeyedCoding.h:
240         (WebCore::KeyedEncoder::encodeObjects):
241         Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.
242
243 2013-11-08  Tim Horton  <timothy_horton@apple.com>
244
245         Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
246         https://bugs.webkit.org/show_bug.cgi?id=123944
247
248         Reviewed by Simon Fraser.
249
250         Ensure that the tile cache retrieves repaint rects from the tile layer,
251         not from the tiled backing layer.
252
253         * platform/graphics/ca/PlatformCALayer.h:
254         * platform/graphics/ca/mac/PlatformCALayerMac.h:
255         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
256         (PlatformCALayerMac::enumerateRectsBeingDrawn):
257         Allow the PlatformCALayer to decide how to enumerate rects to paint.
258
259         * WebCore.exp.in:
260         * platform/graphics/mac/WebLayer.h:
261         Add RepaintRectList, remove some unnecessary WebCore::s.
262
263         * platform/graphics/mac/WebLayer.mm:
264         (WebCore::collectRectsToPaint):
265         Factor collectRectsToPaint out; it just grabs the rects from
266         the layer and makes the decision whether to repaint the bounds
267         of the dirty region or just the subregions.
268
269         Move calls to collectRectsToPaint() to callers of drawLayerContents(),
270         so that TileController can collect rects from the appropriate source
271         (the Tile layer) and other layers just continue grabbing them from
272         their relevant layers.
273
274         Make sure that the list that comes from collectRectsToPaint() always
275         has at least one rect in it (appending the clip bounds if we don't
276         want to repaint subregions) so we can simplify logic in drawLayerContents.
277
278         (WebCore::drawLayerContents):
279         Remove code to support CompositingCoordinatesBottomUp, as it's only
280         used on Windows, so this Mac-specific code doesn't need to support it.
281
282         Simplify logic given that dirtyRects will always be non-empty.
283
284         (-[WebLayer drawInContext:]):
285         (-[WebSimpleLayer setNeedsDisplayInRect:]):
286         * platform/graphics/ca/mac/TileController.mm:
287         (WebCore::TileController::platformCALayerPaintContents):
288         Adopt collectRectsToPaint.
289
290 2013-11-08  Anders Carlsson  <andersca@apple.com>
291
292         Implement more KeyedEncoder functionality
293         https://bugs.webkit.org/show_bug.cgi?id=124089
294
295         Reviewed by Beth Dakin.
296
297         * bindings/js/SerializedScriptValue.h:
298         * history/HistoryItem.cpp:
299         (WebCore::HistoryItem::encodeBackForwardTreeNode):
300         * platform/KeyedCoding.h:
301         (WebCore::KeyedEncoder::encodeConditionalObject):
302
303 2013-11-08  Eric Carlson  <eric.carlson@apple.com>
304
305         getCueAsHTML() on an empty cue should return a document fragment
306         https://bugs.webkit.org/show_bug.cgi?id=124084
307
308         Reviewed by Darin Adler.
309
310         Test: media/track/track-cue-empty-cue-text.html
311
312         * html/track/WebVTTParser.cpp:
313         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): Don't return early when the
314             passed an empty string.
315
316 2013-11-08  Anders Carlsson  <andersca@apple.com>
317
318         KeyedEncoder should be able to encoder objects
319         https://bugs.webkit.org/show_bug.cgi?id=124085
320
321         Reviewed by Sam Weinig.
322
323         * history/HistoryItem.cpp:
324         (WebCore::HistoryItem::encodeBackForwardTree):
325         Encode the root object.
326
327         (WebCore::HistoryItem::encodeBackForwardTreeNode):
328         Encode the target.
329
330         * history/HistoryItem.h:
331         Add new members.
332
333         * platform/KeyedCoding.h:
334         (WebCore::KeyedEncoder::encodeObject):
335         Call beginObject, call the functor and then call endObject().
336
337 2013-11-08  Sam Weinig  <sam@webkit.org>
338
339         Teach CanvasObserver about references
340         https://bugs.webkit.org/show_bug.cgi?id=124082
341
342         Reviewed by Anders Carlsson.
343
344         * css/CSSCanvasValue.cpp:
345         * css/CSSCanvasValue.h:
346         * html/HTMLCanvasElement.cpp:
347         * html/HTMLCanvasElement.h:
348
349 2013-11-08  Anders Carlsson  <andersca@apple.com>
350
351         Begin stubbing out a KeyedEncoder class in WebCore
352         https://bugs.webkit.org/show_bug.cgi?id=124079
353
354         Reviewed by Sam Weinig.
355
356         * WebCore.exp.in:
357         Add symbol needed by WebCore.
358
359         * WebCore.xcodeproj/project.pbxproj:
360         Add new header file.
361
362         * history/HistoryItem.cpp:
363         (WebCore::HistoryItem::encodeBackForwardTree):
364         * history/HistoryItem.h:
365         Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
366
367         * platform/KeyedCoding.h:
368         Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
369
370 2013-11-08  Brady Eidson  <beidson@apple.com>
371
372         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
373         https://bugs.webkit.org/show_bug.cgi?id=124077
374
375         Reviewed by Alexey Proskuryakov.
376
377         The abstraction is no longer needed.
378
379         * CMakeLists.txt:
380         * GNUmakefile.list.am:
381         * WebCore.xcodeproj/project.pbxproj:
382
383         * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
384
385         * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
386         * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
387
388         * Modules/indexeddb/IDBBackingStoreInterface.h:
389         * Modules/indexeddb/IDBCursorBackend.cpp:
390         * Modules/indexeddb/IDBCursorBackend.h:
391         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
392         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
393         * Modules/indexeddb/IDBFactoryBackendInterface.h:
394         * Modules/indexeddb/IDBTransactionBackendOperations.h:
395         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
396         * Modules/indexeddb/IDBTransactionCoordinator.h:
397         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
398         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
399         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
400         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
401
402 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
403
404         REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
405         https://bugs.webkit.org/show_bug.cgi?id=124075
406
407         Reviewed by Beth Dakin.
408         
409         In r155660 I removed some scrollbar-related layouts when scrollbars
410         are in overlay mode.
411         
412         However, ScrollView::updateScrollbars() has a case where we still need
413         to do multiple pases, related to its "Never ever try to both gain/lose a
414         scrollbar in the same pass" comment. When we avoid making a new scrollbar
415         because the other was removed, we need to do another pass to bring the
416         correct scrollbar back.
417
418         Can't test overlay scrollbars in tests.
419
420         * platform/ScrollView.cpp:
421         (WebCore::ScrollView::updateScrollbars):
422
423 2013-11-08  Hans Muller  <hmuller@adobe.com>
424
425         [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
426         https://bugs.webkit.org/show_bug.cgi?id=123769
427
428         Reviewed by Dirk Schulze.
429
430         Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
431         and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
432         method now generates intervals with Y coordinates that begin at the image shape's
433         bounds.y - shape-margin, which may be less than 0.
434
435         The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
436         by the shape-margin. A non-const overload of the method was added to centralize all
437         access to m_intervalLists.
438
439         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
440               fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
441
442         * rendering/shapes/RasterShape.cpp:
443         (WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
444         (WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
445         (WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
446         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
447         * rendering/shapes/RasterShape.h:
448         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
449         (WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
450
451 2013-11-08  Piotr Grad  <p.grad@samsung.com>
452
453         Ended event should work also when playback rate is negative
454         https://bugs.webkit.org/show_bug.cgi?id=123879
455
456         Reviewed by Eric Carlson.
457
458         According to W3C specification playback is ended also when playback rate is
459         negative and position is the earliest possible position.
460
461         Test: media/video-ended-event-negative-playback.html
462
463         * html/HTMLMediaElement.cpp:
464         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
465
466 2013-11-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
467
468         Checking for TypeError in RTCPeerConnection object creation
469         https://bugs.webkit.org/show_bug.cgi?id=124049
470
471         Reviewed by Eric Carlson.
472
473         If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
474         According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
475
476         Please notice that this patch does not make every tests run as expected,
477         RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
478
479         Existing tests were updated.
480
481         * GNUmakefile.list.am:
482         * Modules/mediastream/RTCPeerConnection.idl:
483         * UseJSC.cmake:
484         * WebCore.vcxproj/WebCore.vcxproj:
485         * WebCore.vcxproj/WebCore.vcxproj.filters:
486         * WebCore.xcodeproj/project.pbxproj:
487         * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
488         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
489
490 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
491
492         Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
493         https://bugs.webkit.org/show_bug.cgi?id=124074
494
495         Reviewed by Sam Weinig.
496
497         Just a straightforward conversion from const pointers to const references.
498
499         Also, remove unneeded argument from FloatingObjects constructor.
500
501         No new tests, no behavior change.
502
503         * rendering/FloatingObjects.cpp:
504         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
505         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
506         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
507         (WebCore::FloatingObjects::FloatingObjects):
508         (WebCore::FloatingObjects::clearLineBoxTreePointers):
509         (WebCore::FloatingObjects::computePlacedFloatsTree):
510         (WebCore::shapeInfoForFloat):
511         (WebCore::::updateOffsetIfNeeded):
512         (WebCore::::collectIfNeeded):
513         (WebCore::::heightRemaining):
514         * rendering/FloatingObjects.h:
515         * rendering/RenderBlockFlow.cpp:
516         (WebCore::RenderBlockFlow::createFloatingObjects):
517
518 2013-11-08  Sam Weinig  <sam@webkit.org>
519
520         Teach SubframeLoader a bit about references
521         https://bugs.webkit.org/show_bug.cgi?id=124076
522
523         Reviewed by Anders Carlsson.
524
525         * html/HTMLAppletElement.cpp:
526         * html/HTMLFrameElementBase.cpp:
527         * html/HTMLMediaElement.cpp:
528         * loader/SubframeLoader.cpp:
529         * loader/SubframeLoader.h:
530
531 2013-11-08  Brady Eidson  <beidson@apple.com>
532
533         Blind Windows build-fix attempt after r158959
534
535         * WebCore.vcxproj/WebCore.vcxproj:
536
537 2013-11-08  Brady Eidson  <beidson@apple.com>
538
539         Merge IDBCursorBackendInterface and IDBCursorBackendImpl
540         https://bugs.webkit.org/show_bug.cgi?id=124068
541
542         Reviewed by Anders Carlsson.
543
544         * CMakeLists.txt:
545         * GNUmakefile.list.am:
546         * WebCore.xcodeproj/project.pbxproj:
547
548         * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
549
550         * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
551         * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
552
553         * Modules/indexeddb/IDBCallbacks.h:
554         * Modules/indexeddb/IDBCursor.cpp:
555         * Modules/indexeddb/IDBCursor.h:
556         * Modules/indexeddb/IDBCursorWithValue.cpp:
557         * Modules/indexeddb/IDBCursorWithValue.h:
558         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
559         * Modules/indexeddb/IDBFactoryBackendInterface.h:
560         * Modules/indexeddb/IDBRequest.cpp:
561         * Modules/indexeddb/IDBRequest.h:
562         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
563         * Modules/indexeddb/IDBTransactionBackendImpl.h:
564         * Modules/indexeddb/IDBTransactionBackendInterface.h:
565         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
566         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
567         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
568
569 2013-11-08  Sam Weinig  <sam@webkit.org>
570
571         Modernize FrameLoader a bit
572         https://bugs.webkit.org/show_bug.cgi?id=124073
573
574         Reviewed by Anders Carlsson.
575
576         * loader/FrameLoader.cpp:
577         * loader/FrameLoader.h:
578         Use std::unique_ptrs rather than OwnPtrs.
579
580         * loader/MixedContentChecker.cpp:
581         * loader/MixedContentChecker.h:
582         Switch to hold a Frame& rather than Frame*.
583
584 2013-11-08  Zan Dobersek  <zdobersek@igalia.com>
585
586         Remove code guarded with ENABLE(STREAM)
587         https://bugs.webkit.org/show_bug.cgi?id=123667
588
589         Reviewed by Anders Carlsson.
590
591         Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
592         no port enables the feature and the work on this feature has wound down after the Chromium port forked,
593         leaving this code unmaintained.
594
595         * fileapi/FileReaderLoader.cpp:
596         * fileapi/FileReaderLoader.h:
597
598 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
599
600         RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
601         https://bugs.webkit.org/show_bug.cgi?id=123931
602
603         Reviewed by Sam Weinig.
604
605         Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
606         the search and to not need ShapeOutsideFloatOffsetMode anymore. This
607         moves almost all of the logic into FloatingObjects, making a small
608         reduction in the amount that RenderBlockFlow needs to know about the
609         implementation of FloatingObjects.
610
611         In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
612         and roundToInt itself so that all of it's callers can be simplified.
613
614         No new tests, no new behavior.
615
616         * rendering/FloatingObjects.cpp:
617         (WebCore::rangesIntersect):
618         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
619         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
620         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
621         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
622         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
623         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
624         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
625         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
626         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
627         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
628         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
629         (WebCore::FloatingObjects::logicalLeftOffset):
630         (WebCore::FloatingObjects::logicalRightOffset):
631         * rendering/FloatingObjects.h:
632         * rendering/LineWidth.cpp:
633         (WebCore::LineWidth::fitBelowFloats):
634         * rendering/RenderBlockFlow.cpp:
635         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
636         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
637         (WebCore::RenderBlockFlow::getClearDelta):
638         * rendering/RenderBlockFlow.h:
639
640 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
641
642         https://bugs.webkit.org/show_bug.cgi?id=124064
643         Some WebCrypto files are not in correct directories
644
645         Rubber-stamped by Anders Carlsson.
646
647         * WebCore.xcodeproj/project.pbxproj:
648         * crypto/CryptoAlgorithmAesCbcParams.h: Removed.
649         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
650         * crypto/CryptoKeyAES.cpp: Removed.
651         * crypto/CryptoKeyAES.h: Removed.
652         * crypto/CryptoKeyMac.cpp: Removed.
653         * crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
654         * crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
655         * crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
656         * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
657         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
658
659 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
660
661         Implement JWK key import for HMAC and AES-CBC
662         https://bugs.webkit.org/show_bug.cgi?id=124059
663
664         Reviewed by Anders Carlsson.
665
666         Tests: crypto/subtle/aes-cbc-import-jwk.html
667                crypto/subtle/hmac-import-jwk.html
668                crypto/subtle/import-jwk.html
669
670         WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
671         we'll transform these into parsed KeyData subclasses before passing to algorithms.
672
673         CryptoKeySerialization is a base class for handling all these formats.
674
675         * WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
676         
677         * bindings/js/JSCryptoKeySerializationJWK.h: Added.
678         * bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
679         (WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
680         a nice freshly parsed JSON, no getters or anything.
681         (WebCore::getBooleanFromJSON): Ditto.
682         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
683         (WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
684         (WebCore::createHMACParameters): A simple helper.
685         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
686         you can have algorithm parameters both inside a JWK key and passed as importKey()
687         arguments. They need to agree, whatever that means for specific serialization's
688         algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
689         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
690         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
691         both JWK and the caller agree.
692         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
693         (WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
694         subclass.
695
696         * bindings/js/JSSubtleCryptoCustom.cpp:
697         (WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
698         (WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
699         (WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
700
701         * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
702         * crypto/CryptoAlgorithm.h:
703         Updated signature for importKey to one that makes more sense. Decoding formats all
704         the way from a binary blob is not something that CryptoAlgorithm subclasses should
705         do, we now pass a KeyData subclass instead.
706         Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
707         signatures will be.
708
709         * crypto/CryptoKeyData.h: Added.
710         (WebCore::CryptoKeyData::ENUM_CLASS):
711         (WebCore::CryptoKeyData::CryptoKeyData):
712         (WebCore::CryptoKeyData::~CryptoKeyData):
713         (WebCore::CryptoKeyData::format):
714         A base class for passing key material to algorithms. Currently, only one type is
715         supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
716         complicated, and secret/public ones are different too.
717
718         * crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
719         confusingly floating around, and this was only needed in one file for parsing.
720
721         * crypto/CryptoKeySerialization.h: Added.
722         Base class for handling raw/pkcs8/spki/jwk keys.
723
724         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
725         (WebCore::CryptoAlgorithmAES_CBC::importKey):
726         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
727         Updated to use CryptoKeyData.
728
729         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
730         (WebCore::CryptoAlgorithmHMAC::importKey):
731         * crypto/algorithms/CryptoAlgorithmHMAC.h:
732         Updated to use CryptoKeyData.
733
734         * crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
735         (WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
736         (WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
737         * crypto/keys/CryptoKeyDataOctetSequence.h: Added.
738         (WebCore::asCryptoKeyDataOctetSequence):
739         * crypto/keys/CryptoKeySerializationRaw.cpp: Added.
740         (WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
741         (WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
742         (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
743         (WebCore::CryptoKeySerializationRaw::reconcileUsages):
744         (WebCore::CryptoKeySerializationRaw::reconcileExtractable):
745         (WebCore::CryptoKeySerializationRaw::keyData):
746         * crypto/keys/CryptoKeySerializationRaw.h: Added.
747         Much code to pass around a Vector<char>.
748
749 2013-11-08  Mark Lam  <mark.lam@apple.com>
750
751         Move breakpoint (and exception break) functionality into JSC::Debugger.
752         https://bugs.webkit.org/show_bug.cgi?id=121796.
753
754         Reviewed by Geoffrey Garen.
755
756         No new tests.
757
758         - In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
759           now numeric tokens.
760
761         - JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
762           record. Previously, this info is tracked in the ScriptBreakpoint record
763           in ScriptDebugServer. The only element of ScriptBreakpoint that is not
764           being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
765              The ScriptBreakpointAction is still tracked by the ScriptDebugServer
766           in a list keyed on the corresponding BreakpointID.
767              The ScriptBreakpoint record is now only used as a means of passing
768           breakpoint paramaters to the ScriptDebugServer.
769
770         - ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
771           It always goes through the DebuggerCallFrame.
772
773         * GNUmakefile.list.am:
774         * WebCore.vcxproj/WebCore.vcxproj:
775         * WebCore.vcxproj/WebCore.vcxproj.filters:
776         * WebCore.xcodeproj/project.pbxproj:
777         * bindings/js/BreakpointID.h: Added.
778         * bindings/js/ScriptDebugServer.cpp:
779         (WebCore::ScriptDebugServer::ScriptDebugServer):
780         (WebCore::ScriptDebugServer::setBreakpoint):
781         (WebCore::ScriptDebugServer::removeBreakpoint):
782         (WebCore::ScriptDebugServer::clearBreakpoints):
783         (WebCore::ScriptDebugServer::dispatchDidPause):
784         (WebCore::ScriptDebugServer::dispatchDidContinue):
785         (WebCore::ScriptDebugServer::dispatchDidParseSource):
786         (WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
787         (WebCore::ScriptDebugServer::needPauseHandling):
788         (WebCore::ScriptDebugServer::handleBreakpointHit):
789         (WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
790         (WebCore::ScriptDebugServer::handlePause):
791         * bindings/js/ScriptDebugServer.h:
792         * bindings/js/SourceID.h: Added.
793         * bindings/js/WorkerScriptDebugServer.cpp:
794         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
795         * bindings/js/WorkerScriptDebugServer.h:
796         * inspector/InspectorDebuggerAgent.cpp:
797         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
798         (WebCore::parseLocation):
799         (WebCore::InspectorDebuggerAgent::setBreakpoint):
800         (WebCore::InspectorDebuggerAgent::continueToLocation):
801         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
802         (WebCore::InspectorDebuggerAgent::searchInContent):
803         (WebCore::InspectorDebuggerAgent::getScriptSource):
804         (WebCore::InspectorDebuggerAgent::didParseSource):
805         (WebCore::InspectorDebuggerAgent::didPause):
806         (WebCore::InspectorDebuggerAgent::clear):
807         * inspector/InspectorDebuggerAgent.h:
808         * inspector/ScriptDebugListener.h:
809
810 2013-11-08  László Langó  <lango@inf.u-szeged.hu>
811
812         InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
813         https://bugs.webkit.org/show_bug.cgi?id=114316
814
815         Reviewed by Timothy Hatcher.
816
817         InspectorConsoleAgent::didFinishXHRLoading creates a ConsoleMessage with a line number, 
818         but it should also include a column number. It looks like ultimately the line number comes from
819         JSXMLHttpRequest::send, it should also be possible to get the column number at the time.
820         The column number would be needed by the Web Inspector to jump to the proper place in source code 
821         to show where the XHR originated from.
822
823         * bindings/js/JSXMLHttpRequestCustom.cpp:
824         (WebCore::SendFunctor::SendFunctor):
825         (WebCore::SendFunctor::column):
826         (WebCore::SendFunctor::operator()):
827         (WebCore::JSXMLHttpRequest::send):
828         * inspector/InspectorConsoleAgent.cpp:
829         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
830         * inspector/InspectorConsoleAgent.h:
831         * inspector/InspectorInstrumentation.cpp:
832         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
833         * inspector/InspectorInstrumentation.h:
834         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
835         * xml/XMLHttpRequest.cpp:
836         (WebCore::XMLHttpRequest::XMLHttpRequest):
837         (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber):
838         (WebCore::XMLHttpRequest::didFinishLoading):
839         * xml/XMLHttpRequest.h:
840
841 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
842
843         Left sidebar on cubic-bezier.com flickers
844         https://bugs.webkit.org/show_bug.cgi?id=123128
845
846         Reviewed by Dean Jackson.
847         
848         The logic that determined whether position:fixed elements outside the viewport
849         should be composited was incorrect if the fixed element also had a transform.
850         
851         layer.calculateLayerBounds() only takes into account painted transforms (since they
852         affect layer bounds). So we need to compute the bounds relative to the layer
853         itself, then use localToContainerQuad() to map them to document coordinates,
854         but only to the RenderView so that we don't hit the page scale transform.
855
856         Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
857                compositing/layer-creation/fixed-position-transformed-outside-view.html
858
859         * rendering/RenderLayerCompositor.cpp:
860         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
861
862 2013-11-08  Martin Robinson  <mrobinson@igalia.com>
863
864         [MathML] Center of stretched curly bracket not always vertically centered
865         https://bugs.webkit.org/show_bug.cgi?id=123715
866
867         Reviewed by Brent Fulgham.
868
869         * rendering/mathml/RenderMathMLOperator.cpp:
870         (WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Update an assertion and
871         handle the case where two glyph pieces abut.
872         (WebCore::RenderMathMLOperator::paint): Do not offset the center glyph by y().
873
874 2013-10-30  Jer Noble  <jer.noble@apple.com>
875
876         [MSE] Bring SourceBuffer.append up to the most recent spec.
877         https://bugs.webkit.org/show_bug.cgi?id=123377
878
879         Reviewed by Eric Carlson.
880
881         Test: media/media-source/media-source-append-failed.html
882
883         Bring the MediaSource append() implementation up to the current spec.
884
885         * Modules/mediasource/SourceBuffer.cpp:
886         (WebCore::SourceBuffer::appendBufferInternal):
887         (WebCore::SourceBuffer::appendBufferTimerFired):
888         * platform/graphics/SourceBufferPrivate.h:
889         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
890         (WebCore::MockSourceBufferPrivate::append):
891         (WebCore::MockSourceBufferPrivate::evictCodedFrames):
892         (WebCore::MockSourceBufferPrivate::isFull):
893         * platform/mock/mediasource/MockSourceBufferPrivate.h:
894
895 2013-11-07  Jer Noble  <jer.noble@apple.com>
896
897         [Mac] Crash at com.apple.WebCore: WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange + 26
898         https://bugs.webkit.org/show_bug.cgi?id=124031
899
900         Reviewed by Eric Carlson.
901
902         WTF::bind() causes errors when given a bare id pointer as a parameter,
903         when that parameter is casted to a specific NS type pointer (in this
904         case, a NSArray*) in order to pass it as a parameter to the bound
905         function.
906
907         Instead of passing around bare id pointers, wrap them in RetainPtr<>
908         objects before passing them to WTF::bind().
909
910         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
911         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
912         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
913         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
914         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
915         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
916
917 2013-11-08  Antti Koivisto  <antti@apple.com>
918
919         Templated LChar/UChar paths for simple line layout
920         https://bugs.webkit.org/show_bug.cgi?id=124035
921
922         Reviewed by Andreas Kling.
923
924         * rendering/SimpleLineLayout.cpp:
925         (WebCore::SimpleLineLayout::canUseForText):
926         (WebCore::SimpleLineLayout::canUseFor):
927         
928             Use a templated function to check for illegal characters.
929
930         (WebCore::SimpleLineLayout::skipWhitespaces):
931         
932             Make a template function.
933
934         (WebCore::SimpleLineLayout::textWidth):
935         
936             Make a template function plus some argument changes.
937
938         (WebCore::SimpleLineLayout::createTextRuns):
939         
940             Template function for creating runs while operating with either LChars or UChar.
941             Also simplified line breaking and text width measuring logic.
942
943         (WebCore::SimpleLineLayout::create):
944         
945             Pick the template.
946
947         * rendering/break_lines.cpp:
948         * rendering/break_lines.h:
949         
950             Move the implementation to the header (except for the table) so we can use the template
951             versions directly.
952
953         (WebCore::isBreakableSpace):
954         (WebCore::shouldBreakAfter):
955         (WebCore::needsLineBreakIterator):
956         (WebCore::nextBreakablePosition):
957         (WebCore::nextBreakablePositionIgnoringNBSP):
958
959 2013-11-08  Mario Sanchez Prada  <mario.prada@samsung.com>
960
961         AX: [ATK] <span> elements exposed through ATK when not needed
962         https://bugs.webkit.org/show_bug.cgi?id=123885
963
964         Reviewed by Chris Fleizach.
965
966         As per SVN r158195, the way it's decided whether <span> elements
967         should be ignored or not has slightly changed, causing that the
968         GTK/EFL ports expose them in cases that they should be ignored,
969         such as for text elements that neither are focusable (e.g. by
970         explicitly setting tabindex) nor have a meaningful accessible name
971         suggesting they should be exposed.
972
973         As a result, the flattening that ATK based ports normally do for
974         this kind of elements (by folding them into their parents) do not
975         work correctly anymore, making two tests to fail:
976
977             platform/gtk/accessibility/spans-paragraphs-and-divs.html
978             platform/gtk/accessibility/spans.html
979
980         This patch encapsulates the part of the logic that affects this in
981         the computeAccessibilityIsIgnored() method, placing it in a
982         new method of AccessibilityObject that we can call from ATK's
983         accessibilityPlatformIncludesObject() to ensure we hide those
984         <span> elements when they don't fulfill those requirements.
985
986         * accessibility/AccessibilityObject.cpp:
987         (WebCore::AccessibilityObject::hasAttributesRequiredForInclusion):
988         New virtual method encapsulating part of the logic from the function
989         that computes whether accessibility should be ignored or not.
990         * accessibility/AccessibilityObject.h:
991
992         * accessibility/AccessibilityNodeObject.cpp:
993         (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion):
994         Override of the new method adding additional checks, as extracted from
995         the original bits in computeAccessibilityIsIgnored().
996         * accessibility/AccessibilityNodeObject.h:
997
998         * accessibility/AccessibilityRenderObject.cpp:
999         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1000         Use the newly added function where we had the original code before.
1001
1002         * accessibility/atk/AccessibilityObjectAtk.cpp:
1003         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1004         Make sure <span> elements are ignored if they are not focusable
1005         and they don't have a meaningful accessible name.
1006
1007 2013-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1008
1009         [GTK] Add missing symbols to WebKitDOMEventTarget.symbols
1010         https://bugs.webkit.org/show_bug.cgi?id=123990
1011
1012         Reviewed by Philippe Normand.
1013
1014         Add webkit_dom_event_target_add_event_listener_with_closure and
1015         webkit_dom_event_target_remove_event_listener_with_closure to the
1016         symbols files.
1017
1018         * bindings/gobject/WebKitDOMEventTarget.symbols:
1019         * bindings/gobject/webkitdom.symbols:
1020
1021 2013-11-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1022
1023         [GTK] Use deprecation guards around deprecated API in GObject DOM bindings
1024         https://bugs.webkit.org/show_bug.cgi?id=123899
1025
1026         Reviewed by Martin Robinson.
1027
1028         Do not include deprecated API when compiling with
1029         WEBKIT_DISABLE_DEPRECATED option.
1030
1031         * bindings/scripts/CodeGeneratorGObject.pm:
1032         (GenerateFunction):
1033         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1034         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1035
1036 2013-11-07  Brady Eidson  <beidson@apple.com>
1037
1038         Enhance SQL journal_mode setting code to be less likely to log an error.
1039         <rdar://problem/15418577> and https://bugs.webkit.org/show_bug.cgi?id=124018
1040
1041         Reviewed by Anders Carlsson.
1042
1043         Even though the docs says SQLITE_ROW will always be returned, apparently SQLITE_OK is sometimes returned.
1044         Change the code to handle that.
1045
1046         * platform/sql/SQLiteDatabase.cpp:
1047         (WebCore::SQLiteDatabase::open): Save the statement result value, and accept SQLITE_OK as a non-error condition.
1048
1049 2013-11-07  Brady Eidson  <beidson@apple.com>
1050
1051         Update an out-dated ASSERT in IconDatabase code.
1052         <rdar://problem/15171118> and https://bugs.webkit.org/show_bug.cgi?id=124030.
1053
1054         Reviewed by Andreas Kling.
1055
1056         With the asynchronous interfaces that have been added and the support for WK2 that has been added, 
1057         this ASSERT can incorrectly fire if an icon is asked for before database cleanup is allowed.
1058
1059         * loader/icon/IconDatabase.cpp:
1060         (WebCore::IconDatabase::synchronousIconForPageURL): Update an invalid ASSERT.
1061
1062 2013-11-07  Andreas Kling  <akling@apple.com>
1063
1064         RenderSVGResource helpers should take RenderStyle by const reference.
1065         <https://webkit.org/b/124029>
1066
1067         Take const RenderStyle& instead of RenderStyle* in a few more places
1068         so we can get rid of some ampersands and assertions.
1069
1070         Reviewed by Anders Carlsson.
1071
1072 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1073
1074         [AX] Generate toAccessibilityTableRow|Column|Cell to detect bad type casts
1075         https://bugs.webkit.org/show_bug.cgi?id=123984
1076
1077         Reviewed by Mario Sanchez Prada.
1078
1079         As a step to let static_cast<> use TYPE_CASTS_BASE, AccessibilityTableRow|Column|Cell use
1080         ACCESSIBILITY_OBJECT_TYPE_CASTS which can support more helper functions rather than manual
1081         static_cast<>. This change will help to detect bad type casts further.
1082
1083         No new tests, no behavior changes.
1084
1085         * accessibility/AccessibilityARIAGrid.cpp:
1086         (WebCore::AccessibilityARIAGrid::addTableCellChild):
1087         (WebCore::AccessibilityARIAGrid::addChildren):
1088         * accessibility/AccessibilityARIAGridCell.cpp:
1089         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1090         * accessibility/AccessibilityTable.cpp:
1091         (WebCore::AccessibilityTable::addChildren):
1092         (WebCore::AccessibilityTable::rowHeaders):
1093         (WebCore::AccessibilityTable::columnHeaders):
1094         (WebCore::AccessibilityTable::cellForColumnAndRow):
1095         * accessibility/AccessibilityTableCell.h:
1096         * accessibility/AccessibilityTableColumn.h:
1097         * accessibility/AccessibilityTableRow.cpp:
1098         (WebCore::AccessibilityTableRow::headerObject):
1099         * accessibility/AccessibilityTableRow.h:
1100         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1101         (cellAtIndex):
1102         (webkitAccessibleTableGetColumnHeader):
1103         (webkitAccessibleTableGetRowHeader):
1104         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1105         (-[WebAccessibilityObjectWrapper tableCellParent]):
1106         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1107         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1108
1109 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1110
1111         REGRESSION (r154375): Image is oriented incorrectly
1112         https://bugs.webkit.org/show_bug.cgi?id=123831
1113
1114         Reviewed by Antonio Gomes.
1115
1116         r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
1117         It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
1118         value by default.
1119
1120         * rendering/RenderImage.cpp:
1121         (WebCore::RenderImage::paintReplaced):
1122         (WebCore::RenderImage::paintIntoRect):
1123
1124 2013-11-07  Hans Muller  <hmuller@adobe.com>
1125
1126         [CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly
1127         https://bugs.webkit.org/show_bug.cgi?id=123934
1128
1129         Reviewed by Andreas Kling.
1130
1131         RasterShapeIntervals::getExcludedIntervals() was returning an empty
1132         list when the line overlapped any vertical gap in the image. This short-circuit
1133         had been mistakenly copied from getIncludedIntervals(), where it makes sense.
1134
1135         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap.html
1136
1137         * rendering/shapes/RasterShape.cpp:
1138         (WebCore::RasterShapeIntervals::getExcludedIntervals):
1139
1140 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
1141
1142         Make contents layer borders more visible
1143         https://bugs.webkit.org/show_bug.cgi?id=124025
1144
1145         Reviewed by Tim Horton.
1146
1147         Layer borders for contents layers are impossible to see when the
1148         contentsLayer has the same bounds as its parent; make the contents
1149         layer border 4px thick to make it more visible.
1150
1151         * platform/graphics/ca/GraphicsLayerCA.cpp:
1152         (WebCore::GraphicsLayerCA::setupContentsLayer):
1153
1154 2013-11-07  Andreas Kling  <akling@apple.com>
1155
1156         InlineFlowBox always has a RenderBoxModelObject, take advantage.
1157         <https://webkit.org/b/124024>
1158
1159         Since InlineFlowBox already has the branch-less renderer() returning
1160         a RenderBoxModelObject&, avoid using InlineBox::boxModelObject()
1161         wherever we have a tightly-typed box. One branch disappears from
1162         every call site.
1163
1164         Deleted boxModelObject() on InlineFlowBox to prevent new code from
1165         calling the less efficient function.
1166
1167         Reviewed by Anders Carlsson.
1168
1169 2013-11-07  Andreas Kling  <akling@apple.com>
1170
1171         CTTE: Scrolling tree nodes should always have a ScrollingTree&.
1172         <https://webkit.org/b/124022>
1173
1174         Let ScrollingTreeNode and subclasses store the backpointer to the
1175         tree as a ScrollingTree& reference.
1176
1177         Reviewed by Anders Carlsson.
1178
1179 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
1180
1181         Lots of layers get solid color but transparent contents layers now
1182         https://bugs.webkit.org/show_bug.cgi?id=123537
1183
1184         Reviewed by Tim Horton.
1185         
1186         We call rendererBackgroundColor() to determine the layer's background color,
1187         but on most elements this returns the transparent color (a valid color).
1188         This caused us to allocate a contentsLayer, and use the transparent color as its
1189         backgroundColor, which was wasteful.
1190         
1191         Fix by only making a background-color layer if the color is not transparent (zero alpha).
1192         
1193         Also avoid making a new contents layer on every color change, and make sure that
1194         we don't do implicit animations for backgroundColor, and some other properties
1195         that were omitted by mistake.
1196
1197         Layer tree dumps don't dump content layers, so no way to test easily.
1198
1199         * platform/graphics/ca/GraphicsLayerCA.cpp:
1200         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
1201         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1202         (nullActionsDictionary):
1203
1204 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
1205
1206         DOMTokenList::add can add duplicated values if arguments had duplicated values
1207         https://bugs.webkit.org/show_bug.cgi?id=123962
1208
1209         Reviewed by Benjamin Poulain.
1210
1211         Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305
1212
1213         In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
1214         See http://dom.spec.whatwg.org/#dom-domtokenlist-add
1215
1216         * html/DOMTokenList.cpp:
1217         (WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.
1218
1219 2013-11-07  Eric Carlson  <eric.carlson@apple.com>
1220
1221         Remove npr.org specific hack in HTMLMediaElement
1222         https://bugs.webkit.org/show_bug.cgi?id=123859
1223
1224         Reviewed by Jer Noble.
1225
1226         Remove the site specific hack added in r57820, it is no longer necessary.
1227
1228         * html/HTMLMediaElement.cpp:
1229         (WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
1230         (HTMLMediaElement::play): Don't special case npr.org.
1231         * html/HTMLMediaElement.h:
1232
1233 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
1234
1235         Attempt to fix the 32-bit build. Virtual thunks seem to have different
1236         symbol names between 32- and 64-bit.
1237         
1238         * WebCore.exp.in:
1239
1240 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
1241
1242         Crash in HTMLMediaElement::contextDestroyed
1243         https://bugs.webkit.org/show_bug.cgi?id=123963
1244
1245         Reviewed by Eric Carlson.
1246
1247         Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278
1248
1249         * html/HTMLMediaElement.cpp:
1250         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1251
1252 2013-11-07  Jer Noble  <jer.noble@apple.com>
1253
1254         [Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084 
1255         https://bugs.webkit.org/show_bug.cgi?id=124012
1256
1257         Reviewed by Eric Carlson.
1258
1259         The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.
1260
1261         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1262         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1263
1264 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
1265
1266         Crash when submitting form in a document with null encoding
1267         https://bugs.webkit.org/show_bug.cgi?id=123975
1268
1269         Reviewed by Alexey Proskuryakov.
1270
1271         Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f
1272         
1273         The CString object which is passed to normalizeLineEndingsToCRLF() can be
1274         a null string. It is created in FormDataList::appendString(), and it
1275         produces a null CString if FormDataList::m_encoding is a null encoding.
1276
1277         Test: fast/forms/form-submit-in-image-document.html
1278
1279         * platform/text/LineEnding.cpp:
1280         (internalNormalizeLineEndingsToCRLF):
1281
1282 2013-11-07  Anders Carlsson  <andersca@apple.com>
1283
1284         Use std::function for all policy continuation functions
1285         https://bugs.webkit.org/show_bug.cgi?id=124011
1286
1287         Reviewed by Sam Weinig.
1288
1289         * loader/DocumentLoader.cpp:
1290         (WebCore::DocumentLoader::willSendRequest):
1291         (WebCore::DocumentLoader::responseReceived):
1292         * loader/DocumentLoader.h:
1293         * loader/FrameLoader.cpp:
1294         (WebCore::FrameLoader::loadURL):
1295         (WebCore::FrameLoader::load):
1296         (WebCore::FrameLoader::loadWithDocumentLoader):
1297         (WebCore::FrameLoader::loadPostRequest):
1298         * loader/PolicyCallback.cpp:
1299         (WebCore::PolicyCallback::clear):
1300         (WebCore::PolicyCallback::set):
1301         (WebCore::PolicyCallback::call):
1302         (WebCore::PolicyCallback::clearRequest):
1303         (WebCore::PolicyCallback::cancel):
1304         * loader/PolicyCallback.h:
1305         * loader/PolicyChecker.cpp:
1306         (WebCore::PolicyChecker::checkNavigationPolicy):
1307         (WebCore::PolicyChecker::checkNewWindowPolicy):
1308         (WebCore::PolicyChecker::checkContentPolicy):
1309         * loader/PolicyChecker.h:
1310
1311 2013-11-07  Brady Eidson  <beidson@apple.com>
1312
1313         Use SQLite journal mode WAL (WriteAheadLogging)
1314         https://bugs.webkit.org/show_bug.cgi?id=124009
1315
1316         Reviewed by Anders Carlsson.
1317
1318         WriteAheadLogging journalling is better than the traditional rollback model.
1319
1320         * platform/sql/SQLiteDatabase.cpp:
1321         (WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.
1322
1323 2013-11-07  Mark Lam  <mark.lam@apple.com>
1324
1325         Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
1326         https://bugs.webkit.org/show_bug.cgi?id=123945.
1327
1328         Reviewed by Geoffrey Garen.
1329
1330         No new tests.
1331
1332         * bindings/js/JSInjectedScriptHostCustom.cpp:
1333         (WebCore::JSInjectedScriptHost::functionDetails):
1334         * bindings/js/JavaScriptCallFrame.h:
1335         (WebCore::JavaScriptCallFrame::sourceID):
1336         * bindings/js/ScriptDebugServer.cpp:
1337         (WebCore::ScriptDebugServer::ScriptDebugServer):
1338         (WebCore::ScriptDebugServer::setBreakpoint):
1339         (WebCore::ScriptDebugServer::removeBreakpoint):
1340         (WebCore::ScriptDebugServer::hasBreakpoint):
1341         (WebCore::ScriptDebugServer::clearBreakpoints):
1342         (WebCore::ScriptDebugServer::updateCallFrame):
1343         (WebCore::ScriptDebugServer::pauseIfNeeded):
1344         * bindings/js/ScriptDebugServer.h:
1345         * inspector/InspectorConsoleAgent.cpp:
1346         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1347         * inspector/InspectorConsoleAgent.h:
1348         * inspector/InspectorConsoleInstrumentation.h:
1349         (WebCore::InspectorInstrumentation::addMessageToConsole):
1350         * inspector/InspectorDOMAgent.cpp:
1351         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1352         * inspector/InspectorDebuggerAgent.cpp:
1353         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1354         (WebCore::parseLocation):
1355         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1356         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1357         (WebCore::InspectorDebuggerAgent::continueToLocation):
1358         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1359         (WebCore::InspectorDebuggerAgent::searchInContent):
1360         (WebCore::InspectorDebuggerAgent::setScriptSource):
1361         (WebCore::InspectorDebuggerAgent::getScriptSource):
1362         (WebCore::InspectorDebuggerAgent::compileScript):
1363         (WebCore::InspectorDebuggerAgent::runScript):
1364         (WebCore::InspectorDebuggerAgent::didParseSource):
1365         (WebCore::InspectorDebuggerAgent::didPause):
1366         (WebCore::InspectorDebuggerAgent::clear):
1367         (WebCore::InspectorDebuggerAgent::reset):
1368         * inspector/InspectorDebuggerAgent.h:
1369         * inspector/InspectorInstrumentation.cpp:
1370         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1371         * inspector/InspectorInstrumentation.h:
1372         * inspector/ScriptDebugListener.h:
1373
1374 2013-11-07  Cidorvan Leite  <cidorvan.leite@openbossa.org>
1375
1376         Avoid invalid cairo matrix when drawing surfaces too small
1377         https://bugs.webkit.org/show_bug.cgi?id=123810
1378
1379         Drawing surfaces too small makes inverse matrix with values too big,
1380         when this happen, cairo context is not valid anymore and it stops to draw anything.
1381
1382         Reviewed by Martin Robinson.
1383
1384         Test: fast/canvas/drawImage-with-small-values.html
1385
1386         * platform/graphics/cairo/PlatformContextCairo.cpp:
1387         (WebCore::PlatformContextCairo::drawSurfaceToContext):
1388
1389 2013-11-07  Antti Koivisto  <antti@apple.com>
1390
1391         Simple line layout crashes with SVG fonts
1392         https://bugs.webkit.org/show_bug.cgi?id=124002
1393
1394         Reviewed by Simon Fraser.
1395         
1396         Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.
1397
1398         Test: fast/text/svg-font-simple-line-crash.html
1399
1400         * platform/graphics/Font.h:
1401         (WebCore::Font::isSVGFont):
1402         
1403             Add isSVGFont() so callers don't need to go via primaryFont().
1404
1405         * rendering/InlineTextBox.cpp:
1406         (WebCore::InlineTextBox::constructTextRun):
1407         * rendering/RenderBlock.cpp:
1408         (WebCore::constructTextRunInternal):
1409         * rendering/SimpleLineLayout.cpp:
1410         (WebCore::SimpleLineLayout::canUseFor):
1411         
1412             Disallow SVG fonts.
1413
1414         * rendering/svg/SVGInlineTextBox.cpp:
1415         (WebCore::SVGInlineTextBox::constructTextRun):
1416         * rendering/svg/SVGTextMetrics.cpp:
1417         (WebCore::SVGTextMetrics::constructTextRun):
1418         (WebCore::SVGTextMetrics::SVGTextMetrics):
1419         * rendering/svg/SVGTextRunRenderingContext.h:
1420         
1421             Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().
1422
1423 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
1424
1425         Allow customization of the contentsScale of TileController tiles
1426         https://bugs.webkit.org/show_bug.cgi?id=124004
1427
1428         Reviewed by Tim Horton.
1429
1430         On some platorms, zooming out on pages with TiledBacking compositing
1431         layers can cause very high memory use, because the TiledBacking retains
1432         the original page scale while the zoom is in flight, but can be asked
1433         to cover a large area.
1434         
1435         Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
1436         to provide an additional scale factor for newly created tiles. Platforms can
1437         then customize this to create low-res tiles when necessary.
1438
1439         * WebCore.exp.in:
1440         * platform/graphics/GraphicsLayerClient.h:
1441         (WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
1442         * platform/graphics/ca/GraphicsLayerCA.cpp:
1443         (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
1444         * platform/graphics/ca/GraphicsLayerCA.h:
1445         * platform/graphics/ca/PlatformCALayerClient.h:
1446         (WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
1447         * platform/graphics/ca/mac/TileController.h:
1448         * platform/graphics/ca/mac/TileController.mm:
1449         (WebCore::TileController::TileController):
1450         (WebCore::TileController::setScale):
1451         (WebCore::TileController::createTileLayer):
1452         * rendering/RenderLayerBacking.cpp:
1453         (WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
1454         * rendering/RenderLayerBacking.h:
1455         * rendering/RenderLayerCompositor.cpp:
1456         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
1457         * rendering/RenderLayerCompositor.h:
1458
1459 2013-11-07  Jer Noble  <jer.noble@apple.com>
1460
1461         Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.
1462
1463         * rendering/FloatingObjects.cpp:
1464
1465 2013-11-07  Bem Jones-Bey  <bjonesbe@adobe.com>
1466
1467         Refactor logical left/right offset for line methods
1468         https://bugs.webkit.org/show_bug.cgi?id=123898
1469
1470         Reviewed by David Hyatt.
1471
1472         Simplify the logical left/right offset for line methods and their
1473         implementation, including the ComputeFloatOffsetAdapter. This also
1474         reduces the number of line offset methods in RenderBlock.
1475
1476         No new tests, no behavior change.
1477
1478         * rendering/FloatingObjects.cpp:
1479         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
1480         (WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
1481             the offset instead of using a confusing out parameter.
1482         (WebCore::::shapeOffset): Method to return the offset modified by the
1483             shape delta. Moving the computation to this method allowed for
1484             simplification of the users of ComputeFloatOffsetAdapter.
1485         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
1486             method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
1487             offset based on the float margin box.
1488         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
1489         (WebCore::FloatingObjects::logicalLeftOffset): This now only returns
1490             the offset based on the shape's contour.
1491         (WebCore::FloatingObjects::logicalRightOffset): Ditto.
1492         (WebCore::::heightRemaining): Rename to properly follow the getter
1493             naming convention.
1494         * rendering/FloatingObjects.h:
1495         * rendering/RenderBlock.h:
1496         (WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
1497             use of ShapeOutsideFloatOffsetMode and heightRemaining.
1498         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
1499         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
1500         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
1501         * rendering/RenderBlockFlow.cpp:
1502         (WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
1503             Positioning a float is the only case where the float margin box
1504             should be used, and also the only case where heightRemaining is
1505             needed. This handles that case.
1506         (WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
1507             Ditto.
1508         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
1509             use logical(Left|Right)OffsetForPositioningFloatOnLine.
1510         (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
1511             remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
1512         (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
1513         * rendering/RenderBlockFlow.h:
1514
1515 2013-11-07  Alexandru Chiculita  <achicu@adobe.com>
1516
1517         Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
1518         https://bugs.webkit.org/show_bug.cgi?id=123577
1519
1520         Reviewed by Timothy Hatcher.
1521
1522         Test: inspector-protocol/model/content-flow-content-removal.html
1523
1524         Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
1525         anymore. We already send an unbind event, so the inspector is already notified that the node was removed.
1526
1527         * inspector/InspectorCSSAgent.cpp:
1528         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
1529
1530 2013-10-30  Jer Noble  <jer.noble@apple.com>
1531
1532         [MSE] Add mock MediaSource classes for testing.
1533         https://bugs.webkit.org/show_bug.cgi?id=123322
1534
1535         Reviewed by Eric Carlson.
1536
1537         Tests: media/media-source/media-source-addsourcebuffer.html
1538                media/media-source/media-source-append-buffer.html
1539                media/media-source/media-source-canplaythrough.html
1540                media/media-source/media-source-closed.html
1541                media/media-source/media-source-play.html
1542                media/media-source/media-source-track-enabled.html
1543                media/media-source/media-source-tracks.html
1544
1545
1546         Add mock implementation of platform MediaSource classes, allowing ports to test the
1547         MediaSource API without having a platform implementation.
1548
1549         The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
1550         format with an initialization segment containing a number of tracks, followed by a list of
1551         samples.
1552
1553         Add a means to insert a new media engine factory at runtime, so the internals object can add
1554         a MockMediaSourceMediaPlayer:
1555         * platform/graphics/MediaPlayer.cpp:
1556         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
1557         * platform/graphics/MediaPlayer.h:
1558         * testing/Internals.cpp:
1559         (WebCore::Internals::initializeMockMediaSource):
1560         * testing/Internals.h:
1561         * testing/Internals.idl:
1562
1563         For non-media-source supporting media engines, fail immediately when asked to load a media
1564         source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
1565         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1566         (WebCore::MediaPlayerPrivateAVFoundation::load):
1567         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1568         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1569         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1570         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1571         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1572         (WebCore::MediaPlayerPrivateQTKit::load):
1573         (WebCore::MediaPlayerPrivateQTKit::supportsType):
1574
1575         Add new files to the project:
1576         * WebCore.xcodeproj/project.pbxproj:
1577         * Source/WebCore/WebCore.exp.in:
1578
1579         Update the MediaSource implementation:
1580         * Modules/mediasource/MediaSource.cpp:
1581         (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
1582         * Modules/mediasource/SourceBuffer.cpp:
1583         (WebCore::SourceBuffer::buffered): Ditto.
1584         (WebCore::SourceBuffer::setTimestampOffset): Ditto.
1585         (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
1586         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
1587             bring the implementation up to date with part of the spec.
1588         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
1589             SampleIsRandomAccessPredicate.
1590
1591         Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
1592         * platform/mock/mediasource/MockBox.cpp: Added.
1593         (WebCore::MockBox::MockBox):
1594         (WebCore::MockBox::peekType):
1595         (WebCore::MockBox::peekLength):
1596         (WebCore::MockTrackBox::MockTrackBox):
1597         (WebCore::MockTrackBox::type):
1598         (WebCore::MockInitializationBox::MockInitializationBox):
1599         (WebCore::MockInitializationBox::type):
1600         (WebCore::MockSampleBox::MockSampleBox):
1601         (WebCore::MockSampleBox::type):
1602         * platform/mock/mediasource/MockBox.h: Added.
1603         (WebCore::MockBox::length):
1604         (WebCore::MockBox::type):
1605         (WebCore::MockTrackBox::trackID):
1606         (WebCore::MockTrackBox::codec):
1607         (WebCore::MockTrackBox::kind):
1608         (WebCore::MockInitializationBox::duration):
1609         (WebCore::MockInitializationBox::tracks):
1610         (WebCore::MockSampleBox::presentationTimestamp):
1611         (WebCore::MockSampleBox::decodeTimestamp):
1612         (WebCore::MockSampleBox::duration):
1613         (WebCore::MockSampleBox::trackID):
1614         (WebCore::MockSampleBox::flags):
1615         (WebCore::MockSampleBox::isSync):
1616
1617         Add a MediaPlayerPrivate implementation which uses MockMediaSource:
1618         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
1619         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
1620         (WebCore::MockMediaPlayerMediaSource::create):
1621         (WebCore::mimeTypeCache):
1622         (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
1623         (WebCore::MockMediaPlayerMediaSource::supportsType):
1624         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
1625         (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
1626         (WebCore::MockMediaPlayerMediaSource::load):
1627         (WebCore::MockMediaPlayerMediaSource::cancelLoad):
1628         (WebCore::MockMediaPlayerMediaSource::play):
1629         (WebCore::MockMediaPlayerMediaSource::pause):
1630         (WebCore::MockMediaPlayerMediaSource::naturalSize):
1631         (WebCore::MockMediaPlayerMediaSource::hasVideo):
1632         (WebCore::MockMediaPlayerMediaSource::hasAudio):
1633         (WebCore::MockMediaPlayerMediaSource::setVisible):
1634         (WebCore::MockMediaPlayerMediaSource::seeking):
1635         (WebCore::MockMediaPlayerMediaSource::paused):
1636         (WebCore::MockMediaPlayerMediaSource::networkState):
1637         (WebCore::MockMediaPlayerMediaSource::readyState):
1638         (WebCore::MockMediaPlayerMediaSource::buffered):
1639         (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
1640         (WebCore::MockMediaPlayerMediaSource::setSize):
1641         (WebCore::MockMediaPlayerMediaSource::paint):
1642         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
1643         (WebCore::MockMediaPlayerMediaSource::durationDouble):
1644         (WebCore::MockMediaPlayerMediaSource::seekDouble):
1645         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
1646         (WebCore::MockMediaPlayerMediaSource::updateDuration):
1647         (WebCore::MockMediaPlayerMediaSource::setReadyState):
1648         * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
1649
1650         Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
1651         * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
1652         (WebCore::MockMediaSourcePrivate::create):
1653         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
1654         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
1655         (WebCore::MockMediaSourcePrivate::addSourceBuffer):
1656         (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
1657         (WebCore::MockMediaSourcePrivate::duration):
1658         (WebCore::MockMediaSourcePrivate::setDuration):
1659         (WebCore::MockMediaSourcePrivate::markEndOfStream):
1660         (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
1661         (WebCore::MockMediaSourcePrivate::readyState):
1662         (WebCore::MockMediaSourcePrivate::setReadyState):
1663         (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
1664         (WebCore::MockSourceBufferPrivateHasAudio):
1665         (WebCore::MockMediaSourcePrivate::hasAudio):
1666         (WebCore::MockSourceBufferPrivateHasVideo):
1667         (WebCore::MockMediaSourcePrivate::hasVideo):
1668         * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
1669         (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
1670         (WebCore::MockMediaSourcePrivate::player):
1671
1672         Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
1673         bytestream provided by SourceBuffer:
1674         * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
1675         (WebCore::MockMediaSample::create):
1676         (WebCore::MockMediaSample::~MockMediaSample):
1677         (WebCore::MockMediaSample::MockMediaSample):
1678         (WebCore::MockMediaSample::platformSample):
1679         (WebCore::MockMediaDescription::create):
1680         (WebCore::MockMediaDescription::~MockMediaDescription):
1681         (WebCore::MockMediaDescription::MockMediaDescription):
1682         (WebCore::MockSourceBufferPrivate::create):
1683         (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
1684         (WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
1685         (WebCore::MockSourceBufferPrivate::setClient):
1686         (WebCore::MockSourceBufferPrivate::append):
1687         (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
1688         (WebCore::MockSourceBufferPrivate::didReceiveSample):
1689         (WebCore::MockSourceBufferPrivate::abort):
1690         (WebCore::MockSourceBufferPrivate::removedFromMediaSource):
1691         (WebCore::MockSourceBufferPrivate::readyState):
1692         (WebCore::MockSourceBufferPrivate::setReadyState):
1693         (WebCore::MockSourceBufferPrivate::hasVideo):
1694         (WebCore::MockSourceBufferPrivate::hasAudio):
1695         * platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
1696
1697         Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
1698         which wrap the MockTrackBox class:
1699         * platform/mock/mediasource/MockTracks.cpp: Added.
1700         * platform/mock/mediasource/MockTracks.h: Added.
1701         (WebCore::MockAudioTrackPrivate::create):
1702         (WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
1703         (WebCore::MockAudioTrackPrivate::id):
1704         (WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
1705         (WebCore::MockTextTrackPrivate::create):
1706         (WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
1707         (WebCore::MockTextTrackPrivate::id):
1708         (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
1709         (WebCore::MockVideoTrackPrivate::create):
1710         (WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
1711         (WebCore::MockVideoTrackPrivate::id):
1712         (WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
1713
1714 2013-11-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1715
1716         Changing MediaStreamDescriptor to MediaStreamPrivate
1717         https://bugs.webkit.org/show_bug.cgi?id=123935
1718
1719         Reviewed by Eric Carlson.
1720
1721         No new tests needed.
1722
1723         * CMakeLists.txt:
1724         * GNUmakefile.list.am:
1725         * Modules/mediastream/MediaStream.cpp:
1726         (WebCore::MediaStream::create):
1727         (WebCore::MediaStream::MediaStream):
1728         (WebCore::MediaStream::~MediaStream):
1729         (WebCore::MediaStream::ended):
1730         (WebCore::MediaStream::setEnded):
1731         (WebCore::MediaStream::addTrack):
1732         (WebCore::MediaStream::removeTrack):
1733         (WebCore::MediaStream::removeRemoteSource):
1734         * Modules/mediastream/MediaStream.h:
1735         * Modules/mediastream/MediaStreamRegistry.cpp:
1736         (WebCore::MediaStreamRegistry::registerURL):
1737         (WebCore::MediaStreamRegistry::unregisterURL):
1738         (WebCore::MediaStreamRegistry::lookupMediaStreamPrivate):
1739         * Modules/mediastream/MediaStreamRegistry.h:
1740         * Modules/mediastream/MediaStreamTrack.cpp:
1741         * Modules/mediastream/MediaStreamTrack.h:
1742         * Modules/mediastream/RTCPeerConnection.cpp:
1743         (WebCore::RTCPeerConnection::addStream):
1744         (WebCore::RTCPeerConnection::removeStream):
1745         (WebCore::RTCPeerConnection::didAddRemoteStream):
1746         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
1747         * Modules/mediastream/RTCPeerConnection.h:
1748         * Modules/mediastream/UserMediaRequest.cpp:
1749         (WebCore::UserMediaRequest::didCreateStream):
1750         (WebCore::UserMediaRequest::callSuccessHandler):
1751         * Modules/mediastream/UserMediaRequest.h:
1752         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
1753         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
1754         * WebCore.xcodeproj/project.pbxproj:
1755         * html/HTMLMediaElement.cpp:
1756         (HTMLMediaElement::loadResource):
1757         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1758         (WebCore::toWebMediaStreamPrivate):
1759         (WebCore::MediaPlayerPrivate::lookupMediaStream):
1760         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1761         * platform/mediastream/MediaStreamCenter.cpp:
1762         * platform/mediastream/MediaStreamCreationClient.h:
1763         * platform/mediastream/MediaStreamPrivate.cpp: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp.
1764         (WebCore::MediaStreamPrivate::create):
1765         (WebCore::MediaStreamPrivate::addSource):
1766         (WebCore::MediaStreamPrivate::removeSource):
1767         (WebCore::MediaStreamPrivate::addRemoteSource):
1768         (WebCore::MediaStreamPrivate::removeRemoteSource):
1769         (WebCore::MediaStreamPrivate::addRemoteTrack):
1770         (WebCore::MediaStreamPrivate::removeRemoteTrack):
1771         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
1772         (WebCore::MediaStreamPrivate::setEnded):
1773         (WebCore::MediaStreamPrivate::addTrack):
1774         (WebCore::MediaStreamPrivate::removeTrack):
1775         * platform/mediastream/MediaStreamPrivate.h: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.h.
1776         (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
1777         (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
1778         (WebCore::MediaStreamPrivate::client):
1779         (WebCore::MediaStreamPrivate::setClient):
1780         (WebCore::MediaStreamPrivate::id):
1781         (WebCore::MediaStreamPrivate::numberOfAudioSources):
1782         (WebCore::MediaStreamPrivate::audioSources):
1783         (WebCore::MediaStreamPrivate::numberOfVideoSources):
1784         (WebCore::MediaStreamPrivate::videoSources):
1785         (WebCore::MediaStreamPrivate::numberOfAudioTracks):
1786         (WebCore::MediaStreamPrivate::audioTracks):
1787         (WebCore::MediaStreamPrivate::numberOfVideoTracks):
1788         (WebCore::MediaStreamPrivate::videoTracks):
1789         (WebCore::MediaStreamPrivate::ended):
1790         * platform/mediastream/MediaStreamSource.cpp:
1791         * platform/mediastream/MediaStreamSource.h:
1792         * platform/mediastream/RTCPeerConnectionHandler.h:
1793         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1794         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
1795         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
1796         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
1797         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
1798         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
1799         (WebCore::MediaStreamCenterMac::createMediaStream):
1800         * platform/mock/MockMediaStreamCenter.cpp:
1801         (WebCore::MockMediaStreamCenter::createMediaStream):
1802         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1803         (WebCore::RTCPeerConnectionHandlerMock::addStream):
1804         (WebCore::RTCPeerConnectionHandlerMock::removeStream):
1805         * platform/mock/RTCPeerConnectionHandlerMock.h:
1806
1807 2013-11-07  Denis Nomiyama  <d.nomiyama@samsung.com>
1808
1809         [GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
1810         https://bugs.webkit.org/show_bug.cgi?id=50619
1811
1812         Reviewed by Martin Robinson.
1813
1814         Implemented the OPENTYPE_VERTICAL feature for the GTK+ port. It resolves
1815         the 90 degrees rotation problem of CJK characters when displaying
1816         vertical text.
1817
1818         New tests are not required as the existing tests for vertical text will
1819         work properly now.
1820
1821         * GNUmakefile.list.am: Added OpenTypeVerticalData.cpp and
1822         OpenTypeVerticalData.h to platformgtk_sources.
1823         * PlatformEfl.cmake: Added OpenTypeVerticalData.cpp.
1824         * PlatformGTK.cmake: Added OpenTypeVerticalData.cpp.
1825         * platform/graphics/FontCache.cpp: Originally the HashMap for
1826         OpenTypeVerticalData was designed with FontFileKey as integer in the
1827         Chromium port, which was an unique number provided by Skia. Since other
1828         ports use FontFileKey as string, new generic hash functions had to be
1829         implemented instead of using the specific ones for integers.
1830         (WebCore::FontVerticalDataCacheKeyHash::hash): New hash function for
1831         HashMap of OpenTypeVerticalData.
1832         (WebCore::FontVerticalDataCacheKeyHash::equal): New function for
1833         comparing hash indexes in the HashMap of OpenTypeVerticalData.
1834         (WebCore::FontVerticalDataCacheKeyTraits::emptyValue): New function for
1835         giving an empty FontFileKey.
1836         (WebCore::FontVerticalDataCacheKeyTraits::constructDeletedValue): New
1837         function to create a FontFileKey for deleted values.
1838         (WebCore::FontVerticalDataCacheKeyTraits::isDeletedValue): New function
1839         to check if a HashMap entry is available.
1840         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1841         (WebCore::FontCustomPlatformData::fontPlatformData): Added font
1842         orientation as a parameter to the FontPlatformData constructor.
1843         * platform/graphics/freetype/FontPlatformData.h: Added m_orientation to
1844         store the font orientation and m_horizontalOrientationMatrix to store
1845         the Cairo matrix for horizontal orientation, which can be restored in
1846         setOrientation().
1847         (WebCore::FontPlatformData::FontPlatformData): Added font orientation as
1848         a parameter.
1849         (WebCore::FontPlatformData::orientation): Implemented this function
1850         based on m_orientation.
1851         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Added new
1852         helper function rotateCairoMatrixForVerticalOrientation() to rotate the
1853         Cairo matrix in case of vertical orientation.
1854         (WebCore::FontPlatformData::FontPlatformData): Initialized
1855         m_orientation.
1856         (WebCore::FontPlatformData::operator=): Added m_orientation and
1857         m_horizontalOrientationMatrix to the assignment operator.
1858         (WebCore::FontPlatformData::operator==): Added m_orientation to the
1859         equal operator.
1860         (WebCore::FontPlatformData::initializeWithFontFace): Rotated and
1861         translated fonts if orientation is vertical. Also stored the horizontal
1862         Cairo matrix.
1863         (WebCore::FontPlatformData::verticalData): Returned the vertical data
1864         from the font cache.
1865         (WebCore::FontPlatformData::openTypeTable): Loaded the font table into
1866         a shared buffer.
1867         (WebCore::FontPlatformData::setOrientation): Replaced the scaled font
1868         data by rotating fonts according to the new orientation.
1869         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1870         (WebCore::SimpleFontData::platformInit): Set the glyph's height and
1871         width according to the font orientation. It also sets EM.
1872         (WebCore::SimpleFontData::platformCreateScaledFontData): Added
1873         orientation to the FontPlatformData constructor.
1874         (WebCore::SimpleFontData::platformWidthForGlyph): Returned the glyph's
1875         width according the orientation.
1876         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
1877         (WebCore::CairoGetGlyphWidthAndExtents): Obtained the character advance
1878         and extents according to the font orientation.
1879
1880 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1881
1882         [AX] Use toAccessibilityRenderObject() instead of using static_cast<>
1883         https://bugs.webkit.org/show_bug.cgi?id=123986
1884
1885         Reviewed by Mario Sanchez Prada.
1886
1887         Though there is toAccessibilityRenderObject(), static_cast<> are being used by many places.
1888         To use toAccessibilityRenderObject() is more helpful to find bad type cast.
1889
1890         No new tests, no behavior changes.
1891
1892         * accessibility/AXObjectCache.cpp:
1893         (WebCore::AXObjectCache::notificationPostTimerFired):
1894         * accessibility/AccessibilityImageMapLink.cpp:
1895         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
1896         * accessibility/AccessibilityRenderObject.cpp:
1897         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1898         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
1899         * accessibility/ios/AccessibilityObjectIOS.mm:
1900         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
1901         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1902         (AXAttributeStringSetElement):
1903         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1904
1905 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1906
1907         [AX] Use toAccessibilityTable() instead of using manual static_cast<>
1908         https://bugs.webkit.org/show_bug.cgi?id=123982
1909
1910         Reviewed by Mario Sanchez Prada.
1911
1912         Though there is toAccessibilityTable(), static_cast<> are being used by many places.
1913         We need to use toAccessibilityTable().
1914
1915         No new tests, no behavior changes.
1916
1917         * accessibility/AccessibilityARIAGridRow.cpp:
1918         (WebCore::AccessibilityARIAGridRow::disclosedRows):
1919         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
1920         * accessibility/AccessibilityTableHeaderContainer.cpp:
1921         (WebCore::AccessibilityTableHeaderContainer::addChildren):
1922         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1923         (cell):
1924         (cellAtIndex):
1925         (webkitAccessibleTableGetIndexAt):
1926         (webkitAccessibleTableGetNColumns):
1927         (webkitAccessibleTableGetNRows):
1928         (webkitAccessibleTableGetColumnHeader):
1929         (webkitAccessibleTableGetRowHeader):
1930         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1931         (-[WebAccessibilityObjectWrapper tableParent]):
1932         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1933         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1934         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1935         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1936
1937 2013-11-07  Andreas Kling  <akling@apple.com>
1938
1939         Use tighter InlineBox subtypes in some places.
1940         <https://webkit.org/b/123980>
1941
1942         RenderLineBreak and RenderBox line box wrappers are always going to
1943         be InlineElementBox, so codify this with tighter types. Also made
1944         the various positionLine() functions take tighter reference types.
1945
1946         All the casting to renderer-appropriate box types happens inside of
1947         RenderBlockFlow::computeBlockDirectionPositionsForLine() and
1948         propagates from there.
1949
1950         Reviewed by Antti Koivisto.
1951
1952 2013-11-07  Mario Sanchez Prada  <mario.prada@samsung.com>
1953
1954         AX: [ATK] Video and audio elements are not properly exposed
1955         https://bugs.webkit.org/show_bug.cgi?id=123894
1956
1957         Reviewed by Chris Fleizach.
1958
1959         Expose <audio> and <video> elements with ATK_ROLE_EMBEDDED, so we
1960         can identify them properly from ATK/AT-SPI based ATs.
1961
1962         Tests: platform/gtk/accessibility/media-controls-panel-title.html
1963                platform/efl/accessibility/media-emits-object-replacement.html
1964                platform/gtk/accessibility/media-emits-object-replacement.html
1965
1966         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1967         (atkRole): Add the new mapping.
1968
1969 2013-11-07  Laszlo Vidacs  <lac@inf.u-szeged.hu>
1970         
1971         Fix crash in BitmapImage::destroyDecodedData()
1972         https://bugs.webkit.org/show_bug.cgi?id=116494
1973
1974         Reviewed by Csaba Osztrogonác.
1975
1976         Merge from https://chromium.googlesource.com/chromium/blink/+/6b6887bf53068f8537908e501fdc7317ad2c6d86
1977
1978         * platform/graphics/BitmapImage.cpp:
1979         (WebCore::BitmapImage::destroyDecodedData):
1980
1981 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
1982
1983         [CSS Grid Layout] CSSParser should reject <track-list> without a <track-size>
1984         https://bugs.webkit.org/show_bug.cgi?id=118025
1985
1986         Reviewed by Andreas Kling.
1987
1988         From Blink r152914 by <jchaffraix@chromium.org>
1989
1990         Make sure that we parse at least 1 <track-size> inside each
1991         <track-list>. The old parser code allowed track-lists exclusively
1992         made of <track-name>. The way it was implemented eases the future
1993         addition of parsing for the repeat() function.
1994
1995         * css/CSSParser.cpp:
1996         (WebCore::CSSParser::parseGridTrackList):
1997         * css/StyleResolver.cpp:
1998         (WebCore::createGridTrackList): ASSERT if we don't find any
1999         <track-size> now that we detect their absence in the parser.
2000
2001 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
2002
2003         [CSS Grid Layout] Fix handling of 'inherit' and 'initial' for grid lines
2004         https://bugs.webkit.org/show_bug.cgi?id=115401
2005
2006         Reviewed by Andreas Kling.
2007
2008         From Blink r150585 by <jchaffraix@chromium.org>
2009
2010         Added support for 'inherit' and 'initial' special values to
2011         grid-auto-{columns|rows} and grid-definition-{columns|rows}.
2012
2013         * css/StyleResolver.cpp:
2014         (WebCore::StyleResolver::applyProperty): Resolve 'initial' and 'inherit'.
2015         * rendering/style/RenderStyle.h: Added initialNamedGrid{Column|Row}Lines().
2016         * rendering/style/StyleGridData.cpp:
2017         (WebCore::StyleGridData::StyleGridData): Initialize m_namedGrid{Column|Row}Lines.
2018
2019 2013-11-07  Andreas Kling  <akling@apple.com>
2020
2021         Clean up BidiRun a little bit.
2022         <https://webkit.org/b/123964>
2023
2024         Make BidiRun's member variables private and add accessors for them.
2025         In doing so, codify the following:
2026
2027             - BidiRun always has a corresponding RenderObject.
2028             - The inline box is never cleared after being set.
2029
2030         Reviewed by Antti Koivisto.
2031
2032 2013-11-07  Andreas Kling  <akling@apple.com>
2033
2034         More CSSPrimitiveValue constructors should return PassRef.
2035         <https://webkit.org/b/123953>
2036
2037         Make some more CSSPrimitiveValue constructor helpers (that are
2038         known to never return null) return PassRef instead of PassRefPtr.
2039
2040         Reviewed by Antti Koivisto.
2041
2042 2013-11-07  Andreas Kling  <akling@apple.com>
2043
2044         Generate type casting helpers for line boxes and use them.
2045         <https://webkit.org/b/123976>
2046
2047         Semi-automatically generate the full set of toFooInlineBox()
2048         helpers with macros instead of having them (partially) hand-coded.
2049         Replaced static_casts with the new helpers across the codebase.
2050
2051         Also made the isFooInlineBox() overrides private since they should
2052         never be called when the type is already known.
2053
2054         Reviewed by Antti Koivisto.
2055
2056 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2057
2058         Simplify Attr by removing m_specified member variable and setter
2059         https://bugs.webkit.org/show_bug.cgi?id=123965
2060
2061         Reviewed by Andreas Kling.
2062
2063         Merge https://chromium.googlesource.com/chromium/blink/+/597f44ec928e08820574728889adabc6d8ecd746
2064
2065         m_specified is always true in WebKit so simply return true in Attr::specified().
2066
2067         * dom/Attr.cpp:
2068         (WebCore::Attr::Attr):
2069         * dom/Attr.h:
2070         * dom/Document.cpp:
2071         (WebCore::Document::adoptNode):
2072
2073 2013-10-25  Jer Noble  <jer.noble@apple.com>
2074
2075         [MSE] Add MediaSource extensions to AudioTrack, VideoTrack, and TextTrack.
2076         https://bugs.webkit.org/show_bug.cgi?id=123374
2077
2078         Reviewed by Eric Carlson.
2079
2080         No tests added; tests will be added when Mock implementations are added in a future patch.
2081
2082         Add new partial interfaces for added methods on AudioTrack, TextTrack, and VideoTrack:
2083         * Modules/mediasource/AudioTrackMediaSource.idl: Add read-only sourceBuffer attribute.
2084         * Modules/mediasource/TextTrackMediaSource.idl: Ditto.
2085         * Modules/mediasource/VideoTrackMediaSource.idl: Ditto.
2086         * Modules/mediasource/AudioTrackMediaSource.h:
2087         (WebCore::AudioTrackMediaSource::sourceBuffer): Added static wrapper around non-static sourceBuffer().
2088         * Modules/mediasource/TextTrackMediaSource.h:
2089         (WebCore::TextTrackMediaSource::sourceBuffer): Ditto.
2090         * Modules/mediasource/VideoTrackMediaSource.h:
2091         (WebCore::VideoTrackMediaSource::sourceBuffer): Ditto.
2092
2093         Add support for writable kind & language attributes through a custom setter:
2094         * bindings/js/JSAudioTrackCustom.cpp:
2095         (WebCore::JSAudioTrack::setKind):
2096         (WebCore::JSAudioTrack::setLanguage):
2097         * bindings/js/JSTextTrackCustom.cpp:
2098         (WebCore::JSTextTrack::setKind):
2099         (WebCore::JSTextTrack::setLanguage):
2100         * bindings/js/JSVideoTrackCustom.cpp:
2101         (WebCore::JSVideoTrack::setKind):
2102         (WebCore::JSVideoTrack::setLanguage):
2103         * html/track/AudioTrack.idl:
2104         * html/track/TextTrack.idl:
2105         * html/track/VideoTrack.idl:
2106
2107         Add setter methods to the implementation classes:
2108         * html/track/TextTrack.cpp:
2109         (WebCore::TextTrack::TextTrack):
2110         (WebCore::TextTrack::setKind):
2111         (WebCore::TextTrack::setLanguage):
2112         * html/track/TextTrack.h:
2113         * html/track/TrackBase.cpp:
2114         (WebCore::TrackBase::TrackBase):
2115         (WebCore::TrackBase::setKind):
2116         (WebCore::TrackBase::setKindInternal):
2117         * html/track/TrackBase.h:
2118         (WebCore::TrackBase::setLanguage):
2119         (WebCore::TrackBase::sourceBuffer):
2120         (WebCore::TrackBase::setSourceBuffer):
2121         * html/track/VideoTrack.cpp:
2122         (WebCore::VideoTrack::VideoTrack):
2123         (WebCore::VideoTrack::setKind):
2124         (WebCore::VideoTrack::setLanguage):
2125         * html/track/VideoTrack.h:
2126
2127         Implement the unimplemented portions of MediaSource and SourceBuffer:
2128         * Modules/mediasource/MediaSource.cpp:
2129         (WebCore::MediaSource::removeSourceBuffer):
2130         * Modules/mediasource/MediaSourceBase.cpp:
2131         (WebCore::MediaSourceBase::MediaSourceBase):
2132         (WebCore::MediaSourceBase::setPrivateAndOpen):
2133         (WebCore::MediaSourceBase::setReadyState):
2134         (WebCore::MediaSourceBase::attachToElement):
2135         * Modules/mediasource/MediaSourceBase.h:
2136         (WebCore::MediaSourceBase::mediaElement):
2137         * Modules/mediasource/SourceBuffer.cpp:
2138         (WebCore::SourceBuffer::videoTracks):
2139         (WebCore::SourceBuffer::audioTracks):
2140         (WebCore::SourceBuffer::textTracks):
2141         (WebCore::SourceBuffer::sourceBufferPrivateDidAddAudioTrack):
2142         (WebCore::SourceBuffer::sourceBufferPrivateDidAddVideoTrack):
2143         (WebCore::SourceBuffer::sourceBufferPrivateDidAddTextTrack):
2144         (WebCore::SourceBuffer::sourceBufferPrivateDidChangeActiveState):
2145         * Modules/mediasource/SourceBuffer.h:
2146         * Modules/mediasource/SourceBuffer.idl:
2147
2148         Add new files to the project:
2149         * DerivedSources.make:
2150         * WebCore.xcodeproj/project.pbxproj:
2151
2152         And a smorgasbord of other utility changes:
2153         * html/HTMLMediaElement.cpp:
2154         (WebCore::HTMLMediaElement::loadResource): Pass this when attaching.
2155         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto.
2156         * html/HTMLMediaSource.h:
2157         * html/track/TextTrackList.cpp:
2158         (TextTrackList::item): Make const.
2159         * html/track/TextTrackList.h:
2160         (WebCore::TextTrackList::lastItem): Added.
2161         * platform/graphics/InbandTextTrackPrivate.h:
2162         (WebCore::InbandTextTrackPrivate::create): Added.
2163         (WebCore::MockSourceBufferPrivate::trackDidChangeEnabled):
2164
2165 2013-11-06  Vani Hegde  <vani.hegde@samsung.com>
2166
2167         Applied background color is not retained after typing a characters
2168         https://bugs.webkit.org/show_bug.cgi?id=117337
2169
2170         Reviewed by Ryosuke Niwa.
2171
2172         While deleting a selection, only the inheritable style properties
2173         applied on the selection were saved.
2174         Since background color is considered as noninheritable style property,
2175         on deleting the selection, background color set on it was being lost.
2176         Hence on typing in new text, it would not have the applied
2177         background color set.
2178         Fixed by saving editing preoperties that are already in effect
2179         on a selection before deleting it.
2180
2181         Test: editing/style/background-color-retained.html
2182
2183         * editing/DeleteSelectionCommand.cpp:
2184         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2185         Modified as to save EditingPropertiesInEffect on a selection before
2186         deleting it.
2187
2188 2013-11-06  Andreas Kling  <akling@apple.com>
2189
2190         InlineBox: Make paint() and nodeAtPoint() pure virtuals.
2191         <https://webkit.org/b/123937>
2192
2193         ...and move the current implementations to InlineElementBox.
2194         All subclasses were already overriding these functions so the move
2195         is completely natural.
2196
2197         Reviewed by Anders Carlsson.
2198
2199 2013-11-06  Andreas Kling  <akling@apple.com>
2200
2201         Nothing should return std::unique_ptr<InlineBox>.
2202         <https://webkit.org/b/123936>
2203
2204         Made RenderBox, RenderLineBreak and RenderListMarker return tightly
2205         typed InlineElementBoxes instead.
2206
2207         Reviewed by Anders Carlsson.
2208
2209 2013-11-06  Daniel Bates  <dabates@apple.com>
2210
2211         [iOS] Upstream Letterpress effect
2212         https://bugs.webkit.org/show_bug.cgi?id=123932
2213
2214         Reviewed by Sam Weinig.
2215
2216         Test: platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html
2217
2218         * Configurations/FeatureDefines.xcconfig: Add feature define ENABLE_LETTERPRESS disabled
2219         by default. We only enable letterpress on iOS.
2220         * css/CSSComputedStyleDeclaration.cpp:
2221         (WebCore::renderTextDecorationFlagsToCSSValue): Add support for CSS value -webkit-letterpress.
2222         * css/CSSParser.cpp:
2223         (WebCore::CSSParser::parseTextDecoration): Ditto.
2224         * css/CSSPrimitiveValueMappings.h:
2225         (WebCore::CSSPrimitiveValue::operator TextDecoration): Ditto.
2226         * css/CSSValueKeywords.in: Added CSS value -webkit-letterpress.
2227         * platform/graphics/GraphicsContext.h:
2228         * platform/graphics/mac/FontMac.mm:
2229         (WebCore::fillVectorWithHorizontalGlyphPositions): Added.
2230         (WebCore::shouldUseLetterpressEffect): Added.
2231         (WebCore::showLetterpressedGlyphsWithAdvances): Added.
2232         (WebCore::showGlyphsWithAdvances): Modified to call showLetterpressedGlyphsWithAdvances()
2233         to show a letterpressed glyph. I also included additional iOS-specific changes.
2234         (WebCore::Font::drawGlyphs):
2235         * rendering/TextPaintStyle.cpp:
2236         (WebCore::TextPaintStyle::TextPaintStyle): 
2237         (WebCore::computeTextPaintStyle): Modified to compute letterpress effect style.
2238         (WebCore::updateGraphicsContext): Modified to apply/unapply letterpress effect drawing mode.
2239         * rendering/TextPaintStyle.h:
2240         * rendering/style/RenderStyleConstants.h:
2241
2242 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
2243
2244         Crash in SliderThumbElement::dragFrom
2245         https://bugs.webkit.org/show_bug.cgi?id=123873
2246
2247         Reviewed by Sam Weinig.
2248
2249         Moved Ref.
2250
2251         * html/RangeInputType.cpp:
2252         (WebCore::RangeInputType::handleMouseDownEvent):
2253         * html/shadow/SliderThumbElement.cpp:
2254         (WebCore::SliderThumbElement::dragFrom):
2255
2256 2013-11-06  Daniel Bates  <dabates@apple.com>
2257
2258         Cleanup FontMac.mm
2259         https://bugs.webkit.org/show_bug.cgi?id=123928
2260
2261         Reviewed by Andy Estes.
2262
2263         * platform/graphics/mac/FontMac.mm:
2264         (WebCore::showGlyphsWithAdvances): Inline the value of variable isVertical as we
2265         reference it exactly once and its value is sufficiently clear.
2266         (WebCore::Font::drawGlyphs): Remove default case in switch block so that the compiler
2267         checks that all cases are covered. Move definition of platformData to the top of the
2268         function and use it whenever we want to access the platform font data
2269
2270 2013-11-06  Brent Fulgham  <bfulgham@apple.com>
2271
2272         [WebGL] We should not allow generateMipMap on compressed textures
2273         https://bugs.webkit.org/show_bug.cgi?id=123915
2274         <rdar://problem/15201274>
2275
2276         Reviewed by Dean Jackson.
2277
2278         Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html
2279
2280         * html/canvas/WebGLRenderingContext.cpp:
2281         (WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
2282         (WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
2283         (WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
2284         of compressed flag and generate appropriate WebGL error if necessary.
2285         * html/canvas/WebGLTexture.cpp:
2286         (WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
2287         (WebCore::WebGLTexture::isCompressed): Added
2288         (WebCore::WebGLTexture::setCompressed): Added
2289         * html/canvas/WebGLTexture.h:
2290         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2291         (WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
2292         glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.
2293
2294 2013-11-06  Joseph Pecoraro  <pecoraro@apple.com>
2295
2296         Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
2297         https://bugs.webkit.org/show_bug.cgi?id=123925
2298
2299         Reviewed by Timothy Hatcher.
2300
2301         * CMakeLists.txt:
2302         * DerivedSources.make:
2303         * GNUmakefile.am:
2304
2305 2013-11-06  Bem Jones-Bey  <bjonesbe@adobe.com>
2306
2307         Rename region line offset methods
2308         https://bugs.webkit.org/show_bug.cgi?id=123897
2309
2310         Reviewed by Sam Weinig.
2311
2312         Because of the large number of overloads on the line offset methods,
2313         it is very hard to read code using them, which also makes it harder to
2314         move them out of RenderBlock. This patch renames the methods that take
2315         a region as an argument to make it clearer when looking at the code
2316         how the differ from the ones that don't.
2317
2318         No new tests, no behavior change.
2319
2320         * rendering/RenderBlock.cpp:
2321         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
2322         * rendering/RenderBlock.h:
2323         (WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
2324         (WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
2325         (WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
2326         (WebCore::RenderBlock::startOffsetForLineInRegion):
2327         (WebCore::RenderBlock::endOffsetForLineInRegion):
2328         (WebCore::RenderBlock::availableLogicalWidthForLine):
2329         * rendering/RenderBox.cpp:
2330         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2331         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
2332
2333 2013-11-06  Antti Koivisto  <antti@apple.com>
2334
2335         HTMLCollection should use CollectionIndexCache
2336         https://bugs.webkit.org/show_bug.cgi?id=123906
2337
2338         Reviewed by Ryosuke Niwa.
2339         
2340         More code sharing.
2341
2342         * bindings/js/JSDOMWindowCustom.cpp:
2343         (WebCore::namedItemGetter):
2344         * bindings/js/JSHTMLDocumentCustom.cpp:
2345         (WebCore::JSHTMLDocument::nameGetter):
2346         * dom/ChildNodeList.h:
2347         * dom/CollectionIndexCache.h:
2348         (WebCore::::nodeBeforeCached):
2349         (WebCore::::nodeAfterCached):
2350         (WebCore::::nodeAt):
2351             
2352             Add a mechanism for disabling use of backward traversal.
2353
2354         * dom/LiveNodeList.h:
2355         (WebCore::LiveNodeList::collectionCanTraverseBackward):
2356         * html/HTMLCollection.cpp:
2357         (WebCore::HTMLCollection::HTMLCollection):
2358         (WebCore::isMatchingElement):
2359         (WebCore::HTMLCollection::iterateForPreviousElement):
2360         (WebCore::firstMatchingElement):
2361         (WebCore::nextMatchingElement):
2362         (WebCore::HTMLCollection::length):
2363         (WebCore::HTMLCollection::item):
2364         (WebCore::nameShouldBeVisibleInDocumentAll):
2365         (WebCore::firstMatchingChildElement):
2366         (WebCore::nextMatchingSiblingElement):
2367         (WebCore::HTMLCollection::firstElement):
2368         (WebCore::HTMLCollection::traverseForward):
2369         (WebCore::HTMLCollection::collectionFirst):
2370         (WebCore::HTMLCollection::collectionLast):
2371         (WebCore::HTMLCollection::collectionTraverseForward):
2372         (WebCore::HTMLCollection::collectionTraverseBackward):
2373         (WebCore::HTMLCollection::invalidateCache):
2374         (WebCore::HTMLCollection::namedItem):
2375         (WebCore::HTMLCollection::updateNameCache):
2376         * html/HTMLCollection.h:
2377         (WebCore::HTMLCollection::collectionCanTraverseBackward):
2378         
2379             Disable use of backward traversal for collections that use custom traversal.
2380
2381 2013-11-06  Brendan Long  <b.long@cablelabs.com>
2382
2383         Add "id" attribute to TextTrack
2384         https://bugs.webkit.org/show_bug.cgi?id=123825
2385
2386         Reviewed by Eric Carlson.
2387
2388         Test: media/track/track-id.html
2389
2390         * html/HTMLMediaElement.cpp:
2391         (HTMLMediaElement::addTextTrack): Add emptyString() for track id.
2392         * html/track/AudioTrack.cpp:
2393         (WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
2394         (WebCore::AudioTrack::idChanged): Added, set id.
2395         * html/track/AudioTrack.h: Move m_id to TrackBase.
2396         * html/track/InbandTextTrack.cpp:
2397         (WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
2398         (WebCore::InbandTextTrack::idChanged): Added, set id.
2399         * html/track/InbandTextTrack.h: Add idChanged().
2400         * html/track/LoadableTextTrack.cpp:
2401         (WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
2402         (WebCore::LoadableTextTrack::id): Override to return the track element's id.
2403         * html/track/TextTrack.cpp:
2404         (WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
2405         (WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
2406         (WebCore::TextTrack::TextTrack): Pass id to TrackBase.
2407         * html/track/TextTrack.h:
2408         (WebCore::TextTrack::create): Add id parameter.
2409         * html/track/TextTrack.idl: Add id attribute.
2410         * html/track/TrackBase.cpp:
2411         (WebCore::TrackBase::TrackBase): Add m_id.
2412         * html/track/TrackBase.h: Add id attribute / m_id.
2413         * html/track/VideoTrack.cpp:
2414         (WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
2415         (WebCore::VideoTrack::idChanged): Added, set id.
2416         * html/track/VideoTrack.h: Move m_id to TrackBase.
2417         * platform/graphics/TrackPrivateBase.h: Add idChanged() callback.
2418
2419 2013-11-06  Antti Koivisto  <antti@apple.com>
2420
2421         Move array position caching out from HTMLCollection
2422         https://bugs.webkit.org/show_bug.cgi?id=123895
2423
2424         Reviewed by Darin Adler.
2425
2426         This caching complicates the logic but is used by a single subclass
2427         (HTMLFormControlsCollection) only. The subclass can do the caching itself.
2428
2429         * html/HTMLAllCollection.cpp:
2430         (WebCore::HTMLAllCollection::HTMLAllCollection):
2431         * html/HTMLCollection.cpp:
2432         (WebCore::HTMLCollection::HTMLCollection):
2433         (WebCore::HTMLCollection::create):
2434         (WebCore::HTMLCollection::item):
2435         (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
2436         (WebCore::HTMLCollection::firstElement):
2437         
2438             Renamed from traverseFirstElement.
2439
2440         (WebCore::HTMLCollection::traverseForwardToOffset):
2441         (WebCore::HTMLCollection::invalidateCache):
2442         
2443             Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.
2444
2445         (WebCore::HTMLCollection::namedItem):
2446         (WebCore::HTMLCollection::updateNameCache):
2447         
2448             Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.
2449
2450         * html/HTMLCollection.h:
2451         (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
2452         
2453             Renamed the enum and the accessor to be more informative.
2454
2455         (WebCore::HTMLCollection::setCachedElement):
2456         (WebCore::HTMLCollection::customElementAfter):
2457         
2458             Renamed from virtualItemAfter.
2459
2460         * html/HTMLFormControlsCollection.cpp:
2461         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
2462         (WebCore::findFormAssociatedElement):
2463         (WebCore::HTMLFormControlsCollection::customElementAfter):
2464         
2465             Move the array position caching logic here.
2466
2467         (WebCore::HTMLFormControlsCollection::invalidateCache):
2468         * html/HTMLFormControlsCollection.h:
2469         * html/HTMLNameCollection.cpp:
2470         (WebCore::HTMLNameCollection::HTMLNameCollection):
2471         * html/HTMLOptionsCollection.cpp:
2472         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2473         * html/HTMLTableRowsCollection.cpp:
2474         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
2475         (WebCore::HTMLTableRowsCollection::customElementAfter):
2476         * html/HTMLTableRowsCollection.h:
2477
2478 2013-11-06  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2479
2480         [ATK] accessibility/title-ui-element-correctness.html fails
2481         https://bugs.webkit.org/show_bug.cgi?id=99825
2482
2483         Reviewed by Mario Sanchez Prada.
2484
2485         When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
2486         is added, adding proper label element as a relation. When the document structure
2487         has been changed and a different label should be linked as a relation, current ATK
2488         implementation adds it as a next target on relation's target list, while
2489         WTR/DumpRenderTree implementation takes only first one into account.
2490         This patch adds a new function removing current relations before adding new ones.
2491
2492         Covered by existing tests.
2493
2494         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2495         (removeAtkRelationFromRelationSetByType):
2496         (setAtkRelationSetFromCoreObject):
2497
2498 2013-11-06  Daniel Bates  <dabates@apple.com>
2499
2500         Add ENABLE(TEXT_SELECTION)
2501         https://bugs.webkit.org/show_bug.cgi?id=123827
2502
2503         Reviewed by Ryosuke Niwa.
2504
2505         Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
2506         disable selection painting in WebCore (enabled by default).
2507
2508         On iOS we disable WebCore selection painting and have UIKit
2509         paint the selection.
2510
2511         * rendering/InlineTextBox.cpp:
2512         (WebCore::InlineTextBox::paintSelection): Only paint selection when
2513         TEXT_SELECTION is enabled.
2514         * rendering/LogicalSelectionOffsetCaches.h:
2515         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2516         For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
2517         a FIXME comment to investigate the callers and either move the assertion
2518         to the appropriate callers or structure the code such that we can remove
2519         the assertion.
2520         * rendering/RenderBlock.cpp:
2521         (WebCore::RenderBlock::paintSelection): Only paint selection when
2522         TEXT_SELECTION is enabled.
2523         * rendering/TextPaintStyle.cpp:
2524         (WebCore::computeTextSelectionPaintStyle): Only compute the selection
2525         paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
2526         style identical to the text paint style. Also, substitute nullptr for 0.
2527
2528 2013-11-06  Jer Noble  <jer.noble@apple.com>
2529
2530         Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.
2531
2532         * rendering/RenderingAllInOne.cpp:
2533
2534 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
2535
2536         Unreviewed build fix, style() return type is now a reference.
2537
2538         * rendering/RenderGrid.cpp:
2539         (WebCore::RenderGrid::resolveGridPositionFromStyle):
2540
2541 2013-11-06  Jer Noble  <jer.noble@apple.com>
2542
2543         Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.
2544
2545         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2546         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
2547
2548 2013-11-04  Jer Noble  <jer.noble@apple.com>
2549
2550         Playing many sounds with HTML5 Audio makes WebKit unresponsive
2551         https://bugs.webkit.org/show_bug.cgi?id=116145
2552
2553         Reviewed by Eric Carlson.
2554
2555         Cache as much information as possible from AVPlayerItem to eliminate unneccesary
2556         calls into AVFoundation.
2557
2558         Add WillChange/DidChange functions to handle the results of KVO notifications
2559         from AVPlayerItem and AVPlayer:
2560         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2561         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
2562         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
2563         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
2564         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
2565         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
2566         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
2567         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
2568         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
2569         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
2570         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
2571         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
2572         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
2573         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2574         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
2575         (WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
2576         (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
2577         (WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
2578         (WebCore::itemKVOProperties):
2579         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2580
2581         Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
2582         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2583         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):
2584
2585         Add and initialize member variables to hold these cached values:
2586         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2587         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2588         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2589         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2590
2591         Add a new Notification type which can take (and call) a Function object:
2592         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2593         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2594         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2595         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
2596         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
2597
2598         Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
2599         properties:
2600         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2601         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2602         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2603         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2604         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
2605         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
2606         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
2607         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
2608         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
2609         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
2610         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
2611         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2612         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
2613         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
2614         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
2615         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
2616
2617         Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
2618         correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
2619         * html/HTMLMediaElement.cpp:
2620         (HTMLMediaElement::setReadyState):
2621
2622 2013-10-24  Sergio Villar Senin  <svillar@igalia.com>
2623
2624         [CSS Grid Layout] Add support for named grid areas
2625         https://bugs.webkit.org/show_bug.cgi?id=120045
2626
2627         Reviewed by Andreas Kling.
2628
2629         From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>
2630
2631         Added support for named grid areas. Basically a named grid area is
2632         now a valid grid position. The shorthand parsing of grid-area was
2633         split from the grid-{row|column} as the rules for expanding are
2634         slightly different.
2635
2636         Unknown grid area names are treated as 'auto' as per the
2637         specification. This means that for those cases we need to trigger
2638         the auto-placement algorithm.
2639
2640         Tests: fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
2641                fast/css-grid-layout/grid-item-named-grid-area-resolution.html
2642
2643         * css/CSSComputedStyleDeclaration.cpp:
2644         (WebCore::valueForGridPosition):
2645         * css/CSSParser.cpp:
2646         (WebCore::CSSParser::parseValue):
2647         (WebCore::CSSParser::parseGridPosition):
2648         (WebCore::gridMissingGridPositionValue):
2649         (WebCore::CSSParser::parseGridItemPositionShorthand):
2650         (WebCore::CSSParser::parseGridAreaShorthand):
2651         (WebCore::CSSParser::parseSingleGridAreaLonghand):
2652         * css/CSSParser.h:
2653         * css/StyleResolver.cpp:
2654         (WebCore::StyleResolver::adjustRenderStyle):
2655         (WebCore::StyleResolver::adjustGridItemPosition):
2656         (WebCore::createGridPosition):
2657         * css/StyleResolver.h:
2658         * rendering/RenderGrid.cpp:
2659         (WebCore::RenderGrid::resolveGridPositionFromStyle):
2660         * rendering/style/GridPosition.h:
2661         (WebCore::GridPosition::isNamedGridArea):
2662         (WebCore::GridPosition::setNamedGridArea):
2663         (WebCore::GridPosition::namedGridLine):
2664
2665 2013-11-06  Chris Fleizach  <cfleizach@apple.com>
2666
2667         AX: Audio and Video attachments are not output to VoiceOver
2668         https://bugs.webkit.org/show_bug.cgi?id=123479
2669
2670         Reviewed by Mario Sanchez Prada.
2671
2672         Video and audio elements don't appear as distinct objects in the AX hierarchy,
2673         nor are they treated as replaceable objects when emitting the text. We should
2674         treat these characters like attachments, for one. On the Mac platform, we should
2675         also identify them with special subroles.
2676
2677         Tests: platform/mac/accessibility/media-emits-object-replacement.html
2678                platform/mac/accessibility/media-role-descriptions.html
2679
2680         * accessibility/AccessibilityNodeObject.cpp:
2681         (WebCore::AccessibilityNodeObject::isGenericFocusableElement):
2682         * accessibility/AccessibilityObject.h:
2683         * accessibility/AccessibilityRenderObject.cpp:
2684         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2685         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2686         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2687         (createAccessibilityRoleMap):
2688         (-[WebAccessibilityObjectWrapper subrole]):
2689         (-[WebAccessibilityObjectWrapper roleDescription]):
2690         * editing/TextIterator.cpp:
2691         (WebCore::isRendererReplacedElement):
2692
2693
2694 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
2695
2696         Notify nodes removal to Range/Selection after dispatching blur and mutation event
2697         https://bugs.webkit.org/show_bug.cgi?id=123880
2698
2699         Reviewed by Andreas Kling.
2700
2701         Merge https://chromium.googlesource.com/chromium/blink/+/b60576a0560d14f8757e58d55d37b7cefa48a6ac
2702
2703         In willRemoveChildren in ContainerNode.cpp, call Document::nodeChildrenWillBeRemoved after instead of
2704         before dispatching mutation events because we need to update ranges created by those mutation event
2705         listeners. willRemoveChild was fixed in r115686.
2706
2707         Tests: editing/selection/selection-change-in-blur-event-by-remove-children.html
2708                editing/selection/selection-change-in-mutation-event-by-remove-children.html
2709                fast/dom/Range/range-created-during-remove-children.html
2710
2711         * dom/ContainerNode.cpp:
2712         (WebCore::willRemoveChildren):
2713
2714 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
2715
2716         Fix out-of-date offset in selection range code in range.surroundContents
2717         https://bugs.webkit.org/show_bug.cgi?id=123871
2718
2719         Reviewed by Andreas Kling.
2720         
2721         Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
2722
2723         The code in Range::insertNode assumeed that the start offset of the selection range within its container
2724         doesn't change across a call to insertBefore on the container but this is wrong. This patch recomputes
2725         the start offset when it is used after the insertBefore call.
2726
2727         Test: editing/selection/range-surroundContents-with-preceding-node.html
2728
2729         * dom/Range.cpp:
2730         (WebCore::Range::insertNode):
2731
2732 2013-11-06  Andreas Kling  <akling@apple.com>
2733
2734         Add InlineElementBox and stop instantiating InlineBox directly.
2735         <https://webkit.org/b/123882>
2736
2737         Make the InlineBox constructors protected and add a new class
2738         called InlineElementBox on top. This is somewhat analogous to the
2739         split between RenderText and RenderElement, and allows us to make
2740         renderer() return a far tighter RenderBoxModelObject& instead
2741         of a RenderObject&.
2742
2743         Moved over attachLine(), deleteLine() and extractLine() to start
2744         things off. More things will follow.
2745
2746         Reviewed by Antti Koivisto.
2747
2748 2013-11-06  Piotr Grad  <p.grad@samsung.com>
2749
2750         Seek for video doesn't work when playback rate is negative
2751         https://bugs.webkit.org/show_bug.cgi?id=123791
2752
2753         In MediaPlayerPrivateGStreamer::seek negative playback rate was not taken to account.
2754
2755         Reviewed by Philippe Normand.
2756
2757         Test: media/video-seek-with-negative-playback.html
2758
2759         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2760         (WebCore::MediaPlayerPrivateGStreamer::seek):
2761
2762 2013-11-06  Andreas Kling  <akling@apple.com>
2763
2764         Reinstate an annoying assertion that I accidentally commented out.
2765
2766         * loader/icon/IconDatabase.cpp:
2767         (WebCore::IconDatabase::synchronousIconForPageURL):
2768
2769 2013-11-06  Brendan Long  <b.long@cablelabs.com>
2770
2771         [GStreamer] Override label() and language() in Audio and VideoTrackPrivateGStreamer
2772         https://bugs.webkit.org/show_bug.cgi?id=123836
2773
2774         The tests are currently flakey because we only get the label and language if we get
2775         tags after the track client is set.
2776
2777         Reviewed by Philippe Normand.
2778
2779         No new tests because the tests already exist (this fixes flakeyness).
2780
2781         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Override label() and language() to use m_label and m_language.
2782         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same.
2783         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Make m_label and m_language protected so they can be used in the functions above.
2784
2785 2013-11-05  Andreas Kling  <akling@apple.com>
2786
2787         RenderBlockFlow should only expose its line boxes as RootInlineBox.
2788         <https://webkit.org/b/123878>
2789
2790         The line boxes attached directly to a RenderBlockFlow are always
2791         RootInlineBox objects, so call sites should always use the tightly
2792         typed firstRootBox() and lastRootBox().
2793
2794         This allows the compiler to devirtualize calls to member functions
2795         of RootInlineBox that are marked FINAL.
2796
2797         Reviewed by Antti Koivisto.
2798
2799 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
2800
2801         Assertion failure end < m_runCount in WebCore::BidiRunList<WebCore::BidiRun>::reverseRuns
2802         https://bugs.webkit.org/show_bug.cgi?id=123863
2803
2804         Reviewed by Andreas Kling.
2805
2806         Merge https://chromium.googlesource.com/chromium/blink/+/cbaa92c763a37d89eeabd01658e522219299290c
2807
2808         Test: fast/text/bidi-reverse-runs-crash.html
2809
2810         * platform/text/BidiResolver.h:
2811         (WebCore::BidiResolver<Iterator, Run>::createBidiRunsForLine): Don't reverse the runs if there's
2812         nothing to be reversed.
2813
2814 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
2815
2816         Address the review comment after r158724.
2817
2818         * html/RangeInputType.cpp:
2819         (WebCore::RangeInputType::handleMouseDownEvent):
2820
2821 2013-11-05  Zalan Bujtas  <zalan@apple.com>
2822
2823         Widget's position change should not initiate layout, only when its size changes.
2824         https://bugs.webkit.org/show_bug.cgi?id=123860
2825
2826         Reviewed by Andreas Kling.
2827
2828         RenderWidgets initiate unnecessary layouts while scrolling when they are embedded to
2829         overflow:scroll containers. Scroll position change doesn't dirty the render tree
2830         so it should not trigger layout either.
2831
2832         Manual test added. Unfortunately we can't test against the number of layouts yet.
2833
2834         * rendering/RenderWidget.cpp:
2835         (WebCore::RenderWidget::setWidgetGeometry):
2836         (WebCore::RenderWidget::updateWidgetGeometry):
2837         (WebCore::RenderWidget::updateWidgetPosition):
2838
2839 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
2840
2841         Use-after-free in SliderThumbElement::dragFrom
2842         https://bugs.webkit.org/show_bug.cgi?id=123873
2843
2844         Reviewed by Andreas Kling.
2845
2846         Ref the SliderThumbElement since it could go away inside dragFrom.
2847
2848         Test: fast/forms/range/range-type-change-onchange-2.html
2849
2850         * html/RangeInputType.cpp:
2851         (WebCore::RangeInputType::handleMouseDownEvent):
2852
2853 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
2854
2855         Change the order of conditions to avoid computing rendererIsEditable()
2856         https://bugs.webkit.org/show_bug.cgi?id=123868
2857
2858         Reviewed by Andreas Kling.
2859
2860         Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
2861
2862         When we need both Node::renderer() and Node::rendererIsEditable() conditions to be true to perform
2863         some operation, it is more effective to check for renderer() first, so that if this condition fails
2864         we can avoid unnecessary computation of rendererIsEditable().
2865
2866         * dom/Position.cpp:
2867         (WebCore::nextRenderedEditable):
2868         (WebCore::previousRenderedEditable):
2869         * page/EventHandler.cpp:
2870         (WebCore::EventHandler::handleMouseReleaseEvent):
2871
2872 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
2873
2874         simpleUserAgentStyleSheet doesn't have focus ring on anchor element
2875         https://bugs.webkit.org/show_bug.cgi?id=123867
2876
2877         Reviewed by Andreas Kling.
2878
2879         Merge https://chromium.googlesource.com/chromium/blink/+/08ecc23c4d80be9969918c4baf0ac83dc6cb6cbd
2880
2881         * css/CSSDefaultStyleSheets.cpp:
2882
2883 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
2884
2885         valueForBorderRadiusShorthand returns wrong values in some case
2886         https://bugs.webkit.org/show_bug.cgi?id=123866
2887
2888         Reviewed by Andreas Kling.
2889
2890         Merge https://chromium.googlesource.com/chromium/blink/+/0933728126f2db06ab8e945efc98bffa2d42af1c
2891
2892         Because valueForBorderRadiusShorthand misses the followings:
2893         - showHorizontalBottomRight depends on showHorizontalBottomLeft.
2894         - showHorizontalTopRight depends on showHorizontalBottomRight (including showHorizontalBottomLeft).
2895
2896         See also http://dev.w3.org/csswg/css-backgrounds/#the-border-radius
2897
2898         Test: fast/css/getComputedStyle/getComputedStyle-borderRadius-2.html
2899
2900         * css/CSSComputedStyleDeclaration.cpp:
2901         (WebCore::getBorderRadiusShorthandValue):
2902
2903 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
2904
2905         Protect DOM nodes in IndentOutdentCommand::tryIndentingAsListItem()
2906         https://bugs.webkit.org/show_bug.cgi?id=123861
2907
2908         Reviewed by Benjamin Poulain.
2909
2910         Merge https://chromium.googlesource.com/chromium/blink/+/297442eb539a2b764fdad323de79099a70179186 partially.
2911
2912         * editing/IndentOutdentCommand.cpp:
2913         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Make selectedListItem, previousList, and nextList
2914         RefPtr since they're are used after calling insertNodeBefore.
2915
2916 2013-11-05  Andreas Kling  <akling@apple.com>
2917
2918         Apply more unique_ptr to line box management.
2919         <https://webkit.org/b/123857>
2920
2921         Make all of the functions that return newly-created line boxes
2922         return them packed up in std::unique_ptrs.
2923
2924         There is one exception in RenderBlockLineLayout where the function
2925         createInlineBoxForRenderer() is inconsistent about the ownership of
2926         the returned object. This will be addressed by a subsequent patch.
2927
2928         We now "release" the line boxes into their various home structures,
2929         so the pointer smartness doesn't go end-to-end just yet.
2930
2931         Reviewed by Anders Carlsson.
2932
2933 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
2934
2935         getComputedStyle(x).lineHeight is affected by zooming
2936         https://bugs.webkit.org/show_bug.cgi?id=123847
2937
2938         Reviewed by Benjamin Poulain.
2939
2940         Merge https://chromium.googlesource.com/chromium/blink/+/7957097afbab2899ababd0d9c8acbf6e3eddb870
2941
2942         Test: fast/css/line-height-zoom-get-computed-style.html
2943
2944         * css/CSSComputedStyleDeclaration.cpp:
2945         (WebCore::lineHeightFromStyle): Don't round line-height values.
2946         * css/DeprecatedStyleBuilder.cpp:
2947         (WebCore::ApplyPropertyLineHeight::applyValue): Use the computed value instead of the used value.
2948
2949 2013-11-05  James Craig  <jcraig@apple.com>
2950
2951         AX: media controls accessibility needs more work
2952         https://bugs.webkit.org/show_bug.cgi?id=123749
2953
2954         Reviewed by Jer Noble.
2955
2956         Updated some of the control labels/roles to improve accessibility.
2957           - Volume slider is now keyboard/screenreader accessible.
2958           - muteButton was a checkbox toggling checked state, now a button that toggles label "mute/unmute"
2959           - fullscreenButton was a checkbox toggling checked state, now a button that toggles label "display/exit full screen"
2960           - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
2961         Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
2962         Render dump expectations changed because volume slider is now hidden via... 
2963         ...opacity/size (to make accessible without hover) instead of display:none.
2964
2965         Updated existing test coverage.
2966
2967         * Modules/mediacontrols/mediaControlsApple.css:
2968         (audio::-webkit-media-controls-panel .volume-box):
2969         (audio::-webkit-media-controls-panel .volume-box:active):
2970         (audio::-webkit-media-controls-toggle-closed-captions-button):
2971         (audio::-webkit-media-controls-closed-captions-container .list):
2972         (audio::-webkit-media-controls-closed-captions-container li:focus):
2973         * Modules/mediacontrols/mediaControlsApple.js:
2974         (Controller.prototype.createControls):
2975         (Controller.prototype.handleFullscreenChange):
2976         (Controller.prototype.handleMuteButtonClicked):
2977         (Controller.prototype.handleMinButtonClicked):
2978         (Controller.prototype.handleMaxButtonClicked):
2979         (Controller.prototype.handleVolumeSliderChange):
2980         (Controller.prototype.buildCaptionMenu):
2981         (Controller.prototype.focusSiblingCaptionItem):
2982         (Controller.prototype.handleCaptionItemKeyUp):
2983
2984 2013-11-05  Andreas Kling  <akling@apple.com>
2985
2986         Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
2987         <https://webkit.org/b/123845>
2988
2989         All RenderWidgets representing plugins will be RenderEmbeddedObjects.
2990         Move some of the plugin-specific logic to RenderEmbeddedObject since it
2991         doesn't make sense for all RenderWidgets (frames, embedded documents)
2992         to care about this.
2993
2994         Reviewed by Anders Carlsson.
2995
2996 2013-11-05  Tim Horton  <timothy_horton@apple.com>
2997
2998         Fix the 32-bit build.
2999
3000         * WebCore.exp.in:
3001
3002 2013-11-05  Alexandru Chiculita  <achicu@adobe.com>
3003
3004         Web Inspector: Moving an element while in the DOMNodeRemoved handler will hide it in the inspector
3005         https://bugs.webkit.org/show_bug.cgi?id=123516
3006
3007         Reviewed by Timothy Hatcher.
3008
3009         InspectorInstrumentation::willRemoveDOMNode was actually calling both willRemoveDOMNodeImpl and
3010         didRemoveDOMNodeImpl, making the DOMAgent unbind the element even if it was still part of the DOM.
3011
3012         Because of that the DOMAgent was sending two events:
3013         1. When the element was about to be removed, just before JS "DOMNodeRemoved" was triggered.
3014         2. When the element was actually removed.
3015
3016         Note that inspector's event #2 will not know about the node, as it just removed it from the
3017         internal hashmap, so it will just use a nodeID == 0 for it.
3018
3019         This patch adds a separate call to InspectorInstrumentation::didRemoveDOMNode, just before the
3020         element is about to be removed. The InspectorInstrumentation::willRemoveDOMNode call is now only used
3021         by the DOMDebugger to trigger the DOM breakpoints in the Web Inspector. That feature is not exposed
3022         in the new Inspector UI, but can be used/tested using the protocol directly.
3023
3024         Tests: inspector-protocol/dom-debugger/node-removed.html
3025                inspector-protocol/dom/dom-remove-events.html
3026                inspector-protocol/dom/remove-multiple-nodes.html
3027
3028         * dom/ContainerNode.cpp:
3029         (WebCore::ContainerNode::removeBetween):
3030         * inspector/InspectorInstrumentation.h:
3031         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
3032         (WebCore::InspectorInstrumentation::didRemoveDOMNode):
3033
3034 2013-11-05  Ryuan Choi  <ryuan.choi@samsung.com>
3035
3036         Unreviewed build fix on CMake based ports with GLES.
3037
3038         * CMakeLists.txt:
3039         Added OPENGLES2_LIBRARIES and OPENGLES2_INCLUDE_DIR into the includes and
3040         libraries list.
3041
3042 2013-11-05  Tim Horton  <timothy_horton@apple.com>
3043
3044         platformCALayerDeviceScaleFactor should be const
3045         https://bugs.webkit.org/show_bug.cgi?id=123842
3046
3047         Reviewed by Simon Fraser.
3048
3049         * WebCore.exp.in:
3050         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3051         (WebCore::LayerClient::platformCALayerDeviceScaleFactor):
3052         * platform/graphics/ca/GraphicsLayerCA.cpp:
3053         (WebCore::GraphicsLayerCA::platformCALayerDeviceScaleFactor):
3054         * platform/graphics/ca/GraphicsLayerCA.h:
3055         * platform/graphics/ca/PlatformCALayerClient.h:
3056         * platform/graphics/ca/mac/TileController.h:
3057         * platform/graphics/ca/mac/TileController.mm:
3058         (WebCore::TileController::platformCALayerDeviceScaleFactor):
3059         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
3060         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDeviceScaleFactor):
3061         Constify PlatformCALayerClient::platformCALayerDeviceScaleFactor.
3062
3063 2013-11-05  Gavin Barraclough  <barraclough@apple.com>
3064
3065         Subresource loads should not prevent page throttling
3066         https://bugs.webkit.org/show_bug.cgi?id=123757
3067
3068         Reviewed by Alexey Proskuryakov.
3069
3070         The page-is-loading test for inhibiting process supression is currently
3071         too conservative, preventing supression of pages with infinitely loading
3072         resources (commonly XHRs). Instead, just rely on the FrameLoader being
3073         active (with hysteresis).
3074
3075         * loader/SubresourceLoader.cpp:
3076         (WebCore::SubresourceLoader::init):
3077         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
3078         (WebCore::SubresourceLoader::didFinishLoading):
3079         (WebCore::SubresourceLoader::didFail):
3080         (WebCore::SubresourceLoader::willCancel):
3081         * loader/SubresourceLoader.h:
3082             - remove m_activityAssertion from SubresourceLoader.
3083
3084 2013-11-05  Tim Horton  <timothy_horton@apple.com>
3085
3086         [mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
3087         https://bugs.webkit.org/show_bug.cgi?id=123840
3088         <rdar://problem/15308765>
3089
3090         Reviewed by Alexey Proskuryakov.
3091
3092         Test: fast/images/pdf-as-image-crop-box.html
3093
3094         * platform/graphics/cg/PDFDocumentImage.cpp:
3095         (WebCore::PDFDocumentImage::size):
3096         Use the crop box when determining the size of the image.
3097
3098         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
3099         * platform/graphics/cg/PDFDocumentImage.h:
3100         * platform/graphics/mac/PDFDocumentImageMac.mm:
3101         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
3102         Get rid of m_mediaBox, since we don't need it anymore.
3103
3104         (WebCore::PDFDocumentImage::drawPDFPage):
3105         PDFKit does the translation by the crop box origin for us;
3106         if we do it additionally, we'll be painting the wrong part of the image.
3107         So, don't do the translation here.
3108
3109 2013-11-05  Antti Koivisto  <antti@apple.com>
3110
3111         Factor index cache for NodeLists and HTMLCollections to a class
3112         https://bugs.webkit.org/show_bug.cgi?id=123823
3113
3114         Reviewed by Ryosuke Niwa.
3115
3116         Implement index cache class that can used by NodeLists and HTMLCollections that currently
3117         each have implementations of their own.
3118         
3119         This patch also implements ChildNodeList and LiveNodeList using CollectionIndexCache.
3120         HTMLCollection is will be transitioned later.
3121
3122         * GNUmakefile.list.am:
3123         * WebCore.vcxproj/WebCore.vcxproj:
3124         * WebCore.xcodeproj/project.pbxproj:
3125         * dom/ChildNodeList.cpp:
3126         (WebCore::ChildNodeList::ChildNodeList):
3127         (WebCore::ChildNodeList::length):
3128         (WebCore::ChildNodeList::item):
3129         
3130             The client calls to cache to for indexed and size access.
3131
3132         (WebCore::ChildNodeList::collectionFirst):
3133         (WebCore::ChildNodeList::collectionLast):
3134         (WebCore::ChildNodeList::collectionTraverseForward):
3135         (WebCore::ChildNodeList::collectionTraverseBackward):
3136         
3137             Cache calls back to these as needed to do the actual traversal.
3138
3139         (WebCore::ChildNodeList::invalidateCache):
3140         * dom/ChildNodeList.h:
3141         * dom/CollectionIndexCache.h: Added.
3142         
3143             Templated cache class itself.
3144
3145         (WebCore::::CollectionIndexCache):
3146         (WebCore::::nodeCount):
3147         (WebCore::::nodeBeforeCached):
3148         (WebCore::::nodeAfterCached):
3149         (WebCore::::nodeAt):
3150         (WebCore::::invalidate):
3151         * dom/LiveNodeList.cpp:
3152         (WebCore::firstMatchingElement):
3153         (WebCore::nextMatchingElement):
3154         (WebCore::traverseMatchingElementsForward):
3155         (WebCore::LiveNodeList::collectionFirst):
3156         (WebCore::LiveNodeList::collectionLast):
3157         (WebCore::LiveNodeList::collectionTraverseForward):
3158         (WebCore::LiveNodeList::collectionTraverseBackward):
3159         (WebCore::LiveNodeList::length):
3160         (WebCore::LiveNodeList::item):
3161         (WebCore::LiveNodeList::invalidateCache):
3162         * dom/LiveNodeList.h:
3163         (WebCore::LiveNodeList::LiveNodeList):
3164
3165 2013-11-05  Enrica Casucci  <enrica@apple.com>
3166
3167         Full width semicolon is wrong in vertical text.
3168         https://bugs.webkit.org/show_bug.cgi?id=123814
3169         <rdar://problem/15312541>
3170
3171         Reviewed by Benjamin Poulain.
3172
3173         The full width semicolon should always be upright.
3174         Adding it to the list of characters that should
3175         ignore rotation.
3176
3177         * platform/graphics/FontGlyphs.cpp:
3178         (WebCore::shouldIgnoreRotation):
3179
3180 2013-11-05  Andreas Kling  <akling@apple.com>
3181
3182         Remove unused RenderWidget::notifyWidget().
3183
3184         Rubber-stamped by Anders Carlsson.
3185
3186 2013-11-05  Commit Queue  <commit-queue@webkit.org>
3187
3188         Unreviewed, rolling out r158678.
3189         http://trac.webkit.org/changeset/158678
3190         https://bugs.webkit.org/show_bug.cgi?id=123820
3191
3192         Causes a new debug assertion failure on the Mavericks test
3193         system. (Requested by bfulgham on #webkit).
3194
3195         * rendering/mathml/RenderMathMLOperator.cpp:
3196
3197 2013-11-05  Renata Hodovan  <reni@webkit.org>
3198
3199         ASSERTION FAILED: isHTMLTitleElement(m_titleElement.get()) in WebCore::Document::setTitle
3200         https://bugs.webkit.org/show_bug.cgi?id=122092
3201
3202         Reviewed by Darin Adler.
3203
3204         Remove a bogus assert in Document::setTitle().
3205         m_titleElement can be either of HTMLTitleElement or SVGTitleElement. The assertion was wrong.
3206         
3207         Backported from Blink:
3208         https://src.chromium.org/viewvc/blink?revision=158620&view=revision
3209
3210         Test: svg/custom/title-assertion.html
3211
3212         * dom/Document.cpp:
3213         (WebCore::Document::setTitle):
3214         * svg/SVGTitleElement.cpp:
3215         (WebCore::SVGTitleElement::insertedInto):
3216
3217 2013-11-05  Martin Robinson  <mrobinson@igalia.com>
3218
3219         [MathML] Poor spacing around delimiters in MathML Torture Test 14
3220         https://bugs.webkit.org/show_bug.cgi?id=122837
3221
3222         Reviewed by Brent Fulgham.
3223
3224         Instead of stretching the vertical bar with the stretchable version, just repeat
3225         the normal vertical bar. This follows what Gecko does when rendering tall vertical
3226         bars and also works around an issue with STIX fonts leading to poor spacing in
3227         formulas.
3228
3229         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
3230         normal variant.
3231
3232 2013-11-05  Daniel Bates  <dabates@apple.com>
3233
3234         XSSAuditor should catch reflected srcdoc properties even without a <frame> tag injection
3235
3236         From Blink r160615 by <tsepez@chromium.org>
3237         https://src.chromium.org/viewvc/blink?view=rev&revision=160615
3238
3239         Test: http/tests/security/xssAuditor/iframe-srcdoc-property-blocked.html
3240
3241         * html/parser/XSSAuditor.cpp:
3242         (WebCore::XSSAuditor::filterIframeToken):
3243
3244 2013-11-05  Éva Balázsfalvi  <balazsfalvi.eva@stud.u-szeged.hu>
3245
3246         Delete maketokenizer.
3247         https://bugs.webkit.org/show_bug.cgi?id=115155
3248
3249         Reviewed by Zoltan Herczeg.
3250
3251         This script was used to generate the old flex based CSS tokenizer. It
3252         was replaced by a custom tokenizer in r106217 but the script wasn't
3253         removed. Since there is no mention of it in the original bug nor any
3254         reference to maketokenizer in our build files, it's probably an
3255         oversight.
3256
3257         Merge from blink:
3258         https://chromium.googlesource.com/chromium/blink/+/2a1c8aaf867f707ccdcd8893446e907e2aa2e1c2
3259
3260         * css/maketokenizer: Removed.
3261
3262 2013-11-05  Zan Dobersek  <zdobersek@igalia.com>
3263
3264         Unreviewed. Unbreaking GCC builds.
3265
3266         * html/HTMLCollection.cpp:
3267         (WebCore::isMatchingElement): This inline function is not a template anymore.
3268
3269 2013-11-05  Antti Koivisto  <antti@apple.com>
3270
3271         Make it compile.
3272
3273         * dom/LiveNodeList.h:
3274         (WebCore::LiveNodeList::LiveNodeList):
3275         (WebCore::LiveNodeList::~LiveNodeList):
3276         * dom/NodeRareData.h:
3277         (WebCore::NodeListsNodeData::adoptDocument):
3278         * html/HTMLCollection.cpp:
3279         (WebCore::HTMLCollection::HTMLCollection):
3280         (WebCore::HTMLCollection::~HTMLCollection):
3281
3282 2013-11-05  Antti Koivisto  <antti@apple.com>
3283
3284         HTMLCollection should not be NodeList
3285         https://bugs.webkit.org/show_bug.cgi?id=123794
3286
3287         Reviewed by Andreas Kling.
3288
3289         HTMLCollection and NodeList are unrelated types in DOM yet our HTMLCollection inherits NodeList
3290         for code sharing reasons. While some code does get shared the types are sufficiently different 
3291         that this results in lots of unnecessary branches, complexity and general awkwardness. Code sharing 
3292         can be better achieved by means other than inheritance.
3293         
3294         This patch splits HTMLCollection from NodeList by copy-pasting and eliminating resulting redundancies. 
3295         Sharing comes later.
3296
3297         * dom/Attr.cpp:
3298         (WebCore::Attr::setValue):
3299         (WebCore::Attr::childrenChanged):
3300         * dom/ClassNodeList.cpp:
3301         (WebCore::ClassNodeList::~ClassNodeList):
3302         * dom/ContainerNode.cpp:
3303         (WebCore::ContainerNode::childrenChanged):
3304         (WebCore::ContainerNode::getElementsByTagName):
3305         (WebCore::ContainerNode::getElementsByName):
3306         (WebCore::ContainerNode::getElementsByClassName):
3307         (WebCore::ContainerNode::radioNodeList):
3308         * dom/Document.cpp:
3309         (WebCore::Document::Document):
3310         (WebCore::Document::~Document):
3311         (WebCore::Document::registerNodeList):
3312         (WebCore::Document::unregisterNodeList):
3313         (WebCore::Document::registerCollection):
3314         (WebCore::Document::unregisterCollection):
3315         (WebCore::Document::ensureCachedCollection):
3316         
3317             Add separate functions and map for registering HTMLCollections.
3318
3319         (WebCore::Document::all):
3320         (WebCore::Document::windowNamedItems):
3321         (WebCore::Document::documentNamedItems):
3322         * dom/Document.h:
3323         * dom/Element.cpp:
3324         (WebCore::Element::attributeChanged):
3325         (WebCore::Element::ensureCachedHTMLCollection):
3326         (WebCore::Element::cachedHTMLCollection):
3327         * dom/LiveNodeList.cpp:
3328         (WebCore::LiveNodeList::rootNode):
3329         (WebCore::isMatchingElement):
3330         (WebCore::LiveNodeList::iterateForPreviousElement):
3331         (WebCore::LiveNodeList::itemBefore):
3332         (WebCore::firstMatchingElement):
3333         (WebCore::nextMatchingElement):
3334         (WebCore::traverseMatchingElementsForwardToOffset):
3335         (WebCore::LiveNodeList::traverseLiveNodeListFirstElement):
3336         (WebCore::LiveNodeList::traverseLiveNodeListForwardToOffset):
3337         (WebCore::LiveNodeList::isLastItemCloserThanLastOrCachedItem):
3338         (WebCore::LiveNodeList::isFirstItemCloserThanCachedItem):
3339         (WebCore::LiveNodeList::length):
3340         (WebCore::LiveNodeList::item):
3341         (WebCore::LiveNodeList::elementBeforeOrAfterCachedElement):
3342         
3343             This code used to live in HTMLCollection.cpp. Copy-paste here and remove all branches not needed for NodeLists.
3344
3345         (WebCore::LiveNodeList::invalidateCache):
3346         
3347             NodeLists have no name caches.
3348
3349         * dom/LiveNodeList.h:
3350         (WebCore::LiveNodeList::LiveNodeList):
3351         (WebCore::LiveNodeList::~LiveNodeList):
3352         (WebCore::LiveNodeList::isRootedAtDocument):
3353         (WebCore::LiveNodeList::type):
3354         (WebCore::LiveNodeList::invalidateCache):
3355         (WebCore::LiveNodeList::setCachedElement):
3356         
3357             Merge LiveNodeListBase and LiveNodeList.
3358             Remove fields and code supporting HTMLCollection.
3359
3360         (WebCore::shouldInvalidateTypeOnAttributeChange):
3361         
3362             Move to global scope. This function is used both HTMLCollections and LiveNodeLists.
3363
3364         * dom/NameNodeList.cpp:
3365         (WebCore::NameNodeList::~NameNodeList):
3366         * dom/NameNodeList.h:
3367         (WebCore::NameNodeList::create):
3368         * dom/Node.cpp:
3369         (WebCore::shouldInvalidateNodeListCachesForAttr):
3370         (WebCore::Document::shouldInvalidateNodeListAndCollectionCaches):
3371         (WebCore::Document::invalidateNodeListAndCollectionCaches):
3372         (WebCore::Node::invalidateNodeListAndCollectionCachesInAncestors):
3373         (WebCore::NodeListsNodeData::invalidateCaches):
3374         * dom/Node.h:
3375         * dom/NodeRareData.h:
3376         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
3377         (WebCore::NodeListsNodeData::addCacheWithName):
3378         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
3379         (WebCore::NodeListsNodeData::addCachedCollection):
3380         (WebCore::NodeListsNodeData::cachedCollection):
3381         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
3382         (WebCore::NodeListsNodeData::removeCacheWithName):
3383         (WebCore::NodeListsNodeData::removeCachedCollection):
3384         (WebCore::NodeListsNodeData::isEmpty):
3385         (WebCore::NodeListsNodeData::adoptDocument):
3386         (WebCore::NodeListsNodeData::namedCollectionKey):
3387         (WebCore::NodeListsNodeData::namedNodeListKey):
3388         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
3389         
3390             Add separate cache for HTMLCollections.
3391
3392         * dom/TagNodeList.cpp:
3393         (WebCore::TagNodeList::TagNodeList):
3394         (WebCore::TagNodeList::~TagNodeList):
3395         * dom/TagNodeList.h:
3396         (WebCore::TagNodeList::create):
3397         (WebCore::HTMLTagNodeList::create):
3398         * html/CollectionType.h:
3399         
3400             Remove NodeList types.
3401
3402         * html/HTMLCollection.cpp:
3403         (WebCore::shouldOnlyIncludeDirectChildren):
3404         (WebCore::rootTypeFromCollectionType):
3405         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3406         (WebCore::HTMLCollection::HTMLCollection):
3407         (WebCore::HTMLCollection::~HTMLCollection):
3408         (WebCore::HTMLCollection::rootNode):
3409         (WebCore::isMatchingElement):
3410         (WebCore::HTMLCollection::iterateForPreviousElement):
3411         (WebCore::HTMLCollection::itemBefore):
3412         (WebCore::firstMatchingElement):
3413         (WebCore::nextMatchingElement):
3414         (WebCore::traverseMatchingElementsForwardToOffset):
3415         (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
3416         (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
3417         (WebCore::HTMLCollection::setCachedElement):
3418         (WebCore::HTMLCollection::length):
3419         (WebCore::HTMLCollection::item):
3420         (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
3421         (WebCore::HTMLCollection::traverseFirstElement):
3422         (WebCore::HTMLCollection::traverseNextElement):
3423         (WebCore::HTMLCollection::traverseForwardToOffset):
3424         (WebCore::HTMLCollection::invalidateCache):
3425         (WebCore::HTMLCollection::invalidateIdNameCacheMaps):
3426         (WebCore::HTMLCollection::namedItem):
3427         
3428             Remove NodeList specific branches and functions.
3429             LiveNodeListBase functions are now HTMLCollection functions.
3430
3431         * html/HTMLCollection.h:
3432         (WebCore::HTMLCollection::isRootedAtDocument):
3433         (WebCore::HTMLCollection::invalidationType):
3434         (WebCore::HTMLCollection::type):
3435         (WebCore::HTMLCollection::ownerNode):
3436         (WebCore::HTMLCollection::invalidateCache):
3437         (WebCore::HTMLCollection::document):
3438         (WebCore::HTMLCollection::overridesItemAfter):
3439         (WebCore::HTMLCollection::isElementCacheValid):
3440         (WebCore::HTMLCollection::cachedElement):
3441         (WebCore::HTMLCollection::cachedElementOffset):
3442         (WebCore::HTMLCollection::isLengthCacheValid):
3443         (WebCore::HTMLCollection::cachedLength):
3444         (WebCore::HTMLCollection::setLengthCache):
3445         (WebCore::HTMLCollection::setCachedElement):
3446         (WebCore::HTMLCollection::isItemRefElementsCacheValid):
3447         (WebCore::HTMLCollection::setItemRefElementsCacheValid):
3448         (WebCore::HTMLCollection::rootType):
3449         (WebCore::HTMLCollection::hasNameCache):
3450         (WebCore::HTMLCollection::setHasNameCache):
3451         
3452             Copy-paste functions and fields from former LiveNodeListBase.
3453
3454         * html/HTMLNameCollection.cpp:
3455         (WebCore::HTMLNameCollection::~HTMLNameCollection):
3456         * html/LabelableElement.cpp:
3457         (WebCore::LabelableElement::labels):
3458         * html/LabelsNodeList.cpp:
3459         (WebCore::LabelsNodeList::~LabelsNodeList):
3460         * html/LabelsNodeList.h:
3461         * html/RadioNodeList.cpp:
3462         (WebCore::RadioNodeList::~RadioNodeList):
3463         * html/RadioNodeList.h:
3464         (WebCore::RadioNodeList::create):
3465
3466 2013-11-05  Emilio Pozuelo Monfort  <pochu27@gmail.com>
3467
3468         [GTK] Add stubs for missing symbols in dom bindings
3469         https://bugs.webkit.org/show_bug.cgi?id=123663
3470
3471         Reviewed by Carlos Garcia Campos.
3472
3473         * bindings/gobject/WebKitDOMCustom.cpp:
3474         (webkit_dom_html_head_element_get_profile):
3475         (webkit_dom_html_head_element_set_profile):
3476         (webkit_dom_processing_instruction_get_data):
3477         (webkit_dom_processing_instruction_set_data):
3478         * bindings/gobject/WebKitDOMCustom.h:
3479         * bindings/gobject/WebKitDOMCustom.symbols:
3480
3481 2013-11-05  Zan Dobersek  <zdobersek@igalia.com>
3482
3483         Main thread tasks in ThreadableBlobRegistry should use std::unique_ptr
3484         https://bugs.webkit.org/show_bug.cgi?id=122946
3485
3486         Reviewed by Darin Adler.
3487
3488         The new BlobRegistryContext objects don't have to be adopted into OwnPtr and then have OwnPtr's leaked pointer
3489         passed into the WTF::callOnMainThread call - the pointer to the new heap-allocated object is passed in directly,
3490         with the object ending up being managed by std::unique_ptr in the designated main thread task.
3491
3492         * fileapi/ThreadableBlobRegistry.cpp:
3493         (WebCore::registerBlobURLTask):
3494         (WebCore::ThreadableBlobRegistry::registerBlobURL):
3495         (WebCore::registerBlobURLFromTask):
3496         (WebCore::unregisterBlobURLTask):
3497         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
3498
3499 2013-11-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3500
3501         [CSS] Enable css-image-orientation on EFL and GTK ports.
3502         https://bugs.webkit.org/show_bug.cgi?id=123698
3503
3504         Reviewed by Beth Dakin.
3505
3506         r157909 added wrong early return for css-image-orientation. It causes about 20 regressions in layout test
3507         when enabling css-image-orientation. This fixes those wrong implementation as well as enables it on EFL
3508         and GTK ports by default.
3509
3510         Test: fast/css/image-orientation/image-orientation.html
3511
3512         * loader/cache/CachedImage.cpp:
3513         (WebCore::CachedImage::imageSizeForRenderer):
3514         * platform/graphics/BitmapImage.cpp:
3515         (WebCore::BitmapImage::updateSize):
3516
3517 2013-11-05  Andreas Kling  <akling@apple.com>
3518
3519         RenderEmbeddedObject shouldn't know about fallback content.
3520         <https://webkit.org/b/123781>
3521
3522         Stop caching the presence of fallback (DOM) content in a flag on
3523         RenderEmbeddedObject and have SubframeLoader fetch it directly from
3524         HTMLObjectElement instead.
3525
3526         Also made SubframeLoader::requestObject() take the owner element
3527         by reference since we don't support owner-less embedded objects.
3528
3529         Reviewed by Antti Koivisto.
3530
3531 2013-11-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3532
3533         [GStreamer] Remove NATIVE_FULLSCREEN_VIDEO support
3534         https://bugs.webkit.org/show_bug.cgi?id=123437
3535
3536         Reviewed by Philippe Normand.
3537
3538         Removed some dead code as no GStreamer port is using the native
3539         fullscreen video support.
3540
3541         * GNUmakefile.list.am:
3542         * PlatformEfl.cmake:
3543         * PlatformGTK.cmake: Removed compilation of deleted files.
3544         * platform/graphics/MediaPlayer.h: Removed structures related to
3545         GStreamer and NATIVE_FULLSCREEN_VIDEO.
3546         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: Removed.
3547         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h: Removed.
3548         * platform/graphics/gstreamer/GStreamerGWorld.cpp: Removed.
3549         * platform/graphics/gstreamer/GStreamerGWorld.h: Removed.
3550         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Removed
3551         gst/video/video.h include.
3552         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3553         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
3554         (WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
3555         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
3556         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3557         Removed code related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
3558         * platform/graphics/gstreamer/PlatformVideoWindow.h: Removed.
3559         * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp: Removed.
3560         * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Removed.
3561         * platform/graphics/gstreamer/PlatformVideoWindowMac.mm: Removed.
3562         * platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Removed.
3563         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: Removed.
3564         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3565         (webkitVideoSinkRender):
3566         (webkitVideoSinkNew):
3567         * platform/graphics/gstreamer/VideoSinkGStreamer.h: Removed code
3568         related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
3569         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp: Removed.
3570         * platform/graphics/gtk/FullscreenVideoControllerGtk.h: Removed.
3571
3572 2013-11-05  Andreas Kling  <akling@apple.com>
3573
3574         Remove RenderWidget::viewCleared().
3575         <https://webkit.org/b/123777>
3576
3577         This was some ancient hand-waving code from the KHTML era.
3578
3579         It was obviously confused (e.g RenderEmbeddedObject trying to handle
3580         iframe owners, even though that setup is impossible.)
3581
3582         Reviewed by Anders Carlsson.
3583
3584 2013-11-04  Brady Eidson  <beidson@apple.com>
3585
3586         IDB: Split backend Cursors and Transactions into their own files
3587         https://bugs.webkit.org/show_bug.cgi?id=123789
3588
3589         Reviewed by Alexey Proskuryakov.
3590
3591         No new tests (Rename, no change in behavior).
3592
3593         * CMakeLists.txt:
3594         * GNUmakefile.list.am:
3595         * WebCore.xcodeproj/project.pbxproj:
3596
3597         * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
3598         (WebCore::IDBBackingStoreCursorInterface::~IDBBackingStoreCursorInterface):
3599
3600         * Modules/indexeddb/IDBBackingStoreInterface.h:
3601
3602         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Added.
3603         (WebCore::IDBBackingStoreTransactionInterface::~IDBBackingStoreTransactionInterface):
3604
3605         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
3606         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
3607         * Modules/indexeddb/IDBCursorBackendImpl.h:
3608         (WebCore::IDBCursorBackendImpl::create):
3609
3610         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3611
3612         * Modules/indexeddb/IDBIndexWriter.cpp:
3613         (WebCore::IDBIndexWriter::writeIndexKeys):
3614         (WebCore::IDBIndexWriter::verifyIndexKeys):
3615         (WebCore::IDBIndexWriter::addingKeyAllowed):
3616         * Modules/indexeddb/IDBIndexWriter.h:
3617
3618         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3619         (WebCore::IDBTransactionBackendImpl::createCursorBackend):
3620         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3621         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3622
3623         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
3624         (WebCore::GetOperation::perform):
3625         (WebCore::OpenCursorOperation::perform):
3626         (WebCore::CountOperation::perform):
3627         (WebCore::DeleteRangeOperation::perform):
3628
3629         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Added.
3630         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
3631         (WebCore::IDBBackingStoreCursorLevelDB::firstSeek):
3632         (WebCore::IDBBackingStoreCursorLevelDB::advance):
3633         (WebCore::IDBBackingStoreCursorLevelDB::continueFunction):
3634         (WebCore::IDBBackingStoreCursorLevelDB::haveEnteredRange):
3635         (WebCore::IDBBackingStoreCursorLevelDB::isPastBounds):
3636         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Added.
3637         (WebCore::IDBBackingStoreCursorLevelDB::~IDBBackingStoreCursorLevelDB):
3638         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
3639
3640         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3641         (WebCore::IDBBackingStoreLevelDB::compareIndexKeys):
3642         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
3643         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
3644         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
3645         (WebCore::IDBBackingStoreLevelDB::getRecord):
3646         (WebCore::IDBBackingStoreLevelDB::putRecord):
3647         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
3648         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3649         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
3650         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
3651         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3652         (WebCore::IDBBackingStoreLevelDB::createIndex):
3653         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
3654         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3655         (WebCore::findGreatestKeyLessThanOrEqual):
3656         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
3657         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
3658         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
3659         (WebCore::ObjectStoreKeyCursorImpl::create):
3660         (WebCore::ObjectStoreKeyCursorImpl::clone):
3661         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
3662         (WebCore::ObjectStoreCursorImpl::create):
3663         (WebCore::ObjectStoreCursorImpl::clone):
3664         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
3665         (WebCore::objectStoreCursorOptions):
3666         (WebCore::indexCursorOptions):
3667         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3668         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3669         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3670         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3671         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
3672         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3673  
3674        * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Added.
3675         (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
3676         (WebCore::IDBBackingStoreTransactionLevelDB::begin):
3677         (WebCore::IDBBackingStoreTransactionLevelDB::commit):
3678         (WebCore::IDBBackingStoreTransactionLevelDB::rollback):
3679         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
3680
3681         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3682         (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
3683         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3684
3685 2013-11-04  Zalan Bujtas  <zalan@apple.com>
3686
3687         Do not call setFrameRect on Widget unless its boundaries changed.
3688         https://bugs.webkit.org/show_bug.cgi?id=123781
3689
3690         Reviewed by Andreas Kling.
3691
3692         Call Widget:setFrameRect only when the frame's rect actually changes. It also
3693         cleans up the related weak reference code a bit.
3694         
3695         Covered by existing tests.
3696
3697         * rendering/RenderWidget.cpp:
3698         (WebCore::RenderWidget::setWidgetGeometry): 
3699
3700 2013-11-04  Santosh Mahto  <santosh.ma@samsung.com>
3701
3702         [webcore/html] remove extra header includes from cpp files.
3703         https://bugs.webkit.org/show_bug.cgi?id=123740
3704
3705         Reviewed by Darin Adler.
3706
3707         Removing redundant headers.
3708
3709         * html/BaseDateAndTimeInputType.cpp:
3710         * html/ColorInputType.cpp:
3711         * html/DOMFormData.cpp:
3712         * html/DOMURL.cpp:
3713         * html/DateInputType.cpp:
3714         * html/DateTimeInputType.cpp:
3715         * html/DateTimeLocalInputType.cpp:
3716         * html/FTPDirectoryDocument.cpp:
3717         * html/FileInputType.cpp:
3718         * html/FormController.cpp:
3719         * html/HTMLAnchorElement.cpp:
3720         * html/HTMLAreaElement.cpp:
3721         * html/HTMLCanvasElement.cpp:
3722         * html/HTMLCollection.cpp:
3723         * html/HTMLDetailsElement.cpp:
3724         * html/HTMLDocument.cpp:
3725         * html/HTMLElement.cpp:
3726         * html/HTMLFormControlsCollection.cpp:
3727         * html/HTMLFormElement.cpp:
3728         * html/HTMLImageElement.cpp:
3729         * html/HTMLInputElement.cpp:
3730         * html/HTMLLegendElement.cpp:
3731         * html/HTMLMapElement.cpp:
3732         * html/HTMLMediaElement.cpp:
3733         * html/HTMLOptionElement.cpp:
3734         * html/HTMLOptionsCollection.cpp:
3735         * html/HTMLPlugInImageElement.cpp:
3736         * html/HTMLProgressElement.cpp:
3737         * html/HTMLSummaryElement.cpp:
3738         * html/HTMLTemplateElement.cpp:
3739         * html/HTMLVideoElement.cpp:
3740         * html/HTMLViewSourceDocument.cpp:
3741         * html/MediaController.cpp:
3742         * html/MediaKeyEvent.cpp:
3743         * html/MonthInputType.cpp:
3744         * html/RangeInputType.cpp:
3745         * html/StepRange.cpp:
3746         * html/TextFieldInputType.cpp:
3747         * html/TimeInputType.cpp:
3748         * html/WeekInputType.cpp:
3749         * html/canvas/CanvasRenderingContext.cpp:
3750         * html/canvas/CanvasRenderingContext2D.cpp:
3751         * html/canvas/CanvasStyle.cpp:
3752         * html/canvas/OESVertexArrayObject.cpp:
3753         * html/parser/BackgroundHTMLParser.cpp:
3754         * html/parser/CSSPreloadScanner.cpp:
3755         * html/parser/CompactHTMLToken.cpp:
3756         * html/parser/HTMLConstructionSite.cpp:
3757         * html/parser/HTMLDocumentParser.cpp:
3758         * html/parser/HTMLElementStack.cpp:
3759         * html/parser/HTMLFormattingElementList.cpp:
3760         * html/parser/HTMLMetaCharsetParser.cpp:
3761         * html/parser/HTMLParserIdioms.cpp:
3762         * html/parser/HTMLPreloadScanner.cpp:
3763         * html/parser/HTMLTokenizer.cpp:
3764         * html/parser/HTMLTreeBuilder.cpp:
3765         * html/parser/HTMLTreeBuilderSimulator.cpp:
3766         * html/parser/HTMLViewSourceParser.cpp:
3767         * html/parser/TextDocumentParser.cpp:
3768         * html/parser/XSSAuditor.cpp:
3769         * html/shadow/ContentDistributor.cpp:
3770         * html/shadow/InsertionPoint.cpp:
3771         * html/shadow/MediaControlElements.cpp:
3772         * html/shadow/MediaControlsApple.cpp:
3773         * html/shadow/MediaControlsBlackBerry.cpp:
3774         * html/shadow/MediaControlsGtk.cpp:
3775         * html/shadow/SliderThumbElement.cpp:
3776         * html/track/AudioTrack.cpp:
3777         * html/track/InbandGenericTextTrack.cpp:
3778         * html/track/InbandTextTrack.cpp:
3779         * html/track/InbandWebVTTTextTrack.cpp:
3780         * html/track/TextTrack.cpp:
3781         * html/track/TextTrackCueGeneric.cpp:
3782         * html/track/TextTrackList.cpp:
3783         * html/track/TextTrackRegion.cpp:
3784         * html/track/TrackListBase.cpp:
3785         * html/track/VideoTrack.cpp:
3786         * html/track/WebVTTParser.cpp:
3787
3788 2013-11-04  Brady Eidson  <beidson@apple.com>
3789
3790         IDB: deleteDatabase() interface should be asynchronous
3791         https://bugs.webkit.org/show_bug.cgi?id=123787
3792
3793         Reviewed by Tim Horton.
3794
3795         No new tests (No behavior change for a tested port).
3796
3797         deleteDatabase now has no return value, but calls back to a bool function:
3798         * Modules/indexeddb/IDBBackingStoreInterface.h:
3799         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3800         (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
3801         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3802
3803         Refactor to account for the new async deleteDatabase:
3804         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3805         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3806         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
3807         (WebCore::IDBDatabaseBackendImpl::deleteDatabaseAsync):
3808         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3809
3810 2013-11-04  Brady Eidson  <beidson@apple.com>
3811
3812         Add Modules/indexeddb/leveldb to the WebCore.xcodeproj
3813
3814         Rubberstamped by Andreas Kling.
3815
3816         This will make hacking on IDB much easier for Mac developers as they won’t have
3817         to constantly add and then subtract the leveldb subdirectory.
3818
3819         The USE(LEVELDB) flag is still disabled so these files won’t actually build by default.
3820
3821         * WebCore.xcodeproj/project.pbxproj:
3822
3823 2013-11-04  Brady Eidson  <beidson@apple.com>
3824
3825         Address review feedback I forgot to commit in r158641
3826
3827         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3828         (WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls):
3829
3830 2013-11-04  Brady Eidson  <beidson@apple.com>
3831
3832         IDB: Make opening/establishing a database asynchronous.
3833         https://bugs.webkit.org/show_bug.cgi?id=123775
3834
3835         Reviewed by Andreas Kling.
3836
3837         No new tests (No behavior change for a tested port).
3838
3839         * Modules/indexeddb/IDBBackingStoreInterface.h: Add getOrEstablishIDBDatabaseMetadata with a callback,
3840           removing getIDBDatabaseMetaData, getObjectStores, and createIDBDatabaseMetaData in the process.
3841
3842         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3843         (WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata): Adapted from getIDBDatabaseMetaData,
3844           implement the asynchronous interface in terms of other LevelDB methods, always calling back synchronously.
3845         (WebCore::IDBBackingStoreLevelDB::createIDBDatabaseMetaData):
3846         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3847
3848         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3849         (WebCore::IDBDatabaseBackendImpl::create):
3850         (WebCore::IDBDatabaseBackendImpl::openInternalAsync): Broken off from openInternal.
3851         (WebCore::IDBDatabaseBackendImpl::didOpenInternalAsync): Broken off from openInternal.
3852         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3853         (WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls): Broken off to allow didOpenInternalAsync
3854           to perform open callbacks in the failure case.
3855         (WebCore::IDBDatabaseBackendImpl::openConnection): Always queue open connection calls, then immediately processPendingCalls.
3856         (WebCore::IDBDatabaseBackendImpl::openConnectionInternal): Actually perform open connection calls.
3857         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3858
3859
3860 2013-11-04  Andreas Kling  <akling@apple.com>
3861
3862         CTTE: RenderFrameBase's widget is always a FrameView.
3863         <https://webkit.org/b/123771>
3864
3865         Delete widget() from RenderFrameBase and supplant a childView()
3866         that returns FrameView*. Strip away unnecessary casts and asserts.
3867
3868         Reviewed by Antti Koivisto.
3869
3870 2013-11-04  Zoltan Horvath  <zoltan@webkit.org>
3871
3872         [CSS Regions][CSS Shapes] Content in region doesn't respect shape-outside after initial layout pass
3873         <https://webkit.org/b/114829>
3874
3875         Although we set the size of a shape for shape-outside in RenderBlockFlow::insertFloatingObject based on the
3876         float's size, the actual height of the float is not always resolved at that point. (Look at cases when the shape
3877         has percentage based height or percentage based radius.) ShapeInfo::setShapeSize triggers a layout for 0 height
3878         value, which will be overriden later, when RenderBlockFlow::positionNewFloats sets the actual size of the float (shape).
3879         Thus it doesn't make sense to set the shape's size in insertFloatingObject and run those extra unnecessary layout passes,
3880         since it'll be overriden anyways. I moved the shape size setting logic into RenderBlockFlow::positionNewFloats.
3881
3882         The problem showed up when we had a shape-outside ellipse with percentage based radius, and we inserted the content
3883         with JavaScript into a region flow. The content has been layed out based on the 0 border radius, and relayout hasn't been
3884         triggered when it flew into the flow. This change sets the shape size only when we already have the height of the float,
3885         so the radius(es) can be resolved correctly, thus no unnecessary layout passes will happen and the layout will be correct as well.
3886
3887         Reviewed by David Hyatt.
3888
3889         Test: fast/shapes/shape-outside-floats/shape-outside-floats-layout-after-initial-layout-pass.html
3890
3891         * rendering/RenderBlockFlow.cpp:
3892         (WebCore::RenderBlockFlow::insertFloatingObject): Remove setting the size of the shape.
3893         (WebCore::RenderBlockFlow::positionNewFloats): Set the size of the shape here.
3894
3895 2013-11-04  Samuel White  <samuel_white@apple.com>
3896
3897         AX: AXShowMenu doesn't always work.
3898         https://bugs.webkit.org/show_bug.cgi?id=123649
3899
3900         Reviewed by Chris Fleizach.
3901
3902         No new tests, the change occurs in a code path that forces the context menu to show which
3903         locks up DRT if we try to test it (platform menu is shown). The change itself gives the mouse
3904         event handler a chance to handle our platform mouse event BEFORE the event ends up in the show
3905         context menu machinery. This is necessary because without it, the element will not become
3906         focused. Without focus, accessibility shows different/less menu items than a mouse click. The
3907         end result is that context menus shown via accessibility are consistent with menus shown via click.
3908
3909         * page/ContextMenuController.cpp:
3910         (WebCore::ContextMenuController::showContextMenuAt):
3911
3912 2013-11-04  Jeffrey Pfau  <jpfau@apple.com>
3913
3914         SMIL timers can still fire after the containing document has been torn down
3915         <https://webkit.org/b/123291>
3916
3917         Reviewed by Darin Adler.
3918
3919         Ensure that the timers get paused when the document is preparing to be torn down.
3920
3921         Test: svg/animations/smil-timers-not-disabled-crash.html
3922
3923         * dom/Document.cpp:
3924         (WebCore::Document::dropChildren):
3925         (WebCore::Document::commonTeardown):
3926         (WebCore::Document::prepareForDestruction):
3927         * dom/Document.h:
3928
3929 2013-11-04  Brendan Long  <b.long@cablelabs.com>
3930
3931         Move duplicate code in TrackPrivate classes to a common base class
3932         https://bugs.webkit.org/show_bug.cgi?id=123619
3933
3934         Reviewed by Darin Adler.
3935
3936         No new tests because this is just refactoring.
3937
3938         * GNUmakefile.list.am: Add TrackPrivateBase.
3939         * WebCore.vcxproj/WebCore.vcxproj: Same.
3940         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
3941         * WebCore.xcodeproj/project.pbxproj: Same.
3942         * html/track/AudioTrack.cpp:
3943         (WebCore::AudioTrack::inbandTrackIndex): Renamed audioTrackIndex() to trackIndex().
3944         (WebCore::AudioTrack::labelChanged): First argument is now a TrackPrivateBase*.
3945         (WebCore::AudioTrack::languageChanged): Same.
3946         (WebCore::AudioTrack::willRemove): Same.
3947         * html/track/AudioTrack.h: Update TrackPrivateBaseClient function signatures.
3948         * html/track/InbandTextTrack.cpp:
3949         (WebCore::InbandTextTrack::inbandTrackIndex): Renamed textTrackIndex() to trackIndex().
3950         (WebCore::InbandTextTrack::labelChanged): First argument is now a TrackPrivateBase*.
3951         (WebCore::InbandTextTrack::languageChanged): Same.
3952         (WebCore::InbandTextTrack::willRemove): Same.
3953         * html/track/InbandTextTrack.h: Update TrackPrivateBaseClient function signatures.
3954         * html/track/VideoTrack.cpp:
3955         (WebCore::VideoTrack::inbandTrackIndex): Renamed videoTrackIndex() to trackIndex().
3956         (WebCore::VideoTrack::labelChanged): First argument is now a TrackPrivateBase*.
3957         (WebCore::VideoTrack::languageChanged): Same.
3958         (WebCore::VideoTrack::willRemove): Same.
3959         * html/track/VideoTrack.h: Update TrackPrivateBaseClient function signatures.
3960         * platform/graphics/AudioTrackPrivate.h: Remove code that was moved to TrackPrivateBase.
3961         * platform/graphics/InbandTextTrackPrivate.h: Same.
3962         * platform/graphics/InbandTextTrackPrivateClient.h: Same.
3963         * platform/graphics/VideoTrackPrivate.h: Same.
3964         * platform/graphics/TrackPrivateBase.h: Refactored out duplicate code in AudioTrackPrivate, InbandTextTrackPrivate and VideoTrackPrivate.
3965         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Renamed textTrackIndex() to trackIndex().
3966         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Same.
3967         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Renamed audioTrackIndex() to trackIndex().
3968         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Renamed videoTrackIndex() to trackIndex90.
3969
3970 2013-11-04  Andreas Kling  <akling@apple.com>
3971
3972         FrameView destructor is worried about being retained by a renderer.
3973         <https://webkit.org/b/123763>
3974
3975         There's no way we can be in ~FrameView() while also being owned by
3976         a RenderWidget. Remove some overly paranoid code that was making sure
3977         the renderer didn't have a reference on us.
3978
3979         Reviewed by Anders Carlsson.
3980
3981 2013-11-04  Eric Carlson  <eric.carlson@apple.com>
3982
3983         REGRESSION(r158311): media/media-fragments/TC0054.html and TC0061.html hit assertions
3984         https://bugs.webkit.org/show_bug.cgi?id=123555
3985
3986         Reviewed by Darin Adler.
3987
3988         No new tests, covered by existing tests.
3989
3990         * html/MediaFragmentURIParser.cpp:
3991         (WebCore::MediaFragmentURIParser::parseFragments): Don't add a fragment with empty key or value as
3992             they will not processed.
3993         (WebCore::MediaFragmentURIParser::parseNPTFragment): Remove excess whitespace.
3994
3995 2013-11-04  Patrick Gansterer  <paroga@webkit.org>
3996
3997         Remove code duplications in createFontCustomPlatformData()
3998         https://bugs.webkit.org/show_bug.cgi?id=123706
3999
4000         Reviewed by Darin Adler.
4001
4002         Move OpenTypeSanitizer and WOFF handling from the port specific
4003         implementations in createFontCustomPlatformData() into the only
4004         caller of this function CachedFont::ensureCustomFontData().
4005         Also change the parameter passing the SharedBuffer from a
4006         pointer to a reference since it is never null.
4007
4008         * loader/cache/CachedFont.cpp:
4009         (WebCore::CachedFont::ensureCustomFontData):
4010         * platform/graphics/blackberry/FontCustomPlatformData.h:
4011         * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp:
4012         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
4013         (WebCore::createFontCustomPlatformData):
4014         * platform/graphics/cairo/FontCustomPlatformData.h:
4015         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
4016         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
4017         (WebCore::createFontCustomPlatformData):
4018         * platform/graphics/mac/FontCustomPlatformData.cpp:
4019         (WebCore::createFontCustomPlatformData):
4020         * platform/graphics/mac/FontCustomPlatformData.h:
4021         * platform/graphics/win/FontCustomPlatformData.cpp:
4022         (WebCore::createFontCustomPlatformData):
4023         * platform/graphics/win/FontCustomPlatformData.h:
4024         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
4025         (WebCore::createFontCustomPlatformData):
4026         * platform/graphics/wince/FontCustomPlatformData.cpp:
4027         (WebCore::createFontCustomPlatformData):
4028         * platform/graphics/wince/FontCustomPlatformData.h:
4029
4030 2013-11-04  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
4031
4032         Fixing MediaStreamDescriptor addSource and addTrack methods
4033         https://bugs.webkit.org/show_bug.cgi?id=123755
4034
4035         Reviewed by Eric Carlson.
4036
4037         We must store the track and source that is passed as parameter in a RefPtr,
4038         otherwise we will refer to a null pointer.
4039
4040         No new tests needed.
4041
4042         * platform/mediastream/MediaStreamDescriptor.cpp: