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