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