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