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