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