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