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