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