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