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