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