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