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