Nothing should return std::unique_ptr<InlineBox>.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-06  Andreas Kling  <akling@apple.com>
2
3         Nothing should return std::unique_ptr<InlineBox>.
4         <https://webkit.org/b/123936>
5
6         Made RenderBox, RenderLineBreak and RenderListMarker return tightly
7         typed InlineElementBoxes instead.
8
9         Reviewed by Anders Carlsson.
10
11 2013-11-06  Daniel Bates  <dabates@apple.com>
12
13         [iOS] Upstream Letterpress effect
14         https://bugs.webkit.org/show_bug.cgi?id=123932
15
16         Reviewed by Sam Weinig.
17
18         Test: platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html
19
20         * Configurations/FeatureDefines.xcconfig: Add feature define ENABLE_LETTERPRESS disabled
21         by default. We only enable letterpress on iOS.
22         * css/CSSComputedStyleDeclaration.cpp:
23         (WebCore::renderTextDecorationFlagsToCSSValue): Add support for CSS value -webkit-letterpress.
24         * css/CSSParser.cpp:
25         (WebCore::CSSParser::parseTextDecoration): Ditto.
26         * css/CSSPrimitiveValueMappings.h:
27         (WebCore::CSSPrimitiveValue::operator TextDecoration): Ditto.
28         * css/CSSValueKeywords.in: Added CSS value -webkit-letterpress.
29         * platform/graphics/GraphicsContext.h:
30         * platform/graphics/mac/FontMac.mm:
31         (WebCore::fillVectorWithHorizontalGlyphPositions): Added.
32         (WebCore::shouldUseLetterpressEffect): Added.
33         (WebCore::showLetterpressedGlyphsWithAdvances): Added.
34         (WebCore::showGlyphsWithAdvances): Modified to call showLetterpressedGlyphsWithAdvances()
35         to show a letterpressed glyph. I also included additional iOS-specific changes.
36         (WebCore::Font::drawGlyphs):
37         * rendering/TextPaintStyle.cpp:
38         (WebCore::TextPaintStyle::TextPaintStyle): 
39         (WebCore::computeTextPaintStyle): Modified to compute letterpress effect style.
40         (WebCore::updateGraphicsContext): Modified to apply/unapply letterpress effect drawing mode.
41         * rendering/TextPaintStyle.h:
42         * rendering/style/RenderStyleConstants.h:
43
44 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
45
46         Crash in SliderThumbElement::dragFrom
47         https://bugs.webkit.org/show_bug.cgi?id=123873
48
49         Reviewed by Sam Weinig.
50
51         Moved Ref.
52
53         * html/RangeInputType.cpp:
54         (WebCore::RangeInputType::handleMouseDownEvent):
55         * html/shadow/SliderThumbElement.cpp:
56         (WebCore::SliderThumbElement::dragFrom):
57
58 2013-11-06  Daniel Bates  <dabates@apple.com>
59
60         Cleanup FontMac.mm
61         https://bugs.webkit.org/show_bug.cgi?id=123928
62
63         Reviewed by Andy Estes.
64
65         * platform/graphics/mac/FontMac.mm:
66         (WebCore::showGlyphsWithAdvances): Inline the value of variable isVertical as we
67         reference it exactly once and its value is sufficiently clear.
68         (WebCore::Font::drawGlyphs): Remove default case in switch block so that the compiler
69         checks that all cases are covered. Move definition of platformData to the top of the
70         function and use it whenever we want to access the platform font data
71
72 2013-11-06  Brent Fulgham  <bfulgham@apple.com>
73
74         [WebGL] We should not allow generateMipMap on compressed textures
75         https://bugs.webkit.org/show_bug.cgi?id=123915
76         <rdar://problem/15201274>
77
78         Reviewed by Dean Jackson.
79
80         Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html
81
82         * html/canvas/WebGLRenderingContext.cpp:
83         (WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
84         (WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
85         (WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
86         of compressed flag and generate appropriate WebGL error if necessary.
87         * html/canvas/WebGLTexture.cpp:
88         (WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
89         (WebCore::WebGLTexture::isCompressed): Added
90         (WebCore::WebGLTexture::setCompressed): Added
91         * html/canvas/WebGLTexture.h:
92         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
93         (WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
94         glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.
95
96 2013-11-06  Joseph Pecoraro  <pecoraro@apple.com>
97
98         Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
99         https://bugs.webkit.org/show_bug.cgi?id=123925
100
101         Reviewed by Timothy Hatcher.
102
103         * CMakeLists.txt:
104         * DerivedSources.make:
105         * GNUmakefile.am:
106
107 2013-11-06  Bem Jones-Bey  <bjonesbe@adobe.com>
108
109         Rename region line offset methods
110         https://bugs.webkit.org/show_bug.cgi?id=123897
111
112         Reviewed by Sam Weinig.
113
114         Because of the large number of overloads on the line offset methods,
115         it is very hard to read code using them, which also makes it harder to
116         move them out of RenderBlock. This patch renames the methods that take
117         a region as an argument to make it clearer when looking at the code
118         how the differ from the ones that don't.
119
120         No new tests, no behavior change.
121
122         * rendering/RenderBlock.cpp:
123         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
124         * rendering/RenderBlock.h:
125         (WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
126         (WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
127         (WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
128         (WebCore::RenderBlock::startOffsetForLineInRegion):
129         (WebCore::RenderBlock::endOffsetForLineInRegion):
130         (WebCore::RenderBlock::availableLogicalWidthForLine):
131         * rendering/RenderBox.cpp:
132         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
133         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
134
135 2013-11-06  Antti Koivisto  <antti@apple.com>
136
137         HTMLCollection should use CollectionIndexCache
138         https://bugs.webkit.org/show_bug.cgi?id=123906
139
140         Reviewed by Ryosuke Niwa.
141         
142         More code sharing.
143
144         * bindings/js/JSDOMWindowCustom.cpp:
145         (WebCore::namedItemGetter):
146         * bindings/js/JSHTMLDocumentCustom.cpp:
147         (WebCore::JSHTMLDocument::nameGetter):
148         * dom/ChildNodeList.h:
149         * dom/CollectionIndexCache.h:
150         (WebCore::::nodeBeforeCached):
151         (WebCore::::nodeAfterCached):
152         (WebCore::::nodeAt):
153             
154             Add a mechanism for disabling use of backward traversal.
155
156         * dom/LiveNodeList.h:
157         (WebCore::LiveNodeList::collectionCanTraverseBackward):
158         * html/HTMLCollection.cpp:
159         (WebCore::HTMLCollection::HTMLCollection):
160         (WebCore::isMatchingElement):
161         (WebCore::HTMLCollection::iterateForPreviousElement):
162         (WebCore::firstMatchingElement):
163         (WebCore::nextMatchingElement):
164         (WebCore::HTMLCollection::length):
165         (WebCore::HTMLCollection::item):
166         (WebCore::nameShouldBeVisibleInDocumentAll):
167         (WebCore::firstMatchingChildElement):
168         (WebCore::nextMatchingSiblingElement):
169         (WebCore::HTMLCollection::firstElement):
170         (WebCore::HTMLCollection::traverseForward):
171         (WebCore::HTMLCollection::collectionFirst):
172         (WebCore::HTMLCollection::collectionLast):
173         (WebCore::HTMLCollection::collectionTraverseForward):
174         (WebCore::HTMLCollection::collectionTraverseBackward):
175         (WebCore::HTMLCollection::invalidateCache):
176         (WebCore::HTMLCollection::namedItem):
177         (WebCore::HTMLCollection::updateNameCache):
178         * html/HTMLCollection.h:
179         (WebCore::HTMLCollection::collectionCanTraverseBackward):
180         
181             Disable use of backward traversal for collections that use custom traversal.
182
183 2013-11-06  Brendan Long  <b.long@cablelabs.com>
184
185         Add "id" attribute to TextTrack
186         https://bugs.webkit.org/show_bug.cgi?id=123825
187
188         Reviewed by Eric Carlson.
189
190         Test: media/track/track-id.html
191
192         * html/HTMLMediaElement.cpp:
193         (HTMLMediaElement::addTextTrack): Add emptyString() for track id.
194         * html/track/AudioTrack.cpp:
195         (WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
196         (WebCore::AudioTrack::idChanged): Added, set id.
197         * html/track/AudioTrack.h: Move m_id to TrackBase.
198         * html/track/InbandTextTrack.cpp:
199         (WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
200         (WebCore::InbandTextTrack::idChanged): Added, set id.
201         * html/track/InbandTextTrack.h: Add idChanged().
202         * html/track/LoadableTextTrack.cpp:
203         (WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
204         (WebCore::LoadableTextTrack::id): Override to return the track element's id.
205         * html/track/TextTrack.cpp:
206         (WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
207         (WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
208         (WebCore::TextTrack::TextTrack): Pass id to TrackBase.
209         * html/track/TextTrack.h:
210         (WebCore::TextTrack::create): Add id parameter.
211         * html/track/TextTrack.idl: Add id attribute.
212         * html/track/TrackBase.cpp:
213         (WebCore::TrackBase::TrackBase): Add m_id.
214         * html/track/TrackBase.h: Add id attribute / m_id.
215         * html/track/VideoTrack.cpp:
216         (WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
217         (WebCore::VideoTrack::idChanged): Added, set id.
218         * html/track/VideoTrack.h: Move m_id to TrackBase.
219         * platform/graphics/TrackPrivateBase.h: Add idChanged() callback.
220
221 2013-11-06  Antti Koivisto  <antti@apple.com>
222
223         Move array position caching out from HTMLCollection
224         https://bugs.webkit.org/show_bug.cgi?id=123895
225
226         Reviewed by Darin Adler.
227
228         This caching complicates the logic but is used by a single subclass
229         (HTMLFormControlsCollection) only. The subclass can do the caching itself.
230
231         * html/HTMLAllCollection.cpp:
232         (WebCore::HTMLAllCollection::HTMLAllCollection):
233         * html/HTMLCollection.cpp:
234         (WebCore::HTMLCollection::HTMLCollection):
235         (WebCore::HTMLCollection::create):
236         (WebCore::HTMLCollection::item):
237         (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
238         (WebCore::HTMLCollection::firstElement):
239         
240             Renamed from traverseFirstElement.
241
242         (WebCore::HTMLCollection::traverseForwardToOffset):
243         (WebCore::HTMLCollection::invalidateCache):
244         
245             Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.
246
247         (WebCore::HTMLCollection::namedItem):
248         (WebCore::HTMLCollection::updateNameCache):
249         
250             Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.
251
252         * html/HTMLCollection.h:
253         (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
254         
255             Renamed the enum and the accessor to be more informative.
256
257         (WebCore::HTMLCollection::setCachedElement):
258         (WebCore::HTMLCollection::customElementAfter):
259         
260             Renamed from virtualItemAfter.
261
262         * html/HTMLFormControlsCollection.cpp:
263         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
264         (WebCore::findFormAssociatedElement):
265         (WebCore::HTMLFormControlsCollection::customElementAfter):
266         
267             Move the array position caching logic here.
268
269         (WebCore::HTMLFormControlsCollection::invalidateCache):
270         * html/HTMLFormControlsCollection.h:
271         * html/HTMLNameCollection.cpp:
272         (WebCore::HTMLNameCollection::HTMLNameCollection):
273         * html/HTMLOptionsCollection.cpp:
274         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
275         * html/HTMLTableRowsCollection.cpp:
276         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
277         (WebCore::HTMLTableRowsCollection::customElementAfter):
278         * html/HTMLTableRowsCollection.h:
279
280 2013-11-06  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
281
282         [ATK] accessibility/title-ui-element-correctness.html fails
283         https://bugs.webkit.org/show_bug.cgi?id=99825
284
285         Reviewed by Mario Sanchez Prada.
286
287         When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
288         is added, adding proper label element as a relation. When the document structure
289         has been changed and a different label should be linked as a relation, current ATK
290         implementation adds it as a next target on relation's target list, while
291         WTR/DumpRenderTree implementation takes only first one into account.
292         This patch adds a new function removing current relations before adding new ones.
293
294         Covered by existing tests.
295
296         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
297         (removeAtkRelationFromRelationSetByType):
298         (setAtkRelationSetFromCoreObject):
299
300 2013-11-06  Daniel Bates  <dabates@apple.com>
301
302         Add ENABLE(TEXT_SELECTION)
303         https://bugs.webkit.org/show_bug.cgi?id=123827
304
305         Reviewed by Ryosuke Niwa.
306
307         Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
308         disable selection painting in WebCore (enabled by default).
309
310         On iOS we disable WebCore selection painting and have UIKit
311         paint the selection.
312
313         * rendering/InlineTextBox.cpp:
314         (WebCore::InlineTextBox::paintSelection): Only paint selection when
315         TEXT_SELECTION is enabled.
316         * rendering/LogicalSelectionOffsetCaches.h:
317         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
318         For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
319         a FIXME comment to investigate the callers and either move the assertion
320         to the appropriate callers or structure the code such that we can remove
321         the assertion.
322         * rendering/RenderBlock.cpp:
323         (WebCore::RenderBlock::paintSelection): Only paint selection when
324         TEXT_SELECTION is enabled.
325         * rendering/TextPaintStyle.cpp:
326         (WebCore::computeTextSelectionPaintStyle): Only compute the selection
327         paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
328         style identical to the text paint style. Also, substitute nullptr for 0.
329
330 2013-11-06  Jer Noble  <jer.noble@apple.com>
331
332         Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.
333
334         * rendering/RenderingAllInOne.cpp:
335
336 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
337
338         Unreviewed build fix, style() return type is now a reference.
339
340         * rendering/RenderGrid.cpp:
341         (WebCore::RenderGrid::resolveGridPositionFromStyle):
342
343 2013-11-06  Jer Noble  <jer.noble@apple.com>
344
345         Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.
346
347         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
348         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
349
350 2013-11-04  Jer Noble  <jer.noble@apple.com>
351
352         Playing many sounds with HTML5 Audio makes WebKit unresponsive
353         https://bugs.webkit.org/show_bug.cgi?id=116145
354
355         Reviewed by Eric Carlson.
356
357         Cache as much information as possible from AVPlayerItem to eliminate unneccesary
358         calls into AVFoundation.
359
360         Add WillChange/DidChange functions to handle the results of KVO notifications
361         from AVPlayerItem and AVPlayer:
362         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
363         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
364         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
365         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
366         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
367         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
368         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
369         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
370         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
371         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
372         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
373         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
374         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
375         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
376         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
377         (WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
378         (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
379         (WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
380         (WebCore::itemKVOProperties):
381         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
382
383         Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
384         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
385         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):
386
387         Add and initialize member variables to hold these cached values:
388         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
389         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
390         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
391         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
392
393         Add a new Notification type which can take (and call) a Function object:
394         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
395         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
396         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
397         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
398         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
399
400         Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
401         properties:
402         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
403         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
404         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
405         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
406         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
407         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
408         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
409         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
410         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
411         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
412         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
413         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
414         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
415         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
416         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
417         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
418
419         Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
420         correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
421         * html/HTMLMediaElement.cpp:
422         (HTMLMediaElement::setReadyState):
423
424 2013-10-24  Sergio Villar Senin  <svillar@igalia.com>
425
426         [CSS Grid Layout] Add support for named grid areas
427         https://bugs.webkit.org/show_bug.cgi?id=120045
428
429         Reviewed by Andreas Kling.
430
431         From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>
432
433         Added support for named grid areas. Basically a named grid area is
434         now a valid grid position. The shorthand parsing of grid-area was
435         split from the grid-{row|column} as the rules for expanding are
436         slightly different.
437
438         Unknown grid area names are treated as 'auto' as per the
439         specification. This means that for those cases we need to trigger
440         the auto-placement algorithm.
441
442         Tests: fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
443                fast/css-grid-layout/grid-item-named-grid-area-resolution.html
444
445         * css/CSSComputedStyleDeclaration.cpp:
446         (WebCore::valueForGridPosition):
447         * css/CSSParser.cpp:
448         (WebCore::CSSParser::parseValue):
449         (WebCore::CSSParser::parseGridPosition):
450         (WebCore::gridMissingGridPositionValue):
451         (WebCore::CSSParser::parseGridItemPositionShorthand):
452         (WebCore::CSSParser::parseGridAreaShorthand):
453         (WebCore::CSSParser::parseSingleGridAreaLonghand):
454         * css/CSSParser.h:
455         * css/StyleResolver.cpp:
456         (WebCore::StyleResolver::adjustRenderStyle):
457         (WebCore::StyleResolver::adjustGridItemPosition):
458         (WebCore::createGridPosition):
459         * css/StyleResolver.h:
460         * rendering/RenderGrid.cpp:
461         (WebCore::RenderGrid::resolveGridPositionFromStyle):
462         * rendering/style/GridPosition.h:
463         (WebCore::GridPosition::isNamedGridArea):
464         (WebCore::GridPosition::setNamedGridArea):
465         (WebCore::GridPosition::namedGridLine):
466
467 2013-11-06  Chris Fleizach  <cfleizach@apple.com>
468
469         AX: Audio and Video attachments are not output to VoiceOver
470         https://bugs.webkit.org/show_bug.cgi?id=123479
471
472         Reviewed by Mario Sanchez Prada.
473
474         Video and audio elements don't appear as distinct objects in the AX hierarchy,
475         nor are they treated as replaceable objects when emitting the text. We should
476         treat these characters like attachments, for one. On the Mac platform, we should
477         also identify them with special subroles.
478
479         Tests: platform/mac/accessibility/media-emits-object-replacement.html
480                platform/mac/accessibility/media-role-descriptions.html
481
482         * accessibility/AccessibilityNodeObject.cpp:
483         (WebCore::AccessibilityNodeObject::isGenericFocusableElement):
484         * accessibility/AccessibilityObject.h:
485         * accessibility/AccessibilityRenderObject.cpp:
486         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
487         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
488         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
489         (createAccessibilityRoleMap):
490         (-[WebAccessibilityObjectWrapper subrole]):
491         (-[WebAccessibilityObjectWrapper roleDescription]):
492         * editing/TextIterator.cpp:
493         (WebCore::isRendererReplacedElement):
494
495
496 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
497
498         Notify nodes removal to Range/Selection after dispatching blur and mutation event
499         https://bugs.webkit.org/show_bug.cgi?id=123880
500
501         Reviewed by Andreas Kling.
502
503         Merge https://chromium.googlesource.com/chromium/blink/+/b60576a0560d14f8757e58d55d37b7cefa48a6ac
504
505         In willRemoveChildren in ContainerNode.cpp, call Document::nodeChildrenWillBeRemoved after instead of
506         before dispatching mutation events because we need to update ranges created by those mutation event
507         listeners. willRemoveChild was fixed in r115686.
508
509         Tests: editing/selection/selection-change-in-blur-event-by-remove-children.html
510                editing/selection/selection-change-in-mutation-event-by-remove-children.html
511                fast/dom/Range/range-created-during-remove-children.html
512
513         * dom/ContainerNode.cpp:
514         (WebCore::willRemoveChildren):
515
516 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
517
518         Fix out-of-date offset in selection range code in range.surroundContents
519         https://bugs.webkit.org/show_bug.cgi?id=123871
520
521         Reviewed by Andreas Kling.
522         
523         Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
524
525         The code in Range::insertNode assumeed that the start offset of the selection range within its container
526         doesn't change across a call to insertBefore on the container but this is wrong. This patch recomputes
527         the start offset when it is used after the insertBefore call.
528
529         Test: editing/selection/range-surroundContents-with-preceding-node.html
530
531         * dom/Range.cpp:
532         (WebCore::Range::insertNode):
533
534 2013-11-06  Andreas Kling  <akling@apple.com>
535
536         Add InlineElementBox and stop instantiating InlineBox directly.
537         <https://webkit.org/b/123882>
538
539         Make the InlineBox constructors protected and add a new class
540         called InlineElementBox on top. This is somewhat analogous to the
541         split between RenderText and RenderElement, and allows us to make
542         renderer() return a far tighter RenderBoxModelObject& instead
543         of a RenderObject&.
544
545         Moved over attachLine(), deleteLine() and extractLine() to start
546         things off. More things will follow.
547
548         Reviewed by Antti Koivisto.
549
550 2013-11-06  Piotr Grad  <p.grad@samsung.com>
551
552         Seek for video doesn't work when playback rate is negative
553         https://bugs.webkit.org/show_bug.cgi?id=123791
554
555         In MediaPlayerPrivateGStreamer::seek negative playback rate was not taken to account.
556
557         Reviewed by Philippe Normand.
558
559         Test: media/video-seek-with-negative-playback.html
560
561         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
562         (WebCore::MediaPlayerPrivateGStreamer::seek):
563
564 2013-11-06  Andreas Kling  <akling@apple.com>
565
566         Reinstate an annoying assertion that I accidentally commented out.
567
568         * loader/icon/IconDatabase.cpp:
569         (WebCore::IconDatabase::synchronousIconForPageURL):
570
571 2013-11-06  Brendan Long  <b.long@cablelabs.com>
572
573         [GStreamer] Override label() and language() in Audio and VideoTrackPrivateGStreamer
574         https://bugs.webkit.org/show_bug.cgi?id=123836
575
576         The tests are currently flakey because we only get the label and language if we get
577         tags after the track client is set.
578
579         Reviewed by Philippe Normand.
580
581         No new tests because the tests already exist (this fixes flakeyness).
582
583         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Override label() and language() to use m_label and m_language.
584         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same.
585         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Make m_label and m_language protected so they can be used in the functions above.
586
587 2013-11-05  Andreas Kling  <akling@apple.com>
588
589         RenderBlockFlow should only expose its line boxes as RootInlineBox.
590         <https://webkit.org/b/123878>
591
592         The line boxes attached directly to a RenderBlockFlow are always
593         RootInlineBox objects, so call sites should always use the tightly
594         typed firstRootBox() and lastRootBox().
595
596         This allows the compiler to devirtualize calls to member functions
597         of RootInlineBox that are marked FINAL.
598
599         Reviewed by Antti Koivisto.
600
601 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
602
603         Assertion failure end < m_runCount in WebCore::BidiRunList<WebCore::BidiRun>::reverseRuns
604         https://bugs.webkit.org/show_bug.cgi?id=123863
605
606         Reviewed by Andreas Kling.
607
608         Merge https://chromium.googlesource.com/chromium/blink/+/cbaa92c763a37d89eeabd01658e522219299290c
609
610         Test: fast/text/bidi-reverse-runs-crash.html
611
612         * platform/text/BidiResolver.h:
613         (WebCore::BidiResolver<Iterator, Run>::createBidiRunsForLine): Don't reverse the runs if there's
614         nothing to be reversed.
615
616 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
617
618         Address the review comment after r158724.
619
620         * html/RangeInputType.cpp:
621         (WebCore::RangeInputType::handleMouseDownEvent):
622
623 2013-11-05  Zalan Bujtas  <zalan@apple.com>
624
625         Widget's position change should not initiate layout, only when its size changes.
626         https://bugs.webkit.org/show_bug.cgi?id=123860
627
628         Reviewed by Andreas Kling.
629
630         RenderWidgets initiate unnecessary layouts while scrolling when they are embedded to
631         overflow:scroll containers. Scroll position change doesn't dirty the render tree
632         so it should not trigger layout either.
633
634         Manual test added. Unfortunately we can't test against the number of layouts yet.
635
636         * rendering/RenderWidget.cpp:
637         (WebCore::RenderWidget::setWidgetGeometry):
638         (WebCore::RenderWidget::updateWidgetGeometry):
639         (WebCore::RenderWidget::updateWidgetPosition):
640
641 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
642
643         Use-after-free in SliderThumbElement::dragFrom
644         https://bugs.webkit.org/show_bug.cgi?id=123873
645
646         Reviewed by Andreas Kling.
647
648         Ref the SliderThumbElement since it could go away inside dragFrom.
649
650         Test: fast/forms/range/range-type-change-onchange-2.html
651
652         * html/RangeInputType.cpp:
653         (WebCore::RangeInputType::handleMouseDownEvent):
654
655 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
656
657         Change the order of conditions to avoid computing rendererIsEditable()
658         https://bugs.webkit.org/show_bug.cgi?id=123868
659
660         Reviewed by Andreas Kling.
661
662         Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
663
664         When we need both Node::renderer() and Node::rendererIsEditable() conditions to be true to perform
665         some operation, it is more effective to check for renderer() first, so that if this condition fails
666         we can avoid unnecessary computation of rendererIsEditable().
667
668         * dom/Position.cpp:
669         (WebCore::nextRenderedEditable):
670         (WebCore::previousRenderedEditable):
671         * page/EventHandler.cpp:
672         (WebCore::EventHandler::handleMouseReleaseEvent):
673
674 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
675
676         simpleUserAgentStyleSheet doesn't have focus ring on anchor element
677         https://bugs.webkit.org/show_bug.cgi?id=123867
678
679         Reviewed by Andreas Kling.
680
681         Merge https://chromium.googlesource.com/chromium/blink/+/08ecc23c4d80be9969918c4baf0ac83dc6cb6cbd
682
683         * css/CSSDefaultStyleSheets.cpp:
684
685 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
686
687         valueForBorderRadiusShorthand returns wrong values in some case
688         https://bugs.webkit.org/show_bug.cgi?id=123866
689
690         Reviewed by Andreas Kling.
691
692         Merge https://chromium.googlesource.com/chromium/blink/+/0933728126f2db06ab8e945efc98bffa2d42af1c
693
694         Because valueForBorderRadiusShorthand misses the followings:
695         - showHorizontalBottomRight depends on showHorizontalBottomLeft.
696         - showHorizontalTopRight depends on showHorizontalBottomRight (including showHorizontalBottomLeft).
697
698         See also http://dev.w3.org/csswg/css-backgrounds/#the-border-radius
699
700         Test: fast/css/getComputedStyle/getComputedStyle-borderRadius-2.html
701
702         * css/CSSComputedStyleDeclaration.cpp:
703         (WebCore::getBorderRadiusShorthandValue):
704
705 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
706
707         Protect DOM nodes in IndentOutdentCommand::tryIndentingAsListItem()
708         https://bugs.webkit.org/show_bug.cgi?id=123861
709
710         Reviewed by Benjamin Poulain.
711
712         Merge https://chromium.googlesource.com/chromium/blink/+/297442eb539a2b764fdad323de79099a70179186 partially.
713
714         * editing/IndentOutdentCommand.cpp:
715         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Make selectedListItem, previousList, and nextList
716         RefPtr since they're are used after calling insertNodeBefore.
717
718 2013-11-05  Andreas Kling  <akling@apple.com>
719
720         Apply more unique_ptr to line box management.
721         <https://webkit.org/b/123857>
722
723         Make all of the functions that return newly-created line boxes
724         return them packed up in std::unique_ptrs.
725
726         There is one exception in RenderBlockLineLayout where the function
727         createInlineBoxForRenderer() is inconsistent about the ownership of
728         the returned object. This will be addressed by a subsequent patch.
729
730         We now "release" the line boxes into their various home structures,
731         so the pointer smartness doesn't go end-to-end just yet.
732
733         Reviewed by Anders Carlsson.
734
735 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
736
737         getComputedStyle(x).lineHeight is affected by zooming
738         https://bugs.webkit.org/show_bug.cgi?id=123847
739
740         Reviewed by Benjamin Poulain.
741
742         Merge https://chromium.googlesource.com/chromium/blink/+/7957097afbab2899ababd0d9c8acbf6e3eddb870
743
744         Test: fast/css/line-height-zoom-get-computed-style.html
745
746         * css/CSSComputedStyleDeclaration.cpp:
747         (WebCore::lineHeightFromStyle): Don't round line-height values.
748         * css/DeprecatedStyleBuilder.cpp:
749         (WebCore::ApplyPropertyLineHeight::applyValue): Use the computed value instead of the used value.
750
751 2013-11-05  James Craig  <jcraig@apple.com>
752
753         AX: media controls accessibility needs more work
754         https://bugs.webkit.org/show_bug.cgi?id=123749
755
756         Reviewed by Jer Noble.
757
758         Updated some of the control labels/roles to improve accessibility.
759           - Volume slider is now keyboard/screenreader accessible.
760           - muteButton was a checkbox toggling checked state, now a button that toggles label "mute/unmute"
761           - fullscreenButton was a checkbox toggling checked state, now a button that toggles label "display/exit full screen"
762           - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
763         Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
764         Render dump expectations changed because volume slider is now hidden via... 
765         ...opacity/size (to make accessible without hover) instead of display:none.
766
767         Updated existing test coverage.
768
769         * Modules/mediacontrols/mediaControlsApple.css:
770         (audio::-webkit-media-controls-panel .volume-box):
771         (audio::-webkit-media-controls-panel .volume-box:active):
772         (audio::-webkit-media-controls-toggle-closed-captions-button):
773         (audio::-webkit-media-controls-closed-captions-container .list):
774         (audio::-webkit-media-controls-closed-captions-container li:focus):
775         * Modules/mediacontrols/mediaControlsApple.js:
776         (Controller.prototype.createControls):
777         (Controller.prototype.handleFullscreenChange):
778         (Controller.prototype.handleMuteButtonClicked):
779         (Controller.prototype.handleMinButtonClicked):
780         (Controller.prototype.handleMaxButtonClicked):
781         (Controller.prototype.handleVolumeSliderChange):
782         (Controller.prototype.buildCaptionMenu):
783         (Controller.prototype.focusSiblingCaptionItem):
784         (Controller.prototype.handleCaptionItemKeyUp):
785
786 2013-11-05  Andreas Kling  <akling@apple.com>
787
788         Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
789         <https://webkit.org/b/123845>
790
791         All RenderWidgets representing plugins will be RenderEmbeddedObjects.
792         Move some of the plugin-specific logic to RenderEmbeddedObject since it
793         doesn't make sense for all RenderWidgets (frames, embedded documents)
794         to care about this.
795
796         Reviewed by Anders Carlsson.
797
798 2013-11-05  Tim Horton  <timothy_horton@apple.com>
799
800         Fix the 32-bit build.
801
802         * WebCore.exp.in:
803
804 2013-11-05  Alexandru Chiculita  <achicu@adobe.com>
805
806         Web Inspector: Moving an element while in the DOMNodeRemoved handler will hide it in the inspector
807         https://bugs.webkit.org/show_bug.cgi?id=123516
808
809         Reviewed by Timothy Hatcher.
810
811         InspectorInstrumentation::willRemoveDOMNode was actually calling both willRemoveDOMNodeImpl and
812         didRemoveDOMNodeImpl, making the DOMAgent unbind the element even if it was still part of the DOM.
813
814         Because of that the DOMAgent was sending two events:
815         1. When the element was about to be removed, just before JS "DOMNodeRemoved" was triggered.
816         2. When the element was actually removed.
817
818         Note that inspector's event #2 will not know about the node, as it just removed it from the
819         internal hashmap, so it will just use a nodeID == 0 for it.
820
821         This patch adds a separate call to InspectorInstrumentation::didRemoveDOMNode, just before the
822         element is about to be removed. The InspectorInstrumentation::willRemoveDOMNode call is now only used
823         by the DOMDebugger to trigger the DOM breakpoints in the Web Inspector. That feature is not exposed
824         in the new Inspector UI, but can be used/tested using the protocol directly.
825
826         Tests: inspector-protocol/dom-debugger/node-removed.html
827                inspector-protocol/dom/dom-remove-events.html
828                inspector-protocol/dom/remove-multiple-nodes.html
829
830         * dom/ContainerNode.cpp:
831         (WebCore::ContainerNode::removeBetween):
832         * inspector/InspectorInstrumentation.h:
833         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
834         (WebCore::InspectorInstrumentation::didRemoveDOMNode):
835
836 2013-11-05  Ryuan Choi  <ryuan.choi@samsung.com>
837
838         Unreviewed build fix on CMake based ports with GLES.
839
840         * CMakeLists.txt:
841         Added OPENGLES2_LIBRARIES and OPENGLES2_INCLUDE_DIR into the includes and
842         libraries list.
843
844 2013-11-05  Tim Horton  <timothy_horton@apple.com>
845
846         platformCALayerDeviceScaleFactor should be const
847         https://bugs.webkit.org/show_bug.cgi?id=123842
848
849         Reviewed by Simon Fraser.
850
851         * WebCore.exp.in:
852         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
853         (WebCore::LayerClient::platformCALayerDeviceScaleFactor):
854         * platform/graphics/ca/GraphicsLayerCA.cpp:
855         (WebCore::GraphicsLayerCA::platformCALayerDeviceScaleFactor):
856         * platform/graphics/ca/GraphicsLayerCA.h:
857         * platform/graphics/ca/PlatformCALayerClient.h:
858         * platform/graphics/ca/mac/TileController.h:
859         * platform/graphics/ca/mac/TileController.mm:
860         (WebCore::TileController::platformCALayerDeviceScaleFactor):
861         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
862         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDeviceScaleFactor):
863         Constify PlatformCALayerClient::platformCALayerDeviceScaleFactor.
864
865 2013-11-05  Gavin Barraclough  <barraclough@apple.com>
866
867         Subresource loads should not prevent page throttling
868         https://bugs.webkit.org/show_bug.cgi?id=123757
869
870         Reviewed by Alexey Proskuryakov.
871
872         The page-is-loading test for inhibiting process supression is currently
873         too conservative, preventing supression of pages with infinitely loading
874         resources (commonly XHRs). Instead, just rely on the FrameLoader being
875         active (with hysteresis).
876
877         * loader/SubresourceLoader.cpp:
878         (WebCore::SubresourceLoader::init):
879         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
880         (WebCore::SubresourceLoader::didFinishLoading):
881         (WebCore::SubresourceLoader::didFail):
882         (WebCore::SubresourceLoader::willCancel):
883         * loader/SubresourceLoader.h:
884             - remove m_activityAssertion from SubresourceLoader.
885
886 2013-11-05  Tim Horton  <timothy_horton@apple.com>
887
888         [mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
889         https://bugs.webkit.org/show_bug.cgi?id=123840
890         <rdar://problem/15308765>
891
892         Reviewed by Alexey Proskuryakov.
893
894         Test: fast/images/pdf-as-image-crop-box.html
895
896         * platform/graphics/cg/PDFDocumentImage.cpp:
897         (WebCore::PDFDocumentImage::size):
898         Use the crop box when determining the size of the image.
899
900         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
901         * platform/graphics/cg/PDFDocumentImage.h:
902         * platform/graphics/mac/PDFDocumentImageMac.mm:
903         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
904         Get rid of m_mediaBox, since we don't need it anymore.
905
906         (WebCore::PDFDocumentImage::drawPDFPage):
907         PDFKit does the translation by the crop box origin for us;
908         if we do it additionally, we'll be painting the wrong part of the image.
909         So, don't do the translation here.
910
911 2013-11-05  Antti Koivisto  <antti@apple.com>
912
913         Factor index cache for NodeLists and HTMLCollections to a class
914         https://bugs.webkit.org/show_bug.cgi?id=123823
915
916         Reviewed by Ryosuke Niwa.
917
918         Implement index cache class that can used by NodeLists and HTMLCollections that currently
919         each have implementations of their own.
920         
921         This patch also implements ChildNodeList and LiveNodeList using CollectionIndexCache.
922         HTMLCollection is will be transitioned later.
923
924         * GNUmakefile.list.am:
925         * WebCore.vcxproj/WebCore.vcxproj:
926         * WebCore.xcodeproj/project.pbxproj:
927         * dom/ChildNodeList.cpp:
928         (WebCore::ChildNodeList::ChildNodeList):
929         (WebCore::ChildNodeList::length):
930         (WebCore::ChildNodeList::item):
931         
932             The client calls to cache to for indexed and size access.
933
934         (WebCore::ChildNodeList::collectionFirst):
935         (WebCore::ChildNodeList::collectionLast):
936         (WebCore::ChildNodeList::collectionTraverseForward):
937         (WebCore::ChildNodeList::collectionTraverseBackward):
938         
939             Cache calls back to these as needed to do the actual traversal.
940
941         (WebCore::ChildNodeList::invalidateCache):
942         * dom/ChildNodeList.h:
943         * dom/CollectionIndexCache.h: Added.
944         
945             Templated cache class itself.
946
947         (WebCore::::CollectionIndexCache):
948         (WebCore::::nodeCount):
949         (WebCore::::nodeBeforeCached):
950         (WebCore::::nodeAfterCached):
951         (WebCore::::nodeAt):
952         (WebCore::::invalidate):
953         * dom/LiveNodeList.cpp:
954         (WebCore::firstMatchingElement):
955         (WebCore::nextMatchingElement):
956         (WebCore::traverseMatchingElementsForward):
957         (WebCore::LiveNodeList::collectionFirst):
958         (WebCore::LiveNodeList::collectionLast):
959         (WebCore::LiveNodeList::collectionTraverseForward):
960         (WebCore::LiveNodeList::collectionTraverseBackward):
961         (WebCore::LiveNodeList::length):
962         (WebCore::LiveNodeList::item):
963         (WebCore::LiveNodeList::invalidateCache):
964         * dom/LiveNodeList.h:
965         (WebCore::LiveNodeList::LiveNodeList):
966
967 2013-11-05  Enrica Casucci  <enrica@apple.com>
968
969         Full width semicolon is wrong in vertical text.
970         https://bugs.webkit.org/show_bug.cgi?id=123814
971         <rdar://problem/15312541>
972
973         Reviewed by Benjamin Poulain.
974
975         The full width semicolon should always be upright.
976         Adding it to the list of characters that should
977         ignore rotation.
978
979         * platform/graphics/FontGlyphs.cpp:
980         (WebCore::shouldIgnoreRotation):
981
982 2013-11-05  Andreas Kling  <akling@apple.com>
983
984         Remove unused RenderWidget::notifyWidget().
985
986         Rubber-stamped by Anders Carlsson.
987
988 2013-11-05  Commit Queue  <commit-queue@webkit.org>
989
990         Unreviewed, rolling out r158678.
991         http://trac.webkit.org/changeset/158678
992         https://bugs.webkit.org/show_bug.cgi?id=123820
993
994         Causes a new debug assertion failure on the Mavericks test
995         system. (Requested by bfulgham on #webkit).
996
997         * rendering/mathml/RenderMathMLOperator.cpp:
998
999 2013-11-05  Renata Hodovan  <reni@webkit.org>
1000
1001         ASSERTION FAILED: isHTMLTitleElement(m_titleElement.get()) in WebCore::Document::setTitle
1002         https://bugs.webkit.org/show_bug.cgi?id=122092
1003
1004         Reviewed by Darin Adler.
1005
1006         Remove a bogus assert in Document::setTitle().
1007         m_titleElement can be either of HTMLTitleElement or SVGTitleElement. The assertion was wrong.
1008         
1009         Backported from Blink:
1010         https://src.chromium.org/viewvc/blink?revision=158620&view=revision
1011
1012         Test: svg/custom/title-assertion.html
1013
1014         * dom/Document.cpp:
1015         (WebCore::Document::setTitle):
1016         * svg/SVGTitleElement.cpp:
1017         (WebCore::SVGTitleElement::insertedInto):
1018
1019 2013-11-05  Martin Robinson  <mrobinson@igalia.com>
1020
1021         [MathML] Poor spacing around delimiters in MathML Torture Test 14
1022         https://bugs.webkit.org/show_bug.cgi?id=122837
1023
1024         Reviewed by Brent Fulgham.
1025
1026         Instead of stretching the vertical bar with the stretchable version, just repeat
1027         the normal vertical bar. This follows what Gecko does when rendering tall vertical
1028         bars and also works around an issue with STIX fonts leading to poor spacing in
1029         formulas.
1030
1031         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
1032         normal variant.
1033
1034 2013-11-05  Daniel Bates  <dabates@apple.com>
1035
1036         XSSAuditor should catch reflected srcdoc properties even without a <frame> tag injection
1037
1038         From Blink r160615 by <tsepez@chromium.org>
1039         https://src.chromium.org/viewvc/blink?view=rev&revision=160615
1040
1041         Test: http/tests/security/xssAuditor/iframe-srcdoc-property-blocked.html
1042
1043         * html/parser/XSSAuditor.cpp:
1044         (WebCore::XSSAuditor::filterIframeToken):
1045
1046 2013-11-05  Éva Balázsfalvi  <balazsfalvi.eva@stud.u-szeged.hu>
1047
1048         Delete maketokenizer.
1049         https://bugs.webkit.org/show_bug.cgi?id=115155
1050
1051         Reviewed by Zoltan Herczeg.
1052
1053         This script was used to generate the old flex based CSS tokenizer. It
1054         was replaced by a custom tokenizer in r106217 but the script wasn't
1055         removed. Since there is no mention of it in the original bug nor any
1056         reference to maketokenizer in our build files, it's probably an
1057         oversight.
1058
1059         Merge from blink:
1060         https://chromium.googlesource.com/chromium/blink/+/2a1c8aaf867f707ccdcd8893446e907e2aa2e1c2
1061
1062         * css/maketokenizer: Removed.
1063
1064 2013-11-05  Zan Dobersek  <zdobersek@igalia.com>
1065
1066         Unreviewed. Unbreaking GCC builds.
1067
1068         * html/HTMLCollection.cpp:
1069         (WebCore::isMatchingElement): This inline function is not a template anymore.
1070
1071 2013-11-05  Antti Koivisto  <antti@apple.com>
1072
1073         Make it compile.
1074
1075         * dom/LiveNodeList.h:
1076         (WebCore::LiveNodeList::LiveNodeList):
1077         (WebCore::LiveNodeList::~LiveNodeList):
1078         * dom/NodeRareData.h:
1079         (WebCore::NodeListsNodeData::adoptDocument):
1080         * html/HTMLCollection.cpp:
1081         (WebCore::HTMLCollection::HTMLCollection):
1082         (WebCore::HTMLCollection::~HTMLCollection):
1083
1084 2013-11-05  Antti Koivisto  <antti@apple.com>
1085
1086         HTMLCollection should not be NodeList
1087         https://bugs.webkit.org/show_bug.cgi?id=123794
1088
1089         Reviewed by Andreas Kling.
1090
1091         HTMLCollection and NodeList are unrelated types in DOM yet our HTMLCollection inherits NodeList
1092         for code sharing reasons. While some code does get shared the types are sufficiently different 
1093         that this results in lots of unnecessary branches, complexity and general awkwardness. Code sharing 
1094         can be better achieved by means other than inheritance.
1095         
1096         This patch splits HTMLCollection from NodeList by copy-pasting and eliminating resulting redundancies. 
1097         Sharing comes later.
1098
1099         * dom/Attr.cpp:
1100         (WebCore::Attr::setValue):
1101         (WebCore::Attr::childrenChanged):
1102         * dom/ClassNodeList.cpp:
1103         (WebCore::ClassNodeList::~ClassNodeList):
1104         * dom/ContainerNode.cpp:
1105         (WebCore::ContainerNode::childrenChanged):
1106         (WebCore::ContainerNode::getElementsByTagName):
1107         (WebCore::ContainerNode::getElementsByName):
1108         (WebCore::ContainerNode::getElementsByClassName):
1109         (WebCore::ContainerNode::radioNodeList):
1110         * dom/Document.cpp:
1111         (WebCore::Document::Document):
1112         (WebCore::Document::~Document):
1113         (WebCore::Document::registerNodeList):
1114         (WebCore::Document::unregisterNodeList):
1115         (WebCore::Document::registerCollection):
1116         (WebCore::Document::unregisterCollection):
1117         (WebCore::Document::ensureCachedCollection):
1118         
1119             Add separate functions and map for registering HTMLCollections.
1120
1121         (WebCore::Document::all):
1122         (WebCore::Document::windowNamedItems):
1123         (WebCore::Document::documentNamedItems):
1124         * dom/Document.h:
1125         * dom/Element.cpp:
1126         (WebCore::Element::attributeChanged):
1127         (WebCore::Element::ensureCachedHTMLCollection):
1128         (WebCore::Element::cachedHTMLCollection):
1129         * dom/LiveNodeList.cpp:
1130         (WebCore::LiveNodeList::rootNode):
1131         (WebCore::isMatchingElement):
1132         (WebCore::LiveNodeList::iterateForPreviousElement):
1133         (WebCore::LiveNodeList::itemBefore):
1134         (WebCore::firstMatchingElement):
1135         (WebCore::nextMatchingElement):
1136         (WebCore::traverseMatchingElementsForwardToOffset):
1137         (WebCore::LiveNodeList::traverseLiveNodeListFirstElement):
1138         (WebCore::LiveNodeList::traverseLiveNodeListForwardToOffset):
1139         (WebCore::LiveNodeList::isLastItemCloserThanLastOrCachedItem):
1140         (WebCore::LiveNodeList::isFirstItemCloserThanCachedItem):
1141         (WebCore::LiveNodeList::length):
1142         (WebCore::LiveNodeList::item):
1143         (WebCore::LiveNodeList::elementBeforeOrAfterCachedElement):
1144         
1145             This code used to live in HTMLCollection.cpp. Copy-paste here and remove all branches not needed for NodeLists.
1146
1147         (WebCore::LiveNodeList::invalidateCache):
1148         
1149             NodeLists have no name caches.
1150
1151         * dom/LiveNodeList.h:
1152         (WebCore::LiveNodeList::LiveNodeList):
1153         (WebCore::LiveNodeList::~LiveNodeList):
1154         (WebCore::LiveNodeList::isRootedAtDocument):
1155         (WebCore::LiveNodeList::type):
1156         (WebCore::LiveNodeList::invalidateCache):
1157         (WebCore::LiveNodeList::setCachedElement):
1158         
1159             Merge LiveNodeListBase and LiveNodeList.
1160             Remove fields and code supporting HTMLCollection.
1161
1162         (WebCore::shouldInvalidateTypeOnAttributeChange):
1163         
1164             Move to global scope. This function is used both HTMLCollections and LiveNodeLists.
1165
1166         * dom/NameNodeList.cpp:
1167         (WebCore::NameNodeList::~NameNodeList):
1168         * dom/NameNodeList.h:
1169         (WebCore::NameNodeList::create):
1170         * dom/Node.cpp:
1171         (WebCore::shouldInvalidateNodeListCachesForAttr):
1172         (WebCore::Document::shouldInvalidateNodeListAndCollectionCaches):
1173         (WebCore::Document::invalidateNodeListAndCollectionCaches):
1174         (WebCore::Node::invalidateNodeListAndCollectionCachesInAncestors):
1175         (WebCore::NodeListsNodeData::invalidateCaches):
1176         * dom/Node.h:
1177         * dom/NodeRareData.h:
1178         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1179         (WebCore::NodeListsNodeData::addCacheWithName):
1180         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
1181         (WebCore::NodeListsNodeData::addCachedCollection):
1182         (WebCore::NodeListsNodeData::cachedCollection):
1183         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
1184         (WebCore::NodeListsNodeData::removeCacheWithName):
1185         (WebCore::NodeListsNodeData::removeCachedCollection):
1186         (WebCore::NodeListsNodeData::isEmpty):
1187         (WebCore::NodeListsNodeData::adoptDocument):
1188         (WebCore::NodeListsNodeData::namedCollectionKey):
1189         (WebCore::NodeListsNodeData::namedNodeListKey):
1190         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
1191         
1192             Add separate cache for HTMLCollections.
1193
1194         * dom/TagNodeList.cpp:
1195         (WebCore::TagNodeList::TagNodeList):
1196         (WebCore::TagNodeList::~TagNodeList):
1197         * dom/TagNodeList.h:
1198         (WebCore::TagNodeList::create):
1199         (WebCore::HTMLTagNodeList::create):
1200         * html/CollectionType.h:
1201         
1202             Remove NodeList types.
1203
1204         * html/HTMLCollection.cpp:
1205         (WebCore::shouldOnlyIncludeDirectChildren):
1206         (WebCore::rootTypeFromCollectionType):
1207         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
1208         (WebCore::HTMLCollection::HTMLCollection):
1209         (WebCore::HTMLCollection::~HTMLCollection):
1210         (WebCore::HTMLCollection::rootNode):
1211         (WebCore::isMatchingElement):
1212         (WebCore::HTMLCollection::iterateForPreviousElement):
1213         (WebCore::HTMLCollection::itemBefore):
1214         (WebCore::firstMatchingElement):
1215         (WebCore::nextMatchingElement):
1216         (WebCore::traverseMatchingElementsForwardToOffset):
1217         (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
1218         (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
1219         (WebCore::HTMLCollection::setCachedElement):
1220         (WebCore::HTMLCollection::length):
1221         (WebCore::HTMLCollection::item):
1222         (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
1223         (WebCore::HTMLCollection::traverseFirstElement):
1224         (WebCore::HTMLCollection::traverseNextElement):
1225         (WebCore::HTMLCollection::traverseForwardToOffset):
1226         (WebCore::HTMLCollection::invalidateCache):
1227         (WebCore::HTMLCollection::invalidateIdNameCacheMaps):
1228         (WebCore::HTMLCollection::namedItem):
1229         
1230             Remove NodeList specific branches and functions.
1231             LiveNodeListBase functions are now HTMLCollection functions.
1232
1233         * html/HTMLCollection.h:
1234         (WebCore::HTMLCollection::isRootedAtDocument):
1235         (WebCore::HTMLCollection::invalidationType):
1236         (WebCore::HTMLCollection::type):
1237         (WebCore::HTMLCollection::ownerNode):
1238         (WebCore::HTMLCollection::invalidateCache):
1239         (WebCore::HTMLCollection::document):
1240         (WebCore::HTMLCollection::overridesItemAfter):
1241         (WebCore::HTMLCollection::isElementCacheValid):
1242         (WebCore::HTMLCollection::cachedElement):
1243         (WebCore::HTMLCollection::cachedElementOffset):
1244         (WebCore::HTMLCollection::isLengthCacheValid):
1245         (WebCore::HTMLCollection::cachedLength):
1246         (WebCore::HTMLCollection::setLengthCache):
1247         (WebCore::HTMLCollection::setCachedElement):
1248         (WebCore::HTMLCollection::isItemRefElementsCacheValid):
1249         (WebCore::HTMLCollection::setItemRefElementsCacheValid):
1250         (WebCore::HTMLCollection::rootType):
1251         (WebCore::HTMLCollection::hasNameCache):
1252         (WebCore::HTMLCollection::setHasNameCache):
1253         
1254             Copy-paste functions and fields from former LiveNodeListBase.
1255
1256         * html/HTMLNameCollection.cpp:
1257         (WebCore::HTMLNameCollection::~HTMLNameCollection):
1258         * html/LabelableElement.cpp:
1259         (WebCore::LabelableElement::labels):
1260         * html/LabelsNodeList.cpp:
1261         (WebCore::LabelsNodeList::~LabelsNodeList):
1262         * html/LabelsNodeList.h:
1263         * html/RadioNodeList.cpp:
1264         (WebCore::RadioNodeList::~RadioNodeList):
1265         * html/RadioNodeList.h:
1266         (WebCore::RadioNodeList::create):
1267
1268 2013-11-05  Emilio Pozuelo Monfort  <pochu27@gmail.com>
1269
1270         [GTK] Add stubs for missing symbols in dom bindings
1271         https://bugs.webkit.org/show_bug.cgi?id=123663
1272
1273         Reviewed by Carlos Garcia Campos.
1274
1275         * bindings/gobject/WebKitDOMCustom.cpp:
1276         (webkit_dom_html_head_element_get_profile):
1277         (webkit_dom_html_head_element_set_profile):
1278         (webkit_dom_processing_instruction_get_data):
1279         (webkit_dom_processing_instruction_set_data):
1280         * bindings/gobject/WebKitDOMCustom.h:
1281         * bindings/gobject/WebKitDOMCustom.symbols:
1282
1283 2013-11-05  Zan Dobersek  <zdobersek@igalia.com>
1284
1285         Main thread tasks in ThreadableBlobRegistry should use std::unique_ptr
1286         https://bugs.webkit.org/show_bug.cgi?id=122946
1287
1288         Reviewed by Darin Adler.
1289
1290         The new BlobRegistryContext objects don't have to be adopted into OwnPtr and then have OwnPtr's leaked pointer
1291         passed into the WTF::callOnMainThread call - the pointer to the new heap-allocated object is passed in directly,
1292         with the object ending up being managed by std::unique_ptr in the designated main thread task.
1293
1294         * fileapi/ThreadableBlobRegistry.cpp:
1295         (WebCore::registerBlobURLTask):
1296         (WebCore::ThreadableBlobRegistry::registerBlobURL):
1297         (WebCore::registerBlobURLFromTask):
1298         (WebCore::unregisterBlobURLTask):
1299         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
1300
1301 2013-11-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1302
1303         [CSS] Enable css-image-orientation on EFL and GTK ports.
1304         https://bugs.webkit.org/show_bug.cgi?id=123698
1305
1306         Reviewed by Beth Dakin.
1307
1308         r157909 added wrong early return for css-image-orientation. It causes about 20 regressions in layout test
1309         when enabling css-image-orientation. This fixes those wrong implementation as well as enables it on EFL
1310         and GTK ports by default.
1311
1312         Test: fast/css/image-orientation/image-orientation.html
1313
1314         * loader/cache/CachedImage.cpp:
1315         (WebCore::CachedImage::imageSizeForRenderer):
1316         * platform/graphics/BitmapImage.cpp:
1317         (WebCore::BitmapImage::updateSize):
1318
1319 2013-11-05  Andreas Kling  <akling@apple.com>
1320
1321         RenderEmbeddedObject shouldn't know about fallback content.
1322         <https://webkit.org/b/123781>
1323
1324         Stop caching the presence of fallback (DOM) content in a flag on
1325         RenderEmbeddedObject and have SubframeLoader fetch it directly from
1326         HTMLObjectElement instead.
1327
1328         Also made SubframeLoader::requestObject() take the owner element
1329         by reference since we don't support owner-less embedded objects.
1330
1331         Reviewed by Antti Koivisto.
1332
1333 2013-11-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1334
1335         [GStreamer] Remove NATIVE_FULLSCREEN_VIDEO support
1336         https://bugs.webkit.org/show_bug.cgi?id=123437
1337
1338         Reviewed by Philippe Normand.
1339
1340         Removed some dead code as no GStreamer port is using the native
1341         fullscreen video support.
1342
1343         * GNUmakefile.list.am:
1344         * PlatformEfl.cmake:
1345         * PlatformGTK.cmake: Removed compilation of deleted files.
1346         * platform/graphics/MediaPlayer.h: Removed structures related to
1347         GStreamer and NATIVE_FULLSCREEN_VIDEO.
1348         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: Removed.
1349         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h: Removed.
1350         * platform/graphics/gstreamer/GStreamerGWorld.cpp: Removed.
1351         * platform/graphics/gstreamer/GStreamerGWorld.h: Removed.
1352         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Removed
1353         gst/video/video.h include.
1354         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1355         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1356         (WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
1357         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
1358         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1359         Removed code related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
1360         * platform/graphics/gstreamer/PlatformVideoWindow.h: Removed.
1361         * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp: Removed.
1362         * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Removed.
1363         * platform/graphics/gstreamer/PlatformVideoWindowMac.mm: Removed.
1364         * platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Removed.
1365         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: Removed.
1366         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1367         (webkitVideoSinkRender):
1368         (webkitVideoSinkNew):
1369         * platform/graphics/gstreamer/VideoSinkGStreamer.h: Removed code
1370         related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
1371         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp: Removed.
1372         * platform/graphics/gtk/FullscreenVideoControllerGtk.h: Removed.
1373
1374 2013-11-05  Andreas Kling  <akling@apple.com>
1375
1376         Remove RenderWidget::viewCleared().
1377         <https://webkit.org/b/123777>
1378
1379         This was some ancient hand-waving code from the KHTML era.
1380
1381         It was obviously confused (e.g RenderEmbeddedObject trying to handle
1382         iframe owners, even though that setup is impossible.)
1383
1384         Reviewed by Anders Carlsson.
1385
1386 2013-11-04  Brady Eidson  <beidson@apple.com>
1387
1388         IDB: Split backend Cursors and Transactions into their own files
1389         https://bugs.webkit.org/show_bug.cgi?id=123789
1390
1391         Reviewed by Alexey Proskuryakov.
1392
1393         No new tests (Rename, no change in behavior).
1394
1395         * CMakeLists.txt:
1396         * GNUmakefile.list.am:
1397         * WebCore.xcodeproj/project.pbxproj:
1398
1399         * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
1400         (WebCore::IDBBackingStoreCursorInterface::~IDBBackingStoreCursorInterface):
1401
1402         * Modules/indexeddb/IDBBackingStoreInterface.h:
1403
1404         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Added.
1405         (WebCore::IDBBackingStoreTransactionInterface::~IDBBackingStoreTransactionInterface):
1406
1407         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1408         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
1409         * Modules/indexeddb/IDBCursorBackendImpl.h:
1410         (WebCore::IDBCursorBackendImpl::create):
1411
1412         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1413
1414         * Modules/indexeddb/IDBIndexWriter.cpp:
1415         (WebCore::IDBIndexWriter::writeIndexKeys):
1416         (WebCore::IDBIndexWriter::verifyIndexKeys):
1417         (WebCore::IDBIndexWriter::addingKeyAllowed):
1418         * Modules/indexeddb/IDBIndexWriter.h:
1419
1420         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1421         (WebCore::IDBTransactionBackendImpl::createCursorBackend):
1422         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1423         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1424
1425         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1426         (WebCore::GetOperation::perform):
1427         (WebCore::OpenCursorOperation::perform):
1428         (WebCore::CountOperation::perform):
1429         (WebCore::DeleteRangeOperation::perform):
1430
1431         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Added.
1432         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
1433         (WebCore::IDBBackingStoreCursorLevelDB::firstSeek):
1434         (WebCore::IDBBackingStoreCursorLevelDB::advance):
1435         (WebCore::IDBBackingStoreCursorLevelDB::continueFunction):
1436         (WebCore::IDBBackingStoreCursorLevelDB::haveEnteredRange):
1437         (WebCore::IDBBackingStoreCursorLevelDB::isPastBounds):
1438         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Added.
1439         (WebCore::IDBBackingStoreCursorLevelDB::~IDBBackingStoreCursorLevelDB):
1440         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
1441
1442         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1443         (WebCore::IDBBackingStoreLevelDB::compareIndexKeys):
1444         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
1445         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
1446         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
1447         (WebCore::IDBBackingStoreLevelDB::getRecord):
1448         (WebCore::IDBBackingStoreLevelDB::putRecord):
1449         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
1450         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
1451         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
1452         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
1453         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
1454         (WebCore::IDBBackingStoreLevelDB::createIndex):
1455         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
1456         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
1457         (WebCore::findGreatestKeyLessThanOrEqual):
1458         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
1459         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
1460         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
1461         (WebCore::ObjectStoreKeyCursorImpl::create):
1462         (WebCore::ObjectStoreKeyCursorImpl::clone):
1463         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
1464         (WebCore::ObjectStoreCursorImpl::create):
1465         (WebCore::ObjectStoreCursorImpl::clone):
1466         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
1467         (WebCore::objectStoreCursorOptions):
1468         (WebCore::indexCursorOptions):
1469         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
1470         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
1471         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
1472         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
1473         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
1474         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1475  
1476        * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Added.
1477         (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
1478         (WebCore::IDBBackingStoreTransactionLevelDB::begin):
1479         (WebCore::IDBBackingStoreTransactionLevelDB::commit):
1480         (WebCore::IDBBackingStoreTransactionLevelDB::rollback):
1481         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
1482
1483         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1484         (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
1485         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1486
1487 2013-11-04  Zalan Bujtas  <zalan@apple.com>
1488
1489         Do not call setFrameRect on Widget unless its boundaries changed.
1490         https://bugs.webkit.org/show_bug.cgi?id=123781
1491
1492         Reviewed by Andreas Kling.
1493
1494         Call Widget:setFrameRect only when the frame's rect actually changes. It also
1495         cleans up the related weak reference code a bit.
1496         
1497         Covered by existing tests.
1498
1499         * rendering/RenderWidget.cpp:
1500         (WebCore::RenderWidget::setWidgetGeometry): 
1501
1502 2013-11-04  Santosh Mahto  <santosh.ma@samsung.com>
1503
1504         [webcore/html] remove extra header includes from cpp files.
1505         https://bugs.webkit.org/show_bug.cgi?id=123740
1506
1507         Reviewed by Darin Adler.
1508
1509         Removing redundant headers.
1510
1511         * html/BaseDateAndTimeInputType.cpp:
1512         * html/ColorInputType.cpp:
1513         * html/DOMFormData.cpp:
1514         * html/DOMURL.cpp:
1515         * html/DateInputType.cpp:
1516         * html/DateTimeInputType.cpp:
1517         * html/DateTimeLocalInputType.cpp:
1518         * html/FTPDirectoryDocument.cpp:
1519         * html/FileInputType.cpp:
1520         * html/FormController.cpp:
1521         * html/HTMLAnchorElement.cpp:
1522         * html/HTMLAreaElement.cpp:
1523         * html/HTMLCanvasElement.cpp:
1524         * html/HTMLCollection.cpp:
1525         * html/HTMLDetailsElement.cpp:
1526         * html/HTMLDocument.cpp:
1527         * html/HTMLElement.cpp:
1528         * html/HTMLFormControlsCollection.cpp:
1529         * html/HTMLFormElement.cpp:
1530         * html/HTMLImageElement.cpp:
1531         * html/HTMLInputElement.cpp:
1532         * html/HTMLLegendElement.cpp:
1533         * html/HTMLMapElement.cpp:
1534         * html/HTMLMediaElement.cpp:
1535         * html/HTMLOptionElement.cpp:
1536         * html/HTMLOptionsCollection.cpp:
1537         * html/HTMLPlugInImageElement.cpp:
1538         * html/HTMLProgressElement.cpp:
1539         * html/HTMLSummaryElement.cpp:
1540         * html/HTMLTemplateElement.cpp:
1541         * html/HTMLVideoElement.cpp:
1542         * html/HTMLViewSourceDocument.cpp:
1543         * html/MediaController.cpp:
1544         * html/MediaKeyEvent.cpp:
1545         * html/MonthInputType.cpp:
1546         * html/RangeInputType.cpp:
1547         * html/StepRange.cpp:
1548         * html/TextFieldInputType.cpp:
1549         * html/TimeInputType.cpp:
1550         * html/WeekInputType.cpp:
1551         * html/canvas/CanvasRenderingContext.cpp:
1552         * html/canvas/CanvasRenderingContext2D.cpp:
1553         * html/canvas/CanvasStyle.cpp:
1554         * html/canvas/OESVertexArrayObject.cpp:
1555         * html/parser/BackgroundHTMLParser.cpp:
1556         * html/parser/CSSPreloadScanner.cpp:
1557         * html/parser/CompactHTMLToken.cpp:
1558         * html/parser/HTMLConstructionSite.cpp:
1559         * html/parser/HTMLDocumentParser.cpp:
1560         * html/parser/HTMLElementStack.cpp:
1561         * html/parser/HTMLFormattingElementList.cpp:
1562         * html/parser/HTMLMetaCharsetParser.cpp:
1563         * html/parser/HTMLParserIdioms.cpp:
1564         * html/parser/HTMLPreloadScanner.cpp:
1565         * html/parser/HTMLTokenizer.cpp:
1566         * html/parser/HTMLTreeBuilder.cpp:
1567         * html/parser/HTMLTreeBuilderSimulator.cpp:
1568         * html/parser/HTMLViewSourceParser.cpp:
1569         * html/parser/TextDocumentParser.cpp:
1570         * html/parser/XSSAuditor.cpp:
1571         * html/shadow/ContentDistributor.cpp:
1572         * html/shadow/InsertionPoint.cpp:
1573         * html/shadow/MediaControlElements.cpp:
1574         * html/shadow/MediaControlsApple.cpp:
1575         * html/shadow/MediaControlsBlackBerry.cpp:
1576         * html/shadow/MediaControlsGtk.cpp:
1577         * html/shadow/SliderThumbElement.cpp:
1578         * html/track/AudioTrack.cpp:
1579         * html/track/InbandGenericTextTrack.cpp:
1580         * html/track/InbandTextTrack.cpp:
1581         * html/track/InbandWebVTTTextTrack.cpp:
1582         * html/track/TextTrack.cpp:
1583         * html/track/TextTrackCueGeneric.cpp:
1584         * html/track/TextTrackList.cpp:
1585         * html/track/TextTrackRegion.cpp:
1586         * html/track/TrackListBase.cpp:
1587         * html/track/VideoTrack.cpp:
1588         * html/track/WebVTTParser.cpp:
1589
1590 2013-11-04  Brady Eidson  <beidson@apple.com>
1591
1592         IDB: deleteDatabase() interface should be asynchronous
1593         https://bugs.webkit.org/show_bug.cgi?id=123787
1594
1595         Reviewed by Tim Horton.
1596
1597         No new tests (No behavior change for a tested port).
1598
1599         deleteDatabase now has no return value, but calls back to a bool function:
1600         * Modules/indexeddb/IDBBackingStoreInterface.h:
1601         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1602         (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
1603         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1604
1605         Refactor to account for the new async deleteDatabase:
1606         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1607         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1608         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
1609         (WebCore::IDBDatabaseBackendImpl::deleteDatabaseAsync):
1610         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1611
1612 2013-11-04  Brady Eidson  <beidson@apple.com>
1613
1614         Add Modules/indexeddb/leveldb to the WebCore.xcodeproj
1615
1616         Rubberstamped by Andreas Kling.
1617
1618         This will make hacking on IDB much easier for Mac developers as they won’t have
1619         to constantly add and then subtract the leveldb subdirectory.
1620
1621         The USE(LEVELDB) flag is still disabled so these files won’t actually build by default.
1622
1623         * WebCore.xcodeproj/project.pbxproj:
1624
1625 2013-11-04  Brady Eidson  <beidson@apple.com>
1626
1627         Address review feedback I forgot to commit in r158641
1628
1629         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1630         (WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls):
1631
1632 2013-11-04  Brady Eidson  <beidson@apple.com>
1633
1634         IDB: Make opening/establishing a database asynchronous.
1635         https://bugs.webkit.org/show_bug.cgi?id=123775
1636
1637         Reviewed by Andreas Kling.
1638
1639         No new tests (No behavior change for a tested port).
1640
1641         * Modules/indexeddb/IDBBackingStoreInterface.h: Add getOrEstablishIDBDatabaseMetadata with a callback,
1642           removing getIDBDatabaseMetaData, getObjectStores, and createIDBDatabaseMetaData in the process.
1643
1644         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1645         (WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata): Adapted from getIDBDatabaseMetaData,
1646           implement the asynchronous interface in terms of other LevelDB methods, always calling back synchronously.
1647         (WebCore::IDBBackingStoreLevelDB::createIDBDatabaseMetaData):
1648         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1649
1650         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1651         (WebCore::IDBDatabaseBackendImpl::create):
1652         (WebCore::IDBDatabaseBackendImpl::openInternalAsync): Broken off from openInternal.
1653         (WebCore::IDBDatabaseBackendImpl::didOpenInternalAsync): Broken off from openInternal.
1654         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1655         (WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls): Broken off to allow didOpenInternalAsync
1656           to perform open callbacks in the failure case.
1657         (WebCore::IDBDatabaseBackendImpl::openConnection): Always queue open connection calls, then immediately processPendingCalls.
1658         (WebCore::IDBDatabaseBackendImpl::openConnectionInternal): Actually perform open connection calls.
1659         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1660
1661
1662 2013-11-04  Andreas Kling  <akling@apple.com>
1663
1664         CTTE: RenderFrameBase's widget is always a FrameView.
1665         <https://webkit.org/b/123771>
1666
1667         Delete widget() from RenderFrameBase and supplant a childView()
1668         that returns FrameView*. Strip away unnecessary casts and asserts.
1669
1670         Reviewed by Antti Koivisto.
1671
1672 2013-11-04  Zoltan Horvath  <zoltan@webkit.org>
1673
1674         [CSS Regions][CSS Shapes] Content in region doesn't respect shape-outside after initial layout pass
1675         <https://webkit.org/b/114829>
1676
1677         Although we set the size of a shape for shape-outside in RenderBlockFlow::insertFloatingObject based on the
1678         float's size, the actual height of the float is not always resolved at that point. (Look at cases when the shape
1679         has percentage based height or percentage based radius.) ShapeInfo::setShapeSize triggers a layout for 0 height
1680         value, which will be overriden later, when RenderBlockFlow::positionNewFloats sets the actual size of the float (shape).
1681         Thus it doesn't make sense to set the shape's size in insertFloatingObject and run those extra unnecessary layout passes,
1682         since it'll be overriden anyways. I moved the shape size setting logic into RenderBlockFlow::positionNewFloats.
1683
1684         The problem showed up when we had a shape-outside ellipse with percentage based radius, and we inserted the content
1685         with JavaScript into a region flow. The content has been layed out based on the 0 border radius, and relayout hasn't been
1686         triggered when it flew into the flow. This change sets the shape size only when we already have the height of the float,
1687         so the radius(es) can be resolved correctly, thus no unnecessary layout passes will happen and the layout will be correct as well.
1688
1689         Reviewed by David Hyatt.
1690
1691         Test: fast/shapes/shape-outside-floats/shape-outside-floats-layout-after-initial-layout-pass.html
1692
1693         * rendering/RenderBlockFlow.cpp:
1694         (WebCore::RenderBlockFlow::insertFloatingObject): Remove setting the size of the shape.
1695         (WebCore::RenderBlockFlow::positionNewFloats): Set the size of the shape here.
1696
1697 2013-11-04  Samuel White  <samuel_white@apple.com>
1698
1699         AX: AXShowMenu doesn't always work.
1700         https://bugs.webkit.org/show_bug.cgi?id=123649
1701
1702         Reviewed by Chris Fleizach.
1703
1704         No new tests, the change occurs in a code path that forces the context menu to show which
1705         locks up DRT if we try to test it (platform menu is shown). The change itself gives the mouse
1706         event handler a chance to handle our platform mouse event BEFORE the event ends up in the show
1707         context menu machinery. This is necessary because without it, the element will not become
1708         focused. Without focus, accessibility shows different/less menu items than a mouse click. The
1709         end result is that context menus shown via accessibility are consistent with menus shown via click.
1710
1711         * page/ContextMenuController.cpp:
1712         (WebCore::ContextMenuController::showContextMenuAt):
1713
1714 2013-11-04  Jeffrey Pfau  <jpfau@apple.com>
1715
1716         SMIL timers can still fire after the containing document has been torn down
1717         <https://webkit.org/b/123291>
1718
1719         Reviewed by Darin Adler.
1720
1721         Ensure that the timers get paused when the document is preparing to be torn down.
1722
1723         Test: svg/animations/smil-timers-not-disabled-crash.html
1724
1725         * dom/Document.cpp:
1726         (WebCore::Document::dropChildren):
1727         (WebCore::Document::commonTeardown):
1728         (WebCore::Document::prepareForDestruction):
1729         * dom/Document.h:
1730
1731 2013-11-04  Brendan Long  <b.long@cablelabs.com>
1732
1733         Move duplicate code in TrackPrivate classes to a common base class
1734         https://bugs.webkit.org/show_bug.cgi?id=123619
1735
1736         Reviewed by Darin Adler.
1737
1738         No new tests because this is just refactoring.
1739
1740         * GNUmakefile.list.am: Add TrackPrivateBase.
1741         * WebCore.vcxproj/WebCore.vcxproj: Same.
1742         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
1743         * WebCore.xcodeproj/project.pbxproj: Same.
1744         * html/track/AudioTrack.cpp:
1745         (WebCore::AudioTrack::inbandTrackIndex): Renamed audioTrackIndex() to trackIndex().
1746         (WebCore::AudioTrack::labelChanged): First argument is now a TrackPrivateBase*.
1747         (WebCore::AudioTrack::languageChanged): Same.
1748         (WebCore::AudioTrack::willRemove): Same.
1749         * html/track/AudioTrack.h: Update TrackPrivateBaseClient function signatures.
1750         * html/track/InbandTextTrack.cpp:
1751         (WebCore::InbandTextTrack::inbandTrackIndex): Renamed textTrackIndex() to trackIndex().
1752         (WebCore::InbandTextTrack::labelChanged): First argument is now a TrackPrivateBase*.
1753         (WebCore::InbandTextTrack::languageChanged): Same.
1754         (WebCore::InbandTextTrack::willRemove): Same.
1755         * html/track/InbandTextTrack.h: Update TrackPrivateBaseClient function signatures.
1756         * html/track/VideoTrack.cpp:
1757         (WebCore::VideoTrack::inbandTrackIndex): Renamed videoTrackIndex() to trackIndex().
1758         (WebCore::VideoTrack::labelChanged): First argument is now a TrackPrivateBase*.
1759         (WebCore::VideoTrack::languageChanged): Same.
1760         (WebCore::VideoTrack::willRemove): Same.
1761         * html/track/VideoTrack.h: Update TrackPrivateBaseClient function signatures.
1762         * platform/graphics/AudioTrackPrivate.h: Remove code that was moved to TrackPrivateBase.
1763         * platform/graphics/InbandTextTrackPrivate.h: Same.
1764         * platform/graphics/InbandTextTrackPrivateClient.h: Same.
1765         * platform/graphics/VideoTrackPrivate.h: Same.
1766         * platform/graphics/TrackPrivateBase.h: Refactored out duplicate code in AudioTrackPrivate, InbandTextTrackPrivate and VideoTrackPrivate.
1767         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Renamed textTrackIndex() to trackIndex().
1768         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Same.
1769         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Renamed audioTrackIndex() to trackIndex().
1770         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Renamed videoTrackIndex() to trackIndex90.
1771
1772 2013-11-04  Andreas Kling  <akling@apple.com>
1773
1774         FrameView destructor is worried about being retained by a renderer.
1775         <https://webkit.org/b/123763>
1776
1777         There's no way we can be in ~FrameView() while also being owned by
1778         a RenderWidget. Remove some overly paranoid code that was making sure
1779         the renderer didn't have a reference on us.
1780
1781         Reviewed by Anders Carlsson.
1782
1783 2013-11-04  Eric Carlson  <eric.carlson@apple.com>
1784
1785         REGRESSION(r158311): media/media-fragments/TC0054.html and TC0061.html hit assertions
1786         https://bugs.webkit.org/show_bug.cgi?id=123555
1787
1788         Reviewed by Darin Adler.
1789
1790         No new tests, covered by existing tests.
1791
1792         * html/MediaFragmentURIParser.cpp:
1793         (WebCore::MediaFragmentURIParser::parseFragments): Don't add a fragment with empty key or value as
1794             they will not processed.
1795         (WebCore::MediaFragmentURIParser::parseNPTFragment): Remove excess whitespace.
1796
1797 2013-11-04  Patrick Gansterer  <paroga@webkit.org>
1798
1799         Remove code duplications in createFontCustomPlatformData()
1800         https://bugs.webkit.org/show_bug.cgi?id=123706
1801
1802         Reviewed by Darin Adler.
1803
1804         Move OpenTypeSanitizer and WOFF handling from the port specific
1805         implementations in createFontCustomPlatformData() into the only
1806         caller of this function CachedFont::ensureCustomFontData().
1807         Also change the parameter passing the SharedBuffer from a
1808         pointer to a reference since it is never null.
1809
1810         * loader/cache/CachedFont.cpp:
1811         (WebCore::CachedFont::ensureCustomFontData):
1812         * platform/graphics/blackberry/FontCustomPlatformData.h:
1813         * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp:
1814         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1815         (WebCore::createFontCustomPlatformData):
1816         * platform/graphics/cairo/FontCustomPlatformData.h:
1817         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1818         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1819         (WebCore::createFontCustomPlatformData):
1820         * platform/graphics/mac/FontCustomPlatformData.cpp:
1821         (WebCore::createFontCustomPlatformData):
1822         * platform/graphics/mac/FontCustomPlatformData.h:
1823         * platform/graphics/win/FontCustomPlatformData.cpp:
1824         (WebCore::createFontCustomPlatformData):
1825         * platform/graphics/win/FontCustomPlatformData.h:
1826         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1827         (WebCore::createFontCustomPlatformData):
1828         * platform/graphics/wince/FontCustomPlatformData.cpp:
1829         (WebCore::createFontCustomPlatformData):
1830         * platform/graphics/wince/FontCustomPlatformData.h:
1831
1832 2013-11-04  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1833
1834         Fixing MediaStreamDescriptor addSource and addTrack methods
1835         https://bugs.webkit.org/show_bug.cgi?id=123755
1836
1837         Reviewed by Eric Carlson.
1838
1839         We must store the track and source that is passed as parameter in a RefPtr,
1840         otherwise we will refer to a null pointer.
1841
1842         No new tests needed.
1843
1844         * platform/mediastream/MediaStreamDescriptor.cpp:
1845         (WebCore::MediaStreamDescriptor::addSource):
1846         (WebCore::MediaStreamDescriptor::addTrack):
1847
1848 2013-11-04  Tim Horton  <timothy_horton@apple.com>
1849
1850         Remove PlatformCALayer::playerLayer
1851         https://bugs.webkit.org/show_bug.cgi?id=123764
1852
1853         Reviewed by Sam Weinig.
1854
1855         * platform/graphics/ca/PlatformCALayer.h:
1856         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1857         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1858         (PlatformCALayerMac::clone):
1859         Remove playerLayer(), fold it into clone().
1860
1861 2013-11-04  Chris Fleizach  <cfleizach@apple.com>
1862
1863         AX: Mail attachments at the start of an email are not output by VoiceOver
1864         https://bugs.webkit.org/show_bug.cgi?id=123697
1865
1866         Reviewed by Ryosuke Niwa.
1867
1868         VoiceOver is expecting that "replaced elements" (attachments in a Mail message in this case) to be
1869         represented by the replacement character when asking for a stringForRange.
1870
1871         However, when that replaced element is at the beginning of the document, the logic does not work because
1872         there is a few code places that will take that first Position and advance it forward, not accounting for replaced elements.
1873         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.
1874
1875         Also a "replaced element" can be more than just renderer->isReplaced(), hence the externing of the isRendererReplacedElement method
1876         and using that it in pertinent places.
1877
1878         Tests: platform/mac/accessibility/object-replacement-with-no-rendered-children-at-node-start.html
1879                platform/mac/accessibility/object-replacement-with-rendered-children-at-node-start.html
1880
1881         * accessibility/AccessibilityObject.cpp:
1882         (WebCore::replacedNodeNeedsCharacter):
1883         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1884         (nsStringForReplacedNode):
1885         * dom/Position.cpp:
1886         (WebCore::Position::isCandidate):
1887         * dom/PositionIterator.cpp:
1888         * dom/Range.cpp:
1889         (WebCore::Range::firstNode):
1890         * editing/TextIterator.cpp:
1891         (WebCore::isRendererReplacedElement):
1892         * editing/TextIterator.h:
1893
1894 2013-11-04  Andreas Kling  <akling@apple.com>
1895
1896         Use RenderAncestorIterator in a couple of places.
1897         <https://webkit.org/b/123725>
1898
1899         Take the ancestorsOfType<RenderMoo>() thingy out for a spin.
1900
1901         Found a bunch of parent chain walking loops that were really just
1902         looking for the first ancestor renderer of a certain type.
1903         They were a perfect fit for this pattern:
1904
1905             if (auto svgRoot = ancestorsOfType<RenderSVGRoot>(renderer).first())
1906                 svgRoot->shakeMoneyMaker();
1907
1908         Quite a bit clearer than the previous:
1909
1910             for (auto ancestor = renderer.parent(); ancestor; ancestor = ancestor->parent()) {
1911                 if (ancestor->isSVGRoot())
1912                     toRenderSVGRoot(ancestor)->makeMoneyShaker();
1913             }
1914
1915         Reviewed by Antti Koivisto.
1916
1917 2013-10-25  Jer Noble  <jer.noble@apple.com>
1918
1919         [MSE] Add a SourceBufferPrivateClient interface for platform -> html communication.
1920         https://bugs.webkit.org/show_bug.cgi?id=123373
1921
1922         Reviewed by Eric Carlson.
1923
1924         To enable communication between SourceBuffer and SourceBufferPrivate without introducing
1925         layering violations, add a new interface class SourceBufferPrivateInterface from which
1926         SourceBuffer will inherit.
1927
1928         * Modules/mediasource/SourceBuffer.cpp:
1929         (WebCore::SourceBuffer::SourceBuffer): Set the private's client.
1930         (WebCore::SourceBuffer::~SourceBuffer): Clear the private's client.
1931         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Added stub.
1932         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Hinno.
1933         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
1934         (WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Ditto.
1935         (WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Ditto.
1936         * Modules/mediasource/SourceBuffer.h:
1937         * WebCore.xcodeproj/project.pbxproj: Add new files to project.
1938         * platform/graphics/SourceBufferPrivate.h:
1939         * platform/graphics/SourceBufferPrivateClient.h: Added.
1940         (WebCore::SourceBufferPrivateClient::~SourceBufferPrivateClient): Empty destructor.
1941
1942 2013-11-01  Jer Noble  <jer.noble@apple.com>
1943
1944         [PluginProxy] Add a setting to disable video plugin proxy support in HTMLMediaElement.
1945         https://bugs.webkit.org/show_bug.cgi?id=123621
1946
1947         Reviewed by Eric Carlson.
1948
1949         Add a new Setting which will disable the video plugin proxy. Enable support for AVFoundation
1950         in iOS (which requries fixing a few compile errors resulting from classes and methods which
1951         are not available on iOS.
1952
1953         * WebCore.exp.in: Export wkAVAssetResolvedURL.
1954         * css/StyleResolver.cpp:
1955         (WebCore::StyleResolver::canShareStyleWithElement): Make conditional upon
1956             new isVideoPluginProxyEnabled() setting.
1957         * html/HTMLMediaElement.cpp:
1958         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
1959         * html/HTMLMediaElement.h:
1960         * html/HTMLVideoElement.cpp:
1961         (WebCore::HTMLVideoElement::createRenderer): Ditto.
1962         (WebCore::HTMLVideoElement::attach): Ditto.
1963         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
1964         (HTMLVideoElement::setDisplayMode): Ditto.
1965         * html/HTMLVideoElement.h:
1966         * page/Settings.cpp:
1967         (WebCore::Settings::setVideoPluginProxyEnabled): Simple setter.
1968         * page/Settings.h:
1969         (WebCore::Settings::isVideoPluginProxyEnabled): Simple getter.
1970         * platform/graphics/MediaPlayer.cpp:
1971         (WebCore::installedMediaEngines): Conditionally add MediaPlayerPrivateIOS and always add
1972             MediaPlayerPriateAVFoundationObjC.
1973         * platform/graphics/MediaPlayerPrivate.h:
1974         (WebCore::MediaPlayerPrivateInterface::deliverNotification): Add default implementation.
1975         (WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Ditto.
1976         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1977         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1978         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Use new
1979             HAS_ and USE_ macros instead of __MAC_OS_MIN_VERNSION_REQUIRED.
1980         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto.
1981         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer): Ditto.
1982         (WebCore::MediaPlayerPrivateAVFoundationObjC::createContextVideoRenderer): Ditto.
1983         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer): Ditto.
1984         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.
1985         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
1986         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Use cachedCGColor instead
1987             of CGColorGetConstantColor.
1988         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use CVPixelBuffer pixel
1989             format constant instead of QuickDraw constant.
1990         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Ditto.
1991         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Draw to intermediary
1992             CGImage on iOS.
1993         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
1994         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1995         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1996         * platform/mac/WebCoreSystemInterface.h:
1997
1998 2013-11-04  Andreas Kling  <akling@apple.com>
1999
2000         REGRESSION(r158561): fast/block/float/float-append-child-crash.html asserting.
2001
2002         The non-const ancestor iterator was walking siblings, not ancestors.
2003
2004         Rubber-stamped by Antti Koivisto.
2005
2006 2013-10-31  Jer Noble  <jer.noble@apple.com>
2007
2008         [MSE] [Mac] Disclaim support for MSE in AVFoundation and QTKit engines
2009         https://bugs.webkit.org/show_bug.cgi?id=123593
2010
2011         Reviewed by Eric Carlson.
2012
2013         Immediately fail if asked to load a Media Source in engines which do not support
2014         them.
2015
2016         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2017         (WebCore::MediaPlayerPrivateAVFoundation::load):
2018         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2019         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2020         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2021         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2022         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2023         (WebCore::MediaPlayerPrivateQTKit::load):
2024         (WebCore::MediaPlayerPrivateQTKit::supportsType):
2025
2026 2013-11-04  Hans Muller  <hmuller@adobe.com>
2027
2028         [CSS Shapes] image valued shape element margin can cause an ASSERT fail
2029         https://bugs.webkit.org/show_bug.cgi?id=123743
2030
2031         Reviewed by Andreas Kling.
2032
2033         When margin-top is specified for a shape's element, the Y coordinates passed
2034         to RasterShapeIntervals::getExcludedIntervals() may be negative. This is
2035         because the incoming logical coordinates are relative to the content or
2036         padding box, depending on the box-sizing property. The RasterShape::getExcludedIntervals()
2037         method now clips the incoming Y coordinates to the shape's bounds before
2038         accessing the shape's intervals.
2039
2040         Test: fast/shapes/shape-outside-floats/shape-outside-floats-margin-crash.html
2041
2042         * rendering/shapes/RasterShape.cpp:
2043         (WebCore::RasterShapeIntervals::getExcludedIntervals):
2044
2045 2013-11-04  Antti Koivisto  <antti@apple.com>
2046
2047         Make LiveNodeListBase use Elements instead of Nodes
2048         https://bugs.webkit.org/show_bug.cgi?id=123745
2049
2050         Reviewed by Anders Carlsson.
2051
2052         * WebCore.exp.in:
2053         * dom/Element.cpp:
2054         (WebCore::Element::firstElementChild):
2055         (WebCore::Element::lastElementChild):
2056         
2057             Switch to correct calls. ElementTraversal::previous and previousChild are no longer equivalent.
2058
2059         * dom/ElementTraversal.h:
2060         (WebCore::::lastWithinTemplate):
2061         (WebCore::::previousTemplate):
2062         
2063             Fix ElementTraversal::lastWithin and previous. They had no real clients and didn't work correctly.
2064             With LiveNodeListBase starting to use these they get excellent test coverage.
2065
2066         * dom/LiveNodeList.cpp:
2067         (WebCore::LiveNodeListBase::invalidateCache):
2068         * dom/LiveNodeList.h:
2069         (WebCore::LiveNodeListBase::LiveNodeListBase):
2070         (WebCore::LiveNodeListBase::isElementCacheValid):
2071         (WebCore::LiveNodeListBase::cachedElement):
2072         (WebCore::LiveNodeListBase::cachedElementOffset):
2073         (WebCore::LiveNodeListBase::setCachedElement):
2074         
2075             Make the cache Element based.
2076             Switch to Elements in all helpers.
2077             Rename item -> element for clarity.
2078
2079         * dom/NodeIterator.cpp:
2080         (WebCore::NodeIterator::NodePointer::moveToPrevious):
2081         (WebCore::NodeIterator::updateForNodeRemoval):
2082         
2083             This code expected the old inconsistent NodeTraversal::previous behavior where the traversal includes
2084             the root as the last item. Drop the stayWithin parameter and handle the one case where it is needed here.
2085
2086         * dom/NodeTraversal.cpp:
2087         (WebCore::NodeTraversal::last):
2088         (WebCore::NodeTraversal::deepLastChild):
2089         * dom/NodeTraversal.h:
2090         
2091             Support ElementTraversal::previous/lastWithin.
2092
2093         (WebCore::NodeTraversal::previous):
2094         
2095             This was slightly wrong too.
2096
2097         * html/HTMLCollection.cpp:
2098         (WebCore::previousElement):
2099         (WebCore::lastElement):
2100         (WebCore::LiveNodeListBase::iterateForPreviousElement):
2101         (WebCore::LiveNodeListBase::itemBefore):
2102         (WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem):
2103         (WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem):
2104         (WebCore::LiveNodeListBase::setCachedElement):
2105         (WebCore::LiveNodeListBase::item):
2106         (WebCore::LiveNodeListBase::elementBeforeOrAfterCachedElement):
2107         * html/HTMLCollection.h:
2108         (WebCore::HTMLCollection::isEmpty):
2109         (WebCore::HTMLCollection::hasExactlyOneItem):
2110
2111 2013-11-04  Michael Saboff  <msaboff@apple.com>
2112
2113         Eliminate HostCall bit from JSC Stack CallerFrame
2114         https://bugs.webkit.org/show_bug.cgi?id=123642
2115
2116         Reviewed by Geoffrey Garen.
2117
2118         Updated JavaScript stack walking as a result of the corresponding changes made in
2119         JavaScriptCore.
2120
2121         * bindings/js/ScriptController.cpp:
2122         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
2123         * bindings/js/ScriptDebugServer.cpp:
2124         (WebCore::ScriptDebugServer::stepOutOfFunction):
2125         (WebCore::ScriptDebugServer::returnEvent):
2126         (WebCore::ScriptDebugServer::didExecuteProgram):
2127
2128 2013-11-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2129
2130         [css shapes] Fix support for shape-outside on a float with padding
2131         https://bugs.webkit.org/show_bug.cgi?id=123590
2132
2133         Reviewed by Alexandru Chiculita.
2134
2135         The line top was being improperly converted to the coordinates of the
2136         shape, causing the shape to be positioned incorrectly when the float
2137         had padding. This fixes that problem.
2138
2139         No new tests, covered by updates to existing ones.
2140
2141         * rendering/shapes/ShapeOutsideInfo.cpp:
2142         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
2143
2144 2013-11-04  Alexey Proskuryakov  <ap@apple.com>
2145
2146         Implement generateKey for HMAC and AES-CBC
2147         https://bugs.webkit.org/show_bug.cgi?id=123669
2148
2149         Reviewed by Dan Bernstein.
2150
2151         Tests: crypto/subtle/aes-cbc-generate-key.html
2152                crypto/subtle/hmac-generate-key.html
2153
2154         * WebCore.xcodeproj/project.pbxproj: Added new files.
2155
2156         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2157         (WebCore::createAesKeyGenParams): Added bindings for AesKeyGenParams.
2158         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Handle
2159         algorithms that generate AES and HMAC keys.
2160
2161         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::generateKey): Added.
2162
2163         * crypto/CryptoAlgorithmAesKeyGenParams.h: Added.
2164
2165         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::randomData):
2166         * crypto/CryptoKey.h:
2167         * crypto/CryptoKeyMac.cpp: Added
2168         Expose a function that produces random data for symmetric crypto keys. Cross-platform
2169         implementation uses ARC4 code from WTF, while Mac uses a system function that
2170         provides a FIPS validated random number generator.
2171
2172         * crypto/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::generate):
2173         * crypto/CryptoKeyAES.h:
2174         Added a function that creates AES keys.
2175
2176         * crypto/SubtleCrypto.idl: Added generateKey.
2177
2178         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2179         (WebCore::CryptoAlgorithmAES_CBC::generateKey): Added.
2180
2181         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2182         (WebCore::CryptoAlgorithmHMAC::generateKey): Added.
2183
2184         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::generate):
2185         * crypto/keys/CryptoKeyHMAC.h:
2186         Added a function that creates HMAC keys.
2187
2188         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Removed generateKey stub, the implementation
2189         ended up in cross-platform file.
2190
2191         * crypto/mac/CryptoAlgorithmHMACMac.cpp: Ditto.
2192
2193 2013-11-04  Daniel Bates  <dabates@apple.com>
2194
2195         Revert SetCGFontRenderingMode() build fix for Chromium Mac
2196         https://bugs.webkit.org/show_bug.cgi?id=123633
2197
2198         Reviewed by Darin Adler.
2199
2200         Reverts <http://trac.webkit.org/changeset/134380>, which
2201         was a Chromium Mac build fix for <http://trac.webkit.org/changeset/134348>
2202         (https://bugs.webkit.org/show_bug.cgi?id=101787). Chromium doesn't
2203         build against top-of-tree WebKit.
2204
2205         * platform/graphics/mac/FontMac.mm:
2206         (WebCore::Font::drawGlyphs):
2207         * platform/mac/WebCoreSystemInterface.h:
2208         * platform/mac/WebCoreSystemInterface.mm:
2209
2210 2013-11-04  Commit Queue  <commit-queue@webkit.org>
2211
2212         Unreviewed, rolling out r158526.
2213         http://trac.webkit.org/changeset/158526
2214         https://bugs.webkit.org/show_bug.cgi?id=123744
2215
2216         it broke the build (Requested by jessieberlin on #webkit).
2217
2218         * WebCore.xcodeproj/project.pbxproj:
2219         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2220         (WebCore::createAesCbcParams):
2221         (WebCore::createHmacParams):
2222         (WebCore::createHmacKeyParams):
2223         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
2224         * bindings/js/JSSubtleCryptoCustom.cpp:
2225         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
2226         * crypto/CryptoKey.cpp:
2227         * crypto/CryptoKey.h:
2228         * crypto/CryptoKeyAES.cpp:
2229         * crypto/CryptoKeyAES.h:
2230         * crypto/CryptoKeyMac.cpp: Removed.
2231         * crypto/SubtleCrypto.idl:
2232         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2233         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2234         * crypto/keys/CryptoKeyHMAC.cpp:
2235         * crypto/keys/CryptoKeyHMAC.h:
2236         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2237         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
2238         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2239         (WebCore::CryptoAlgorithmHMAC::generateKey):
2240
2241 2013-11-04  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
2242
2243         [Texmap] Remove redundant calls in CoordinatedGraphicsScene
2244         https://bugs.webkit.org/show_bug.cgi?id=123737
2245
2246         Reviewed by Noam Rosenthal.
2247
2248         Removing unused code left after few refactoring patches.
2249
2250         No new tests. Covered by existing ones.
2251
2252         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2253         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2254
2255 2013-11-04  Andreas Kling  <akling@apple.com>
2256
2257         CSSPrimitiveValue color constructors should return PassRef.
2258         <https://webkit.org/b/123728>
2259
2260         Make CSSPrimitiveValue::createColor() and the corresponding
2261         CSSValuePool helper functions return PassRef<CSSPrimitiveValue>.
2262
2263         Also made CSSValuePool slightly less stupid when hitting the upper
2264         size limit on the color value cache: instead of throwing out cache
2265         and rebuilding it from scratch, just remove one value at random.
2266
2267         Reviewed by Antti Koivisto.
2268
2269 2013-11-04  Andreas Kling  <akling@apple.com>
2270
2271         Some more RenderChildIterator deployment.
2272         <https://webkit.org/b/123735>
2273
2274         Convert another handful of loops to use childrenOfType<RenderFoo>
2275         iterators, mostly for skipping over uninteresting text renderers.
2276
2277         Reviewed by Antti Koivisto.
2278
2279 2013-11-04  Andreas Kling  <akling@apple.com>
2280
2281         LabelsNodeList always is always rooted at a LabelableElement.
2282         <https://webkit.org/b/123730>
2283
2284         Tighten up LabelsNodeList by enforcing that it's only rooted to
2285         a LabelableElement. Also marked the class FINAL and made its
2286         create() helper return PassRef.
2287
2288         Reviewed by Antti Koivisto.
2289
2290 2013-11-04  Andreas Kling  <akling@apple.com>
2291
2292         REGRESSION: RenderStyle is leaked when not creating renderer for display:none
2293         <https://webkit.org/b/123726>
2294
2295         Explicitly drop the RenderStyle reference in RenderElement::createFor
2296         if we decide to not create any renderer.
2297
2298         Reviewed by Antti Koivisto.
2299
2300         Test: fast/css/renderstyle-leak-with-display-none.html
2301
2302         * rendering/RenderElement.cpp:
2303         (WebCore::RenderElement::createFor):
2304
2305 2013-11-04  Santosh Mahto  <santosh.ma@samsung.com>
2306
2307         [webcore/dom] Remove extra header includes from cpp files.
2308         https://bugs.webkit.org/show_bug.cgi?id=123720
2309
2310         Reviewed by Andreas Kling.
2311
2312         Removing redundant headers from dom related cpp files.
2313
2314         * dom/Attr.cpp:
2315         * dom/CharacterData.cpp:
2316         * dom/ChildListMutationScope.cpp:
2317         * dom/ChildNodeList.cpp:
2318         * dom/ContainerNode.cpp:
2319         * dom/ContainerNodeAlgorithms.cpp:
2320         * dom/DOMNamedFlowCollection.cpp:
2321         * dom/DatasetDOMStringMap.cpp:
2322         * dom/Document.cpp:
2323         * dom/DocumentEventQueue.cpp:
2324         * dom/DocumentMarkerController.cpp:
2325         * dom/DocumentOrderedMap.cpp:
2326         * dom/DocumentStyleSheetCollection.cpp:
2327         * dom/Element.cpp:
2328         * dom/ElementRareData.cpp:
2329         * dom/Event.cpp:
2330         * dom/EventContext.cpp:
2331         * dom/EventDispatcher.cpp:
2332         * dom/EventTarget.cpp:
2333         * dom/ExceptionBase.cpp:
2334         * dom/FocusEvent.cpp:
2335         * dom/InlineStyleSheetOwner.cpp:
2336         * dom/KeyboardEvent.cpp:
2337         * dom/LiveNodeList.cpp:
2338         * dom/MessageEvent.cpp:
2339         * dom/MessagePort.cpp:
2340         * dom/MouseRelatedEvent.cpp:
2341         * dom/MutationEvent.cpp:
2342         * dom/MutationObserver.cpp:
2343         * dom/MutationObserverInterestGroup.cpp:
2344         * dom/MutationObserverRegistration.cpp:
2345         * dom/MutationRecord.cpp:
2346         * dom/NameNodeList.cpp:
2347         * dom/NamedFlowCollection.cpp:
2348         * dom/NamedNodeMap.cpp:
2349         * dom/Node.cpp:
2350         * dom/NodeIterator.cpp:
2351         * dom/NodeTraversal.cpp:
2352         * dom/PositionIterator.cpp:
2353         * dom/ProcessingInstruction.cpp:
2354         * dom/Range.cpp:
2355         * dom/RegisteredEventListener.cpp:
2356         * dom/ScopedEventQueue.cpp:
2357         * dom/ScriptElement.cpp:
2358         * dom/ScriptRunner.cpp:
2359         * dom/SelectorQuery.cpp:
2360         * dom/ShadowRoot.cpp:
2361         * dom/StyledElement.cpp:
2362         * dom/TagNodeList.cpp:
2363         * dom/Text.cpp:
2364         * dom/TextEvent.cpp:
2365         * dom/TouchEvent.cpp:
2366         * dom/TreeScope.cpp:
2367         * dom/TreeScopeAdopter.cpp:
2368         * dom/TreeWalker.cpp:
2369         * dom/UIEvent.cpp:
2370         * dom/UserActionElementSet.cpp:
2371         * dom/UserTypingGestureIndicator.cpp:
2372         * dom/VisitedLinkState.cpp:
2373         * dom/WebKitNamedFlow.cpp:
2374
2375 2013-11-04  Andreas Kling  <akling@apple.com>
2376
2377         HTMLAllCollection is always rooted at a Document.
2378         <https://webkit.org/b/123724>
2379
2380         Tighten up HTMLAllCollection by making the constructor take a
2381         Document& instead of a ContainerNode&. Drive-by application of
2382         FINAL and PassRef also happened.
2383
2384         Reviewed by Antti Koivisto.
2385
2386 2013-11-04  Andreas Kling  <akling@apple.com>
2387
2388         Make more CSSValue subclass constructors return PassRef.
2389         <https://webkit.org/b/123731>
2390
2391         Make the constructor helpers for the following classes return
2392         PassRef instead of PassRefPtr:
2393
2394             - CSSFontValue
2395             - CSSImageSetValue
2396             - CSSUnicodeRangeValue
2397             - WebKitCSSArrayFunctionValue
2398             - WebKitCSSFilterValue
2399             - WebKitCSSMatFunctionValue
2400             - WebKitCSSMixFunctionValue
2401             - WebKitCSSShaderValue
2402             - WebKitCSSTransformValue
2403
2404         Reviewed by Antti Koivisto.
2405
2406 2013-11-04  Jozsef Berta  <jberta@inf.u-szeged.hu>
2407
2408         Buildfix after r158182 for GCC 4.6
2409         https://bugs.webkit.org/show_bug.cgi?id=123442
2410
2411         Reviewed by Csaba Osztrogonác.
2412
2413         Added explicit "friend class", because  GCC 4.6 doesn't support extended friend declaration (c++11)
2414
2415         * dom/ScopedEventQueue.h:
2416
2417 2013-11-04  Andreas Kling  <akling@apple.com>
2418
2419         HTMLTableRowsCollection is always rooted at a HTMLTableElement.
2420         <https://webkit.org/b/123721>
2421
2422         Tighten up HTMLTableRowsCollection by making the create() helper
2423         take a HTMLTableElement& and adding a HTMLSelectElement& getter.
2424
2425         Reviewed by Antti Koivisto.
2426
2427 2013-11-04  Andreas Kling  <akling@apple.com>
2428
2429         HTMLNameCollection and friends are always rooted at a Document.
2430         <https://webkit.org/b/123722>
2431
2432         Tighten WindowNameCollection and DocumentNameCollection by making
2433         their constructors take a Document&, and add a slightly better
2434         document() than the one we inherit from LiveNodeListBase.
2435
2436         Also marked the classes FINAL and made create() helpers return
2437         PassRef instead of PassRefPtr.
2438
2439         Reviewed by Antti Koivisto.
2440
2441 2013-11-04  Andreas Kling  <akling@apple.com>
2442
2443         Add an ancestor renderer iterator.
2444         <https://webkit.org/b/123718>
2445
2446         Add ancestor iterators for renderers, analogous to element ancestor
2447         iterators. They walk the chain of parent renderers, stopping at each
2448         ancestor of a certain type.
2449
2450         Just like child renderer iterators, this requires isRendererOfType()
2451         to be implemented for the targeted renderer class.
2452
2453         You use them like this:
2454
2455         auto frameSets = ancestorsOfType<RenderFrameSet>(*this);
2456         for (auto frameSet = frameSets.begin(), end = frameSets.end(); frameSet != end; ++frameSet)
2457             frameSet->thisOrThat();
2458
2459         To complete the patch, I put them to use in a couple of random places.
2460
2461         Reviewed by Antti Koivisto.
2462
2463 2013-11-04  Mihnea Ovidenie  <mihnea@adobe.com>
2464
2465         [CSSRegions] Use auto keyword to clean-up for loops
2466         https://bugs.webkit.org/show_bug.cgi?id=123699
2467
2468         Reviewed by Anders Carlsson.
2469
2470         Start using auto keyword for loops.
2471         Also, since region breaks (forced breaks) can be added only on boxes,
2472         i changed RenderFlowThread::addForcedRegionBreak to use a RenderBox* instead of RenderObject*.
2473
2474         No change in functionality, no new tests.
2475
2476         * dom/WebKitNamedFlow.cpp:
2477         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
2478         * rendering/FlowThreadController.cpp:
2479         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
2480         (WebCore::FlowThreadController::styleDidChange):
2481         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
2482         (WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
2483         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
2484         (WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
2485         (WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
2486         (WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
2487         (WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
2488         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
2489         (WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
2490         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
2491         (WebCore::FlowThreadController::collectFixedPositionedLayers):
2492         (WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
2493         * rendering/RenderFlowThread.cpp:
2494         (WebCore::RenderFlowThread::validateRegions):
2495         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
2496         (WebCore::RenderFlowThread::getLayerListForRegion):
2497         (WebCore::RenderFlowThread::updateLayerToRegionMappings):
2498         (WebCore::RenderFlowThread::updateLogicalWidth):
2499         (WebCore::RenderFlowThread::computeLogicalHeight):
2500         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2501         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
2502         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
2503         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
2504         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
2505         (WebCore::RenderFlowThread::setRegionRangeForBox):
2506         (WebCore::RenderFlowThread::getRegionRangeForBox):
2507         (WebCore::RenderFlowThread::regionInRange):
2508         (WebCore::RenderFlowThread::checkRegionsWithStyling):
2509         (WebCore::RenderFlowThread::objectInFlowRegion):
2510         (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
2511         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
2512         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
2513         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
2514         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
2515         (WebCore::RenderFlowThread::addForcedRegionBreak):
2516         (WebCore::RenderFlowThread::collectLayerFragments):
2517         (WebCore::RenderFlowThread::fragmentsBoundingBox):
2518         (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
2519         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
2520         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
2521         (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
2522         (WebCore::RenderFlowThread::clearRegionsOverflow):
2523         * rendering/RenderFlowThread.h:
2524         * rendering/RenderNamedFlowThread.cpp:
2525         (WebCore::RenderNamedFlowThread::nextRendererForNode):
2526         (WebCore::RenderNamedFlowThread::previousRendererForNode):
2527         (WebCore::RenderNamedFlowThread::dependsOn):
2528         (WebCore::addRegionToList):
2529         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
2530         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
2531         (WebCore::RenderNamedFlowThread::pushDependencies):
2532         * rendering/RenderRegion.cpp:
2533         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
2534         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
2535         (WebCore::RenderRegion::computeChildrenStyleInRegion):
2536
2537 2013-11-03  Zan Dobersek  <zdobersek@igalia.com>
2538
2539         PingLoader objects unnecessarily pass through OwnPtr
2540         https://bugs.webkit.org/show_bug.cgi?id=122942
2541
2542         Reviewed by Darin Adler.
2543
2544         There's no need to store new PingLoader objects into an OwnPtr just to leak them out a few lines later
2545         into an unused variable. New objects are created through a new helper method and then left unmanaged as
2546         they're guaranteed to destroy themselves when they receive a response of any kind.
2547
2548         * loader/PingLoader.cpp:
2549         (WebCore::PingLoader::loadImage): Call the new createPingLoader method to spawn the PingLoader.
2550         (WebCore::PingLoader::sendPing): Ditto.
2551         (WebCore::PingLoader::sendViolationReport): Ditto.
2552         (WebCore::PingLoader::createPingLoader): A helper method that creates a new PingLoader object
2553         * loader/PingLoader.h: Declare the new PingLoader::createPingLoader method.
2554
2555 2013-11-03  Andreas Kling  <akling@apple.com>
2556
2557         HTMLOptionsCollection is always rooted at a HTMLSelectElement.
2558         <https://webkit.org/b/123719>
2559
2560         Tighten up HTMLOptionsCollection by making the constructor take
2561         a HTMLSelectElement& and adding a HTMLSelectElement& getter instead
2562         of casting all over the place. Removed now-pointless assertions.
2563
2564         Reviewed by Sam Weinig.
2565
2566 2013-11-03  Andreas Kling  <akling@apple.com>
2567
2568         RenderTextFragment: Tighten first-letter logic.
2569         <https://webkit.org/b/123714>
2570
2571         Reviewed by Antti Koivisto.
2572
2573         * editing/TextIterator.cpp:
2574         (WebCore::firstRenderTextInFirstLetter):
2575
2576             Use iterator helper to find first RenderText child.
2577
2578         (WebCore::TextIterator::handleTextNodeFirstLetter):
2579
2580             Tightening through type inference.
2581
2582         * rendering/RenderBlock.cpp:
2583         (WebCore::RenderBlock::updateFirstLetterStyle):
2584         (WebCore::RenderBlock::createFirstLetterRenderer):
2585         * rendering/RenderTextFragment.h:
2586
2587             The first letter renderer is always a RenderBoxModelObject,
2588             so make the code deal in that instead of RenderObject.
2589
2590         * rendering/RenderChildIterator.h:
2591         (WebCore::RenderChildIteratorAdapter::first):
2592         (WebCore::RenderChildIteratorAdapter::last):
2593
2594             Remove excess ampersands that were keeping this from building.
2595
2596 2013-11-03  Andreas Kling  <akling@apple.com>
2597
2598         CSSPrimitiveValue identifier constructors should return PassRef.
2599         <https://webkit.org/b/123712>
2600
2601         Make CSSPrimitiveValue::createIdentifier() and the corresponding
2602         CSSValuePool helper return PassRef<CSSPrimitiveValue>.
2603
2604         Reviewed by Antti Koivisto.
2605
2606 2013-11-03  Andreas Kling  <akling@apple.com>
2607
2608         Use RenderChildIterator in two more loops.
2609         <https://webkit.org/b/123713>
2610
2611         Switch two more renderer child traversal loops to childrenOfType.
2612
2613         Reviewed by Antti Koivisto.
2614
2615 2013-11-03  Andreas Kling  <akling@apple.com>
2616
2617         CSSShadowValue constructor should return PassRef.
2618         <https://webkit.org/b/123711>
2619
2620         Make CSSShadowValue::create() return a PassRef since it will never
2621         return null.
2622
2623         Reviewed by Sam Weinig.
2624
2625 2013-11-03  Andreas Kling  <akling@apple.com>
2626
2627         CSSLineBoxContainValue constructor should return PassRef.
2628         <https://webkit.org/b/123710>
2629
2630         Make CSSLineBoxContainValue::create() return a PassRef since it
2631         will never return null.
2632
2633         Reviewed by Sam Weinig.
2634
2635 2013-11-03  Antti Koivisto  <antti@apple.com>
2636
2637         LiveNodeLists should have non-null ContainerNode as root
2638         https://bugs.webkit.org/show_bug.cgi?id=123709
2639
2640         Reviewed by Andreas Kling.
2641
2642         After moving ChildNodeList off from LiveNodeList the root is now always at least a ContainerNode.
2643
2644         * dom/ContainerNode.cpp:
2645         (WebCore::ContainerNode::getElementsByTagName):
2646         (WebCore::ContainerNode::getElementsByTagNameNS):
2647         (WebCore::ContainerNode::getElementsByName):
2648         (WebCore::ContainerNode::getElementsByClassName):
2649         (WebCore::ContainerNode::radioNodeList):
2650         
2651             Also these move from Node to ContainerNode to make tighter typing work.
2652
2653 2013-11-03  Antti Koivisto  <antti@apple.com>
2654
2655         Switch createContextualFragment to element iterator
2656         https://bugs.webkit.org/show_bug.cgi?id=123704
2657
2658         Reviewed by Andreas Kling.
2659
2660         * editing/FrameSelection.cpp:
2661         (WebCore::scanForForm):
2662         
2663             Use type helpers instead of hasTagName
2664
2665         * editing/markup.cpp:
2666         (WebCore::collectElementsToRemoveFromFragment):
2667         (WebCore::removeElementFromFragmentPreservingChildren):
2668         (WebCore::createContextualFragment):
2669         * html/HTMLFormElement.cpp:
2670         (WebCore::HTMLFormElement::formElementIndex):
2671         
2672             Use type helpers instead of hasTagName
2673
2674         * html/HTMLTagNames.in:
2675         
2676             Generate type helpers for <html>.
2677
2678 2013-11-03  Antti Koivisto  <antti@apple.com>
2679
2680         ChildNodeList should not be LiveNodeList
2681         https://bugs.webkit.org/show_bug.cgi?id=123708
2682
2683         Reviewed by Sam Weinig.
2684
2685         ChildNodeList is a poor fit to be a LiveNodeList. It is heavily special-cased. It is also
2686         the only subtype that returns non-Elements thus preventing tightening.
2687
2688         * bindings/js/JSNodeListCustom.cpp:
2689         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2690         
2691             Support new types.
2692
2693         * dom/ChildNodeList.cpp:
2694         (WebCore::EmptyNodeList::~EmptyNodeList):
2695         (WebCore::ChildNodeList::ChildNodeList):
2696         (WebCore::ChildNodeList::~ChildNodeList):
2697         (WebCore::ChildNodeList::length):
2698         (WebCore::childFromFirst):
2699         (WebCore::childFromLast):
2700         (WebCore::ChildNodeList::nodeBeforeCached):
2701         (WebCore::ChildNodeList::nodeAfterCached):
2702         (WebCore::ChildNodeList::item):
2703         (WebCore::ChildNodeList::namedItem):
2704         (WebCore::ChildNodeList::invalidateCache):
2705         
2706             Implement the same caching optimizations as LiveNodeList with tighter, less generic code.
2707
2708         * dom/ChildNodeList.h:
2709         
2710             Inherit ChildNodeList directly from NodeList.
2711
2712             Add new EmptyNodeList type. This is only ever used if NodeList is requested for a non-container node.
2713             It allows tighter typing in ChildNodeList.
2714
2715         * dom/LiveNodeList.cpp:
2716         (WebCore::LiveNodeList::namedItem):
2717         * dom/LiveNodeList.h:
2718         (WebCore::LiveNodeListBase::LiveNodeListBase):
2719         (WebCore::LiveNodeListBase::~LiveNodeListBase):
2720         (WebCore::LiveNodeList::LiveNodeList):
2721         
2722             Remove ChildNodeList specific code and branches.
2723
2724         * dom/Node.cpp:
2725         (WebCore::Node::childNodes):
2726         
2727             Return EmptyNodeList for non-containers.
2728
2729         * dom/NodeList.h:
2730         (WebCore::NodeList::~NodeList):
2731         (WebCore::NodeList::isLiveNodeList):
2732         (WebCore::NodeList::isChildNodeList):
2733         (WebCore::NodeList::isEmptyNodeList):
2734         
2735             For isReachableFromOpaqueRoots.
2736
2737         * dom/NodeRareData.h:
2738         (WebCore::NodeListsNodeData::ensureChildNodeList):
2739         (WebCore::NodeListsNodeData::removeChildNodeList):
2740         (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
2741         (WebCore::NodeListsNodeData::removeEmptyChildNodeList):
2742         (WebCore::NodeListsNodeData::NodeListsNodeData):
2743         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
2744         
2745             EmptyNodeList support.
2746
2747         * html/CollectionType.h:
2748         * html/HTMLCollection.cpp:
2749         (WebCore::shouldOnlyIncludeDirectChildren):
2750         (WebCore::rootTypeFromCollectionType):
2751         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
2752         (WebCore::isMatchingElement):
2753         (WebCore::LiveNodeListBase::itemBefore):
2754         (WebCore::LiveNodeListBase::traverseLiveNodeListFirstElement):
2755         (WebCore::LiveNodeListBase::traverseLiveNodeListForwardToOffset):
2756         (WebCore::LiveNodeListBase::item):
2757         (WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
2758         
2759             Remove ChildNodeList specific code and branches.
2760
2761 2013-11-03  Patrick Gansterer  <paroga@webkit.org>
2762
2763         [WINCE] Replace OwnPtr with GDIObject
2764         https://bugs.webkit.org/show_bug.cgi?id=123670
2765
2766         Reviewed by Anders Carlsson.
2767
2768         * page/win/FrameGdiWin.cpp:
2769         (WebCore::imageFromRect):
2770         * platform/graphics/wince/FontPlatformData.cpp:
2771         (WebCore::FixedSizeFontData::create):
2772         (WebCore::FontPlatformData::hfont):
2773         (WebCore::FontPlatformData::getScaledFontHandle):
2774         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2775         (WebCore::createPen):
2776         (WebCore::createBrush):
2777         (WebCore::GraphicsContext::drawRect):
2778         (WebCore::GraphicsContext::drawLine):
2779         (WebCore::GraphicsContext::drawEllipse):
2780         (WebCore::GraphicsContext::drawConvexPolygon):
2781         (WebCore::GraphicsContext::fillRect):
2782         (WebCore::GraphicsContext::clip):
2783         (WebCore::GraphicsContext::strokeRect):
2784         (WebCore::GraphicsContext::fillRoundedRect):
2785         (WebCore::GraphicsContext::drawRoundCorner):
2786         (WebCore::GraphicsContext::fillPath):
2787         (WebCore::GraphicsContext::strokePath):
2788         (WebCore::GraphicsContext::drawText):
2789         * platform/graphics/wince/ImageWinCE.cpp:
2790         (WebCore::BitmapImage::getHBITMAPOfSize):
2791         * platform/graphics/wince/SharedBitmap.cpp:
2792         (WebCore::SharedBitmap::createHandle):
2793         (WebCore::SharedBitmap::draw):
2794         (WebCore::SharedBitmap::clipBitmap):
2795         (WebCore::drawPatternSimple):
2796         (WebCore::SharedBitmap::drawPattern):
2797         (WebCore::SharedBitmap::DCProvider::getDC):
2798         * platform/graphics/wince/SharedBitmap.h:
2799
2800 2013-11-03  Antti Koivisto  <antti@apple.com>
2801
2802         Add helpers for partial descendant traversal to element iterators
2803         https://bugs.webkit.org/show_bug.cgi?id=123703
2804
2805         Reviewed by Andreas Kling.
2806
2807         * dom/ElementAncestorIterator.h:
2808         (WebCore::lineageOfType):
2809         
2810             lineageOfType definition didn't match the declaration.
2811
2812         * dom/ElementDescendantIterator.h:
2813         (WebCore::::find):
2814         (WebCore::::from):
2815         
2816             Add find and from for getting begin iterator for partial traversals.
2817
2818         * editing/FrameSelection.cpp:
2819         (WebCore::scanForForm):
2820         (WebCore::FrameSelection::currentForm):
2821         * html/HTMLFormElement.cpp:
2822         (WebCore::HTMLFormElement::formElementIndex):
2823         (WebCore::HTMLFormElement::findClosestFormAncestor):
2824         
2825             Use them in a few places.
2826
2827 2013-11-03  Andreas Kling  <akling@apple.com>
2828
2829         Inline RenderStyle functions for getting/setting pseudo style bits.
2830         <https://webkit.org/b/123702>
2831
2832         hasPseudoStyle() actually shows up on html5-full-render.html,
2833         and it's pretty crazy to eat the cost of a function call just
2834         to do some basic bit twiddling.
2835
2836         Reviewed by Antti Koivisto.
2837
2838 2013-11-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2839
2840         Remove HTMLMediaElement.initialTime
2841         https://bugs.webkit.org/show_bug.cgi?id=123572
2842
2843         Reviewed by Eric Carlson.
2844
2845         Patch based on one by: philipj@opera.com
2846         Blink review URL: https://codereview.chromium.org/35033002
2847
2848         initialTime has been removed from the HTMLMediaElement.
2849
2850         * bindings/gobject/WebKitDOMCustom.cpp:
2851         (webkit_dom_html_media_element_get_initial_time):
2852         * bindings/gobject/WebKitDOMCustom.h:
2853         * bindings/gobject/WebKitDOMCustom.symbols: Added phony function.
2854         * html/HTMLMediaElement.cpp:
2855         * html/HTMLMediaElement.h:
2856         * html/HTMLMediaElement.idl: Removed HTMLMediaElement::initialTime.
2857
2858 2013-11-02  Alexey Proskuryakov  <ap@apple.com>
2859
2860         Implement generateKey for HMAC and AES-CBC
2861         https://bugs.webkit.org/show_bug.cgi?id=123669
2862
2863         Reviewed by Dan Bernstein.
2864
2865         Tests: crypto/subtle/aes-cbc-generate-key.html
2866                crypto/subtle/hmac-generate-key.html
2867
2868         * WebCore.xcodeproj/project.pbxproj: Added new files.
2869
2870         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2871         (WebCore::createAesKeyGenParams): Added bindings for AesKeyGenParams.
2872         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Handle
2873         algorithms that generate AES and HMAC keys.
2874
2875         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::generateKey): Added.
2876
2877         * crypto/CryptoAlgorithmAesKeyGenParams.h: Added.
2878
2879         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::randomData):
2880         * crypto/CryptoKey.h:
2881         * crypto/CryptoKeyMac.cpp: Added
2882         Expose a function that produces random data for symmetric crypto keys. Cross-platform
2883         implementation uses ARC4 code from WTF, while Mac uses a system function that
2884         provides a FIPS validated random number generator.
2885
2886         * crypto/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::generate):
2887         * crypto/CryptoKeyAES.h:
2888         Added a function that creates AES keys.
2889
2890         * crypto/SubtleCrypto.idl: Added generateKey.
2891
2892         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2893         (WebCore::CryptoAlgorithmAES_CBC::generateKey): Added.
2894
2895         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2896         (WebCore::CryptoAlgorithmHMAC::generateKey): Added.
2897
2898         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::generate):
2899         * crypto/keys/CryptoKeyHMAC.h:
2900         Added a function that creates HMAC keys.
2901
2902         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Removed generateKey stub, the implementation
2903         ended up in cross-platform file.
2904
2905         * crypto/mac/CryptoAlgorithmHMACMac.cpp: Ditto.
2906
2907 2013-11-02  Christophe Dumez  <ch.dumez@samsung.com>
2908
2909         EnforceRange doesn't enforce range of a short
2910         https://bugs.webkit.org/show_bug.cgi?id=123661
2911
2912         Reviewed by Alexey Proskuryakov.
2913
2914         Handle Web IDL short / unsigned short types as per the
2915         specification:
2916         - http://www.w3.org/TR/WebIDL/#es-short
2917         - http://www.w3.org/TR/WebIDL/#es-unsigned-short
2918
2919         Specifically, we used to treat short / unsigned short as 32bit
2920         integers, which was wrong. We now properly handle them as 16bit
2921         integers.
2922
2923         No new tests, added test cases to js/dom/webidl-type-mapping.html.
2924
2925         * WebCore.exp.in:
2926         * bindings/js/JSDOMBinding.cpp:
2927         (WebCore::toSmallerInt):
2928         (WebCore::toSmallerUInt):
2929         (WebCore::toInt8):
2930         (WebCore::toUInt8):
2931         (WebCore::toInt16):
2932         (WebCore::toUInt16):
2933         * bindings/js/JSDOMBinding.h:
2934         * bindings/scripts/CodeGeneratorJS.pm:
2935         (JSValueToNative):
2936         * bindings/scripts/test/JS/JSTestObj.cpp:
2937         (WebCore::setJSTestObjShortAttr):
2938         (WebCore::setJSTestObjUnsignedShortAttr):
2939         * testing/TypeConversions.h:
2940         (WebCore::TypeConversions::testShort):
2941         (WebCore::TypeConversions::setTestShort):
2942         (WebCore::TypeConversions::testEnforceRangeShort):
2943         (WebCore::TypeConversions::setTestEnforceRangeShort):
2944         (WebCore::TypeConversions::testUnsignedShort):
2945         (WebCore::TypeConversions::setTestUnsignedShort):
2946         (WebCore::TypeConversions::testEnforceRangeUnsignedShort):
2947         (WebCore::TypeConversions::setTestEnforceRangeUnsignedShort):
2948         * testing/TypeConversions.idl:
2949
2950 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
2951
2952         Cleanup OpenTypeUtilities
2953         https://bugs.webkit.org/show_bug.cgi?id=123686
2954
2955         Reviewed by Darin Adler.
2956
2957         Merge the WinCE specific code into the general Windows code to
2958         make the compilation of WinCE port on WinNT easier.
2959
2960         * platform/graphics/opentype/OpenTypeUtilities.cpp:
2961         (WebCore::renameFont):
2962         (WebCore::renameAndActivateFont):
2963         * platform/graphics/opentype/OpenTypeUtilities.h:
2964         * platform/graphics/win/FontCustomPlatformData.cpp:
2965         (WebCore::createFontCustomPlatformData):
2966         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2967         (WebCore::createFontCustomPlatformData):
2968         * platform/graphics/wince/FontCustomPlatformData.cpp:
2969         (WebCore::createFontCustomPlatformData):
2970
2971 2013-11-02  Andreas Kling  <akling@apple.com>
2972
2973         CSSFontFaceSrcValue constructors should return PassRef.
2974         <https://webkit.org/b/123692>
2975
2976         Make functions that return non-null CSSFontFaceSrcValues return
2977         PassRef instead of PassRefPtr. Tweak some call sites to be
2978         slightly more efficient.
2979
2980         Reviewed by Anders Carlsson.
2981
2982 2013-11-02  Andreas Kling  <akling@apple.com>
2983
2984         CSSStyleSheet::contents() should return a reference.
2985         <https://webkit.org/b/123689>
2986
2987         Make CSSStyleSheet::contents() return a StyleSheetContents& instead
2988         of a pointer. The object was already stored in a Ref.
2989
2990         Reviewed by Anders Carlsson.
2991
2992 2013-11-02  Andreas Kling  <akling@apple.com>
2993
2994         CSSReflectValue constructor should return PassRef.
2995         <https://webkit.org/b/123963>
2996
2997         Make CSSReflectValue::create() return a PassRef. Tweak one call
2998         site to be slightly more efficient.
2999
3000         Reviewed by Anders Carlsson.
3001
3002 2013-11-02  Andreas Kling  <akling@apple.com>
3003
3004         CSSFontFeatureValue constructor should return PassRef.
3005         <https://webkit.org/b/123691>
3006
3007         Make CSSFontFeatureValue::create() return PassRef, since it never
3008         returns null. Tweak one call site to be slightly more efficient.
3009
3010         Reviewed by Anders Carlsson.
3011
3012 2013-11-02  Andreas Kling  <akling@apple.com>
3013
3014         Tighten typing in SVGResources::buildCachedResources().
3015         <https://webkit.org/b/123690>
3016
3017         Make this function take a RenderElement&/SVGRenderStyle& pair instead
3018         of a RenderObject*/SVGRenderStyle* pair. Also tweaked the code a bit,
3019         removing ampersands and asserts as appropriate.
3020
3021         Reviewed by Anders Carlsson.
3022
3023 2013-11-02  Andreas Kling  <akling@apple.com>
3024
3025         CSSImageValue constructors should return PassRef.
3026         <https://webkit.org/b/123688>
3027
3028         Make the CSSImageValue::create() helpers return PassRef.
3029         Tightened call sites to avoid null checks and destructor calls.
3030
3031         Reviewed by Anders Carlsson.
3032
3033 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
3034
3035         Fix compilation of SynchronousLoaderClient
3036         https://bugs.webkit.org/show_bug.cgi?id=123676
3037
3038         Reviewed by Darin Adler.
3039
3040         Assign a ResourceRequest varibale an empty ResourceRequest instead of 0.
3041         The current solution only works for ports which can create a
3042         ResourceRequest from a pointer, which might not be true for all ports.
3043
3044         * platform/network/SynchronousLoaderClient.cpp:
3045         (WebCore::SynchronousLoaderClient::willSendRequest):
3046
3047 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
3048
3049         Port LoggingWin.cpp to WinCE
3050         https://bugs.webkit.org/show_bug.cgi?id=123678
3051
3052         Reviewed by Darin Adler.
3053
3054         This makes it easier to use a common list of files
3055         for the different Windows ports later.
3056
3057         * PlatformWin.cmake:
3058         * platform/win/LoggingWin.cpp:
3059         (WebCore::logLevelString):
3060
3061 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
3062
3063         Fix UnicodeWchar after r157330.
3064         https://bugs.webkit.org/show_bug.cgi?id=123668
3065
3066         Reviewed by Darin Adler.
3067
3068         * editing/TextIterator.cpp:
3069         (WebCore::SearchBuffer::append):
3070         * platform/graphics/wince/FontWinCE.cpp:
3071         (WebCore::generateComponents):
3072         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3073         (WebCore::GraphicsContext::drawText):
3074         * platform/text/wchar/TextBreakIteratorWchar.cpp:
3075         (WebCore::isCharStop):
3076         (WebCore::isLineStop):
3077         (WebCore::isSentenceStop):
3078         (WebCore::WordBreakIterator::next):
3079         (WebCore::WordBreakIterator::previous):
3080
3081 2013-11-02  Andreas Kling  <akling@apple.com>
3082
3083         Use RenderChildIterator in a couple of places.
3084         <https://webkit.org/b/123684>
3085
3086         Added isRendererOfType() for RenderBox and RenderBlock and switch
3087         some loops over to using childrenOfType<>. Also sprinkled const
3088         and references on touched code.
3089
3090         Reviewed by Antti Koivisto.
3091
3092 2013-11-02  Zan Dobersek  <zdobersek@igalia.com>
3093
3094         Manage FileReaderLoader through std::unique_ptr
3095         https://bugs.webkit.org/show_bug.cgi?id=123666
3096
3097         Reviewed by Anders Carlsson.
3098
3099         Construct FileReaderLoader objects through std::make_unique and store them in std::unique_ptr.
3100
3101         * fileapi/FileReader.cpp:
3102         (WebCore::FileReader::readInternal):
3103         * fileapi/FileReader.h:
3104
3105 2013-11-02  Andreas Kling  <akling@apple.com>
3106
3107         Add a child renderer iterator.
3108         <https://webkit.org/b/123662>
3109
3110         Introduce an ElementIterator-style iterator for renderers and put
3111         it to use in a childrenOfType() implementation.
3112
3113         It's used just like the Element iterators:
3114
3115         auto sections = childrenOfType<RenderTableSection>(*this);
3116         for (auto section = sections.begin(), section = sections.end(); section != sections.end(); ++section)
3117             section->thisOrThat();
3118
3119         Just like the DOM counterpart, it relies on a templatized helper:
3120
3121             bool isRendererOfType<T>(const RenderObject&)
3122
3123         This patch puts the iterator to use in a couple of random places.
3124
3125         Reviewed by Antti Koivisto.
3126
3127 2013-11-02  Alexey Proskuryakov  <ap@apple.com>
3128
3129         Implement remaining SHA variations for WebCrypto
3130         https://bugs.webkit.org/show_bug.cgi?id=123659
3131
3132         Reviewed by Anders Carlsson.
3133
3134         Tests: crypto/subtle/sha-224.html
3135                crypto/subtle/sha-256.html
3136                crypto/subtle/sha-384.html
3137                crypto/subtle/sha-512.html
3138
3139         * WebCore.xcodeproj/project.pbxproj:
3140         * crypto/algorithms/CryptoAlgorithmSHA224.cpp: Added.
3141         (WebCore::CryptoAlgorithmSHA224::CryptoAlgorithmSHA224):
3142         (WebCore::CryptoAlgorithmSHA224::~CryptoAlgorithmSHA224):
3143         (WebCore::CryptoAlgorithmSHA224::create):
3144         (WebCore::CryptoAlgorithmSHA224::identifier):
3145         * crypto/algorithms/CryptoAlgorithmSHA224.h: Added.
3146         * crypto/algorithms/CryptoAlgorithmSHA256.cpp: Added.
3147         (WebCore::CryptoAlgorithmSHA256::CryptoAlgorithmSHA256):
3148         (WebCore::CryptoAlgorithmSHA256::~CryptoAlgorithmSHA256):
3149         (WebCore::CryptoAlgorithmSHA256::create):
3150         (WebCore::CryptoAlgorithmSHA256::identifier):
3151         * crypto/algorithms/CryptoAlgorithmSHA256.h: Added.
3152         * crypto/algorithms/CryptoAlgorithmSHA384.cpp: Added.
3153         (WebCore::CryptoAlgorithmSHA384::CryptoAlgorithmSHA384):
3154         (WebCore::CryptoAlgorithmSHA384::~CryptoAlgorithmSHA384):
3155         (WebCore::CryptoAlgorithmSHA384::create):
3156         (WebCore::CryptoAlgorithmSHA384::identifier):
3157         * crypto/algorithms/CryptoAlgorithmSHA384.h: Added.
3158         * crypto/algorithms/CryptoAlgorithmSHA512.cpp: Added.
3159         (WebCore::CryptoAlgorithmSHA512::CryptoAlgorithmSHA512):
3160         (WebCore::CryptoAlgorithmSHA512::~CryptoAlgorithmSHA512):
3161         (WebCore::CryptoAlgorithmSHA512::create):
3162         (WebCore::CryptoAlgorithmSHA512::identifier):
3163         * crypto/algorithms/CryptoAlgorithmSHA512.h: Added.
3164         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
3165         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
3166         * crypto/mac/CryptoAlgorithmSHA224Mac.cpp: Added.
3167         (WebCore::CryptoAlgorithmSHA224::digest):
3168         * crypto/mac/CryptoAlgorithmSHA256Mac.cpp: Added.
3169         (WebCore::CryptoAlgorithmSHA256::digest):
3170         * crypto/mac/CryptoAlgorithmSHA384Mac.cpp: Added.
3171         (WebCore::CryptoAlgorithmSHA384::digest):
3172         * crypto/mac/CryptoAlgorithmSHA512Mac.cpp: Added.
3173         (WebCore::CryptoAlgorithmSHA512::digest):
3174
3175 2013-11-02  Patrick Gansterer  <paroga@webkit.org>
3176
3177         Various small WinCE build fixes
3178
3179         * editing/TextIterator.cpp:
3180         (WebCore::SearchBuffer::append):
3181         * platform/graphics/BitmapImage.h:
3182         * platform/graphics/wince/ImageWinCE.cpp:
3183         (WebCore::BitmapImage::getHBITMAPOfSize):
3184         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3185         * platform/graphics/wince/PlatformPathWinCE.h:
3186         * platform/win/PopupMenuWin.h:
3187         * rendering/RenderThemeWinCE.cpp:
3188         (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle):
3189
3190 2013-11-01  Alexey Proskuryakov  <ap@apple.com>
3191
3192         Add WebCrypto AES-CBC
3193         https://bugs.webkit.org/show_bug.cgi?id=123647
3194
3195         Reviewed by Anders Carlsson.
3196
3197         Tests: crypto/subtle/aes-cbc-192-encrypt-decrypt.html
3198                crypto/subtle/aes-cbc-256-encrypt-decrypt.html
3199                crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html
3200                crypto/subtle/aes-cbc-encrypt-decrypt.html
3201                crypto/subtle/aes-cbc-invalid-length.html
3202                crypto/subtle/aes-cbc-wrong-key-class.html
3203
3204         * WebCore.xcodeproj/project.pbxproj: Added new files.
3205         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3206         (WebCore::getProperty): Factored out a function to get a property as JSValue.
3207         (WebCore::getHashAlgorithm): Use it.
3208         (WebCore::createAesCbcParams): Added converter for AesCbcParams.
3209         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Support AES_CBC.
3210         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
3211         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Support all
3212         algorithms, all the new ones just have trivial dictionaries.
3213         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Ditto.
3214
3215         * bindings/js/JSCryptoOperationData.cpp: Added.
3216         (WebCore::sequenceOfCryptoOperationDataFromJSValue):
3217         (WebCore::cryptoOperationDataFromJSValue):
3218         * bindings/js/JSCryptoOperationData.h: Added.
3219         Moved CryptoOperationData bindings out of JSSubtleCryptoCustom.cpp, so that we
3220         could use them in JSCryptoAlgorithmDictionary.cpp.
3221
3222         * bindings/js/JSDOMPromise.h: (WebCore::PromiseWrapper::reject): Added a specialization
3223         to reject with null result. The spec doesn't actually say how algorithms fail.
3224
3225         * bindings/js/JSSubtleCryptoCustom.cpp:
3226         (WebCore::JSSubtleCrypto::encrypt): Added.
3227         (WebCore::JSSubtleCrypto::decrypt): Ditto.
3228         (WebCore::JSSubtleCrypto::sign): Style fix.
3229
3230         * crypto/CryptoAlgorithmAesCbcParams.h: Added.
3231
3232         * crypto/CryptoKey.h:
3233         (WebCore::CryptoKeyClass):
3234         * crypto/keys/CryptoKeyHMAC.h:
3235         (WebCore::asCryptoKeyHMAC):
3236         Added poor man's RTTI, so that we can safely upcast Keys passed fro JavaScript code.
3237
3238         * crypto/CryptoKeyAES.cpp: Added.
3239         (WebCore::CryptoKeyAES::CryptoKeyAES):
3240         (WebCore::CryptoKeyAES::~CryptoKeyAES):
3241         (WebCore::CryptoKeyAES::buildAlgorithmDescription):
3242         * crypto/CryptoKeyAES.h: Added.
3243         (WebCore::asCryptoKeyAES):
3244         AES keys are the same for all algorithms, but they still need to remember the algorithm.
3245
3246         * crypto/SubtleCrypto.idl: Added encrypt/decrypt.
3247
3248         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: Added.
3249         (WebCore::CryptoAlgorithmAES_CBC::CryptoAlgorithmAES_CBC):
3250         (WebCore::CryptoAlgorithmAES_CBC::~CryptoAlgorithmAES_CBC):
3251         (WebCore::CryptoAlgorithmAES_CBC::create):
3252         (WebCore::CryptoAlgorithmAES_CBC::identifier):
3253         (WebCore::CryptoAlgorithmAES_CBC::importKey):
3254         (WebCore::CryptoAlgorithmAES_CBC::exportKey):
3255         * crypto/algorithms/CryptoAlgorithmAES_CBC.h: Added.
3256         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Added.
3257         (WebCore::transformAES_CBC):
3258         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
3259         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
3260         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
3261         Added.
3262
3263         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
3264         (WebCore::CryptoAlgorithmHMAC::sign):
3265         (WebCore::CryptoAlgorithmHMAC::verify):
3266         Check key class before casting it to CryptoKeyHMAC.
3267
3268         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
3269         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register AES-CBC
3270         on Mac, so that it can be used.
3271
3272 2013-11-01  Andreas Kling  <akling@apple.com>
3273
3274         SVGRenderStyle accessors should return references.
3275         <https://webkit.org/b/123656>
3276
3277         RenderStyle::svgStyle() and accessSVGStyle() never return null,
3278         so make them return references instead.
3279         
3280         This flushed out a myriad of pointless null checks and assertions.
3281
3282         Reviewed by Anders Carlsson.
3283
3284 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3285
3286         Removing MediaStreamTrackVector and MediaStreamSourceVector typedefs
3287         https://bugs.webkit.org/show_bug.cgi?id=123648
3288
3289         Reviewed by Eric Carlson.
3290
3291         No new tests needed.
3292
3293         * Modules/mediastream/MediaStream.cpp:
3294         (WebCore::MediaStream::create):
3295         (WebCore::MediaStream::clone):
3296         (WebCore::MediaStream::cloneMediaStreamTrackVector):
3297         (WebCore::MediaStream::addTrack):
3298         (WebCore::MediaStream::removeTrack):
3299         (WebCore::MediaStream::haveTrackWithSource):
3300         (WebCore::MediaStream::getTrackById):
3301         (WebCore::MediaStream::trackVectorForType):
3302         * Modules/mediastream/MediaStream.h:
3303         * Modules/mediastream/MediaStreamTrack.h:
3304         * Modules/mediastream/UserMediaRequest.cpp:
3305         (WebCore::UserMediaRequest::callSuccessHandler):
3306         * Modules/webaudio/AudioContext.cpp:
3307         (WebCore::AudioContext::createMediaStreamSource):
3308         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
3309         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
3310         * platform/mediastream/MediaStreamDescriptor.cpp:
3311         (WebCore::MediaStreamDescriptor::create):
3312         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
3313         * platform/mediastream/MediaStreamDescriptor.h:
3314         * platform/mediastream/MediaStreamSource.h:
3315
3316 2013-11-01  Andreas Kling  <akling@apple.com>
3317
3318         createFontFaceValue() should be smarter about overgrown cache.
3319         <https://webkit.org/b/123643>
3320
3321         Instead of clearing the whole font-face value cache when it passes
3322         128 entries, just delete one entry at random.
3323
3324         Reviewed by Geoffrey Garen.
3325
3326 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3327
3328         Fixing mac code to use new MediaStreamDescriptor create method
3329         https://bugs.webkit.org/show_bug.cgi?id=123653
3330
3331         Reviewed by Eric Carlson.
3332
3333         No new tests needed.
3334
3335         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
3336         (WebCore::MediaStreamCenterMac::createMediaStream):
3337
3338 2013-11-01  Andreas Kling  <akling@apple.com>
3339
3340         Re-use existing RenderStyle local in textWidth().
3341         <https://webkit.org/b/123392>
3342
3343         We already have the RenderStyle cached in a local here, so avoid
3344         getting it from RenderText since that has to go via the parent.
3345
3346         Reviewed by Antti Koivisto.
3347
3348 2013-11-01  Andreas Kling  <akling@apple.com>
3349
3350         Neuter WTF_MAKE_FAST_ALLOCATED in GLOBAL_FASTMALLOC_NEW builds.
3351         <https://webkit.org/b/123639>
3352
3353         WebCore::TimerBase really needed to have the new/delete operators
3354         overridden, in order for WebCore::SuspendableTimer to be able to
3355         choose that "operator new" out of the two it inherits.
3356
3357         Reviewed by Anders Carlsson.
3358
3359 2013-11-01  Andreas Kling  <akling@apple.com>
3360
3361         CSSCanvasValue construction helper should return PassRef.
3362         <https://webkit.org/b/123650>
3363
3364         Return PassRef instead of PassRefPtr from functions that return
3365         ownership-passing pointers that are known to be non-null.
3366
3367         Reviewed by Anders Carlsson.
3368
3369 2013-11-01  Joseph Pecoraro  <pecoraro@apple.com>
3370
3371         Move CF/Mac WTF String implementations down into WTF
3372         https://bugs.webkit.org/show_bug.cgi?id=123635
3373
3374         Reviewed by Sam Weinig.
3375
3376         * WebCore.vcxproj/WebCore.vcxproj:
3377         * WebCore.vcxproj/WebCore.vcxproj.filters:
3378         * WebCore.xcodeproj/project.pbxproj:
3379
3380 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3381
3382         Removing unnecessary early returns in addTrack, removeTrack and removeRemoteSource methods
3383         https://bugs.webkit.org/show_bug.cgi?id=123644
3384
3385         Reviewed by Eric Carlson.
3386
3387         No new tests needed.
3388
3389         * Modules/mediastream/MediaStream.cpp:
3390         (WebCore::MediaStream::addTrack):
3391         (WebCore::MediaStream::removeTrack):
3392         (WebCore::MediaStream::removeRemoteSource):
3393         (WebCore::MediaStream::trackVectorForType):
3394         * Modules/mediastream/MediaStream.h:
3395
3396 2013-11-01  Andreas Kling  <akling@apple.com>
3397
3398         CSSAspectRatioValue construction helper should return PassRef.
3399         <https://webkit.org/b/123645>
3400
3401         Return PassRef instead of PassRefPtr from functions that return
3402         ownership-passing pointers that are known to be non-null.
3403
3404         Reviewed by Darin Adler.
3405
3406 2013-11-01  Myles C. Maxfield  <mmaxfield@apple.com>
3407
3408         Initial implementation of text-decoration-skip ink
3409         https://bugs.webkit.org/show_bug.cgi?id=121806
3410
3411         Reviewed by Darin Adler.
3412
3413         text-decoration-skip: ink is implemented by the following steps:
3414         1. Before drawing any decorations, figure out the bounding box for the decorations that will be drawn
3415         2. Create an ImageBuffer with these dimensions
3416         3. Draw text into this ImageBuffer with a thicker stroke
3417         4. Apply the ImageBuffer as a mask to the context
3418         5. Draw decorations like normal
3419         6. Clean up
3420
3421         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink.html
3422
3423         * platform/graphics/cg/GraphicsContextCG.cpp:
3424         (WebCore::computeLineBoundsAndAntialiasingModeForText): Don't call GraphicsContext::roundToDevicePixels
3425         when painting is disabled
3426         * rendering/InlineTextBox.cpp:
3427         (WebCore::InlineTextBox::paint): Pass the TextPainter to paintDecoration
3428         (WebCore::computeUnderlineOffset): Small cleanup
3429         (WebCore::getWavyStrokeControlPointDistance): Pulling out of strokeWavyTextDecoration()
3430         (WebCore::getWavyStrokeStep): Ditto
3431         (WebCore::strokeWavyTextDecoration): Use the previous 2 functions
3432         (WebCore::getSingleDecorationBoundingBox): Pulling out repeated code into a function
3433         (WebCore::getDecorationBoundingBox): Compute the bounding box for an underline which
3434         hasn't been drawn yet
3435         (WebCore::InlineTextBox::paintDecoration): Construct a mask and apply it to the GraphicsContext
3436         * rendering/InlineTextBox.h: paintDecoration needs the TextPainter
3437         * rendering/style/RenderStyle.cpp:
3438         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Redraw the underline when
3439         text-decoration-skip changes
3440
3441 2013-11-01  Andreas Kling  <akling@apple.com>
3442
3443         CSS 'initial' and 'inherit' value constructors should return PassRef.
3444         <https://webkit.org/b/123641>
3445
3446         Make the helpers involved in constructing CSS{Initial,Inherited}Value
3447         all return PassRef instead of PassRefPtr. This avoids generating
3448         pointless null checks at the call sites.
3449
3450         Reviewed by Darin Adler.
3451
3452 2013-11-01  Andreas Kling  <akling@apple.com>
3453
3454         Kill RenderArena.
3455         <https://webkit.org/b/123634>
3456
3457         There are no remaining users of the RenderArena allocator.
3458
3459         Reviewed by Geoffrey Garen.
3460
3461 2013-11-01  James Craig  <jcraig@apple.com>
3462
3463         AX: Regression: media controls are no longer accessible
3464         https://bugs.webkit.org/show_bug.cgi?id=121990
3465
3466         Reviewed by Jer Noble.
3467
3468         Updated existing test coverage.
3469         Added ARIA roles, attrs, and labels to the new media controls shadow DOM.
3470         Localization will be handled in http://webkit.org/b/120956
3471
3472         * Modules/mediacontrols/mediaControlsApple.js:
3473         (Controller.prototype.UIString):
3474         (Controller.prototype.createControls):
3475         (Controller.prototype.handleLoadStart):
3476         (Controller.prototype.handleError):
3477         (Controller.prototype.handleAbort):
3478         (Controller.prototype.handleSuspend):
3479         (Controller.prototype.handleStalled):
3480         (Controller.prototype.handleWaiting):
3481         (Controller.prototype.handleFullscreenChange):
3482         (Controller.prototype.handleMuteButtonClicked):
3483         (Controller.prototype.handleMinButtonClicked):
3484         (Controller.prototype.handleMaxButtonClicked):
3485         (Controller.prototype.handleVolumeSliderChange):
3486         (Controller.prototype.updatePlaying):
3487
3488 2013-11-01  Andreas Kling  <akling@apple.com>
3489
3490         Take BidiRuns out of the arena.
3491         <https://webkit.org/b/123630>
3492
3493         Stop arena-allocating BidiRun objects and use regular new/delete.
3494
3495         With this, there are no remaining clients of RenderArena.
3496         It will be removed in a subsequent patch.
3497
3498         Reviewed by Anders Carlsson.
3499
3500 2013-11-01  Afonso R. Costa Jr.  <afonso.costa@samsung.com>
3501
3502         Expose setApplicationCacheOriginQuota via window.internals
3503         https://bugs.webkit.org/show_bug.cgi?id=87838
3504
3505         Reviewed by Joseph Pecoraro.
3506
3507         Also reset the default origin quota in resetToConsistentState().
3508
3509         * testing/Internals.cpp: Add setApplicationCacheOriginQuota.
3510         (WebCore::Internals::resetToConsistentState): Reset the default origin
3511         quota.
3512         (WebCore::Internals::setApplicationCacheOriginQuota): Added.
3513         * testing/Internals.h: Add setApplicationCacheOriginQuota.
3514         * testing/Internals.idl: Ditto.
3515
3516 2013-11-01  Nick Diego Yamane  <nick.yamane@openbossa.org>
3517
3518         Explicitly initialize RefCounted base class in MediaStreamTrack's constructors
3519         https://bugs.webkit.org/show_bug.cgi?id=123620
3520
3521         Reviewed by Andreas Kling.
3522
3523         No new tests needed.
3524
3525         * Modules/mediastream/MediaStreamTrack.cpp:
3526         (WebCore::MediaStreamTrack::MediaStreamTrack):
3527
3528 2013-11-01  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3529
3530         Adding addRemoteTrack and removeRemoteTrack functions to MediaStreamDescriptor and MediaStream
3531         https://bugs.webkit.org/show_bug.cgi?id=123477
3532
3533         Reviewed by Eric Carlson.
3534
3535         When the backend report that a remote track has been added or removed by a remote peer, we must be able to add
3536         it to its MediaStream
3537
3538         No new tests needed.
3539
3540         * Modules/mediastream/MediaStream.cpp:
3541         (WebCore::MediaStream::addTrack): Splitted in two parts that can be used by old addTrack and new addRemoteTrack.
3542         (WebCore::MediaStream::removeTrack): Splitted in two parts that can be used by old removeTrack and new
3543         removeRemoteTrack.
3544         (WebCore::MediaStream::addRemoteSource): Reusing code in new addTrack method.
3545         (WebCore::MediaStream::removeRemoteSource): Refactored.
3546         (WebCore::MediaStream::addRemoteTrack): Added.
3547         (WebCore::MediaStream::removeRemoteTrack): Added.
3548         (WebCore::MediaStream::getTrackVectorForType): Helper method that returns a vector of tracks according to
3549         track's type (Audio or Video).
3550
3551         * Modules/mediastream/MediaStream.h:
3552         * Modules/mediastream/MediaStreamTrack.cpp:
3553         (WebCore::MediaStreamTrack::MediaStreamTrack):
3554         * platform/mediastream/MediaStreamDescriptor.cpp:
3555         (WebCore::MediaStreamDescriptor::addRemoteTrack): Added.
3556         (WebCore::MediaStreamDescriptor::removeRemoteTrack): Added.
3557         * platform/mediastream/MediaStreamDescriptor.h:
3558
3559 2013-11-01  Brendan Long  <b.long@cablelabs.com>
3560
3561         [GStreamer] Support audio and video tracks
3562         https://bugs.webkit.org/show_bug.cgi?id=117039
3563
3564         Reviewed by Philippe Normand.
3565
3566         Tests: media/track/audio/audio-track-mkv-vorbis-addtrack.html
3567                media/track/audio/audio-track-mkv-vorbis-enabled.html
3568                media/track/audio/audio-track-mkv-vorbis-language.html
3569                media/track/in-band/track-in-band-kate-ogg-addtrack.html
3570                media/track/in-band/track-in-band-srt-mkv-addtrack.html
3571                media/track/video/video-track-mkv-theora-addtrack.html
3572                media/track/video/video-track-mkv-theora-language.html
3573                media/track/video/video-track-mkv-theora-selected.html
3574
3575         * GNUmakefile.list.am: Add audio and video track files.
3576         * PlatformEfl.cmake: Same.
3577         * html/HTMLMediaElement.cpp:
3578         (WebCore::HTMLMediaElement::audioTrackEnabledChanged): Schedule "change" event.
3579         (WebCore::HTMLMediaElement::videoTrackSelectedChanged): Same.
3580         * html/track/AudioTrack.cpp:
3581         (WebCore::AudioTrack::setEnabled): Call m_private->setEnabled
3582         (WebCore::AudioTrack::enabledChanged): Added callback.
3583         (WebCore::AudioTrack::labelChanged): Same.
3584         (WebCore::AudioTrack::languageChanged): Same.
3585         (WebCore::AudioTrack::willRemoveAudioTrackPrivate): Use ASSERT_UNUSED for consistence.
3586         * html/track/AudioTrack.h: Add new enabled, label and language callbacks.
3587         * html/track/VideoTrack.cpp:
3588         (WebCore::VideoTrack::setSelected): Call m_private->setEnabled
3589         (WebCore::VideoTrack::selectedChanged): Added callback.
3590         (WebCore::VideoTrack::labelChanged): Same.
3591         (WebCore::VideoTrack::languageChanged): Same.
3592         (WebCore::VideoTrack::willRemoveVideoTrackPrivate): Use ASSERT_UNUSED for consistence.
3593         * html/track/VideoTrack.h: Add new selected, label and language callbacks.
3594         * platform/graphics/AudioTrackPrivate.h:
3595         (WebCore::AudioTrackPrivate::setEnabled): Call m_client->enabledChanged
3596         * platform/graphics/VideoTrackPrivate.h:
3597         (WebCore::VideoTrackPrivate::setSelected): Call m_client->selectedChanged
3598         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3599         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Add ASSERT(m_pad)
3600         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Look at all tag events instead of just the first one.
3601         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3602         (WebCore::mediaPlayerPrivateVideoSinkCapsChangedCallback): Separated callback when caps change from callback when number of videos change.
3603         (WebCore::mediaPlayerPrivateVideoCapsChangeTimeoutCallback): Same.
3604         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_videoCapsTimerHandler.
3605         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect audio and video tracks and remove callbacks.
3606         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged): Separated callback when caps change from callback when number of videos change.
3607         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Create video tracks for each stream.
3608         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps): Separated callback when caps change from callback when number of videos change.
3609         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Create audio tracks for each stream.
3610         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add audio and video tracks, and a pointer to keep track of the default audio stream.
3611         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: Added.
3612         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Added.
3613         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr<GstTagList>
3614         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: Added, handles tags and "active" property of audio and video tracks.
3615         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Added.
3616         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Added.
3617         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Added.
3618
3619 2013-11-01  Patrick Gansterer  <paroga@webkit.org>
3620
3621         Buildfix for !ENABLE(INSPECTOR) after 157288.
3622
3623         * inspector/InspectorInstrumentation.h:
3624         (WebCore::InspectorInstrumentation::willDispatchEvent):
3625
3626 2013-11-01  Mario Sanchez Prada  <mario.prada@samsung.com>
3627
3628         [ATK] Avoid explicit traversal of text controls and the render tree in AtkText implementation
3629         https://bugs.webkit.org/show_bug.cgi?id=123153
3630
3631         Reviewed by Chris Fleizach.
3632
3633         Remove functions from the AtkText implementation that manually
3634         walk the render tree to compose the text for a exposed objects in
3635         certain cases (e.g. anonymous blocks, text controls).
3636
3637         The reason for this change is that the current implementation
3638         follows an error-prone approach, since by doing things like
3639         manually walking the render tree from here we are not properly
3640         considering all the possible scenarios that might happen when
3641         traversing text. This, however, is a task that is better suited
3642         for the TextIterator, which is already written to consider all
3643         those cases and to emit the proper character in every single
3644         situation: text nodes, replaced objects and so on.
3645
3646         So, by removing all that too specific code (textForObject() and
3647         textForRenderer() mainly) from WebKitAccessibleInterfaceText.cpp
3648         and relying in AccessibilityObject::textUnderElement(), which it
3649         ends up using the TextIterator for certain cases, we have a much
3650         better and robust method of retrieving the text associated with an
3651         instance of AtkObject implementing the AtkText interface.
3652
3653         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3654         (webkitAccessibleTextGetText): Removed call to textForObject(), now that
3655         we have just removed that function, together with textForRenderer().
3656
3657         Make AccessibilityRenderObject::textUnderElement() able to deal with
3658         anonymous blocks directly, by creating a range based in the boundaries
3659         defined by the first and last child renderers for that block. This will
3660         make possible to treat an anonymous block as a whole instead of having
3661         to rely in the concatenation of each of its children, as it does now.
3662
3663         * accessibility/AccessibilityRenderObject.cpp:
3664         (WebCore::AccessibilityRenderObject::textUnderElement): Added a new code
3665         path to deal with anonymous blocks for text renderers, or when including
3666         all the children is explicitly requested.
3667
3668         Modified TextIterator so text for children of replaced objects are
3669         ignored if we are emmiting the special character for those objects.
3670
3671         * editing/TextIterator.cpp:
3672         (WebCore::TextIterator::handleReplacedElement): Make sure no children are
3673         handled a replaced object if m_emitsObjectReplacementCharacters is set.
3674         * editing/TextIterator.h: Updated m_emitsObjectReplacementCharacters
3675         description to reflect the new behavior.
3676
3677 2013-11-01  Alexey Proskuryakov  <ap@apple.com>
3678
3679         Add a Mac WebCrypto implementation of HMAC importKey/sign/verify
3680         https://bugs.webkit.org/show_bug.cgi?id=123598
3681
3682         Reviewed by Anders Carlsson.
3683
3684         Test: crypto/subtle/hmac-sign-verify.html
3685
3686         * WebCore.xcodeproj/project.pbxproj:
3687         * bindings/js/JSSubtleCryptoCustom.cpp: Added property svn:eol-style.
3688         (WebCore::createAlgorithmFromJSValue):
3689         (WebCore::cryptoOperationDataFromJSValue):
3690         (WebCore::cryptoKeyFormatFromJSValue):
3691         (WebCore::cryptoKeyUsagesFromJSValue):
3692         (WebCore::JSSubtleCrypto::sign):
3693         (WebCore::JSSubtleCrypto::verify):
3694         (WebCore::JSSubtleCrypto::digest):
3695         (WebCore::JSSubtleCrypto::importKey):
3696         * crypto/SubtleCrypto.idl:
3697         * crypto/algorithms/CryptoAlgorithmHMAC.cpp: Added.
3698         (WebCore::CryptoAlgorithmHMAC::CryptoAlgorithmHMAC):
3699         (WebCore::CryptoAlgorithmHMAC::~CryptoAlgorithmHMAC):
3700         (WebCore::CryptoAlgorithmHMAC::create):
3701         (WebCore::CryptoAlgorithmHMAC::identifier):
3702         (WebCore::CryptoAlgorithmHMAC::importKey):
3703         (WebCore::CryptoAlgorithmHMAC::exportKey):
3704         * crypto/algorithms/CryptoAlgorithmHMAC.h: Added.
3705         * crypto/keys: Added.
3706         * crypto/keys/CryptoKeyHMAC.cpp: Added.
3707         (WebCore::CryptoKeyHMAC::CryptoKeyHMAC):
3708         (WebCore::CryptoKeyHMAC::~CryptoKeyHMAC):
3709         (WebCore::CryptoKeyHMAC::buildAlgorithmDescription):
3710         * crypto/keys/CryptoKeyHMAC.h: Added.
3711         * crypto/mac/CryptoAlgorithmHMACMac.cpp: Added.
3712         (WebCore::getCommonCryptoAlgorithm):
3713         (WebCore::calculateSignature):
3714         (WebCore::CryptoAlgorithmHMAC::sign):
3715         (WebCore::CryptoAlgorithmHMAC::verify):
3716         (WebCore::CryptoAlgorithmHMAC::generateKey):
3717         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
3718         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
3719
3720 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3721
3722         Web Inspector: Clean up a few Inspector interfaces
3723         https://bugs.webkit.org/show_bug.cgi?id=123594
3724
3725         Reviewed by Timothy Hatcher.
3726
3727         * WebCore.exp.in:
3728         * inspector/InjectedScriptHost.cpp:
3729         * inspector/InspectorBaseAgent.h:
3730         (WebCore::InspectorBaseAgentInterface::name):
3731         * inspector/InspectorConsoleAgent.cpp:
3732         * inspector/InspectorConsoleAgent.h:
3733         (WebCore::InspectorConsoleAgent::enabled):
3734         * inspector/InspectorController.cpp:
3735         (WebCore::InspectorController::profilerEnabled):
3736         * inspector/InspectorController.h:
3737         * inspector/InspectorDebuggerAgent.cpp:
3738         * inspector/InspectorDebuggerAgent.h:
3739         (WebCore::InspectorDebuggerAgent::enabled):
3740         * inspector/InspectorRuntimeAgent.h:
3741         (WebCore::InspectorRuntimeAgent::enabled):
3742
3743 2013-10-31  Tim Horton  <timothy_horton@apple.com>
3744
3745         Remote Layer Tree: Vend layer contents via IOSurfaces
3746         https://bugs.webkit.org/show_bug.cgi?id=123600
3747
3748         Reviewed by Anders Carlsson.
3749
3750         * WebCore.exp.in:
3751         Export sRGBColorSpaceRef.
3752
3753         * WebCore.xcodeproj/project.pbxproj:
3754         Expose GraphicsContextCG.h.
3755
3756 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3757
3758         Remove unused Page::setDebuggerForAllPages
3759         https://bugs.webkit.org/show_bug.cgi?id=123602
3760
3761         Reviewed by Timothy Hatcher.
3762
3763         * page/Page.cpp:
3764         * page/Page.h:
3765
3766 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3767
3768         Web Inspector: Remove InspectorState
3769         https://bugs.webkit.org/show_bug.cgi?id=123547
3770
3771         Reviewed by Timothy Hatcher.
3772
3773         * CMakeLists.txt:
3774         * GNUmakefile.list.am:
3775         * WebCore.vcxproj/WebCore.vcxproj:
3776         * WebCore.vcxproj/WebCore.vcxproj.filters:
3777         * WebCore.xcodeproj/project.pbxproj:
3778         * inspector/InspectorAgent.cpp:
3779         (WebCore::InspectorAgent::InspectorAgent):
3780         * inspector/InspectorAgent.h:
3781         (WebCore::InspectorAgent::create):
3782         * inspector/InspectorAllInOne.cpp:
3783         * inspector/InspectorApplicationCacheAgent.cpp:
3784         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
3785         * inspector/InspectorApplicationCacheAgent.h:
3786         (WebCore::InspectorApplicationCacheAgent::create):
3787         * inspector/InspectorBaseAgent.cpp:
3788         (WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
3789         * inspector/InspectorBaseAgent.h:
3790         (WebCore::InspectorBaseAgent::InspectorBaseAgent):
3791         * inspector/InspectorCSSAgent.cpp:
3792         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
3793         * inspector/InspectorCSSAgent.h:
3794         (WebCore::InspectorCSSAgent::create):
3795         * inspector/InspectorCanvasAgent.cpp:
3796         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3797         * inspector/InspectorCanvasAgent.h:
3798         (WebCore::InspectorCanvasAgent::create):
3799         * inspector/InspectorClient.h:
3800         * inspector/InspectorConsoleAgent.cpp:
3801         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
3802         * inspector/InspectorConsoleAgent.h:
3803         * inspector/InspectorController.cpp:
3804         (WebCore::InspectorController::InspectorController):
3805         (WebCore::InspectorController::connectFrontend):
3806         (WebCore::InspectorController::disconnectFrontend):
3807         * inspector/InspectorController.h:
3808         * inspector/InspectorDOMAgent.cpp:
3809         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
3810         * inspector/InspectorDOMAgent.h:
3811         (WebCore::InspectorDOMAgent::create):
3812         * inspector/InspectorDOMDebuggerAgent.cpp:
3813         (WebCore::InspectorDOMDebuggerAgent::create):
3814         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
3815         * inspector/InspectorDOMDebuggerAgent.h:
3816         * inspector/InspectorDOMStorageAgent.cpp:
3817         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
3818         * inspector/InspectorDOMStorageAgent.h:
3819         (WebCore::InspectorDOMStorageAgent::create):
3820         * inspector/InspectorDatabaseAgent.cpp:
3821         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
3822         * inspector/InspectorDatabaseAgent.h:
3823         (WebCore::InspectorDatabaseAgent::create):
3824         * inspector/InspectorDebuggerAgent.cpp:
3825         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3826         * inspector/InspectorDebuggerAgent.h:
3827         * inspector/InspectorHeapProfilerAgent.cpp:
3828         (WebCore::InspectorHeapProfilerAgent::create):
3829         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
3830         * inspector/InspectorHeapProfilerAgent.h:
3831         * inspector/InspectorIndexedDBAgent.cpp:
3832         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
3833         * inspector/InspectorIndexedDBAgent.h:
3834         (WebCore::InspectorIndexedDBAgent::create):
3835         * inspector/InspectorInputAgent.cpp:
3836         (WebCore::InspectorInputAgent::InspectorInputAgent):
3837         * inspector/InspectorInputAgent.h:
3838         (WebCore::InspectorInputAgent::create):
3839         * inspector/InspectorLayerTreeAgent.cpp:
3840         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
3841         * inspector/InspectorLayerTreeAgent.h:
3842         (WebCore::InspectorLayerTreeAgent::create):
3843         * inspector/InspectorMemoryAgent.cpp:
3844         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
3845         (WebCore::InspectorMemoryAgent::create):
3846         * inspector/InspectorMemoryAgent.h:
3847         * inspector/InspectorPageAgent.cpp:
3848         (WebCore::InspectorPageAgent::create):
3849         (WebCore::InspectorPageAgent::InspectorPageAgent):
3850         * inspector/InspectorPageAgent.h:
3851         * inspector/InspectorProfilerAgent.cpp:
3852         (WebCore::PageProfilerAgent::PageProfilerAgent):
3853         (WebCore::InspectorProfilerAgent::create):
3854         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
3855         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
3856         * inspector/InspectorProfilerAgent.h:
3857         * inspector/InspectorResourceAgent.cpp:
3858         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
3859         * inspector/InspectorResourceAgent.h:
3860         (WebCore::InspectorResourceAgent::create):
3861         * inspector/InspectorRuntimeAgent.cpp:
3862         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
3863         * inspector/InspectorRuntimeAgent.h:
3864         * inspector/InspectorState.cpp: Removed.
3865         * inspector/InspectorState.h: Removed.
3866         * inspector/InspectorStateClient.h: Removed.
3867         * inspector/InspectorTimelineAgent.cpp:
3868         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3869         * inspector/InspectorTimelineAgent.h:
3870         (WebCore::InspectorTimelineAgent::create):
3871         * inspector/InspectorWorkerAgent.cpp:
3872         (WebCore::InspectorWorkerAgent::create):
3873         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
3874         * inspector/InspectorWorkerAgent.h:
3875         * inspector/PageConsoleAgent.cpp:
3876         (WebCore::PageConsoleAgent::PageConsoleAgent):
3877         * inspector/PageConsoleAgent.h:
3878         (WebCore::PageConsoleAgent::create):
3879         * inspector/PageDebuggerAgent.cpp:
3880         (WebCore::PageDebuggerAgent::create):
3881         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
3882         * inspector/PageDebuggerAgent.h:
3883         * inspector/PageRuntimeAgent.cpp:
3884         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
3885         * inspector/PageRuntimeAgent.h:
3886         (WebCore::PageRuntimeAgent::create):
3887         * inspector/WorkerConsoleAgent.cpp:
3888         (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
3889         * inspector/WorkerConsoleAgent.h:
3890         (WebCore::WorkerConsoleAgent::create):
3891         * inspector/WorkerDebuggerAgent.cpp:
3892         (WebCore::WorkerDebuggerAgent::create):
3893         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
3894         * inspector/WorkerDebuggerAgent.h:
3895         * inspector/WorkerInspectorController.cpp:
3896         (WebCore::WorkerInspectorController::WorkerInspectorController):
3897         (WebCore::WorkerInspectorController::connectFrontend):
3898         (WebCore::WorkerInspectorController::disconnectFrontend):
3899         * inspector/WorkerInspectorController.h:
3900         * inspector/WorkerRuntimeAgent.cpp:
3901         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
3902         * inspector/WorkerRuntimeAgent.h:
3903         (WebCore::WorkerRuntimeAgent::create):
3904         * workers/DefaultSharedWorkerRepository.cpp:
3905         (WebCore::SharedWorkerProxy::postMessageToPageInspector):
3906         * workers/WorkerMessagingProxy.cpp:
3907         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
3908         * workers/WorkerMessagingProxy.h:
3909         * workers/WorkerReportingProxy.h:
3910
3911 2013-10-31  Brady Eidson  <beidson@apple.com>
3912
3913         Split PendingDeleteCall into its own header
3914         https://bugs.webkit.org/show_bug.cgi?id=123597
3915
3916         Reviewed by Beth “Okay I guess so, bro” Dakin.
3917
3918         * GNUmakefile.list.am:
3919         * WebCore.xcodeproj/project.pbxproj:
3920
3921         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3922         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3923         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
3924         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3925
3926         * Modules/indexeddb/IDBPendingDeleteCall.h: Added.
3927         (WebCore::IDBPendingDeleteCall::create):
3928         (WebCore::IDBPendingDeleteCall::callbacks):
3929         (WebCore::IDBPendingDeleteCall::IDBPendingDeleteCall):
3930
3931 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3932
3933         Web Inspector: Convert some InspectorObject member variables to HashSet/HashMap
3934         https://bugs.webkit.org/show_bug.cgi?id=123579
3935
3936         Reviewed by Timothy Hatcher.
3937
3938         * inspector/InspectorDOMDebuggerAgent.h:
3939         * inspector/InspectorDOMDebuggerAgent.cpp:
3940         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
3941         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
3942         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
3943         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
3944         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
3945         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
3946         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
3947         Make m_eventListenerBreakpoints and m_xhrBreakpoints HashSet.
3948
3949         * inspector/InspectorDebuggerAgent.h:
3950         * inspector/InspectorDebuggerAgent.cpp:
3951         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3952         (WebCore::InspectorDebuggerAgent::disable):
3953         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3954         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
3955         (WebCore::InspectorDebuggerAgent::didParseSource):
3956         Make m_javaScriptBreakpoints a HashMap.
3957
3958 2013-10-31  Youenn Fablet  <youennf@gmail.com>
3959
3960         Correct the elapsedTime calculation in SVG animations
3961         https://bugs.webkit.org/show_bug.cgi?id=119289
3962
3963         Reviewed by Brent Fulgham.
3964
3965         Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/338f9badca7fb7880abdb0cecd5f02493c1f7d2e
3966
3967         Test: svg/animations/getCurrentTime-pause-unpause.html
3968
3969         * svg/animation/SMILTimeContainer.cpp:
3970         (WebCore::SMILTimeContainer::SMILTimeContainer):
3971         (WebCore::SMILTimeContainer::elapsed):
3972         (WebCore::SMILTimeContainer::begin):
3973         (WebCore::SMILTimeContainer::pause):
3974         (WebCore::SMILTimeContainer::resume):
3975         (WebCore::SMILTimeContainer::setElapsed):
3976         * svg/animation/SMILTimeContainer.h:
3977
3978 2013-10-31  Andreas Kling  <akling@apple.com>
3979
3980         Manage line-grid RootInlineBox with unique_ptr.
3981         <https://webkit.org/b/123583>
3982
3983         Use smart pointers for the RenderBlockFlow's optional line-grid box
3984         instead of manual new/delete.
3985
3986         Reviewed by Antti Koivisto.
3987
3988 2013-10-31  Alexey Proskuryakov  <ap@apple.com>
3989
3990         Enable WebCrypto on Mac
3991         https://bugs.webkit.org/show_bug.cgi?id=123587
3992
3993         Reviewed by Anders Carlsson.
3994
3995         * Configurations/FeatureDefines.xcconfig: Enable it.
3996
3997         * bindings/js/JSCryptoAlgorithmDictionary.cpp: Build fix.
3998
3999         * crypto/CryptoAlgorithmRegistry.cpp: (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
4000         Special case empty keys to avoid upsetting HashMap.
4001
4002         * crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::create):
4003         Build fix. Can't use make_unique, because constructor is private.
4004
4005 2013-10-31  Myles C. Maxfield  <mmaxfield@apple.com>
4006
4007         Underline bounds cannot be queried before underline itself is drawn
4008         https://bugs.webkit.org/show_bug.cgi?id=123310
4009
4010         Reviewed by Dean Jackson.
4011
4012         GraphicsContext's drawLineForText function is used to draw underlines,
4013         strikethroughs, and overlines. Before drawing the line, this function
4014         modifies the bounds given to it in order to make underlines crisp. However,
4015         this means that it is impossible to know where an underline will be drawn
4016         before drawing it. This patch pulls out this adjustment computation into
4017         GraphicsContext::computeLineBoundsForText, then passes the result to
4018         drawLineForText
4019
4020         Because there should be no observable difference, no tests need to be updated.
4021
4022         * platform/graphics/GraphicsContext.h: Signature of new computeLineBoundsForText
4023         function
4024         * platform/graphics/blackberry/PathBlackBerry.cpp:
4025         (WebCore::GraphicsContext::computeLineBoundsForText): Implement new function
4026         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4027         (WebCore::GraphicsContext::computeLineBoundsForText): Ditto
4028         (WebCore::GraphicsContext::drawLineForText): Use computeLineBoundsForText
4029         * platform/graphics/cg/GraphicsContextCG.cpp:
4030         (WebCore::computeLineBoundsAndAntialiasingModeForText): Static function that
4031         performs the actual bounds computation
4032         (WebCore::GraphicsContext::computeLineBoundsForText): Calls
4033         computeLineBoundsAndAntialiasingModeForText
4034         (WebCore::GraphicsContext::drawLineForText): Use new function
4035         * platform/graphics/wince/GraphicsContextWinCE.cpp:
4036         (WebCore::GraphicsContext::computeLineBoundsForText): Implement new function
4037
4038 2013-10-31  Beth Dakin  <bdakin@apple.com>
4039
4040         Repro scrolling crash with scrollbars that use setPresentationValue on the 
4041         scrolling thread
4042         https://bugs.webkit.org/show_bug.cgi?id=123549
4043         -and corresponding-
4044         <rdar://problem/15246606>
4045
4046         Reviewed by Brady Eidson.
4047
4048         Here's another speculative fix. If a scrollbar was removed, we would not properly 
4049         inform the scrolling thread. Instead of checking supportsUpdateOnSecondaryThread() 
4050         before calling setScrollbarPaintersFromScrollbars(), check it from within 
4051         setScrollbarPaintersFromScrollbars(), and this will allow the ScrollbarPainter to 
4052         be properly updated.
4053
4054         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
4055         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
4056         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
4057         (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):
4058
4059 2013-10-31  Csaba Osztrogonác  <ossy@webkit.org>
4060
4061         Unreviewed typo fix after 158386. (buildfix after r158365)
4062
4063         * Modules/mediastream/UserMediaRequest.cpp:
4064         (WebCore::UserMediaRequest::callSuccessHandler):
4065
4066 2013-10-31  Myles C. Maxfield  <mmaxfield@apple.com>
4067
4068         Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
4069         https://bugs.webkit.org/show_bug.cgi?id=123541
4070
4071