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