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