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