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