move calc*Value functions out from Length (and platform)
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Mar 2012 19:54:09 +0000 (19:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Mar 2012 19:54:09 +0000 (19:54 +0000)
commitbc00a752a1d302a3399e0b33be50b25f9f3ef58b
tree38135adc9bb3c2180a664c07e82a6db7e5a3c5bb
parentaa1b45e5c79d2a46f303939786c546db5cd7d25f
move calc*Value functions out from Length (and platform)
https://bugs.webkit.org/show_bug.cgi?id=80897

Moving the Length calc*Value functions out from Length structure and also from /WebCore/platform/ folder.
This helps to avoid the layering violation while length calculation. Otherwise layer violation can be avoided only by adding a virtual interface(bug 27160).

Patch by Joe Thomas <joethomas@motorola.com> on 2012-03-17
Reviewed by Antti Koivisto.

Source/WebCore:

* GNUmakefile.list.am: Build system changes for adding new files.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* accessibility/gtk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/LengthFunctions.h: Added. Moved calc*Value functions of Length.
(WebCore):
(WebCore::calculateMinimumValue):
(WebCore::calculateValue):
(WebCore::calculateFloatValue):
* dom/Document.cpp:
(WebCore::Document::pageSizeAndMarginsInPixels):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::getRegion):
* platform/CalculationValue.h:
(WebCore::CalcExpressionLength::evaluate):
* platform/Length.h: Removed the calc*Value functions from Length structure.
(Length):
(WebCore::Length::getFloatValue):
(WebCore::Length::getIntValue):
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::setFilters):
* platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
(WebCore::CCRenderSurfaceFilters::apply):
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::getOutsets):
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/PerspectiveTransformOperation.h:
(WebCore::PerspectiveTransformOperation::isIdentity):
(WebCore::PerspectiveTransformOperation::apply):
* platform/graphics/transforms/TranslateTransformOperation.h:
(WebCore::TranslateTransformOperation::x):
(WebCore::TranslateTransformOperation::y):
(WebCore::TranslateTransformOperation::z):
(WebCore::TranslateTransformOperation::isIdentity):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::layout):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::textIndentOffset):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::reflectionOffset):
(WebCore::RenderBox::clipRect):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computeBlockDirectionMargins):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::relativePositionOffsetX):
(WebCore::RenderBoxModelObject::relativePositionOffsetY):
(WebCore::RenderBoxModelObject::paddingTop):
(WebCore::RenderBoxModelObject::paddingBottom):
(WebCore::RenderBoxModelObject::paddingLeft):
(WebCore::RenderBoxModelObject::paddingRight):
(WebCore::RenderBoxModelObject::paddingBefore):
(WebCore::RenderBoxModelObject::paddingAfter):
(WebCore::RenderBoxModelObject::paddingStart):
(WebCore::RenderBoxModelObject::paddingEnd):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::computeBorderImageSide):
(WebCore::RenderBoxModelObject::paintNinePieceImage):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
(WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layOutAxis):
* rendering/RenderInline.cpp:
(WebCore::computeMargin):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::perspectiveTransform):
(WebCore::RenderLayer::perspectiveOrigin):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::computeTransformOrigin):
(WebCore::RenderLayerBacking::computePerspectiveOrigin):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::updateOptionsWidth):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintAfterLayoutIfNeeded):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
* rendering/RenderScrollbarPart.cpp:
(WebCore::calcScrollbarThicknessUsing):
(WebCore::RenderScrollbarPart::computeScrollbarWidth):
(WebCore::RenderScrollbarPart::computeScrollbarHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::logicalHeightForRowSizing):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
* rendering/RenderText.h:
(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::verticalPositionForBox):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::applyTransform):
(WebCore::calcRadiiFor):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
(WebCore::resolveLengthAttributeForSVG):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentViewBoxRect):
(WebCore::SVGSVGElement::currentViewportSize):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::computeIntrinsicDimensions):

Source/WebKit2:

* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
49 files changed:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/LengthFunctions.h [new file with mode: 0644]
Source/WebCore/dom/Document.cpp
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/platform/CalculationValue.h
Source/WebCore/platform/Length.h
Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm
Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp
Source/WebCore/platform/graphics/filters/FilterOperations.cpp
Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.cpp
Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h
Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h
Source/WebCore/platform/win/PopupMenuWin.cpp
Source/WebCore/rendering/AutoTableLayout.cpp
Source/WebCore/rendering/FilterEffectRenderer.cpp
Source/WebCore/rendering/FixedTableLayout.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderMarquee.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderScrollbarPart.cpp
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderText.h
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/svg/SVGSVGElement.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp