Kill InlineFlowBox::rendererLineBoxes().
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-11  Andreas Kling  <akling@apple.com>
2
3         Kill InlineFlowBox::rendererLineBoxes().
4         <https://webkit.org/b/124141>
5
6         We only ever used this to access the RenderLineBoxList for non-root
7         boxes, and those always have a RenderInline renderer.
8
9         Tighten things up by losing the virtual rendererLineBoxes() and
10         calling RenderInline::lineBoxes() directly.
11
12         Reviewed by Antti Koivisto.
13
14 2013-11-11  Andreas Kling  <akling@apple.com>
15
16         Bring the LineFragmentationData back to RootInlineBox.
17         <https://webkit.org/b/124136>
18
19         Now that we have the simple line layout path, almost all the root
20         line boxes end up with some kind of fragmentation data, so we might
21         as well put the members back on RootInlineBox and avoid the extra
22         allocation (and indirection.)
23
24         1.74 MB progression on HTML5 spec at <http://whatwg.org/c>
25
26         Reviewed by Antti Koivisto.
27
28 2013-11-10  Andreas Kling  <akling@apple.com>
29
30         Shrink RenderInline.
31         <https://webkit.org/b/124134>
32
33         Move the "always create line boxes" bit from RenderInline up to
34         RenderElement. I didn't do this earlier because there were no bits
35         free on RenderObject but thanks to RenderElement we now have tons!
36
37         540 kB progression on HTML5 spec at <http://whatwg.org/c>
38
39         Reviewed by Anders Carlsson.
40
41 2013-11-10  Sam Weinig  <sam@webkit.org>
42
43         Make childShouldCreateRenderer() take a Node reference
44         https://bugs.webkit.org/show_bug.cgi?id=124132
45
46         Reviewed by Andreas Kling.
47
48         The Node passed to childShouldCreateRenderer() is never null.
49
50 2013-11-10  Frédéric Wang  <fred.wang@free.fr>
51
52         CSS direction must be reset to ltr on <math> element.
53         <https://webkit.org/b/124121>
54
55         Reviewed by Darin Adler.
56
57         Test: mathml/presentation/direction.html
58
59         * css/mathml.css:
60         (math): set direction: ltr; on the <math> element.
61
62 2013-11-10  Sam Weinig  <sam@webkit.org>
63
64         Reduce the size of RenderBlockFlow by making its rare data inherit from RenderBlockRareData
65         https://bugs.webkit.org/show_bug.cgi?id=124124
66
67         Reviewed by Anders Carlsson.
68
69         Reduce RenderBlockFlow by one word.
70
71         * rendering/RenderBlock.cpp:
72         * rendering/RenderBlock.h:
73         * rendering/RenderBlockFlow.cpp:
74         * rendering/RenderBlockFlow.h:
75
76 2013-11-10  Antti Koivisto  <antti@apple.com>
77
78         Use start/end instead of textOffset/textLength for simple text runs
79         https://bugs.webkit.org/show_bug.cgi?id=124130
80
81         Reviewed by Oliver Hunt.
82         
83         The code reads better this way.
84
85         * rendering/SimpleLineLayout.cpp:
86         (WebCore::SimpleLineLayout::createTextRuns):
87         * rendering/SimpleLineLayout.h:
88         (WebCore::SimpleLineLayout::Run::Run):
89         * rendering/SimpleLineLayoutFunctions.h:
90         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
91         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
92         (WebCore::SimpleLineLayout::containsTextCaretOffset):
93         (WebCore::SimpleLineLayout::isTextRendered):
94         * rendering/SimpleLineLayoutResolver.h:
95         (WebCore::SimpleLineLayout::RunResolver::Run::text):
96
97 2013-11-10  Antti Koivisto  <antti@apple.com>
98
99         Implement white-space property on simple line layout path
100         https://bugs.webkit.org/show_bug.cgi?id=124122
101
102         Reviewed by Andreas Kling.
103         
104         Support all values of the white-space property and the tab-size property.
105
106         Tests: fast/forms/basic-textareas-simple-lines.html
107                fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html
108                fast/text/whitespace/pre-wrap-line-test-simple-lines.html
109                fast/text/whitespace/pre-wrap-long-word-simple-lines.html
110                fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html
111
112         * rendering/SimpleLineLayout.cpp:
113         (WebCore::SimpleLineLayout::canUseFor):
114         (WebCore::SimpleLineLayout::isWhitespace):
115         (WebCore::SimpleLineLayout::skipWhitespaces):
116         (WebCore::SimpleLineLayout::textWidth):
117         (WebCore::SimpleLineLayout::measureWord):
118         (WebCore::SimpleLineLayout::createTextRuns):
119         * rendering/SimpleLineLayoutFunctions.cpp:
120         (WebCore::SimpleLineLayout::paintDebugBorders):
121         (WebCore::SimpleLineLayout::paintFlow):
122
123 2013-11-10  Sergio Correia  <sergio.correia@openbossa.org>
124
125         Fix EFL build after r159027
126         https://bugs.webkit.org/show_bug.cgi?id=124127
127
128         Reviewed by Anders Carlsson.
129
130         No new tests, build fix.
131
132         * page/Settings.in: Add std to numeric_limits, since we don't have
133         'using std' directives anymore.
134
135 2013-11-10  Anders Carlsson  <andersca@apple.com>
136
137         Fix build.
138
139         * rendering/RenderMultiColumnBlock.cpp:
140         (WebCore::RenderMultiColumnBlock::computeColumnCountAndWidth):
141         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
142
143 2013-11-10  Anders Carlsson  <andersca@apple.com>
144
145         Remove all 'std' using directives from WebCore
146         https://bugs.webkit.org/show_bug.cgi?id=124125
147
148         Reviewed by Sam Weinig.
149
150         As per the coding style guidelines.
151
152         * loader/CrossOriginPreflightResultCache.cpp:
153         (WebCore::CrossOriginPreflightResultCache::appendEntry):
154         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
155         * loader/WorkerThreadableLoader.cpp:
156         * loader/appcache/ApplicationCacheStorage.cpp:
157         (WebCore::ApplicationCacheStorage::loadCache):
158         * loader/appcache/ManifestParser.cpp:
159         (WebCore::parseManifest):
160         * loader/cache/MemoryCache.cpp:
161         (WebCore::MemoryCache::deadCapacity):
162         (WebCore::MemoryCache::lruListFor):
163         * page/CaptionUserPreferencesMediaAF.cpp:
164         * page/Chrome.cpp:
165         * page/DOMTimer.cpp:
166         (WebCore::DOMTimer::intervalClampedToMinimum):
167         * page/FocusController.cpp:
168         * page/Frame.cpp:
169         (WebCore::Frame::resizePageRectsKeepingRatio):
170         * page/PageGroupLoadDeferrer.cpp:
171         * page/Settings.cpp:
172         * page/animation/AnimationBase.cpp:
173         (WebCore::solveStepsFunction):
174         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
175         (WebCore::AnimationBase::timeToNextService):
176         (WebCore::AnimationBase::fractionalTime):
177         (WebCore::AnimationBase::getTimeToNextEvent):
178         * page/animation/KeyframeAnimation.cpp:
179         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
180         * platform/DateComponents.cpp:
181         * platform/ScrollAnimator.cpp:
182         (WebCore::ScrollAnimator::handleWheelEvent):
183         * platform/ScrollView.cpp:
184         (WebCore::ScrollView::unscaledVisibleContentSize):
185         (WebCore::ScrollView::setScrollOffset):
186         (WebCore::ScrollView::updateScrollbars):
187         (WebCore::ScrollView::scrollContents):
188         * platform/Scrollbar.cpp:
189         (WebCore::Scrollbar::moveThumb):
190         * platform/ScrollbarThemeComposite.cpp:
191         (WebCore::usedTotalSize):
192         (WebCore::ScrollbarThemeComposite::thumbPosition):
193         (WebCore::ScrollbarThemeComposite::thumbLength):
194         * platform/SharedBuffer.cpp:
195         (WebCore::SharedBuffer::append):
196         (WebCore::SharedBuffer::copyBufferAndClear):
197         (WebCore::SharedBuffer::getSomeData):
198         * platform/ThreadTimers.cpp:
199         (WebCore::ThreadTimers::updateSharedTimer):
200         * platform/Timer.cpp:
201         (WebCore::TimerHeapLessThanFunction::operator()):
202         (WebCore::TimerBase::heapPop):
203         (WebCore::TimerBase::nextUnalignedFireInterval):
204         * platform/URL.cpp:
205         (WebCore::findHostnamesInMailToURL):
206         (WebCore::portAllowed):
207         * platform/audio/AudioResampler.cpp:
208         (WebCore::AudioResampler::setRate):
209         * platform/audio/AudioResamplerKernel.cpp:
210         (WebCore::AudioResamplerKernel::process):
211         * platform/audio/Distance.cpp:
212         (WebCore::DistanceEffect::gain):
213         * platform/audio/DynamicsCompressorKernel.cpp:
214         (WebCore::DynamicsCompressorKernel::process):
215         * platform/audio/EqualPowerPanner.cpp:
216         (WebCore::EqualPowerPanner::pan):
217         * platform/audio/HRTFDatabase.cpp:
218         (WebCore::HRTFDatabase::indexFromElevationAngle):
219         * platform/audio/HRTFElevation.cpp:
220         (WebCore::HRTFElevation::createForSubject):
221         * platform/audio/HRTFKernel.cpp:
222         (WebCore::HRTFKernel::HRTFKernel):
223         (WebCore::HRTFKernel::createInterpolatedKernel):
224         * platform/audio/HRTFPanner.cpp:
225         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
226         * platform/audio/Reverb.cpp:
227         * platform/audio/SincResampler.cpp:
228         (WebCore::SincResampler::process):
229         * platform/cf/URLCF.cpp:
230         * platform/graphics/Color.cpp:
231         (WebCore::makeRGB):
232         (WebCore::makeRGBA):
233         (WebCore::colorFloatToRGBAByte):
234         (WebCore::Color::light):
235         (WebCore::Color::dark):
236         * platform/graphics/CrossfadeGeneratedImage.cpp:
237         * platform/graphics/FloatQuad.cpp:
238         (WebCore::min4):
239         (WebCore::max4):
240         (WebCore::withinEpsilon):
241         * platform/graphics/FloatSize.cpp:
242         (WebCore::FloatSize::isZero):
243         * platform/graphics/FontFastPath.cpp:
244         (WebCore::Font::floatWidthForSimpleText):
245         * platform/graphics/FontPlatformData.cpp:
246         * platform/graphics/GraphicsContext.cpp:
247         * platform/graphics/RoundedRect.cpp:
248         (WebCore::RoundedRect::Radii::expand):
249         * platform/graphics/ShadowBlur.cpp:
250         (WebCore::calculateLobes):
251         (WebCore::computeSliceSizesFromRadii):
252         * platform/graphics/SimpleFontData.cpp:
253         (WebCore::SimpleFontData::initCharWidths):
254         * platform/graphics/WidthIterator.cpp:
255         (WebCore::WidthIterator::WidthIterator):
256         (WebCore::WidthIterator::advanceInternal):
257         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
258         (WebCore::InbandTextTrackPrivateAVF::processCue):
259         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
260         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
261         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
262         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
263         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
264         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
265         * platform/graphics/ca/GraphicsLayerCA.cpp:
266         (WebCore::GraphicsLayerCA::setOpacity):
267         (WebCore::GraphicsLayerCA::setNeedsDisplay):
268         (WebCore::GraphicsLayerCA::setupAnimation):
269         (WebCore::clampedContentsScaleForScale):
270         * platform/graphics/ca/mac/TileController.mm:
271         (WebCore::TileController::getTileIndexRangeForRect):
272         (WebCore::TileController::computeTileCoverageRect):
273         * platform/graphics/cg/GraphicsContextCG.cpp:
274         (WebCore::GraphicsContext::setPlatformShadow):
275         (WebCore::computeLineBoundsAndAntialiasingModeForText):
276         * platform/graphics/cg/ImageBufferCG.cpp:
277         * platform/graphics/cg/ImageBufferDataCG.cpp:
278         (WebCore::ImageBufferData::getData):
279         * platform/graphics/cg/ImageSourceCG.cpp:
280         * platform/graphics/filters/FEDropShadow.cpp:
281         * platform/graphics/filters/FEGaussianBlur.cpp:
282         (WebCore::boxBlur):
283         (WebCore::FEGaussianBlur::platformApplyGeneric):
284         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
285         (WebCore::FEGaussianBlur::calculateStdDeviation):
286         * platform/graphics/gpu/Texture.cpp:
287         (WebCore::Texture::updateSubRect):
288         * platform/graphics/gpu/TilingData.cpp:
289         (WebCore::computeNumTiles):
290         (WebCore::TilingData::tileXIndexFromSrcCoord):
291         (WebCore::TilingData::tileYIndexFromSrcCoord):
292         * platform/graphics/mac/ComplexTextController.cpp:
293         (WebCore::ComplexTextController::ComplexTextController):
294         (WebCore::ComplexTextController::offsetForPosition):
295         (WebCore::ComplexTextController::advance):
296         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
297         * platform/graphics/mac/FontComplexTextMac.cpp:
298         (WebCore::Font::floatWidthForComplexText):
299         * platform/graphics/mac/FontMac.mm:
300         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
301         (WebCore::MediaPlayerPrivateQTKit::duration):
302         * platform/graphics/mac/SimpleFontDataMac.mm:
303         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
304         * platform/graphics/transforms/MatrixTransformOperation.cpp:
305         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
306         * platform/graphics/transforms/RotateTransformOperation.cpp:
307         * platform/graphics/transforms/TransformOperations.cpp:
308         (WebCore::TransformOperations::blendByMatchingOperations):
309         * platform/graphics/transforms/TransformationMatrix.cpp:
310         (WebCore::clampEdgeValue):
311         * platform/mac/ScrollAnimatorMac.mm:
312         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
313         * platform/mac/ScrollViewMac.mm:
314         (WebCore::ScrollView::platformSetContentsSize):
315         (WebCore::ScrollView::platformSetScrollPosition):
316         * platform/mac/ScrollbarThemeMac.mm:
317         * platform/mac/ThemeMac.mm:
318         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
319         (-[WebVideoFullscreenHUDWindowController incrementVolume]):
320         (timeToString):
321         * platform/network/HTTPHeaderMap.cpp:
322         (WebCore::HTTPHeaderMap::copyData):
323         * platform/network/ResourceRequestBase.cpp:
324         * platform/network/ResourceResponseBase.cpp:
325         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
326         * platform/network/cf/ResourceResponseCFNet.cpp:
327         * platform/network/mac/ResourceResponseMac.mm:
328         (WebCore::ResourceResponse::initNSURLResponse):
329         * platform/text/TextBreakIteratorICU.cpp:
330         (WebCore::textClone):
331         (WebCore::textLatin1MoveInPrimaryContext):
332         (WebCore::textLatin1MoveInPriorContext):
333         (WebCore::textInChunkOrOutOfRange):
334         (WebCore::textOpenLatin1):
335         (WebCore::textUTF16MoveInPrimaryContext):
336         (WebCore::textUTF16MoveInPriorContext):
337         (WebCore::textOpenUTF16):
338         * platform/text/TextCodecUTF16.cpp:
339         (WebCore::TextCodecUTF16::encode):
340         * platform/text/TextCodecUTF8.cpp:
341         (WebCore::TextCodecUTF8::encode):
342         * platform/text/TextStream.cpp:
343         * platform/text/mac/LocaleMac.mm:
344         * platform/text/mac/TextCodecMac.cpp:
345         (WebCore::TextCodecMac::decode):
346         * rendering/AutoTableLayout.cpp:
347         (WebCore::AutoTableLayout::recalcColumn):
348         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
349         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
350         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
351         (WebCore::AutoTableLayout::layout):
352         * rendering/FixedTableLayout.cpp:
353         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
354         * rendering/FloatingObjects.cpp:
355         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
356         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
357         (WebCore::FloatingObjects::logicalRightOffset):
358         * rendering/InlineBox.cpp:
359         * rendering/InlineFlowBox.cpp:
360         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
361         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
362         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
363         (WebCore::InlineFlowBox::computeMaxLogicalTop):
364         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
365         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
366         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
367         (WebCore::InlineFlowBox::nodeAtPoint):
368         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
369         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
370         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
371         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
372         * rendering/InlineTextBox.cpp:
373         (WebCore::InlineTextBox::isSelected):
374         (WebCore::InlineTextBox::localSelectionRect):
375         (WebCore::InlineTextBox::placeEllipsisBox):
376         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
377         (WebCore::InlineTextBox::paint):
378         (WebCore::InlineTextBox::selectionStartEnd):
379         (WebCore::InlineTextBox::paintSelection):
380         (WebCore::InlineTextBox::paintCompositionBackground):
381         (WebCore::computeUnderlineOffset):
382         (WebCore::InlineTextBox::paintDecoration):
383         (WebCore::InlineTextBox::paintDocumentMarker):
384         (WebCore::InlineTextBox::paintTextMatchMarker):
385         (WebCore::InlineTextBox::computeRectForReplacementMarker):
386         (WebCore::InlineTextBox::paintCompositionUnderline):
387         * rendering/RenderBlock.cpp:
388         (WebCore::RenderBlock::computeOverflow):
389         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
390         (WebCore::RenderBlock::paintChild):
391         (WebCore::RenderBlock::blockSelectionGap):
392         (WebCore::RenderBlock::logicalLeftSelectionGap):
393         (WebCore::RenderBlock::logicalRightSelectionGap):
394         (WebCore::RenderBlock::calcColumnWidth):
395         (WebCore::RenderBlock::adjustRectForColumns):
396         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
397         (WebCore::RenderBlock::computePreferredLogicalWidths):
398         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
399         (WebCore::updatePreferredWidth):
400         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
401         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
402         * rendering/RenderBlockFlow.cpp:
403         (WebCore::RenderBlockFlow::clearFloats):
404         (WebCore::RenderBlockFlow::layoutBlock):
405         (WebCore::RenderBlockFlow::layoutBlockChild):
406         (WebCore::RenderBlockFlow::collapseMargins):
407         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
408         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
409         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
410         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
411         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
412         (WebCore::calculateMinimumPageHeight):
413         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
414         (WebCore::RenderBlockFlow::removeFloatingObject):
415         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
416         (WebCore::RenderBlockFlow::positionNewFloats):
417         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
418         (WebCore::RenderBlockFlow::addOverhangingFloats):
419         (WebCore::RenderBlockFlow::getClearDelta):
420         (WebCore::RenderBlockFlow::adjustForBorderFit):
421         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
422         (WebCore::RenderBlockFlow::updateLogicalHeight):
423         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
424         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
425         (WebCore::RenderBlockFlow::relayoutForPagination):
426         * rendering/RenderBlockLineLayout.cpp:
427         (WebCore::updateLogicalWidthForLeftAlignedBlock):
428         (WebCore::updateLogicalWidthForRightAlignedBlock):
429         (WebCore::updateLogicalWidthForCenterAlignedBlock):
430         (WebCore::setLogicalWidthForTextRun):
431         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
432         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
433         (WebCore::RenderBlockFlow::layoutLineBoxes):
434         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
435         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
436         (WebCore::tryHyphenating):
437         * rendering/RenderBox.cpp:
438         (WebCore::RenderBox::scrollWidth):
439         (WebCore::RenderBox::scrollHeight):
440         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
441         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
442         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
443         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
444         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
445         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
446         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
447         (WebCore::RenderBox::repaintLayerRectsForImage):
448         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
449         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
450         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
451         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
452         (WebCore::RenderBox::computeLogicalWidthInRegion):
453         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
454         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
455         (WebCore::RenderBox::computeInlineDirectionMargins):
456         (WebCore::RenderBox::computeLogicalHeight):
457         (WebCore::RenderBox::computePercentageLogicalHeight):
458         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
459         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
460         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
461         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
462         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
463         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
464         (WebCore::RenderBox::applyVisualEffectOverflow):
465         (WebCore::RenderBox::addLayoutOverflow):
466         * rendering/RenderBoxModelObject.cpp:
467         (WebCore::RenderBoxModelObject::calculateFillTileSize):
468         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
469         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
470         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
471         (WebCore::RenderBoxModelObject::paintNinePieceImage):
472         (WebCore::RenderBoxModelObject::paintOneBorderSide):
473         (WebCore::calculateAdjustedInnerBorder):
474         (WebCore::RenderBoxModelObject::paintBoxShadow):
475         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
476         * rendering/RenderDeprecatedFlexibleBox.cpp:
477         (WebCore::FlexBoxIterator::next):
478         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
479         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
480         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
481         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
482         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
483         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
484         * rendering/RenderFileUploadControl.cpp:
485         (WebCore::RenderFileUploadControl::maxFilenameWidth):
486         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
487         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
488         * rendering/RenderImage.cpp:
489         (WebCore::RenderImage::setImageSizeForAltText):
490         * rendering/RenderInline.cpp:
491         (WebCore::computeMargin):
492         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
493         (WebCore::RenderInline::paintOutline):
494         (WebCore::RenderInline::paintOutlineForLine):
495         * rendering/RenderLayer.cpp:
496         (WebCore::RenderLayer::clampScrollOffset):
497         (WebCore::RenderLayer::scrollRectToVisible):
498         (WebCore::RenderLayer::visibleContentRect):
499         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
500         (WebCore::RenderLayer::hitTestOverflowControls):
501         (WebCore::RenderLayer::hitTestLayer):
502         (WebCore::RenderLayer::calculateLayerBounds):
503         * rendering/RenderLayerBacking.cpp:
504         * rendering/RenderLayerModelObject.cpp:
505         * rendering/RenderLineBoxList.cpp:
506         (WebCore::RenderLineBoxList::rangeIntersectsRect):
507         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
508         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
509         (WebCore::RenderLineBoxList::paint):
510         * rendering/RenderListBox.cpp:
511         (WebCore::RenderListBox::updateFromElement):
512         (WebCore::RenderListBox::layout):
513         (WebCore::RenderListBox::computePreferredLogicalWidths):
514         (WebCore::RenderListBox::size):
515         (WebCore::RenderListBox::numVisibleItems):
516         (WebCore::RenderListBox::panScroll):
517         (WebCore::RenderListBox::scrollHeight):
518         * rendering/RenderListItem.cpp:
519         * rendering/RenderListMarker.cpp:
520         * rendering/RenderMarquee.cpp:
521         (WebCore::RenderMarquee::marqueeSpeed):
522         (WebCore::RenderMarquee::computePosition):
523         (WebCore::RenderMarquee::timerFired):
524         * rendering/RenderMediaControls.cpp:
525         * rendering/RenderMenuList.cpp:
526         (WebCore::RenderMenuList::updateOptionsWidth):
527         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
528         (WebCore::RenderMenuList::computePreferredLogicalWidths):
529         * rendering/RenderMeter.cpp:
530         * rendering/RenderMultiColumnBlock.cpp:
531         * rendering/RenderMultiColumnSet.cpp:
532         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
533         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
534         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
535         * rendering/RenderNamedFlowFragment.cpp:
536         * rendering/RenderObject.cpp:
537         (WebCore::RenderObject::drawLineForBoxSide):
538         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
539         (WebCore::RenderObject::caretMaxOffset):
540         * rendering/RenderProgress.cpp:
541         * rendering/RenderRegion.cpp:
542         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
543         * rendering/RenderReplaced.cpp:
544         (WebCore::RenderReplaced::shouldPaint):
545         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
546         (WebCore::RenderReplaced::computePreferredLogicalWidths):
547         * rendering/RenderRubyBase.cpp:
548         * rendering/RenderRubyRun.cpp:
549         (WebCore::RenderRubyRun::getOverhang):
550         * rendering/RenderRubyText.cpp:
551         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
552         * rendering/RenderScrollbarPart.cpp:
553         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
554         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
555         * rendering/RenderSearchField.cpp:
556         (WebCore::RenderSearchField::computeControlLogicalHeight):
557         * rendering/RenderTable.cpp:
558         (WebCore::RenderTable::updateLogicalWidth):
559         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
560         (WebCore::RenderTable::layout):
561         (WebCore::RenderTable::computePreferredLogicalWidths):
562         (WebCore::RenderTable::calcBorderStart):
563         (WebCore::RenderTable::calcBorderEnd):
564         (WebCore::RenderTable::outerBorderBefore):
565         (WebCore::RenderTable::outerBorderAfter):
566         (WebCore::RenderTable::outerBorderStart):
567         (WebCore::RenderTable::outerBorderEnd):
568         * rendering/RenderTableCell.cpp:
569         (WebCore::RenderTableCell::parseColSpanFromDOM):
570         (WebCore::RenderTableCell::parseRowSpanFromDOM):
571         (WebCore::RenderTableCell::logicalWidthFromColumns):
572         (WebCore::RenderTableCell::computePreferredLogicalWidths):
573         (WebCore::RenderTableCell::layout):
574         (WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
575         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
576         (WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
577         (WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
578         * rendering/RenderTableSection.cpp:
579         (WebCore::RenderTableSection::ensureRows):
580         (WebCore::RenderTableSection::calcRowLogicalHeight):
581         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
582         (WebCore::RenderTableSection::layoutRows):
583         (WebCore::RenderTableSection::firstLineBaseline):
584         (WebCore::RenderTableSection::removeCachedCollapsedBorders):
585         (WebCore::RenderTableSection::setCachedCollapsedBorder):
586         (WebCore::RenderTableSection::cachedCollapsedBorder):
587         * rendering/RenderText.cpp:
588         (WebCore::makeCapitalized):
589         (WebCore::RenderText::absoluteRectsForRange):
590         (WebCore::RenderText::absoluteQuadsForRange):
591         (WebCore::maxWordFragmentWidth):
592         (WebCore::RenderText::computePreferredLogicalWidths):
593         * rendering/RenderTextControl.cpp:
594         (WebCore::RenderTextControl::computePreferredLogicalWidths):
595         * rendering/RenderTextControlSingleLine.cpp:
596         * rendering/RenderThemeMac.mm:
597         (WebCore::RenderThemeMac::paintProgressBar):
598         (WebCore::RenderThemeMac::paintMenuListButton):
599         * rendering/RenderWidget.cpp:
600         * rendering/RootInlineBox.cpp:
601         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
602         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
603         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
604         (WebCore::RootInlineBox::blockDirectionPointInLine):
605         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
606         (WebCore::setAscentAndDescent):
607         (WebCore::RootInlineBox::ascentAndDescentForBox):
608         * rendering/mathml/RenderMathMLRoot.cpp:
609         (WebCore::RenderMathMLRoot::layout):
610         * rendering/style/RenderStyle.cpp:
611         (WebCore::calcConstraintScaleFor):
612         (WebCore::RenderStyle::setFontSize):
613         (WebCore::RenderStyle::getShadowExtent):
614         (WebCore::RenderStyle::getShadowInsetExtent):
615         (WebCore::RenderStyle::getShadowHorizontalExtent):
616         (WebCore::RenderStyle::getShadowVerticalExtent):
617         * rendering/style/SVGRenderStyle.cpp:
618         * rendering/style/ShadowData.cpp:
619         (WebCore::calculateShadowExtent):
620         * rendering/svg/RenderSVGResourceFilter.cpp:
621         * rendering/svg/RenderSVGRoot.cpp:
622         * rendering/svg/SVGInlineFlowBox.cpp:
623         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
624         * rendering/svg/SVGInlineTextBox.cpp:
625         (WebCore::SVGInlineTextBox::localSelectionRect):
626         * svg/SVGAnimatedNumber.cpp:
627         * svg/SVGAnimatedNumberOptionalNumber.cpp:
628         * svg/animation/SMILTimeContainer.cpp:
629         (WebCore::SMILTimeContainer::startTimer):
630         (WebCore::SMILTimeContainer::updateAnimations):
631         * svg/animation/SVGSMILElement.cpp:
632         (WebCore::SVGSMILElement::simpleDuration):
633         (WebCore::SVGSMILElement::repeatingDuration):
634         (WebCore::SVGSMILElement::resolveActiveEnd):
635         (WebCore::SVGSMILElement::resolveInterval):
636         (WebCore::SVGSMILElement::resolveFirstInterval):
637         (WebCore::SVGSMILElement::resolveNextInterval):
638         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
639         * xml/XMLTreeViewer.cpp:
640         * xml/parser/XMLDocumentParser.cpp:
641         * xml/parser/XMLDocumentParserLibxml2.cpp:
642         (WebCore::OffsetBuffer::readOutBytes):
643
644 2013-11-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
645
646         [AX] Clean up static_cast<> to cast from AccessibilityObject 
647         https://bugs.webkit.org/show_bug.cgi?id=124032
648
649         Reviewed by Mario Sanchez Prada.
650
651         ACCESSIBILITY_OBJECT_TYPE_CASTS can support more helpful casting functions.
652         So, we need to use them as much as possible. This patch cleans up all static_cast<> in accessibility.
653
654         This patch generates toAccessibilityFoo() in order to replace static_cast<> with it. Below toAccessibilityFoo()
655         are generated.
656
657         - toAccessibilityARIAGridRow()
658         - toAccessibilityImageMapLink()
659         - toAccessibilityListBox()
660         - toAccessibilityListBoxOption()
661         - toAccessibilityMenuListOption()
662         - toAccessibilityMenuListPopup()
663         - toAccessibilityScrollbar()
664         - toAccessibilitySlider()
665
666         No new tests, no behavior changes.
667
668         * accessibility/AXObjectCache.cpp:
669         (WebCore::AXObjectCache::focusedImageMapUIElement):
670         * accessibility/AccessibilityARIAGridRow.h:
671         * accessibility/AccessibilityImageMapLink.h:
672         * accessibility/AccessibilityListBox.cpp:
673         (WebCore::AccessibilityListBox::setSelectedChildren):
674         (WebCore::AccessibilityListBox::selectedChildren):
675         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
676         * accessibility/AccessibilityListBox.h:
677         * accessibility/AccessibilityListBoxOption.h:
678         * accessibility/AccessibilityMenuList.cpp:
679         (WebCore::AccessibilityMenuList::addChildren):
680         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
681         * accessibility/AccessibilityMenuListOption.h:
682         * accessibility/AccessibilityMenuListPopup.cpp:
683         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
684         * accessibility/AccessibilityMenuListPopup.h:
685         * accessibility/AccessibilityObject.h:
686         (WebCore::AccessibilityObject::isListBoxOption):
687         (WebCore::AccessibilityObject::isSliderThumb):
688         * accessibility/AccessibilityRenderObject.cpp:
689         (WebCore::AccessibilityRenderObject::getDocumentLinks):
690         (WebCore::AccessibilityRenderObject::addImageMapChildren):
691         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
692         * accessibility/AccessibilityScrollView.cpp:
693         (WebCore::AccessibilityScrollView::addChildScrollbar):
694         * accessibility/AccessibilityScrollbar.h:
695         * accessibility/AccessibilitySlider.cpp:
696         (WebCore::AccessibilitySlider::addChildren):
697         * accessibility/AccessibilitySlider.h:
698         * accessibility/AccessibilitySpinButton.cpp:
699         (WebCore::AccessibilitySpinButton::addChildren):
700         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
701         (webkitAccessibleSelectionClearSelection):
702         (webkitAccessibleSelectionSelectAllSelection):
703         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
704         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
705         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
706         * rendering/RenderMenuList.cpp:
707         (WebCore::RenderMenuList::didUpdateActiveOption):
708
709 2013-11-10  Andreas Kling  <akling@apple.com>
710
711         Rebaseline bindings tests after r158997.
712
713         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
714
715 2013-11-10  Brendan Long  <b.long@cablelabs.com>
716
717         [GStreamer] Consolidate more code into TrackPrivateBaseGStreamer
718         https://bugs.webkit.org/show_bug.cgi?id=124020
719
720         Reviewed by Philippe Normand.
721
722         No new tests because this is just refactoring.
723
724         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
725         (WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): Don't pass playbin to TrackPrivateBaseGStreamer, and do pass a pointer to "this".
726         (WebCore::AudioTrackPrivateGStreamer::disconnect): Clear m_playbin().
727         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Move labelChanged() and languageChanged() to TrackPrivateBaseGStreamer. Move m_playbin to this class (along with disconnect() to clear it).
728         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Move tag handling, pad and index to TrackPrivateBaseGStreamer.
729         (WebCore::textTrackPrivateEventCallback):
730         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
731         (WebCore::InbandTextTrackPrivateGStreamer::disconnect):
732         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
733         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Add WebKitTextCombinerPad with "tags" property, set in the same was as input-selector's pads.
734         (webkit_text_combiner_pad_init): Initialize tags to 0.
735         (webkitTextCombinerPadFinalize): Clear tags.
736         (webkitTextCombinerPadGetProperty): Handling "tags" property.
737         (webkitTextCombinerPadEvent): Changed to be a pad event function instead of a pad probe, and now intercepts tags and merges them (like input-selector pads do).
738         (webkitTextCombinerRequestNewPad): Using WebKitTextCombinerPad instead of just GhostPad.
739         (webkit_text_combiner_pad_class_init): Setup WebKitTextCombinerPad.
740         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Remove superfluous code.
741         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
742         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Use "notify::active" so we don't need a playbin, and immediately check for tags after the constructor.
743         (WebCore::TrackPrivateBaseGStreamer::disconnect): Remove m_playbin.
744         (WebCore::TrackPrivateBaseGStreamer::getTag): Refactored out from notifyTrackOfTagsChanged.
745         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Simplify using m_owner (so we can call labelChanged() and languageChanged() directly), and use getTag() above.
746         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_owner to we can access the owning track, and change some functions to match our needs better.
747         (WebCore::TrackPrivateBaseGStreamer::setActive): Add empty default since InbandTextTrackPrivateGStreamer doesn't need this.
748         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Same as AudioTrackPrivateGStreamer.
749         (WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
750         (WebCore::VideoTrackPrivateGStreamer::disconnect):
751         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same as AudioTrackPrivateGStreamer.
752
753 2013-11-10  Andreas Kling  <akling@apple.com>
754
755         Generate type casting helpers for Widget classes.
756         <https://webkit.org/b/124120>
757
758         Add a WIDGET_TYPE_CASTS macro and replace all the hand-written
759         toFoo() helpers we had for Widget subclasses. Fixed up a handful
760         of places that were still using static_cast.
761
762         Reviewed by Antti Koivisto.
763
764 2013-11-10  Andreas Kling  <akling@apple.com>
765
766         Remove unused FragmentationDisabler class.
767         <https://webkit.org/b/124118>
768
769         This RAII object was added in r144744 to avoid a crash when using
770         MathML inside CSS regions. Its only user was removed in r157070.
771
772         Reviewed by Antti Koivisto.
773
774 2013-11-10  Andreas Kling  <akling@apple.com>
775
776         Simplify some is-this-a-MathML-element? checks.
777         <https://webkit.org/b/124119>
778
779         As of r158198, the MathML-ness of an Element is determined by
780         a Node flag, so there's no need to cast to Element before checking
781         on this. Simplify accordingly.
782
783         Reviewed by Antti Koivisto.
784
785 2013-11-10  Andreas Kling  <akling@apple.com>
786
787         Remove RenderTheme::shouldOpenPickerWithF4Key().
788
789         Rubber-stamped by Anders Carlsson.
790
791 2013-11-09  Andreas Kling  <akling@apple.com>
792
793         CSSValuePool::createFontFamilyValue() should return PassRef.
794         <https://webkit.org/b/124114>
795
796         Unlike createFontFaceValue(), createFontFamilyValue() can never
797         fail to return an object and thus should return PassRef.
798
799         Reviewed by Anders Carlsson.
800
801 2013-11-09  Andreas Kling  <akling@apple.com>
802
803         RenderIFrame should display its name correctly in DRT output.
804         <https://webkit.org/b/124117>
805
806         Nuke an age-old FIXME about making RenderIFrame show its true name
807         in DRT output. No more "RenderPartObject {IFRAME}"!
808
809         Reviewed by Anders Carlsson.
810
811 2013-11-09  Andreas Kling  <akling@apple.com>
812
813         SVGTextMetricsBuilder::walkTree() should take a RenderElement.
814         <https://webkit.org/b/124105>
815
816         Make walkTree() take a RenderElement so we can use the non-virtual
817         firstChild() internally. All call sites had pointers to compatible
818         objects already.
819
820         Reviewed by Anders Carlsson.
821
822 2013-11-09  Andreas Kling  <akling@apple.com>
823
824         RenderMathMLFenced should pass around operators in tighter types.
825         <https://webkit.org/b/124115>
826
827         Store operator renderers in RenderMathMLOperator pointers instead
828         of passing them around as RenderObject.
829
830         Reviewed by Martin Robinson.
831
832 2013-11-09  Andreas Kling  <akling@apple.com>
833
834         Use RENDER_OBJECT_TYPE_CASTS for more types.
835         <https://webkit.org/b/124112>
836
837         Generate toRenderFoo() type casting helpers for these classes:
838
839             - RenderCombineText
840             - RenderDetailsMarker
841             - RenderListMarker
842             - RenderVideo
843             - RenderView
844
845         Reviewed by Anders Carlsson.
846
847 2013-11-09  Andreas Kling  <akling@apple.com>
848
849         Move MathML type checking virtuals to RenderObject.
850         <https://webkit.org/b/124111>
851
852         Previously, checking the type of a MathML renderer would require
853         that you first check if it's a RenderMathMLBlock, and then casting
854         to that type to access the check you really wanted.
855
856         This change moves all the isRenderMathMLFoo() virtual functions
857         to RenderObject. I also made sure all the overloads were private
858         and marked them OVERRIDE/FINAL as appropriate.
859
860         Finally I replaced all the hand-written casting functions with
861         autogenerated ones using RENDER_OBJECT_TYPE_CASTS.
862
863         Reviewed by Anders Carlsson.
864
865 2013-11-09  Martin Robinson  <mrobinson@igalia.com>
866
867         [MathML] Poor spacing around delimiters in MathML Torture Test 14
868         https://bugs.webkit.org/show_bug.cgi?id=122837
869
870         Reviewed by Brent Fulgham.
871
872         Instead of stretching the vertical bar with the stretchable version, just repeat
873         the normal vertical bar. This follows what Gecko does when rendering tall vertical
874         bars and also works around an issue with STIX fonts leading to poor spacing in
875         formulas.
876
877         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
878         normal variant.
879
880 2013-11-09  Anders Carlsson  <andersca@apple.com>
881
882         Encode form data using the KeyedEncoder
883         https://bugs.webkit.org/show_bug.cgi?id=124107
884
885         Reviewed by Sam Weinig.
886
887         * platform/KeyedCoding.h:
888         (WebCore::KeyedEncoder::encodeEnum):
889         * platform/network/FormData.cpp:
890         (WebCore::encodeElement):
891         (WebCore::FormData::encode):
892         * platform/network/FormData.h:
893
894 2013-11-09  Sam Weinig  <sam@webkit.org>
895
896         Modernize CanvasObserverProxy
897         https://bugs.webkit.org/show_bug.cgi?id=124106
898
899         Reviewed by Anders Carlsson.
900
901         * css/CSSCanvasValue.h:
902
903 2013-11-09  Patrick Gansterer  <paroga@webkit.org>
904
905         Move RunLoop from WebCore to WTF
906         https://bugs.webkit.org/show_bug.cgi?id=116606
907
908         Reviewed by Anders Carlsson.
909
910         * CMakeLists.txt:
911         * GNUmakefile.list.am:
912         * PlatformBlackBerry.cmake:
913         * PlatformEfl.cmake:
914         * PlatformGTK.cmake:
915         * PlatformWin.cmake:
916         * WebCore.exp.in:
917         * WebCore.vcxproj/WebCore.vcxproj:
918         * WebCore.xcodeproj/project.pbxproj:
919         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
920         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
921
922 2013-11-09  Andreas Kling  <akling@apple.com>
923
924         Tighten typing in SVGResourcesCycleSolver a bit.
925         <https://webkit.org/b/124104>
926
927         Make the SVGResourcesCycleSolver constructor take a RenderElement&
928         and a SVGResources&.
929
930         While I was in the neighborhood, also converted one loop to use a
931         renderer iterator instead of walking siblings manually.
932
933         Finally used "auto" to clean up some overly wordy loops.
934
935         Reviewed by Anders Carlsson.
936
937 2013-11-09  Andreas Kling  <akling@apple.com>
938
939         Beat SVGRenderSupport with the RenderElement stick.
940         <https://webkit.org/b/124102>
941
942         Tighten up all the SVGRenderSupport helper functions by making them
943         take const RenderElements references instead of raw RenderObject
944         pointers as much as possible.
945
946         This tunes up a bunch of branchy style() calls.
947
948         The patch looks big but it's mostly mechanical. I just changed the
949         signatures and then worked backwards until everything built again.
950
951         Reviewed by Antti Koivisto.
952
953 2013-11-09  Andreas Kling  <akling@apple.com>
954
955         SVGTextLayoutAttributes always has a RenderSVGInlineText.
956         <https://webkit.org/b/124101>
957
958         No SVGTextLayoutAttributes object is without a RenderSVGInlineText
959         "context" so make context() return a reference.
960
961         Reviewed by Antti Koivisto.
962
963 2013-11-09  Andreas Kling  <akling@apple.com>
964
965         Move BindingSecurity stuff under JSDOMBinding umbrella.
966         <https://webkit.org/b/124099>
967
968         We are hitting shouldAllowAccessToDOMWindow() pretty hard on the
969         demo here: <http://www.jasondavies.com/maps/rotate/>
970
971         Putting it together with the rest of the JSDOMBinding code takes
972         CPU time spent in there from 8.7% to 6.5%. The abstraction was
973         only used to support alternate JS engines in the past.
974
975         Reviewed by Antti Koivisto.
976
977 2013-11-08  Brady Eidson  <beidson@apple.com>
978
979         Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
980         https://bugs.webkit.org/show_bug.cgi?id=124088
981
982         Reviewed by Tim Horton.
983 +
984         * CMakeLists.txt:
985         * GNUmakefile.list.am:
986         * WebCore.vcxproj/WebCore.vcxproj:
987         * WebCore.xcodeproj/project.pbxproj:
988
989         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
990
991         * Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
992         * Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
993
994         * Modules/indexeddb/IDBBackingStoreInterface.h:
995         * Modules/indexeddb/IDBCallbacks.h:
996         * Modules/indexeddb/IDBCursor.cpp:
997         * Modules/indexeddb/IDBCursorBackend.cpp:
998         * Modules/indexeddb/IDBCursorBackend.h:
999         * Modules/indexeddb/IDBDatabase.cpp:
1000         * Modules/indexeddb/IDBDatabase.h:
1001         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1002         * Modules/indexeddb/IDBIndex.cpp:
1003         * Modules/indexeddb/IDBIndex.h:
1004         * Modules/indexeddb/IDBIndexWriter.h:
1005         * Modules/indexeddb/IDBObjectStore.cpp:
1006         * Modules/indexeddb/IDBObjectStore.h:
1007         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1008         * Modules/indexeddb/IDBOpenDBRequest.h:
1009         * Modules/indexeddb/IDBPendingDeleteCall.h:
1010         * Modules/indexeddb/IDBRequest.cpp:
1011         * Modules/indexeddb/IDBRequest.h:
1012         * Modules/indexeddb/IDBTransaction.cpp:
1013         * Modules/indexeddb/IDBTransaction.h:
1014         * Modules/indexeddb/IDBTransactionBackend.cpp:
1015         * Modules/indexeddb/IDBTransactionBackend.h:
1016         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1017         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1018         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1019         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1020         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1021         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
1022
1023 2013-11-08  Andreas Kling  <akling@apple.com>
1024
1025         Reindent JSDOMBinding.h (finally.)
1026
1027         Rubber-stamped by Sam Weinig.
1028
1029 2013-11-08  Sam Weinig  <sam@webkit.org>
1030
1031         Change collectStyleForPresentationAttribute and related functions to take a MutableStylePropertySet by reference
1032         https://bugs.webkit.org/show_bug.cgi?id=124096
1033
1034         Reviewed by Andreas Kling.
1035
1036         Pass MutableStylePropertySet by reference. It is never null.
1037
1038 2013-11-08  Anders Carlsson  <andersca@apple.com>
1039
1040         Implement encoding of arrays of objects
1041         https://bugs.webkit.org/show_bug.cgi?id=124091
1042
1043         Reviewed by Beth Dakin.
1044
1045         * history/HistoryItem.cpp:
1046         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1047         Encode the rest of the members.
1048
1049         * platform/KeyedCoding.h:
1050         (WebCore::KeyedEncoder::encodeObjects):
1051         Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.
1052
1053 2013-11-08  Tim Horton  <timothy_horton@apple.com>
1054
1055         Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
1056         https://bugs.webkit.org/show_bug.cgi?id=123944
1057
1058         Reviewed by Simon Fraser.
1059
1060         Ensure that the tile cache retrieves repaint rects from the tile layer,
1061         not from the tiled backing layer.
1062
1063         * platform/graphics/ca/PlatformCALayer.h:
1064         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1065         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1066         (PlatformCALayerMac::enumerateRectsBeingDrawn):
1067         Allow the PlatformCALayer to decide how to enumerate rects to paint.
1068
1069         * WebCore.exp.in:
1070         * platform/graphics/mac/WebLayer.h:
1071         Add RepaintRectList, remove some unnecessary WebCore::s.
1072
1073         * platform/graphics/mac/WebLayer.mm:
1074         (WebCore::collectRectsToPaint):
1075         Factor collectRectsToPaint out; it just grabs the rects from
1076         the layer and makes the decision whether to repaint the bounds
1077         of the dirty region or just the subregions.
1078
1079         Move calls to collectRectsToPaint() to callers of drawLayerContents(),
1080         so that TileController can collect rects from the appropriate source
1081         (the Tile layer) and other layers just continue grabbing them from
1082         their relevant layers.
1083
1084         Make sure that the list that comes from collectRectsToPaint() always
1085         has at least one rect in it (appending the clip bounds if we don't
1086         want to repaint subregions) so we can simplify logic in drawLayerContents.
1087
1088         (WebCore::drawLayerContents):
1089         Remove code to support CompositingCoordinatesBottomUp, as it's only
1090         used on Windows, so this Mac-specific code doesn't need to support it.
1091
1092         Simplify logic given that dirtyRects will always be non-empty.
1093
1094         (-[WebLayer drawInContext:]):
1095         (-[WebSimpleLayer setNeedsDisplayInRect:]):
1096         * platform/graphics/ca/mac/TileController.mm:
1097         (WebCore::TileController::platformCALayerPaintContents):
1098         Adopt collectRectsToPaint.
1099
1100 2013-11-08  Anders Carlsson  <andersca@apple.com>
1101
1102         Implement more KeyedEncoder functionality
1103         https://bugs.webkit.org/show_bug.cgi?id=124089
1104
1105         Reviewed by Beth Dakin.
1106
1107         * bindings/js/SerializedScriptValue.h:
1108         * history/HistoryItem.cpp:
1109         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1110         * platform/KeyedCoding.h:
1111         (WebCore::KeyedEncoder::encodeConditionalObject):
1112
1113 2013-11-08  Eric Carlson  <eric.carlson@apple.com>
1114
1115         getCueAsHTML() on an empty cue should return a document fragment
1116         https://bugs.webkit.org/show_bug.cgi?id=124084
1117
1118         Reviewed by Darin Adler.
1119
1120         Test: media/track/track-cue-empty-cue-text.html
1121
1122         * html/track/WebVTTParser.cpp:
1123         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): Don't return early when the
1124             passed an empty string.
1125
1126 2013-11-08  Anders Carlsson  <andersca@apple.com>
1127
1128         KeyedEncoder should be able to encoder objects
1129         https://bugs.webkit.org/show_bug.cgi?id=124085
1130
1131         Reviewed by Sam Weinig.
1132
1133         * history/HistoryItem.cpp:
1134         (WebCore::HistoryItem::encodeBackForwardTree):
1135         Encode the root object.
1136
1137         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1138         Encode the target.
1139
1140         * history/HistoryItem.h:
1141         Add new members.
1142
1143         * platform/KeyedCoding.h:
1144         (WebCore::KeyedEncoder::encodeObject):
1145         Call beginObject, call the functor and then call endObject().
1146
1147 2013-11-08  Sam Weinig  <sam@webkit.org>
1148
1149         Teach CanvasObserver about references
1150         https://bugs.webkit.org/show_bug.cgi?id=124082
1151
1152         Reviewed by Anders Carlsson.
1153
1154         * css/CSSCanvasValue.cpp:
1155         * css/CSSCanvasValue.h:
1156         * html/HTMLCanvasElement.cpp:
1157         * html/HTMLCanvasElement.h:
1158
1159 2013-11-08  Anders Carlsson  <andersca@apple.com>
1160
1161         Begin stubbing out a KeyedEncoder class in WebCore
1162         https://bugs.webkit.org/show_bug.cgi?id=124079
1163
1164         Reviewed by Sam Weinig.
1165
1166         * WebCore.exp.in:
1167         Add symbol needed by WebCore.
1168
1169         * WebCore.xcodeproj/project.pbxproj:
1170         Add new header file.
1171
1172         * history/HistoryItem.cpp:
1173         (WebCore::HistoryItem::encodeBackForwardTree):
1174         * history/HistoryItem.h:
1175         Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
1176
1177         * platform/KeyedCoding.h:
1178         Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
1179
1180 2013-11-08  Brady Eidson  <beidson@apple.com>
1181
1182         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
1183         https://bugs.webkit.org/show_bug.cgi?id=124077
1184
1185         Reviewed by Alexey Proskuryakov.
1186
1187         The abstraction is no longer needed.
1188
1189         * CMakeLists.txt:
1190         * GNUmakefile.list.am:
1191         * WebCore.xcodeproj/project.pbxproj:
1192
1193         * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
1194
1195         * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
1196         * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
1197
1198         * Modules/indexeddb/IDBBackingStoreInterface.h:
1199         * Modules/indexeddb/IDBCursorBackend.cpp:
1200         * Modules/indexeddb/IDBCursorBackend.h:
1201         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1202         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1203         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1204         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1205         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1206         * Modules/indexeddb/IDBTransactionCoordinator.h:
1207         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1208         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1209         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1210         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1211
1212 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
1213
1214         REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
1215         https://bugs.webkit.org/show_bug.cgi?id=124075
1216
1217         Reviewed by Beth Dakin.
1218         
1219         In r155660 I removed some scrollbar-related layouts when scrollbars
1220         are in overlay mode.
1221         
1222         However, ScrollView::updateScrollbars() has a case where we still need
1223         to do multiple pases, related to its "Never ever try to both gain/lose a
1224         scrollbar in the same pass" comment. When we avoid making a new scrollbar
1225         because the other was removed, we need to do another pass to bring the
1226         correct scrollbar back.
1227
1228         Can't test overlay scrollbars in tests.
1229
1230         * platform/ScrollView.cpp:
1231         (WebCore::ScrollView::updateScrollbars):
1232
1233 2013-11-08  Hans Muller  <hmuller@adobe.com>
1234
1235         [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
1236         https://bugs.webkit.org/show_bug.cgi?id=123769
1237
1238         Reviewed by Dirk Schulze.
1239
1240         Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
1241         and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
1242         method now generates intervals with Y coordinates that begin at the image shape's
1243         bounds.y - shape-margin, which may be less than 0.
1244
1245         The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
1246         by the shape-margin. A non-const overload of the method was added to centralize all
1247         access to m_intervalLists.
1248
1249         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
1250               fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
1251
1252         * rendering/shapes/RasterShape.cpp:
1253         (WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
1254         (WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
1255         (WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
1256         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
1257         * rendering/shapes/RasterShape.h:
1258         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
1259         (WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
1260
1261 2013-11-08  Piotr Grad  <p.grad@samsung.com>
1262
1263         Ended event should work also when playback rate is negative
1264         https://bugs.webkit.org/show_bug.cgi?id=123879
1265
1266         Reviewed by Eric Carlson.
1267
1268         According to W3C specification playback is ended also when playback rate is
1269         negative and position is the earliest possible position.
1270
1271         Test: media/video-ended-event-negative-playback.html
1272
1273         * html/HTMLMediaElement.cpp:
1274         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1275
1276 2013-11-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1277
1278         Checking for TypeError in RTCPeerConnection object creation
1279         https://bugs.webkit.org/show_bug.cgi?id=124049
1280
1281         Reviewed by Eric Carlson.
1282
1283         If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
1284         According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
1285
1286         Please notice that this patch does not make every tests run as expected,
1287         RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
1288
1289         Existing tests were updated.
1290
1291         * GNUmakefile.list.am:
1292         * Modules/mediastream/RTCPeerConnection.idl:
1293         * UseJSC.cmake:
1294         * WebCore.vcxproj/WebCore.vcxproj:
1295         * WebCore.vcxproj/WebCore.vcxproj.filters:
1296         * WebCore.xcodeproj/project.pbxproj:
1297         * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
1298         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
1299
1300 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
1301
1302         Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
1303         https://bugs.webkit.org/show_bug.cgi?id=124074
1304
1305         Reviewed by Sam Weinig.
1306
1307         Just a straightforward conversion from const pointers to const references.
1308
1309         Also, remove unneeded argument from FloatingObjects constructor.
1310
1311         No new tests, no behavior change.
1312
1313         * rendering/FloatingObjects.cpp:
1314         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
1315         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
1316         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
1317         (WebCore::FloatingObjects::FloatingObjects):
1318         (WebCore::FloatingObjects::clearLineBoxTreePointers):
1319         (WebCore::FloatingObjects::computePlacedFloatsTree):
1320         (WebCore::shapeInfoForFloat):
1321         (WebCore::::updateOffsetIfNeeded):
1322         (WebCore::::collectIfNeeded):
1323         (WebCore::::heightRemaining):
1324         * rendering/FloatingObjects.h:
1325         * rendering/RenderBlockFlow.cpp:
1326         (WebCore::RenderBlockFlow::createFloatingObjects):
1327
1328 2013-11-08  Sam Weinig  <sam@webkit.org>
1329
1330         Teach SubframeLoader a bit about references
1331         https://bugs.webkit.org/show_bug.cgi?id=124076
1332
1333         Reviewed by Anders Carlsson.
1334
1335         * html/HTMLAppletElement.cpp:
1336         * html/HTMLFrameElementBase.cpp:
1337         * html/HTMLMediaElement.cpp:
1338         * loader/SubframeLoader.cpp:
1339         * loader/SubframeLoader.h:
1340
1341 2013-11-08  Brady Eidson  <beidson@apple.com>
1342
1343         Blind Windows build-fix attempt after r158959
1344
1345         * WebCore.vcxproj/WebCore.vcxproj:
1346
1347 2013-11-08  Brady Eidson  <beidson@apple.com>
1348
1349         Merge IDBCursorBackendInterface and IDBCursorBackendImpl
1350         https://bugs.webkit.org/show_bug.cgi?id=124068
1351
1352         Reviewed by Anders Carlsson.
1353
1354         * CMakeLists.txt:
1355         * GNUmakefile.list.am:
1356         * WebCore.xcodeproj/project.pbxproj:
1357
1358         * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
1359
1360         * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
1361         * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
1362
1363         * Modules/indexeddb/IDBCallbacks.h:
1364         * Modules/indexeddb/IDBCursor.cpp:
1365         * Modules/indexeddb/IDBCursor.h:
1366         * Modules/indexeddb/IDBCursorWithValue.cpp:
1367         * Modules/indexeddb/IDBCursorWithValue.h:
1368         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1369         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1370         * Modules/indexeddb/IDBRequest.cpp:
1371         * Modules/indexeddb/IDBRequest.h:
1372         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1373         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1374         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1375         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1376         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1377         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1378
1379 2013-11-08  Sam Weinig  <sam@webkit.org>
1380
1381         Modernize FrameLoader a bit
1382         https://bugs.webkit.org/show_bug.cgi?id=124073
1383
1384         Reviewed by Anders Carlsson.
1385
1386         * loader/FrameLoader.cpp:
1387         * loader/FrameLoader.h:
1388         Use std::unique_ptrs rather than OwnPtrs.
1389
1390         * loader/MixedContentChecker.cpp:
1391         * loader/MixedContentChecker.h:
1392         Switch to hold a Frame& rather than Frame*.
1393
1394 2013-11-08  Zan Dobersek  <zdobersek@igalia.com>
1395
1396         Remove code guarded with ENABLE(STREAM)
1397         https://bugs.webkit.org/show_bug.cgi?id=123667
1398
1399         Reviewed by Anders Carlsson.
1400
1401         Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
1402         no port enables the feature and the work on this feature has wound down after the Chromium port forked,
1403         leaving this code unmaintained.
1404
1405         * fileapi/FileReaderLoader.cpp:
1406         * fileapi/FileReaderLoader.h:
1407
1408 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
1409
1410         RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
1411         https://bugs.webkit.org/show_bug.cgi?id=123931
1412
1413         Reviewed by Sam Weinig.
1414
1415         Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
1416         the search and to not need ShapeOutsideFloatOffsetMode anymore. This
1417         moves almost all of the logic into FloatingObjects, making a small
1418         reduction in the amount that RenderBlockFlow needs to know about the
1419         implementation of FloatingObjects.
1420
1421         In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
1422         and roundToInt itself so that all of it's callers can be simplified.
1423
1424         No new tests, no new behavior.
1425
1426         * rendering/FloatingObjects.cpp:
1427         (WebCore::rangesIntersect):
1428         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
1429         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
1430         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
1431         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
1432         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
1433         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
1434         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
1435         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
1436         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
1437         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
1438         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
1439         (WebCore::FloatingObjects::logicalLeftOffset):
1440         (WebCore::FloatingObjects::logicalRightOffset):
1441         * rendering/FloatingObjects.h:
1442         * rendering/LineWidth.cpp:
1443         (WebCore::LineWidth::fitBelowFloats):
1444         * rendering/RenderBlockFlow.cpp:
1445         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
1446         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
1447         (WebCore::RenderBlockFlow::getClearDelta):
1448         * rendering/RenderBlockFlow.h:
1449
1450 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
1451
1452         https://bugs.webkit.org/show_bug.cgi?id=124064
1453         Some WebCrypto files are not in correct directories
1454
1455         Rubber-stamped by Anders Carlsson.
1456
1457         * WebCore.xcodeproj/project.pbxproj:
1458         * crypto/CryptoAlgorithmAesCbcParams.h: Removed.
1459         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
1460         * crypto/CryptoKeyAES.cpp: Removed.
1461         * crypto/CryptoKeyAES.h: Removed.
1462         * crypto/CryptoKeyMac.cpp: Removed.
1463         * crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
1464         * crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
1465         * crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
1466         * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
1467         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
1468
1469 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
1470
1471         Implement JWK key import for HMAC and AES-CBC
1472         https://bugs.webkit.org/show_bug.cgi?id=124059
1473
1474         Reviewed by Anders Carlsson.
1475
1476         Tests: crypto/subtle/aes-cbc-import-jwk.html
1477                crypto/subtle/hmac-import-jwk.html
1478                crypto/subtle/import-jwk.html
1479
1480         WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
1481         we'll transform these into parsed KeyData subclasses before passing to algorithms.
1482
1483         CryptoKeySerialization is a base class for handling all these formats.
1484
1485         * WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
1486         
1487         * bindings/js/JSCryptoKeySerializationJWK.h: Added.
1488         * bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
1489         (WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
1490         a nice freshly parsed JSON, no getters or anything.
1491         (WebCore::getBooleanFromJSON): Ditto.
1492         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
1493         (WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
1494         (WebCore::createHMACParameters): A simple helper.
1495         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
1496         you can have algorithm parameters both inside a JWK key and passed as importKey()
1497         arguments. They need to agree, whatever that means for specific serialization's
1498         algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
1499         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
1500         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
1501         both JWK and the caller agree.
1502         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
1503         (WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
1504         subclass.
1505
1506         * bindings/js/JSSubtleCryptoCustom.cpp:
1507         (WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
1508         (WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
1509         (WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
1510
1511         * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
1512         * crypto/CryptoAlgorithm.h:
1513         Updated signature for importKey to one that makes more sense. Decoding formats all
1514         the way from a binary blob is not something that CryptoAlgorithm subclasses should
1515         do, we now pass a KeyData subclass instead.
1516         Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
1517         signatures will be.
1518
1519         * crypto/CryptoKeyData.h: Added.
1520         (WebCore::CryptoKeyData::ENUM_CLASS):
1521         (WebCore::CryptoKeyData::CryptoKeyData):
1522         (WebCore::CryptoKeyData::~CryptoKeyData):
1523         (WebCore::CryptoKeyData::format):
1524         A base class for passing key material to algorithms. Currently, only one type is
1525         supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
1526         complicated, and secret/public ones are different too.
1527
1528         * crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
1529         confusingly floating around, and this was only needed in one file for parsing.
1530
1531         * crypto/CryptoKeySerialization.h: Added.
1532         Base class for handling raw/pkcs8/spki/jwk keys.
1533
1534         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
1535         (WebCore::CryptoAlgorithmAES_CBC::importKey):
1536         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
1537         Updated to use CryptoKeyData.
1538
1539         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
1540         (WebCore::CryptoAlgorithmHMAC::importKey):
1541         * crypto/algorithms/CryptoAlgorithmHMAC.h:
1542         Updated to use CryptoKeyData.
1543
1544         * crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
1545         (WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
1546         (WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
1547         * crypto/keys/CryptoKeyDataOctetSequence.h: Added.
1548         (WebCore::asCryptoKeyDataOctetSequence):
1549         * crypto/keys/CryptoKeySerializationRaw.cpp: Added.
1550         (WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
1551         (WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
1552         (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
1553         (WebCore::CryptoKeySerializationRaw::reconcileUsages):
1554         (WebCore::CryptoKeySerializationRaw::reconcileExtractable):
1555         (WebCore::CryptoKeySerializationRaw::keyData):
1556         * crypto/keys/CryptoKeySerializationRaw.h: Added.
1557         Much code to pass around a Vector<char>.
1558
1559 2013-11-08  Mark Lam  <mark.lam@apple.com>
1560
1561         Move breakpoint (and exception break) functionality into JSC::Debugger.
1562         https://bugs.webkit.org/show_bug.cgi?id=121796.
1563
1564         Reviewed by Geoffrey Garen.
1565
1566         No new tests.
1567
1568         - In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
1569           now numeric tokens.
1570
1571         - JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
1572           record. Previously, this info is tracked in the ScriptBreakpoint record
1573           in ScriptDebugServer. The only element of ScriptBreakpoint that is not
1574           being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
1575              The ScriptBreakpointAction is still tracked by the ScriptDebugServer
1576           in a list keyed on the corresponding BreakpointID.
1577              The ScriptBreakpoint record is now only used as a means of passing
1578           breakpoint paramaters to the ScriptDebugServer.
1579
1580         - ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
1581           It always goes through the DebuggerCallFrame.
1582
1583         * GNUmakefile.list.am:
1584         * WebCore.vcxproj/WebCore.vcxproj:
1585         * WebCore.vcxproj/WebCore.vcxproj.filters:
1586         * WebCore.xcodeproj/project.pbxproj:
1587         * bindings/js/BreakpointID.h: Added.
1588         * bindings/js/ScriptDebugServer.cpp:
1589         (WebCore::ScriptDebugServer::ScriptDebugServer):
1590         (WebCore::ScriptDebugServer::setBreakpoint):
1591         (WebCore::ScriptDebugServer::removeBreakpoint):
1592         (WebCore::ScriptDebugServer::clearBreakpoints):
1593         (WebCore::ScriptDebugServer::dispatchDidPause):
1594         (WebCore::ScriptDebugServer::dispatchDidContinue):
1595         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1596         (WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
1597         (WebCore::ScriptDebugServer::needPauseHandling):
1598         (WebCore::ScriptDebugServer::handleBreakpointHit):
1599         (WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
1600         (WebCore::ScriptDebugServer::handlePause):
1601         * bindings/js/ScriptDebugServer.h:
1602         * bindings/js/SourceID.h: Added.
1603         * bindings/js/WorkerScriptDebugServer.cpp:
1604         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1605         * bindings/js/WorkerScriptDebugServer.h:
1606         * inspector/InspectorDebuggerAgent.cpp:
1607         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1608         (WebCore::parseLocation):
1609         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1610         (WebCore::InspectorDebuggerAgent::continueToLocation):
1611         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1612         (WebCore::InspectorDebuggerAgent::searchInContent):
1613         (WebCore::InspectorDebuggerAgent::getScriptSource):
1614         (WebCore::InspectorDebuggerAgent::didParseSource):
1615         (WebCore::InspectorDebuggerAgent::didPause):
1616         (WebCore::InspectorDebuggerAgent::clear):
1617         * inspector/InspectorDebuggerAgent.h:
1618         * inspector/ScriptDebugListener.h:
1619
1620 2013-11-08  László Langó  <lango@inf.u-szeged.hu>
1621
1622         InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
1623         https://bugs.webkit.org/show_bug.cgi?id=114316
1624
1625         Reviewed by Timothy Hatcher.
1626
1627         InspectorConsoleAgent::didFinishXHRLoading creates a ConsoleMessage with a line number, 
1628         but it should also include a column number. It looks like ultimately the line number comes from
1629         JSXMLHttpRequest::send, it should also be possible to get the column number at the time.
1630         The column number would be needed by the Web Inspector to jump to the proper place in source code 
1631         to show where the XHR originated from.
1632
1633         * bindings/js/JSXMLHttpRequestCustom.cpp:
1634         (WebCore::SendFunctor::SendFunctor):
1635         (WebCore::SendFunctor::column):
1636         (WebCore::SendFunctor::operator()):
1637         (WebCore::JSXMLHttpRequest::send):
1638         * inspector/InspectorConsoleAgent.cpp:
1639         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
1640         * inspector/InspectorConsoleAgent.h:
1641         * inspector/InspectorInstrumentation.cpp:
1642         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
1643         * inspector/InspectorInstrumentation.h:
1644         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
1645         * xml/XMLHttpRequest.cpp:
1646         (WebCore::XMLHttpRequest::XMLHttpRequest):
1647         (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber):
1648         (WebCore::XMLHttpRequest::didFinishLoading):
1649         * xml/XMLHttpRequest.h:
1650
1651 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
1652
1653         Left sidebar on cubic-bezier.com flickers
1654         https://bugs.webkit.org/show_bug.cgi?id=123128
1655
1656         Reviewed by Dean Jackson.
1657         
1658         The logic that determined whether position:fixed elements outside the viewport
1659         should be composited was incorrect if the fixed element also had a transform.
1660         
1661         layer.calculateLayerBounds() only takes into account painted transforms (since they
1662         affect layer bounds). So we need to compute the bounds relative to the layer
1663         itself, then use localToContainerQuad() to map them to document coordinates,
1664         but only to the RenderView so that we don't hit the page scale transform.
1665
1666         Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
1667                compositing/layer-creation/fixed-position-transformed-outside-view.html
1668
1669         * rendering/RenderLayerCompositor.cpp:
1670         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1671
1672 2013-11-08  Martin Robinson  <mrobinson@igalia.com>
1673
1674         [MathML] Center of stretched curly bracket not always vertically centered
1675         https://bugs.webkit.org/show_bug.cgi?id=123715
1676
1677         Reviewed by Brent Fulgham.
1678
1679         * rendering/mathml/RenderMathMLOperator.cpp:
1680         (WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Update an assertion and
1681         handle the case where two glyph pieces abut.
1682         (WebCore::RenderMathMLOperator::paint): Do not offset the center glyph by y().
1683
1684 2013-10-30  Jer Noble  <jer.noble@apple.com>
1685
1686         [MSE] Bring SourceBuffer.append up to the most recent spec.
1687         https://bugs.webkit.org/show_bug.cgi?id=123377
1688
1689         Reviewed by Eric Carlson.
1690
1691         Test: media/media-source/media-source-append-failed.html
1692
1693         Bring the MediaSource append() implementation up to the current spec.
1694
1695         * Modules/mediasource/SourceBuffer.cpp:
1696         (WebCore::SourceBuffer::appendBufferInternal):
1697         (WebCore::SourceBuffer::appendBufferTimerFired):
1698         * platform/graphics/SourceBufferPrivate.h:
1699         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1700         (WebCore::MockSourceBufferPrivate::append):
1701         (WebCore::MockSourceBufferPrivate::evictCodedFrames):
1702         (WebCore::MockSourceBufferPrivate::isFull):
1703         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1704
1705 2013-11-07  Jer Noble  <jer.noble@apple.com>
1706
1707         [Mac] Crash at com.apple.WebCore: WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange + 26
1708         https://bugs.webkit.org/show_bug.cgi?id=124031
1709
1710         Reviewed by Eric Carlson.
1711
1712         WTF::bind() causes errors when given a bare id pointer as a parameter,
1713         when that parameter is casted to a specific NS type pointer (in this
1714         case, a NSArray*) in order to pass it as a parameter to the bound
1715         function.
1716
1717         Instead of passing around bare id pointers, wrap them in RetainPtr<>
1718         objects before passing them to WTF::bind().
1719
1720         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1721         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1722         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
1723         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
1724         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
1725         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1726
1727 2013-11-08  Antti Koivisto  <antti@apple.com>
1728
1729         Templated LChar/UChar paths for simple line layout
1730         https://bugs.webkit.org/show_bug.cgi?id=124035
1731
1732         Reviewed by Andreas Kling.
1733
1734         * rendering/SimpleLineLayout.cpp:
1735         (WebCore::SimpleLineLayout::canUseForText):
1736         (WebCore::SimpleLineLayout::canUseFor):
1737         
1738             Use a templated function to check for illegal characters.
1739
1740         (WebCore::SimpleLineLayout::skipWhitespaces):
1741         
1742             Make a template function.
1743
1744         (WebCore::SimpleLineLayout::textWidth):
1745         
1746             Make a template function plus some argument changes.
1747
1748         (WebCore::SimpleLineLayout::createTextRuns):
1749         
1750             Template function for creating runs while operating with either LChars or UChar.
1751             Also simplified line breaking and text width measuring logic.
1752
1753         (WebCore::SimpleLineLayout::create):
1754         
1755             Pick the template.
1756
1757         * rendering/break_lines.cpp:
1758         * rendering/break_lines.h:
1759         
1760             Move the implementation to the header (except for the table) so we can use the template
1761             versions directly.
1762
1763         (WebCore::isBreakableSpace):
1764         (WebCore::shouldBreakAfter):
1765         (WebCore::needsLineBreakIterator):
1766         (WebCore::nextBreakablePosition):
1767         (WebCore::nextBreakablePositionIgnoringNBSP):
1768
1769 2013-11-08  Mario Sanchez Prada  <mario.prada@samsung.com>
1770
1771         AX: [ATK] <span> elements exposed through ATK when not needed
1772         https://bugs.webkit.org/show_bug.cgi?id=123885
1773
1774         Reviewed by Chris Fleizach.
1775
1776         As per SVN r158195, the way it's decided whether <span> elements
1777         should be ignored or not has slightly changed, causing that the
1778         GTK/EFL ports expose them in cases that they should be ignored,
1779         such as for text elements that neither are focusable (e.g. by
1780         explicitly setting tabindex) nor have a meaningful accessible name
1781         suggesting they should be exposed.
1782
1783         As a result, the flattening that ATK based ports normally do for
1784         this kind of elements (by folding them into their parents) do not
1785         work correctly anymore, making two tests to fail:
1786
1787             platform/gtk/accessibility/spans-paragraphs-and-divs.html
1788             platform/gtk/accessibility/spans.html
1789
1790         This patch encapsulates the part of the logic that affects this in
1791         the computeAccessibilityIsIgnored() method, placing it in a
1792         new method of AccessibilityObject that we can call from ATK's
1793         accessibilityPlatformIncludesObject() to ensure we hide those
1794         <span> elements when they don't fulfill those requirements.
1795
1796         * accessibility/AccessibilityObject.cpp:
1797         (WebCore::AccessibilityObject::hasAttributesRequiredForInclusion):
1798         New virtual method encapsulating part of the logic from the function
1799         that computes whether accessibility should be ignored or not.
1800         * accessibility/AccessibilityObject.h:
1801
1802         * accessibility/AccessibilityNodeObject.cpp:
1803         (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion):
1804         Override of the new method adding additional checks, as extracted from
1805         the original bits in computeAccessibilityIsIgnored().
1806         * accessibility/AccessibilityNodeObject.h:
1807
1808         * accessibility/AccessibilityRenderObject.cpp:
1809         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1810         Use the newly added function where we had the original code before.
1811
1812         * accessibility/atk/AccessibilityObjectAtk.cpp:
1813         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1814         Make sure <span> elements are ignored if they are not focusable
1815         and they don't have a meaningful accessible name.
1816
1817 2013-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1818
1819         [GTK] Add missing symbols to WebKitDOMEventTarget.symbols
1820         https://bugs.webkit.org/show_bug.cgi?id=123990
1821
1822         Reviewed by Philippe Normand.
1823
1824         Add webkit_dom_event_target_add_event_listener_with_closure and
1825         webkit_dom_event_target_remove_event_listener_with_closure to the
1826         symbols files.
1827
1828         * bindings/gobject/WebKitDOMEventTarget.symbols:
1829         * bindings/gobject/webkitdom.symbols:
1830
1831 2013-11-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1832
1833         [GTK] Use deprecation guards around deprecated API in GObject DOM bindings
1834         https://bugs.webkit.org/show_bug.cgi?id=123899
1835
1836         Reviewed by Martin Robinson.
1837
1838         Do not include deprecated API when compiling with
1839         WEBKIT_DISABLE_DEPRECATED option.
1840
1841         * bindings/scripts/CodeGeneratorGObject.pm:
1842         (GenerateFunction):
1843         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1844         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1845
1846 2013-11-07  Brady Eidson  <beidson@apple.com>
1847
1848         Enhance SQL journal_mode setting code to be less likely to log an error.
1849         <rdar://problem/15418577> and https://bugs.webkit.org/show_bug.cgi?id=124018
1850
1851         Reviewed by Anders Carlsson.
1852
1853         Even though the docs says SQLITE_ROW will always be returned, apparently SQLITE_OK is sometimes returned.
1854         Change the code to handle that.
1855
1856         * platform/sql/SQLiteDatabase.cpp:
1857         (WebCore::SQLiteDatabase::open): Save the statement result value, and accept SQLITE_OK as a non-error condition.
1858
1859 2013-11-07  Brady Eidson  <beidson@apple.com>
1860
1861         Update an out-dated ASSERT in IconDatabase code.
1862         <rdar://problem/15171118> and https://bugs.webkit.org/show_bug.cgi?id=124030.
1863
1864         Reviewed by Andreas Kling.
1865
1866         With the asynchronous interfaces that have been added and the support for WK2 that has been added, 
1867         this ASSERT can incorrectly fire if an icon is asked for before database cleanup is allowed.
1868
1869         * loader/icon/IconDatabase.cpp:
1870         (WebCore::IconDatabase::synchronousIconForPageURL): Update an invalid ASSERT.
1871
1872 2013-11-07  Andreas Kling  <akling@apple.com>
1873
1874         RenderSVGResource helpers should take RenderStyle by const reference.
1875         <https://webkit.org/b/124029>
1876
1877         Take const RenderStyle& instead of RenderStyle* in a few more places
1878         so we can get rid of some ampersands and assertions.
1879
1880         Reviewed by Anders Carlsson.
1881
1882 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1883
1884         [AX] Generate toAccessibilityTableRow|Column|Cell to detect bad type casts
1885         https://bugs.webkit.org/show_bug.cgi?id=123984
1886
1887         Reviewed by Mario Sanchez Prada.
1888
1889         As a step to let static_cast<> use TYPE_CASTS_BASE, AccessibilityTableRow|Column|Cell use
1890         ACCESSIBILITY_OBJECT_TYPE_CASTS which can support more helper functions rather than manual
1891         static_cast<>. This change will help to detect bad type casts further.
1892
1893         No new tests, no behavior changes.
1894
1895         * accessibility/AccessibilityARIAGrid.cpp:
1896         (WebCore::AccessibilityARIAGrid::addTableCellChild):
1897         (WebCore::AccessibilityARIAGrid::addChildren):
1898         * accessibility/AccessibilityARIAGridCell.cpp:
1899         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1900         * accessibility/AccessibilityTable.cpp:
1901         (WebCore::AccessibilityTable::addChildren):
1902         (WebCore::AccessibilityTable::rowHeaders):
1903         (WebCore::AccessibilityTable::columnHeaders):
1904         (WebCore::AccessibilityTable::cellForColumnAndRow):
1905         * accessibility/AccessibilityTableCell.h:
1906         * accessibility/AccessibilityTableColumn.h:
1907         * accessibility/AccessibilityTableRow.cpp:
1908         (WebCore::AccessibilityTableRow::headerObject):
1909         * accessibility/AccessibilityTableRow.h:
1910         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1911         (cellAtIndex):
1912         (webkitAccessibleTableGetColumnHeader):
1913         (webkitAccessibleTableGetRowHeader):
1914         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1915         (-[WebAccessibilityObjectWrapper tableCellParent]):
1916         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1917         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1918
1919 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1920
1921         REGRESSION (r154375): Image is oriented incorrectly
1922         https://bugs.webkit.org/show_bug.cgi?id=123831
1923
1924         Reviewed by Antonio Gomes.
1925
1926         r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
1927         It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
1928         value by default.
1929
1930         * rendering/RenderImage.cpp:
1931         (WebCore::RenderImage::paintReplaced):
1932         (WebCore::RenderImage::paintIntoRect):
1933
1934 2013-11-07  Hans Muller  <hmuller@adobe.com>
1935
1936         [CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly
1937         https://bugs.webkit.org/show_bug.cgi?id=123934
1938
1939         Reviewed by Andreas Kling.
1940
1941         RasterShapeIntervals::getExcludedIntervals() was returning an empty
1942         list when the line overlapped any vertical gap in the image. This short-circuit
1943         had been mistakenly copied from getIncludedIntervals(), where it makes sense.
1944
1945         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap.html
1946
1947         * rendering/shapes/RasterShape.cpp:
1948         (WebCore::RasterShapeIntervals::getExcludedIntervals):
1949
1950 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
1951
1952         Make contents layer borders more visible
1953         https://bugs.webkit.org/show_bug.cgi?id=124025
1954
1955         Reviewed by Tim Horton.
1956
1957         Layer borders for contents layers are impossible to see when the
1958         contentsLayer has the same bounds as its parent; make the contents
1959         layer border 4px thick to make it more visible.
1960
1961         * platform/graphics/ca/GraphicsLayerCA.cpp:
1962         (WebCore::GraphicsLayerCA::setupContentsLayer):
1963
1964 2013-11-07  Andreas Kling  <akling@apple.com>
1965
1966         InlineFlowBox always has a RenderBoxModelObject, take advantage.
1967         <https://webkit.org/b/124024>
1968
1969         Since InlineFlowBox already has the branch-less renderer() returning
1970         a RenderBoxModelObject&, avoid using InlineBox::boxModelObject()
1971         wherever we have a tightly-typed box. One branch disappears from
1972         every call site.
1973
1974         Deleted boxModelObject() on InlineFlowBox to prevent new code from
1975         calling the less efficient function.
1976
1977         Reviewed by Anders Carlsson.
1978
1979 2013-11-07  Andreas Kling  <akling@apple.com>
1980
1981         CTTE: Scrolling tree nodes should always have a ScrollingTree&.
1982         <https://webkit.org/b/124022>
1983
1984         Let ScrollingTreeNode and subclasses store the backpointer to the
1985         tree as a ScrollingTree& reference.
1986
1987         Reviewed by Anders Carlsson.
1988
1989 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
1990
1991         Lots of layers get solid color but transparent contents layers now
1992         https://bugs.webkit.org/show_bug.cgi?id=123537
1993
1994         Reviewed by Tim Horton.
1995         
1996         We call rendererBackgroundColor() to determine the layer's background color,
1997         but on most elements this returns the transparent color (a valid color).
1998         This caused us to allocate a contentsLayer, and use the transparent color as its
1999         backgroundColor, which was wasteful.
2000         
2001         Fix by only making a background-color layer if the color is not transparent (zero alpha).
2002         
2003         Also avoid making a new contents layer on every color change, and make sure that
2004         we don't do implicit animations for backgroundColor, and some other properties
2005         that were omitted by mistake.
2006
2007         Layer tree dumps don't dump content layers, so no way to test easily.
2008
2009         * platform/graphics/ca/GraphicsLayerCA.cpp:
2010         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
2011         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2012         (nullActionsDictionary):
2013
2014 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2015
2016         DOMTokenList::add can add duplicated values if arguments had duplicated values
2017         https://bugs.webkit.org/show_bug.cgi?id=123962
2018
2019         Reviewed by Benjamin Poulain.
2020
2021         Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305
2022
2023         In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
2024         See http://dom.spec.whatwg.org/#dom-domtokenlist-add
2025
2026         * html/DOMTokenList.cpp:
2027         (WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.
2028
2029 2013-11-07  Eric Carlson  <eric.carlson@apple.com>
2030
2031         Remove npr.org specific hack in HTMLMediaElement
2032         https://bugs.webkit.org/show_bug.cgi?id=123859
2033
2034         Reviewed by Jer Noble.
2035
2036         Remove the site specific hack added in r57820, it is no longer necessary.
2037
2038         * html/HTMLMediaElement.cpp:
2039         (WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
2040         (HTMLMediaElement::play): Don't special case npr.org.
2041         * html/HTMLMediaElement.h:
2042
2043 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2044
2045         Attempt to fix the 32-bit build. Virtual thunks seem to have different
2046         symbol names between 32- and 64-bit.
2047         
2048         * WebCore.exp.in:
2049
2050 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2051
2052         Crash in HTMLMediaElement::contextDestroyed
2053         https://bugs.webkit.org/show_bug.cgi?id=123963
2054
2055         Reviewed by Eric Carlson.
2056
2057         Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278
2058
2059         * html/HTMLMediaElement.cpp:
2060         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2061
2062 2013-11-07  Jer Noble  <jer.noble@apple.com>
2063
2064         [Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084 
2065         https://bugs.webkit.org/show_bug.cgi?id=124012
2066
2067         Reviewed by Eric Carlson.
2068
2069         The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.
2070
2071         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2072         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2073
2074 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2075
2076         Crash when submitting form in a document with null encoding
2077         https://bugs.webkit.org/show_bug.cgi?id=123975
2078
2079         Reviewed by Alexey Proskuryakov.
2080
2081         Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f
2082         
2083         The CString object which is passed to normalizeLineEndingsToCRLF() can be
2084         a null string. It is created in FormDataList::appendString(), and it
2085         produces a null CString if FormDataList::m_encoding is a null encoding.
2086
2087         Test: fast/forms/form-submit-in-image-document.html
2088
2089         * platform/text/LineEnding.cpp:
2090         (internalNormalizeLineEndingsToCRLF):
2091
2092 2013-11-07  Anders Carlsson  <andersca@apple.com>
2093
2094         Use std::function for all policy continuation functions
2095         https://bugs.webkit.org/show_bug.cgi?id=124011
2096
2097         Reviewed by Sam Weinig.
2098
2099         * loader/DocumentLoader.cpp:
2100         (WebCore::DocumentLoader::willSendRequest):
2101         (WebCore::DocumentLoader::responseReceived):
2102         * loader/DocumentLoader.h:
2103         * loader/FrameLoader.cpp:
2104         (WebCore::FrameLoader::loadURL):
2105         (WebCore::FrameLoader::load):
2106         (WebCore::FrameLoader::loadWithDocumentLoader):
2107         (WebCore::FrameLoader::loadPostRequest):
2108         * loader/PolicyCallback.cpp:
2109         (WebCore::PolicyCallback::clear):
2110         (WebCore::PolicyCallback::set):
2111         (WebCore::PolicyCallback::call):
2112         (WebCore::PolicyCallback::clearRequest):
2113         (WebCore::PolicyCallback::cancel):
2114         * loader/PolicyCallback.h:
2115         * loader/PolicyChecker.cpp:
2116         (WebCore::PolicyChecker::checkNavigationPolicy):
2117         (WebCore::PolicyChecker::checkNewWindowPolicy):
2118         (WebCore::PolicyChecker::checkContentPolicy):
2119         * loader/PolicyChecker.h:
2120
2121 2013-11-07  Brady Eidson  <beidson@apple.com>
2122
2123         Use SQLite journal mode WAL (WriteAheadLogging)
2124         https://bugs.webkit.org/show_bug.cgi?id=124009
2125
2126         Reviewed by Anders Carlsson.
2127
2128         WriteAheadLogging journalling is better than the traditional rollback model.
2129
2130         * platform/sql/SQLiteDatabase.cpp:
2131         (WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.
2132
2133 2013-11-07  Mark Lam  <mark.lam@apple.com>
2134
2135         Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
2136         https://bugs.webkit.org/show_bug.cgi?id=123945.
2137
2138         Reviewed by Geoffrey Garen.
2139
2140         No new tests.
2141
2142         * bindings/js/JSInjectedScriptHostCustom.cpp:
2143         (WebCore::JSInjectedScriptHost::functionDetails):
2144         * bindings/js/JavaScriptCallFrame.h:
2145         (WebCore::JavaScriptCallFrame::sourceID):
2146         * bindings/js/ScriptDebugServer.cpp:
2147         (WebCore::ScriptDebugServer::ScriptDebugServer):
2148         (WebCore::ScriptDebugServer::setBreakpoint):
2149         (WebCore::ScriptDebugServer::removeBreakpoint):
2150         (WebCore::ScriptDebugServer::hasBreakpoint):
2151         (WebCore::ScriptDebugServer::clearBreakpoints):
2152         (WebCore::ScriptDebugServer::updateCallFrame):
2153         (WebCore::ScriptDebugServer::pauseIfNeeded):
2154         * bindings/js/ScriptDebugServer.h:
2155         * inspector/InspectorConsoleAgent.cpp:
2156         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2157         * inspector/InspectorConsoleAgent.h:
2158         * inspector/InspectorConsoleInstrumentation.h:
2159         (WebCore::InspectorInstrumentation::addMessageToConsole):
2160         * inspector/InspectorDOMAgent.cpp:
2161         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2162         * inspector/InspectorDebuggerAgent.cpp:
2163         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2164         (WebCore::parseLocation):
2165         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2166         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
2167         (WebCore::InspectorDebuggerAgent::continueToLocation):
2168         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2169         (WebCore::InspectorDebuggerAgent::searchInContent):
2170         (WebCore::InspectorDebuggerAgent::setScriptSource):
2171         (WebCore::InspectorDebuggerAgent::getScriptSource):
2172         (WebCore::InspectorDebuggerAgent::compileScript):
2173         (WebCore::InspectorDebuggerAgent::runScript):
2174         (WebCore::InspectorDebuggerAgent::didParseSource):
2175         (WebCore::InspectorDebuggerAgent::didPause):
2176         (WebCore::InspectorDebuggerAgent::clear):
2177         (WebCore::InspectorDebuggerAgent::reset):
2178         * inspector/InspectorDebuggerAgent.h:
2179         * inspector/InspectorInstrumentation.cpp:
2180         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2181         * inspector/InspectorInstrumentation.h:
2182         * inspector/ScriptDebugListener.h:
2183
2184 2013-11-07  Cidorvan Leite  <cidorvan.leite@openbossa.org>
2185
2186         Avoid invalid cairo matrix when drawing surfaces too small
2187         https://bugs.webkit.org/show_bug.cgi?id=123810
2188
2189         Drawing surfaces too small makes inverse matrix with values too big,
2190         when this happen, cairo context is not valid anymore and it stops to draw anything.
2191
2192         Reviewed by Martin Robinson.
2193
2194         Test: fast/canvas/drawImage-with-small-values.html
2195
2196         * platform/graphics/cairo/PlatformContextCairo.cpp:
2197         (WebCore::PlatformContextCairo::drawSurfaceToContext):
2198
2199 2013-11-07  Antti Koivisto  <antti@apple.com>
2200
2201         Simple line layout crashes with SVG fonts
2202         https://bugs.webkit.org/show_bug.cgi?id=124002
2203
2204         Reviewed by Simon Fraser.
2205         
2206         Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.
2207
2208         Test: fast/text/svg-font-simple-line-crash.html
2209
2210         * platform/graphics/Font.h:
2211         (WebCore::Font::isSVGFont):
2212         
2213             Add isSVGFont() so callers don't need to go via primaryFont().
2214
2215         * rendering/InlineTextBox.cpp:
2216         (WebCore::InlineTextBox::constructTextRun):
2217         * rendering/RenderBlock.cpp:
2218         (WebCore::constructTextRunInternal):
2219         * rendering/SimpleLineLayout.cpp:
2220         (WebCore::SimpleLineLayout::canUseFor):
2221         
2222             Disallow SVG fonts.
2223
2224         * rendering/svg/SVGInlineTextBox.cpp:
2225         (WebCore::SVGInlineTextBox::constructTextRun):
2226         * rendering/svg/SVGTextMetrics.cpp:
2227         (WebCore::SVGTextMetrics::constructTextRun):
2228         (WebCore::SVGTextMetrics::SVGTextMetrics):
2229         * rendering/svg/SVGTextRunRenderingContext.h:
2230         
2231             Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().
2232
2233 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2234
2235         Allow customization of the contentsScale of TileController tiles
2236         https://bugs.webkit.org/show_bug.cgi?id=124004
2237
2238         Reviewed by Tim Horton.
2239
2240         On some platorms, zooming out on pages with TiledBacking compositing
2241         layers can cause very high memory use, because the TiledBacking retains
2242         the original page scale while the zoom is in flight, but can be asked
2243         to cover a large area.
2244         
2245         Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
2246         to provide an additional scale factor for newly created tiles. Platforms can
2247         then customize this to create low-res tiles when necessary.
2248
2249         * WebCore.exp.in:
2250         * platform/graphics/GraphicsLayerClient.h:
2251         (WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
2252         * platform/graphics/ca/GraphicsLayerCA.cpp:
2253         (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
2254         * platform/graphics/ca/GraphicsLayerCA.h:
2255         * platform/graphics/ca/PlatformCALayerClient.h:
2256         (WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
2257         * platform/graphics/ca/mac/TileController.h:
2258         * platform/graphics/ca/mac/TileController.mm:
2259         (WebCore::TileController::TileController):
2260         (WebCore::TileController::setScale):
2261         (WebCore::TileController::createTileLayer):
2262         * rendering/RenderLayerBacking.cpp:
2263         (WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
2264         * rendering/RenderLayerBacking.h:
2265         * rendering/RenderLayerCompositor.cpp:
2266         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
2267         * rendering/RenderLayerCompositor.h:
2268
2269 2013-11-07  Jer Noble  <jer.noble@apple.com>
2270
2271         Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.
2272
2273         * rendering/FloatingObjects.cpp:
2274
2275 2013-11-07  Bem Jones-Bey  <bjonesbe@adobe.com>
2276
2277         Refactor logical left/right offset for line methods
2278         https://bugs.webkit.org/show_bug.cgi?id=123898
2279
2280         Reviewed by David Hyatt.
2281
2282         Simplify the logical left/right offset for line methods and their
2283         implementation, including the ComputeFloatOffsetAdapter. This also
2284         reduces the number of line offset methods in RenderBlock.
2285
2286         No new tests, no behavior change.
2287
2288         * rendering/FloatingObjects.cpp:
2289         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
2290         (WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
2291             the offset instead of using a confusing out parameter.
2292         (WebCore::::shapeOffset): Method to return the offset modified by the
2293             shape delta. Moving the computation to this method allowed for
2294             simplification of the users of ComputeFloatOffsetAdapter.
2295         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
2296             method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
2297             offset based on the float margin box.
2298         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
2299         (WebCore::FloatingObjects::logicalLeftOffset): This now only returns
2300             the offset based on the shape's contour.
2301         (WebCore::FloatingObjects::logicalRightOffset): Ditto.
2302         (WebCore::::heightRemaining): Rename to properly follow the getter
2303             naming convention.
2304         * rendering/FloatingObjects.h:
2305         * rendering/RenderBlock.h:
2306         (WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
2307             use of ShapeOutsideFloatOffsetMode and heightRemaining.
2308         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
2309         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
2310         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
2311         * rendering/RenderBlockFlow.cpp:
2312         (WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
2313             Positioning a float is the only case where the float margin box
2314             should be used, and also the only case where heightRemaining is
2315             needed. This handles that case.
2316         (WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
2317             Ditto.
2318         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
2319             use logical(Left|Right)OffsetForPositioningFloatOnLine.
2320         (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
2321             remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
2322         (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
2323         * rendering/RenderBlockFlow.h:
2324
2325 2013-11-07  Alexandru Chiculita  <achicu@adobe.com>
2326
2327         Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
2328         https://bugs.webkit.org/show_bug.cgi?id=123577
2329
2330         Reviewed by Timothy Hatcher.
2331
2332         Test: inspector-protocol/model/content-flow-content-removal.html
2333
2334         Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
2335         anymore. We already send an unbind event, so the inspector is already notified that the node was removed.
2336
2337         * inspector/InspectorCSSAgent.cpp:
2338         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
2339
2340 2013-10-30  Jer Noble  <jer.noble@apple.com>
2341
2342         [MSE] Add mock MediaSource classes for testing.
2343         https://bugs.webkit.org/show_bug.cgi?id=123322
2344
2345         Reviewed by Eric Carlson.
2346
2347         Tests: media/media-source/media-source-addsourcebuffer.html
2348                media/media-source/media-source-append-buffer.html
2349                media/media-source/media-source-canplaythrough.html
2350                media/media-source/media-source-closed.html
2351                media/media-source/media-source-play.html
2352                media/media-source/media-source-track-enabled.html
2353                media/media-source/media-source-tracks.html
2354
2355
2356         Add mock implementation of platform MediaSource classes, allowing ports to test the
2357         MediaSource API without having a platform implementation.
2358
2359         The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
2360         format with an initialization segment containing a number of tracks, followed by a list of
2361         samples.
2362
2363         Add a means to insert a new media engine factory at runtime, so the internals object can add
2364         a MockMediaSourceMediaPlayer:
2365         * platform/graphics/MediaPlayer.cpp:
2366         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
2367         * platform/graphics/MediaPlayer.h:
2368         * testing/Internals.cpp:
2369         (WebCore::Internals::initializeMockMediaSource):
2370         * testing/Internals.h:
2371         * testing/Internals.idl:
2372
2373         For non-media-source supporting media engines, fail immediately when asked to load a media
2374         source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
2375         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2376         (WebCore::MediaPlayerPrivateAVFoundation::load):
2377         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2378         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2379         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2380         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2381         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2382         (WebCore::MediaPlayerPrivateQTKit::load):
2383         (WebCore::MediaPlayerPrivateQTKit::supportsType):
2384
2385         Add new files to the project:
2386         * WebCore.xcodeproj/project.pbxproj:
2387         * Source/WebCore/WebCore.exp.in:
2388
2389         Update the MediaSource implementation:
2390         * Modules/mediasource/MediaSource.cpp:
2391         (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
2392         * Modules/mediasource/SourceBuffer.cpp:
2393         (WebCore::SourceBuffer::buffered): Ditto.
2394         (WebCore::SourceBuffer::setTimestampOffset): Ditto.
2395         (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
2396         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
2397             bring the implementation up to date with part of the spec.
2398         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
2399             SampleIsRandomAccessPredicate.
2400
2401         Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
2402         * platform/mock/mediasource/MockBox.cpp: Added.
2403         (WebCore::MockBox::MockBox):
2404         (WebCore::MockBox::peekType):
2405         (WebCore::MockBox::peekLength):
2406         (WebCore::MockTrackBox::MockTrackBox):
2407         (WebCore::MockTrackBox::type):
2408         (WebCore::MockInitializationBox::MockInitializationBox):
2409         (WebCore::MockInitializationBox::type):
2410         (WebCore::MockSampleBox::MockSampleBox):
2411         (WebCore::MockSampleBox::type):
2412         * platform/mock/mediasource/MockBox.h: Added.
2413         (WebCore::MockBox::length):
2414         (WebCore::MockBox::type):
2415         (WebCore::MockTrackBox::trackID):
2416         (WebCore::MockTrackBox::codec):
2417         (WebCore::MockTrackBox::kind):
2418         (WebCore::MockInitializationBox::duration):
2419         (WebCore::MockInitializationBox::tracks):
2420         (WebCore::MockSampleBox::presentationTimestamp):
2421         (WebCore::MockSampleBox::decodeTimestamp):
2422         (WebCore::MockSampleBox::duration):
2423         (WebCore::MockSampleBox::trackID):
2424         (WebCore::MockSampleBox::flags):
2425         (WebCore::MockSampleBox::isSync):
2426
2427         Add a MediaPlayerPrivate implementation which uses MockMediaSource:
2428         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
2429         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
2430         (WebCore::MockMediaPlayerMediaSource::create):
2431         (WebCore::mimeTypeCache):
2432         (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
2433         (WebCore::MockMediaPlayerMediaSource::supportsType):
2434         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
2435         (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
2436         (WebCore::MockMediaPlayerMediaSource::load):
2437         (WebCore::MockMediaPlayerMediaSource::cancelLoad):
2438         (WebCore::MockMediaPlayerMediaSource::play):
2439         (WebCore::MockMediaPlayerMediaSource::pause):
2440         (WebCore::MockMediaPlayerMediaSource::naturalSize):
2441         (WebCore::MockMediaPlayerMediaSource::hasVideo):
2442         (WebCore::MockMediaPlayerMediaSource::hasAudio):
2443         (WebCore::MockMediaPlayerMediaSource::setVisible):
2444         (WebCore::MockMediaPlayerMediaSource::seeking):
2445         (WebCore::MockMediaPlayerMediaSource::paused):
2446         (WebCore::MockMediaPlayerMediaSource::networkState):
2447         (WebCore::MockMediaPlayerMediaSource::readyState):
2448         (WebCore::MockMediaPlayerMediaSource::buffered):
2449         (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
2450         (WebCore::MockMediaPlayerMediaSource::setSize):
2451         (WebCore::MockMediaPlayerMediaSource::paint):
2452         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
2453         (WebCore::MockMediaPlayerMediaSource::durationDouble):
2454         (WebCore::MockMediaPlayerMediaSource::seekDouble):
2455         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
2456         (WebCore::MockMediaPlayerMediaSource::updateDuration):
2457         (WebCore::MockMediaPlayerMediaSource::setReadyState):
2458         * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
2459
2460         Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
2461         * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
2462         (WebCore::MockMediaSourcePrivate::create):
2463         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
2464         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
2465         (WebCore::MockMediaSourcePrivate::addSourceBuffer):
2466         (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
2467         (WebCore::MockMediaSourcePrivate::duration):
2468         (WebCore::MockMediaSourcePrivate::setDuration):
2469         (WebCore::MockMediaSourcePrivate::markEndOfStream):
2470         (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
2471         (WebCore::MockMediaSourcePrivate::readyState):
2472         (WebCore::MockMediaSourcePrivate::setReadyState):
2473         (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
2474         (WebCore::MockSourceBufferPrivateHasAudio):
2475         (WebCore::MockMediaSourcePrivate::hasAudio):
2476         (WebCore::MockSourceBufferPrivateHasVideo):
2477         (WebCore::MockMediaSourcePrivate::hasVideo):
2478         * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
2479         (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
2480         (WebCore::MockMediaSourcePrivate::player):
2481
2482         Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
2483         bytestream provided by SourceBuffer:
2484         * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
2485         (WebCore::MockMediaSample::create):
2486         (WebCore::MockMediaSample::~MockMediaSample):
2487         (WebCore::MockMediaSample::MockMediaSample):
2488         (WebCore::MockMediaSample::platformSample):
2489         (WebCore::MockMediaDescription::create):
2490         (WebCore::MockMediaDescription::~MockMediaDescription):
2491         (WebCore::MockMediaDescription::MockMediaDescription):
2492         (WebCore::MockSourceBufferPrivate::create):
2493         (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
2494         (WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
2495         (WebCore::MockSourceBufferPrivate::setClient):
2496         (WebCore::MockSourceBufferPrivate::append):
2497         (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
2498         (WebCore::MockSourceBufferPrivate::didReceiveSample):
2499         (WebCore::MockSourceBufferPrivate::abort):
2500         (WebCore::MockSourceBufferPrivate::removedFromMediaSource):
2501         (WebCore::MockSourceBufferPrivate::readyState):
2502         (WebCore::MockSourceBufferPrivate::setReadyState):
2503         (WebCore::MockSourceBufferPrivate::hasVideo):
2504         (WebCore::MockSourceBufferPrivate::hasAudio):
2505         * platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
2506
2507         Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
2508         which wrap the MockTrackBox class:
2509         * platform/mock/mediasource/MockTracks.cpp: Added.
2510         * platform/mock/mediasource/MockTracks.h: Added.
2511         (WebCore::MockAudioTrackPrivate::create):
2512         (WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
2513         (WebCore::MockAudioTrackPrivate::id):
2514         (WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
2515         (WebCore::MockTextTrackPrivate::create):
2516         (WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
2517         (WebCore::MockTextTrackPrivate::id):
2518         (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
2519         (WebCore::MockVideoTrackPrivate::create):
2520         (WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
2521         (WebCore::MockVideoTrackPrivate::id):
2522         (WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
2523
2524 2013-11-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2525
2526         Changing MediaStreamDescriptor to MediaStreamPrivate
2527         https://bugs.webkit.org/show_bug.cgi?id=123935
2528
2529         Reviewed by Eric Carlson.
2530
2531         No new tests needed.
2532
2533         * CMakeLists.txt:
2534         * GNUmakefile.list.am:
2535         * Modules/mediastream/MediaStream.cpp:
2536         (WebCore::MediaStream::create):
2537         (WebCore::MediaStream::MediaStream):
2538         (WebCore::MediaStream::~MediaStream):
2539         (WebCore::MediaStream::ended):
2540         (WebCore::MediaStream::setEnded):
2541         (WebCore::MediaStream::addTrack):
2542         (WebCore::MediaStream::removeTrack):
2543         (WebCore::MediaStream::removeRemoteSource):
2544         * Modules/mediastream/MediaStream.h:
2545         * Modules/mediastream/MediaStreamRegistry.cpp:
2546         (WebCore::MediaStreamRegistry::registerURL):
2547         (WebCore::MediaStreamRegistry::unregisterURL):
2548         (WebCore::MediaStreamRegistry::lookupMediaStreamPrivate):
2549         * Modules/mediastream/MediaStreamRegistry.h:
2550         * Modules/mediastream/MediaStreamTrack.cpp:
2551         * Modules/mediastream/MediaStreamTrack.h:
2552         * Modules/mediastream/RTCPeerConnection.cpp:
2553         (WebCore::RTCPeerConnection::addStream):
2554         (WebCore::RTCPeerConnection::removeStream):
2555         (WebCore::RTCPeerConnection::didAddRemoteStream):
2556         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
2557         * Modules/mediastream/RTCPeerConnection.h:
2558         * Modules/mediastream/UserMediaRequest.cpp:
2559         (WebCore::UserMediaRequest::didCreateStream):
2560         (WebCore::UserMediaRequest::callSuccessHandler):
2561         * Modules/mediastream/UserMediaRequest.h:
2562         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2563         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
2564         * WebCore.xcodeproj/project.pbxproj:
2565         * html/HTMLMediaElement.cpp:
2566         (HTMLMediaElement::loadResource):
2567         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2568         (WebCore::toWebMediaStreamPrivate):
2569         (WebCore::MediaPlayerPrivate::lookupMediaStream):
2570         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2571         * platform/mediastream/MediaStreamCenter.cpp:
2572         * platform/mediastream/MediaStreamCreationClient.h:
2573         * platform/mediastream/MediaStreamPrivate.cpp: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp.
2574         (WebCore::MediaStreamPrivate::create):
2575         (WebCore::MediaStreamPrivate::addSource):
2576         (WebCore::MediaStreamPrivate::removeSource):
2577         (WebCore::MediaStreamPrivate::addRemoteSource):
2578         (WebCore::MediaStreamPrivate::removeRemoteSource):
2579         (WebCore::MediaStreamPrivate::addRemoteTrack):
2580         (WebCore::MediaStreamPrivate::removeRemoteTrack):
2581         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
2582         (WebCore::MediaStreamPrivate::setEnded):
2583         (WebCore::MediaStreamPrivate::addTrack):
2584         (WebCore::MediaStreamPrivate::removeTrack):
2585         * platform/mediastream/MediaStreamPrivate.h: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.h.
2586         (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
2587         (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
2588         (WebCore::MediaStreamPrivate::client):
2589         (WebCore::MediaStreamPrivate::setClient):
2590         (WebCore::MediaStreamPrivate::id):
2591         (WebCore::MediaStreamPrivate::numberOfAudioSources):
2592         (WebCore::MediaStreamPrivate::audioSources):
2593         (WebCore::MediaStreamPrivate::numberOfVideoSources):
2594         (WebCore::MediaStreamPrivate::videoSources):
2595         (WebCore::MediaStreamPrivate::numberOfAudioTracks):
2596         (WebCore::MediaStreamPrivate::audioTracks):
2597         (WebCore::MediaStreamPrivate::numberOfVideoTracks):
2598         (WebCore::MediaStreamPrivate::videoTracks):
2599         (WebCore::MediaStreamPrivate::ended):
2600         * platform/mediastream/MediaStreamSource.cpp:
2601         * platform/mediastream/MediaStreamSource.h:
2602         * platform/mediastream/RTCPeerConnectionHandler.h:
2603         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
2604         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
2605         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
2606         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
2607         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
2608         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
2609         (WebCore::MediaStreamCenterMac::createMediaStream):
2610         * platform/mock/MockMediaStreamCenter.cpp:
2611         (WebCore::MockMediaStreamCenter::createMediaStream):
2612         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2613         (WebCore::RTCPeerConnectionHandlerMock::addStream):
2614         (WebCore::RTCPeerConnectionHandlerMock::removeStream):
2615         * platform/mock/RTCPeerConnectionHandlerMock.h:
2616
2617 2013-11-07  Denis Nomiyama  <d.nomiyama@samsung.com>
2618
2619         [GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
2620         https://bugs.webkit.org/show_bug.cgi?id=50619
2621
2622         Reviewed by Martin Robinson.
2623
2624         Implemented the OPENTYPE_VERTICAL feature for the GTK+ port. It resolves
2625         the 90 degrees rotation problem of CJK characters when displaying
2626         vertical text.
2627
2628         New tests are not required as the existing tests for vertical text will
2629         work properly now.
2630
2631         * GNUmakefile.list.am: Added OpenTypeVerticalData.cpp and
2632         OpenTypeVerticalData.h to platformgtk_sources.
2633         * PlatformEfl.cmake: Added OpenTypeVerticalData.cpp.
2634         * PlatformGTK.cmake: Added OpenTypeVerticalData.cpp.
2635         * platform/graphics/FontCache.cpp: Originally the HashMap for
2636         OpenTypeVerticalData was designed with FontFileKey as integer in the
2637         Chromium port, which was an unique number provided by Skia. Since other
2638         ports use FontFileKey as string, new generic hash functions had to be
2639         implemented instead of using the specific ones for integers.
2640         (WebCore::FontVerticalDataCacheKeyHash::hash): New hash function for
2641         HashMap of OpenTypeVerticalData.
2642         (WebCore::FontVerticalDataCacheKeyHash::equal): New function for
2643         comparing hash indexes in the HashMap of OpenTypeVerticalData.
2644         (WebCore::FontVerticalDataCacheKeyTraits::emptyValue): New function for
2645         giving an empty FontFileKey.
2646         (WebCore::FontVerticalDataCacheKeyTraits::constructDeletedValue): New
2647         function to create a FontFileKey for deleted values.
2648         (WebCore::FontVerticalDataCacheKeyTraits::isDeletedValue): New function
2649         to check if a HashMap entry is available.
2650         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
2651         (WebCore::FontCustomPlatformData::fontPlatformData): Added font
2652         orientation as a parameter to the FontPlatformData constructor.
2653         * platform/graphics/freetype/FontPlatformData.h: Added m_orientation to
2654         store the font orientation and m_horizontalOrientationMatrix to store
2655         the Cairo matrix for horizontal orientation, which can be restored in
2656         setOrientation().
2657         (WebCore::FontPlatformData::FontPlatformData): Added font orientation as
2658         a parameter.
2659         (WebCore::FontPlatformData::orientation): Implemented this function
2660         based on m_orientation.
2661         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Added new
2662         helper function rotateCairoMatrixForVerticalOrientation() to rotate the
2663         Cairo matrix in case of vertical orientation.
2664         (WebCore::FontPlatformData::FontPlatformData): Initialized
2665         m_orientation.
2666         (WebCore::FontPlatformData::operator=): Added m_orientation and
2667         m_horizontalOrientationMatrix to the assignment operator.
2668         (WebCore::FontPlatformData::operator==): Added m_orientation to the
2669         equal operator.
2670         (WebCore::FontPlatformData::initializeWithFontFace): Rotated and
2671         translated fonts if orientation is vertical. Also stored the horizontal
2672         Cairo matrix.
2673         (WebCore::FontPlatformData::verticalData): Returned the vertical data
2674         from the font cache.
2675         (WebCore::FontPlatformData::openTypeTable): Loaded the font table into
2676         a shared buffer.
2677         (WebCore::FontPlatformData::setOrientation): Replaced the scaled font
2678         data by rotating fonts according to the new orientation.
2679         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2680         (WebCore::SimpleFontData::platformInit): Set the glyph's height and
2681         width according to the font orientation. It also sets EM.
2682         (WebCore::SimpleFontData::platformCreateScaledFontData): Added
2683         orientation to the FontPlatformData constructor.
2684         (WebCore::SimpleFontData::platformWidthForGlyph): Returned the glyph's
2685         width according the orientation.
2686         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
2687         (WebCore::CairoGetGlyphWidthAndExtents): Obtained the character advance
2688         and extents according to the font orientation.
2689
2690 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2691
2692         [AX] Use toAccessibilityRenderObject() instead of using static_cast<>
2693         https://bugs.webkit.org/show_bug.cgi?id=123986
2694
2695         Reviewed by Mario Sanchez Prada.
2696
2697         Though there is toAccessibilityRenderObject(), static_cast<> are being used by many places.
2698         To use toAccessibilityRenderObject() is more helpful to find bad type cast.
2699
2700         No new tests, no behavior changes.
2701
2702         * accessibility/AXObjectCache.cpp:
2703         (WebCore::AXObjectCache::notificationPostTimerFired):
2704         * accessibility/AccessibilityImageMapLink.cpp:
2705         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
2706         * accessibility/AccessibilityRenderObject.cpp:
2707         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2708         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
2709         * accessibility/ios/AccessibilityObjectIOS.mm:
2710         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
2711         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2712         (AXAttributeStringSetElement):
2713         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2714
2715 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2716
2717         [AX] Use toAccessibilityTable() instead of using manual static_cast<>
2718         https://bugs.webkit.org/show_bug.cgi?id=123982
2719
2720         Reviewed by Mario Sanchez Prada.
2721
2722         Though there is toAccessibilityTable(), static_cast<> are being used by many places.
2723         We need to use toAccessibilityTable().
2724
2725         No new tests, no behavior changes.
2726
2727         * accessibility/AccessibilityARIAGridRow.cpp:
2728         (WebCore::AccessibilityARIAGridRow::disclosedRows):
2729         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
2730         * accessibility/AccessibilityTableHeaderContainer.cpp:
2731         (WebCore::AccessibilityTableHeaderContainer::addChildren):
2732         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2733         (cell):
2734         (cellAtIndex):
2735         (webkitAccessibleTableGetIndexAt):
2736         (webkitAccessibleTableGetNColumns):
2737         (webkitAccessibleTableGetNRows):
2738         (webkitAccessibleTableGetColumnHeader):
2739         (webkitAccessibleTableGetRowHeader):
2740         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2741         (-[WebAccessibilityObjectWrapper tableParent]):
2742         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2743         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2744         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2745         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2746
2747 2013-11-07  Andreas Kling  <akling@apple.com>
2748
2749         Use tighter InlineBox subtypes in some places.
2750         <https://webkit.org/b/123980>
2751
2752         RenderLineBreak and RenderBox line box wrappers are always going to
2753         be InlineElementBox, so codify this with tighter types. Also made
2754         the various positionLine() functions take tighter reference types.
2755
2756         All the casting to renderer-appropriate box types happens inside of
2757         RenderBlockFlow::computeBlockDirectionPositionsForLine() and
2758         propagates from there.
2759
2760         Reviewed by Antti Koivisto.
2761
2762 2013-11-07  Mario Sanchez Prada  <mario.prada@samsung.com>
2763
2764         AX: [ATK] Video and audio elements are not properly exposed
2765         https://bugs.webkit.org/show_bug.cgi?id=123894
2766
2767         Reviewed by Chris Fleizach.
2768
2769         Expose <audio> and <video> elements with ATK_ROLE_EMBEDDED, so we
2770         can identify them properly from ATK/AT-SPI based ATs.
2771
2772         Tests: platform/gtk/accessibility/media-controls-panel-title.html
2773                platform/efl/accessibility/media-emits-object-replacement.html
2774                platform/gtk/accessibility/media-emits-object-replacement.html
2775
2776         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2777         (atkRole): Add the new mapping.
2778
2779 2013-11-07  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2780         
2781         Fix crash in BitmapImage::destroyDecodedData()
2782         https://bugs.webkit.org/show_bug.cgi?id=116494
2783
2784         Reviewed by Csaba Osztrogonác.
2785
2786         Merge from https://chromium.googlesource.com/chromium/blink/+/6b6887bf53068f8537908e501fdc7317ad2c6d86
2787
2788         * platform/graphics/BitmapImage.cpp:
2789         (WebCore::BitmapImage::destroyDecodedData):
2790
2791 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
2792
2793         [CSS Grid Layout] CSSParser should reject <track-list> without a <track-size>
2794         https://bugs.webkit.org/show_bug.cgi?id=118025
2795
2796         Reviewed by Andreas Kling.
2797
2798         From Blink r152914 by <jchaffraix@chromium.org>
2799
2800         Make sure that we parse at least 1 <track-size> inside each
2801         <track-list>. The old parser code allowed track-lists exclusively
2802         made of <track-name>. The way it was implemented eases the future
2803         addition of parsing for the repeat() function.
2804
2805         * css/CSSParser.cpp:
2806         (WebCore::CSSParser::parseGridTrackList):
2807         * css/StyleResolver.cpp:
2808         (WebCore::createGridTrackList): ASSERT if we don't find any
2809         <track-size> now that we detect their absence in the parser.
2810
2811 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
2812
2813         [CSS Grid Layout] Fix handling of 'inherit' and 'initial' for grid lines
2814         https://bugs.webkit.org/show_bug.cgi?id=115401
2815
2816         Reviewed by Andreas Kling.
2817
2818         From Blink r150585 by <jchaffraix@chromium.org>
2819
2820         Added support for 'inherit' and 'initial' special values to
2821         grid-auto-{columns|rows} and grid-definition-{columns|rows}.
2822
2823         * css/StyleResolver.cpp:
2824         (WebCore::StyleResolver::applyProperty): Resolve 'initial' and 'inherit'.
2825         * rendering/style/RenderStyle.h: Added initialNamedGrid{Column|Row}Lines().
2826         * rendering/style/StyleGridData.cpp:
2827         (WebCore::StyleGridData::StyleGridData): Initialize m_namedGrid{Column|Row}Lines.
2828
2829 2013-11-07  Andreas Kling  <akling@apple.com>
2830
2831         Clean up BidiRun a little bit.
2832         <https://webkit.org/b/123964>
2833
2834         Make BidiRun's member variables private and add accessors for them.
2835         In doing so, codify the following:
2836
2837             - BidiRun always has a corresponding RenderObject.
2838             - The inline box is never cleared after being set.
2839
2840         Reviewed by Antti Koivisto.
2841
2842 2013-11-07  Andreas Kling  <akling@apple.com>
2843
2844         More CSSPrimitiveValue constructors should return PassRef.
2845         <https://webkit.org/b/123953>
2846
2847         Make some more CSSPrimitiveValue constructor helpers (that are
2848         known to never return null) return PassRef instead of PassRefPtr.
2849
2850         Reviewed by Antti Koivisto.
2851
2852 2013-11-07  Andreas Kling  <akling@apple.com>
2853
2854         Generate type casting helpers for line boxes and use them.
2855         <https://webkit.org/b/123976>
2856
2857         Semi-automatically generate the full set of toFooInlineBox()
2858         helpers with macros instead of having them (partially) hand-coded.
2859         Replaced static_casts with the new helpers across the codebase.
2860
2861         Also made the isFooInlineBox() overrides private since they should
2862         never be called when the type is already known.
2863
2864         Reviewed by Antti Koivisto.
2865
2866 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2867
2868         Simplify Attr by removing m_specified member variable and setter
2869         https://bugs.webkit.org/show_bug.cgi?id=123965
2870
2871         Reviewed by Andreas Kling.
2872
2873         Merge https://chromium.googlesource.com/chromium/blink/+/597f44ec928e08820574728889adabc6d8ecd746
2874
2875         m_specified is always true in WebKit so simply return true in Attr::specified().
2876
2877         * dom/Attr.cpp:
2878         (WebCore::Attr::Attr):
2879         * dom/Attr.h:
2880         * dom/Document.cpp:
2881         (WebCore::Document::adoptNode):
2882
2883 2013-10-25  Jer Noble  <jer.noble@apple.com>
2884
2885         [MSE] Add MediaSource extensions to AudioTrack, VideoTrack, and TextTrack.
2886         https://bugs.webkit.org/show_bug.cgi?id=123374
2887
2888         Reviewed by Eric Carlson.
2889
2890         No tests added; tests will be added when Mock implementations are added in a future patch.
2891
2892         Add new partial interfaces for added methods on AudioTrack, TextTrack, and VideoTrack:
2893         * Modules/mediasource/AudioTrackMediaSource.idl: Add read-only sourceBuffer attribute.
2894         * Modules/mediasource/TextTrackMediaSource.idl: Ditto.
2895         * Modules/mediasource/VideoTrackMediaSource.idl: Ditto.
2896         * Modules/mediasource/AudioTrackMediaSource.h:
2897         (WebCore::AudioTrackMediaSource::sourceBuffer): Added static wrapper around non-static sourceBuffer().
2898         * Modules/mediasource/TextTrackMediaSource.h:
2899         (WebCore::TextTrackMediaSource::sourceBuffer): Ditto.
2900         * Modules/mediasource/VideoTrackMediaSource.h:
2901         (WebCore::VideoTrackMediaSource::sourceBuffer): Ditto.
2902
2903         Add support for writable kind & language attributes through a custom setter:
2904         * bindings/js/JSAudioTrackCustom.cpp:
2905         (WebCore::JSAudioTrack::setKind):
2906         (WebCore::JSAudioTrack::setLanguage):
2907         * bindings/js/JSTextTrackCustom.cpp:
2908         (WebCore::JSTextTrack::setKind):
2909         (WebCore::JSTextTrack::setLanguage):
2910         * bindings/js/JSVideoTrackCustom.cpp:
2911         (WebCore::JSVideoTrack::setKind):
2912         (WebCore::JSVideoTrack::setLanguage):
2913         * html/track/AudioTrack.idl:
2914         * html/track/TextTrack.idl:
2915         * html/track/VideoTrack.idl:
2916
2917         Add setter methods to the implementation classes:
2918         * html/track/TextTrack.cpp:
2919         (WebCore::TextTrack::TextTrack):
2920         (WebCore::TextTrack::setKind):
2921         (WebCore::TextTrack::setLanguage):
2922         * html/track/TextTrack.h:
2923         * html/track/TrackBase.cpp:
2924         (WebCore::TrackBase::TrackBase):
2925         (WebCore::TrackBase::setKind):
2926         (WebCore::TrackBase::setKindInternal):
2927         * html/track/TrackBase.h:
2928         (WebCore::TrackBase::setLanguage):
2929         (WebCore::TrackBase::sourceBuffer):
2930         (WebCore::TrackBase::setSourceBuffer):
2931         * html/track/VideoTrack.cpp:
2932         (WebCore::VideoTrack::VideoTrack):
2933         (WebCore::VideoTrack::setKind):
2934         (WebCore::VideoTrack::setLanguage):
2935         * html/track/VideoTrack.h:
2936
2937         Implement the unimplemented portions of MediaSource and SourceBuffer:
2938         * Modules/mediasource/MediaSource.cpp:
2939         (WebCore::MediaSource::removeSourceBuffer):
2940         * Modules/mediasource/MediaSourceBase.cpp:
2941         (WebCore::MediaSourceBase::MediaSourceBase):
2942         (WebCore::MediaSourceBase::setPrivateAndOpen):
2943         (WebCore::MediaSourceBase::setReadyState):
2944         (WebCore::MediaSourceBase::attachToElement):
2945         * Modules/mediasource/MediaSourceBase.h:
2946         (WebCore::MediaSourceBase::mediaElement):
2947         * Modules/mediasource/SourceBuffer.cpp:
2948         (WebCore::SourceBuffer::videoTracks):
2949         (WebCore::SourceBuffer::audioTracks):
2950         (WebCore::SourceBuffer::textTracks):
2951         (WebCore::SourceBuffer::sourceBufferPrivateDidAddAudioTrack):
2952         (WebCore::SourceBuffer::sourceBufferPrivateDidAddVideoTrack):
2953         (WebCore::SourceBuffer::sourceBufferPrivateDidAddTextTrack):
2954         (WebCore::SourceBuffer::sourceBufferPrivateDidChangeActiveState):
2955         * Modules/mediasource/SourceBuffer.h:
2956         * Modules/mediasource/SourceBuffer.idl:
2957
2958         Add new files to the project:
2959         * DerivedSources.make:
2960         * WebCore.xcodeproj/project.pbxproj:
2961
2962         And a smorgasbord of other utility changes:
2963         * html/HTMLMediaElement.cpp:
2964         (WebCore::HTMLMediaElement::loadResource): Pass this when attaching.
2965         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto.
2966         * html/HTMLMediaSource.h:
2967         * html/track/TextTrackList.cpp:
2968         (TextTrackList::item): Make const.
2969         * html/track/TextTrackList.h:
2970         (WebCore::TextTrackList::lastItem): Added.
2971         * platform/graphics/InbandTextTrackPrivate.h:
2972         (WebCore::InbandTextTrackPrivate::create): Added.
2973         (WebCore::MockSourceBufferPrivate::trackDidChangeEnabled):
2974
2975 2013-11-06  Vani Hegde  <vani.hegde@samsung.com>
2976
2977         Applied background color is not retained after typing a characters
2978         https://bugs.webkit.org/show_bug.cgi?id=117337
2979
2980         Reviewed by Ryosuke Niwa.
2981
2982         While deleting a selection, only the inheritable style properties
2983         applied on the selection were saved.
2984         Since background color is considered as noninheritable style property,
2985         on deleting the selection, background color set on it was being lost.
2986         Hence on typing in new text, it would not have the applied
2987         background color set.
2988         Fixed by saving editing preoperties that are already in effect
2989         on a selection before deleting it.
2990
2991         Test: editing/style/background-color-retained.html
2992
2993         * editing/DeleteSelectionCommand.cpp:
2994         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2995         Modified as to save EditingPropertiesInEffect on a selection before
2996         deleting it.
2997
2998 2013-11-06  Andreas Kling  <akling@apple.com>
2999
3000         InlineBox: Make paint() and nodeAtPoint() pure virtuals.
3001         <https://webkit.org/b/123937>
3002
3003         ...and move the current implementations to InlineElementBox.
3004         All subclasses were already overriding these functions so the move
3005         is completely natural.
3006
3007         Reviewed by Anders Carlsson.
3008
3009 2013-11-06  Andreas Kling  <akling@apple.com>
3010
3011         Nothing should return std::unique_ptr<InlineBox>.
3012         <https://webkit.org/b/123936>
3013
3014         Made RenderBox, RenderLineBreak and RenderListMarker return tightly
3015         typed InlineElementBoxes instead.
3016
3017         Reviewed by Anders Carlsson.
3018
3019 2013-11-06  Daniel Bates  <dabates@apple.com>
3020
3021         [iOS] Upstream Letterpress effect
3022         https://bugs.webkit.org/show_bug.cgi?id=123932
3023
3024         Reviewed by Sam Weinig.
3025
3026         Test: platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html
3027
3028         * Configurations/FeatureDefines.xcconfig: Add feature define ENABLE_LETTERPRESS disabled
3029         by default. We only enable letterpress on iOS.
3030         * css/CSSComputedStyleDeclaration.cpp:
3031         (WebCore::renderTextDecorationFlagsToCSSValue): Add support for CSS value -webkit-letterpress.
3032         * css/CSSParser.cpp:
3033         (WebCore::CSSParser::parseTextDecoration): Ditto.
3034         * css/CSSPrimitiveValueMappings.h:
3035         (WebCore::CSSPrimitiveValue::operator TextDecoration): Ditto.
3036         * css/CSSValueKeywords.in: Added CSS value -webkit-letterpress.
3037         * platform/graphics/GraphicsContext.h:
3038         * platform/graphics/mac/FontMac.mm:
3039         (WebCore::fillVectorWithHorizontalGlyphPositions): Added.
3040         (WebCore::shouldUseLetterpressEffect): Added.
3041         (WebCore::showLetterpressedGlyphsWithAdvances): Added.
3042         (WebCore::showGlyphsWithAdvances): Modified to call showLetterpressedGlyphsWithAdvances()
3043         to show a letterpressed glyph. I also included additional iOS-specific changes.
3044         (WebCore::Font::drawGlyphs):
3045         * rendering/TextPaintStyle.cpp:
3046         (WebCore::TextPaintStyle::TextPaintStyle): 
3047         (WebCore::computeTextPaintStyle): Modified to compute letterpress effect style.
3048         (WebCore::updateGraphicsContext): Modified to apply/unapply letterpress effect drawing mode.
3049         * rendering/TextPaintStyle.h:
3050         * rendering/style/RenderStyleConstants.h:
3051
3052 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
3053
3054         Crash in SliderThumbElement::dragFrom
3055         https://bugs.webkit.org/show_bug.cgi?id=123873
3056
3057         Reviewed by Sam Weinig.
3058
3059         Moved Ref.
3060
3061         * html/RangeInputType.cpp:
3062         (WebCore::RangeInputType::handleMouseDownEvent):
3063         * html/shadow/SliderThumbElement.cpp:
3064         (WebCore::SliderThumbElement::dragFrom):
3065
3066 2013-11-06  Daniel Bates  <dabates@apple.com>
3067
3068         Cleanup FontMac.mm
3069         https://bugs.webkit.org/show_bug.cgi?id=123928
3070
3071         Reviewed by Andy Estes.
3072
3073         * platform/graphics/mac/FontMac.mm:
3074         (WebCore::showGlyphsWithAdvances): Inline the value of variable isVertical as we
3075         reference it exactly once and its value is sufficiently clear.
3076         (WebCore::Font::drawGlyphs): Remove default case in switch block so that the compiler
3077         checks that all cases are covered. Move definition of platformData to the top of the
3078         function and use it whenever we want to access the platform font data
3079
3080 2013-11-06  Brent Fulgham  <bfulgham@apple.com>
3081
3082         [WebGL] We should not allow generateMipMap on compressed textures
3083         https://bugs.webkit.org/show_bug.cgi?id=123915
3084         <rdar://problem/15201274>
3085
3086         Reviewed by Dean Jackson.
3087
3088         Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html
3089
3090         * html/canvas/WebGLRenderingContext.cpp:
3091         (WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
3092         (WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
3093         (WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
3094         of compressed flag and generate appropriate WebGL error if necessary.
3095         * html/canvas/WebGLTexture.cpp:
3096         (WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
3097         (WebCore::WebGLTexture::isCompressed): Added
3098         (WebCore::WebGLTexture::setCompressed): Added
3099         * html/canvas/WebGLTexture.h:
3100         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3101         (WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
3102         glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.
3103
3104 2013-11-06  Joseph Pecoraro  <pecoraro@apple.com>
3105
3106         Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
3107         https://bugs.webkit.org/show_bug.cgi?id=123925
3108
3109         Reviewed by Timothy Hatcher.
3110
3111         * CMakeLists.txt:
3112         * DerivedSources.make:
3113         * GNUmakefile.am:
3114
3115 2013-11-06  Bem Jones-Bey  <bjonesbe@adobe.com>
3116
3117         Rename region line offset methods
3118         https://bugs.webkit.org/show_bug.cgi?id=123897
3119
3120         Reviewed by Sam Weinig.
3121
3122         Because of the large number of overloads on the line offset methods,
3123         it is very hard to read code using them, which also makes it harder to
3124         move them out of RenderBlock. This patch renames the methods that take
3125         a region as an argument to make it clearer when looking at the code
3126         how the differ from the ones that don't.
3127
3128         No new tests, no behavior change.
3129
3130         * rendering/RenderBlock.cpp:
3131         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
3132         * rendering/RenderBlock.h:
3133         (WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
3134         (WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
3135         (WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
3136         (WebCore::RenderBlock::startOffsetForLineInRegion):
3137         (WebCore::RenderBlock::endOffsetForLineInRegion):
3138         (WebCore::RenderBlock::availableLogicalWidthForLine):
3139         * rendering/RenderBox.cpp:
3140         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
3141         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
3142
3143 2013-11-06  Antti Koivisto  <antti@apple.com>
3144
3145         HTMLCollection should use CollectionIndexCache
3146         https://bugs.webkit.org/show_bug.cgi?id=123906
3147
3148         Reviewed by Ryosuke Niwa.
3149         
3150         More code sharing.
3151
3152         * bindings/js/JSDOMWindowCustom.cpp:
3153         (WebCore::namedItemGetter):
3154         * bindings/js/JSHTMLDocumentCustom.cpp:
3155         (WebCore::JSHTMLDocument::nameGetter):
3156         * dom/ChildNodeList.h:
3157         * dom/CollectionIndexCache.h:
3158         (WebCore::::nodeBeforeCached):
3159         (WebCore::::nodeAfterCached):
3160         (WebCore::::nodeAt):
3161             
3162             Add a mechanism for disabling use of backward traversal.
3163
3164         * dom/LiveNodeList.h:
3165         (WebCore::LiveNodeList::collectionCanTraverseBackward):
3166         * html/HTMLCollection.cpp:
3167         (WebCore::HTMLCollection::HTMLCollection):
3168         (WebCore::isMatchingElement):
3169         (WebCore::HTMLCollection::iterateForPreviousElement):
3170         (WebCore::firstMatchingElement):
3171         (WebCore::nextMatchingElement):
3172         (WebCore::HTMLCollection::length):
3173         (WebCore::HTMLCollection::item):
3174         (WebCore::nameShouldBeVisibleInDocumentAll):
3175         (WebCore::firstMatchingChildElement):
3176         (WebCore::nextMatchingSiblingElement):
3177         (WebCore::HTMLCollection::firstElement):
3178         (WebCore::HTMLCollection::traverseForward):
3179         (WebCore::HTMLCollection::collectionFirst):
3180         (WebCore::HTMLCollection::collectionLast):
3181         (WebCore::HTMLCollection::collectionTraverseForward):
3182         (WebCore::HTMLCollection::collectionTraverseBackward):
3183         (WebCore::HTMLCollection::invalidateCache):
3184         (WebCore::HTMLCollection::namedItem):
3185         (WebCore::HTMLCollection::updateNameCache):
3186         * html/HTMLCollection.h:
3187         (WebCore::HTMLCollection::collectionCanTraverseBackward):
3188         
3189             Disable use of backward traversal for collections that use custom traversal.
3190
3191 2013-11-06  Brendan Long  <b.long@cablelabs.com>
3192
3193         Add "id" attribute to TextTrack
3194         https://bugs.webkit.org/show_bug.cgi?id=123825
3195
3196         Reviewed by Eric Carlson.
3197
3198         Test: media/track/track-id.html
3199
3200         * html/HTMLMediaElement.cpp:
3201         (HTMLMediaElement::addTextTrack): Add emptyString() for track id.
3202         * html/track/AudioTrack.cpp:
3203         (WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
3204         (WebCore::AudioTrack::idChanged): Added, set id.
3205         * html/track/AudioTrack.h: Move m_id to TrackBase.
3206         * html/track/InbandTextTrack.cpp:
3207         (WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
3208         (WebCore::InbandTextTrack::idChanged): Added, set id.
3209         * html/track/InbandTextTrack.h: Add idChanged().
3210         * html/track/LoadableTextTrack.cpp:
3211         (WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
3212         (WebCore::LoadableTextTrack::id): Override to return the track element's id.
3213         * html/track/TextTrack.cpp:
3214         (WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
3215         (WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
3216         (WebCore::TextTrack::TextTrack): Pass id to TrackBase.
3217         * html/track/TextTrack.h:
3218         (WebCore::TextTrack::create): Add id parameter.
3219         * html/track/TextTrack.idl: Add id attribute.
3220         * html/track/TrackBase.cpp:
3221         (WebCore::TrackBase::TrackBase): Add m_id.
3222         * html/track/TrackBase.h: Add id attribute / m_id.
3223         * html/track/VideoTrack.cpp:
3224         (WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
3225         (WebCore::VideoTrack::idChanged): Added, set id.
3226         * html/track/VideoTrack.h: Move m_id to TrackBase.
3227         * platform/graphics/TrackPrivateBase.h: Add idChanged() callback.
3228
3229 2013-11-06  Antti Koivisto  <antti@apple.com>
3230
3231         Move array position caching out from HTMLCollection
3232         https://bugs.webkit.org/show_bug.cgi?id=123895
3233
3234         Reviewed by Darin Adler.
3235
3236         This caching complicates the logic but is used by a single subclass
3237         (HTMLFormControlsCollection) only. The subclass can do the caching itself.
3238
3239         * html/HTMLAllCollection.cpp:
3240         (WebCore::HTMLAllCollection::HTMLAllCollection):
3241         * html/HTMLCollection.cpp:
3242         (WebCore::HTMLCollection::HTMLCollection):
3243         (WebCore::HTMLCollection::create):
3244         (WebCore::HTMLCollection::item):
3245         (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
3246         (WebCore::HTMLCollection::firstElement):
3247         
3248             Renamed from traverseFirstElement.
3249
3250         (WebCore::HTMLCollection::traverseForwardToOffset):
3251         (WebCore::HTMLCollection::invalidateCache):
3252         
3253             Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.
3254
3255         (WebCore::HTMLCollection::namedItem):
3256         (WebCore::HTMLCollection::updateNameCache):
3257         
3258             Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.
3259
3260         * html/HTMLCollection.h:
3261         (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
3262         
3263             Renamed the enum and the accessor to be more informative.
3264
3265         (WebCore::HTMLCollection::setCachedElement):
3266         (WebCore::HTMLCollection::customElementAfter):
3267         
3268             Renamed from virtualItemAfter.
3269
3270         * html/HTMLFormControlsCollection.cpp:
3271         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
3272         (WebCore::findFormAssociatedElement):
3273         (WebCore::HTMLFormControlsCollection::customElementAfter):
3274         
3275             Move the array position caching logic here.
3276
3277         (WebCore::HTMLFormControlsCollection::invalidateCache):
3278         * html/HTMLFormControlsCollection.h:
3279         * html/HTMLNameCollection.cpp:
3280         (WebCore::HTMLNameCollection::HTMLNameCollection):
3281         * html/HTMLOptionsCollection.cpp:
3282         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
3283         * html/HTMLTableRowsCollection.cpp:
3284         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
3285         (WebCore::HTMLTableRowsCollection::customElementAfter):
3286         * html/HTMLTableRowsCollection.h:
3287
3288 2013-11-06  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3289
3290         [ATK] accessibility/title-ui-element-correctness.html fails
3291         https://bugs.webkit.org/show_bug.cgi?id=99825
3292
3293         Reviewed by Mario Sanchez Prada.
3294
3295         When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
3296         is added, adding proper label element as a relation. When the document structure
3297         has been changed and a different label should be linked as a relation, current ATK
3298         implementation adds it as a next target on relation's target list, while
3299         WTR/DumpRenderTree implementation takes only first one into account.
3300         This patch adds a new function removing current relations before adding new ones.
3301
3302         Covered by existing tests.
3303
3304         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3305         (removeAtkRelationFromRelationSetByType):
3306         (setAtkRelationSetFromCoreObject):
3307
3308 2013-11-06  Daniel Bates  <dabates@apple.com>
3309
3310         Add ENABLE(TEXT_SELECTION)
3311         https://bugs.webkit.org/show_bug.cgi?id=123827
3312
3313         Reviewed by Ryosuke Niwa.
3314
3315         Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
3316         disable selection painting in WebCore (enabled by default).
3317
3318         On iOS we disable WebCore selection painting and have UIKit
3319         paint the selection.
3320
3321         * rendering/InlineTextBox.cpp:
3322         (WebCore::InlineTextBox::paintSelection): Only paint selection when
3323         TEXT_SELECTION is enabled.
3324         * rendering/LogicalSelectionOffsetCaches.h:
3325         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
3326         For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
3327         a FIXME comment to investigate the callers and either move the assertion
3328         to the appropriate callers or structure the code such that we can remove
3329         the assertion.
3330         * rendering/RenderBlock.cpp:
3331         (WebCore::RenderBlock::paintSelection): Only paint selection when
3332         TEXT_SELECTION is enabled.
3333         * rendering/TextPaintStyle.cpp:
3334         (WebCore::computeTextSelectionPaintStyle): Only compute the selection
3335         paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
3336         style identical to the text paint style. Also, substitute nullptr for 0.
3337
3338 2013-11-06  Jer Noble  <jer.noble@apple.com>
3339
3340         Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.
3341
3342         * rendering/RenderingAllInOne.cpp:
3343
3344 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
3345
3346         Unreviewed build fix, style() return type is now a reference.
3347
3348         * rendering/RenderGrid.cpp:
3349         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3350
3351 2013-11-06  Jer Noble  <jer.noble@apple.com>
3352
3353         Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.
3354
3355         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3356         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
3357
3358 2013-11-04  Jer Noble  <jer.noble@apple.com>
3359
3360         Playing many sounds with HTML5 Audio makes WebKit unresponsive
3361         https://bugs.webkit.org/show_bug.cgi?id=116145
3362
3363         Reviewed by Eric Carlson.
3364
3365         Cache as much information as possible from AVPlayerItem to eliminate unneccesary
3366         calls into AVFoundation.
3367
3368         Add WillChange/DidChange functions to handle the results of KVO notifications
3369         from AVPlayerItem and AVPlayer:
3370         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3371         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
3372         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
3373         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
3374         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
3375         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
3376         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
3377         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
3378         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
3379         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
3380         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
3381         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
3382         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
3383         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
3384         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
3385         (WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
3386         (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
3387         (WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
3388         (WebCore::itemKVOProperties):
3389         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3390
3391         Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
3392         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3393         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):
3394
3395         Add and initialize member variables to hold these cached values:
3396         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3397         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3398         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
3399         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
3400
3401         Add a new Notification type which can take (and call) a Function object:
3402         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3403         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
3404         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3405         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
3406         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
3407
3408         Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
3409         properties:
3410         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3411         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3412         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
3413         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
3414         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
3415         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
3416         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
3417         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
3418         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
3419         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
3420         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
3421         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
3422         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
3423         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
3424         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
3425         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
3426
3427         Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
3428         correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
3429         * html/HTMLMediaElement.cpp:
3430         (HTMLMediaElement::setReadyState):
3431
3432 2013-10-24  Sergio Villar Senin  <svillar@igalia.com>
3433
3434         [CSS Grid Layout] Add support for named grid areas
3435         https://bugs.webkit.org/show_bug.cgi?id=120045
3436
3437         Reviewed by Andreas Kling.
3438
3439         From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>
3440
3441         Added support for named grid areas. Basically a named grid area is
3442         now a valid grid position. The shorthand parsing of grid-area was
3443         split from the grid-{row|column} as the rules for expanding are
3444         slightly different.
3445
3446         Unknown grid area names are treated as 'auto' as per the
3447         specification. This means that for those cases we need to trigger
3448         the auto-placement algorithm.
3449
3450         Tests: fast/css-grid-layou