Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: Source/core/css/LayoutStyleCSSValueMapping.cpp

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 25 matching lines...) Expand all
36 #include "core/css/CSSGridTemplateAreasValue.h" 36 #include "core/css/CSSGridTemplateAreasValue.h"
37 #include "core/css/CSSPathValue.h" 37 #include "core/css/CSSPathValue.h"
38 #include "core/css/CSSPrimitiveValueMappings.h" 38 #include "core/css/CSSPrimitiveValueMappings.h"
39 #include "core/css/CSSReflectValue.h" 39 #include "core/css/CSSReflectValue.h"
40 #include "core/css/CSSShadowValue.h" 40 #include "core/css/CSSShadowValue.h"
41 #include "core/css/CSSTimingFunctionValue.h" 41 #include "core/css/CSSTimingFunctionValue.h"
42 #include "core/css/CSSValueList.h" 42 #include "core/css/CSSValueList.h"
43 #include "core/css/CSSValuePool.h" 43 #include "core/css/CSSValuePool.h"
44 #include "core/css/Pair.h" 44 #include "core/css/Pair.h"
45 #include "core/css/Rect.h" 45 #include "core/css/Rect.h"
46 #include "core/layout/LayoutBox.h"
46 #include "core/layout/LayoutObject.h" 47 #include "core/layout/LayoutObject.h"
47 #include "core/layout/style/ContentData.h" 48 #include "core/layout/style/ContentData.h"
48 #include "core/layout/style/LayoutStyle.h" 49 #include "core/layout/style/LayoutStyle.h"
49 #include "core/layout/style/PathStyleMotionPath.h" 50 #include "core/layout/style/PathStyleMotionPath.h"
50 #include "core/layout/style/ShadowList.h" 51 #include "core/layout/style/ShadowList.h"
51 #include "core/rendering/RenderBlock.h" 52 #include "core/rendering/RenderBlock.h"
52 #include "core/rendering/RenderBox.h"
53 #include "core/rendering/RenderGrid.h" 53 #include "core/rendering/RenderGrid.h"
54 #include "platform/LengthFunctions.h" 54 #include "platform/LengthFunctions.h"
55 55
56 namespace blink { 56 namespace blink {
57 57
58 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d ouble value, const LayoutStyle& style) 58 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d ouble value, const LayoutStyle& style)
59 { 59 {
60 return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX); 60 return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
61 } 61 }
62 62
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 break; 157 break;
158 case CSSPropertyBottom: 158 case CSSPropertyBottom:
159 offset = style.bottom(); 159 offset = style.bottom();
160 break; 160 break;
161 default: 161 default:
162 return nullptr; 162 return nullptr;
163 } 163 }
164 164
165 if (offset.isPercent() && renderer && renderer->isBox()) { 165 if (offset.isPercent() && renderer && renderer->isBox()) {
166 LayoutUnit containingBlockSize = (propertyID == CSSPropertyLeft || prope rtyID == CSSPropertyRight) ? 166 LayoutUnit containingBlockSize = (propertyID == CSSPropertyLeft || prope rtyID == CSSPropertyRight) ?
167 toRenderBox(renderer)->containingBlockLogicalWidthForContent() : 167 toLayoutBox(renderer)->containingBlockLogicalWidthForContent() :
168 toRenderBox(renderer)->containingBlockLogicalHeightForContent(Exclud eMarginBorderPadding); 168 toLayoutBox(renderer)->containingBlockLogicalHeightForContent(Exclud eMarginBorderPadding);
169 return zoomAdjustedPixelValue(valueForLength(offset, containingBlockSize ), style); 169 return zoomAdjustedPixelValue(valueForLength(offset, containingBlockSize ), style);
170 } 170 }
171 if (offset.isAuto()) { 171 if (offset.isAuto()) {
172 // FIXME: It's not enough to simply return "auto" values for one offset if the other side is defined. 172 // FIXME: It's not enough to simply return "auto" values for one offset if the other side is defined.
173 // In other words if left is auto and right is not auto, then left's com puted value is negative right(). 173 // In other words if left is auto and right is not auto, then left's com puted value is negative right().
174 // So we should get the opposite length unit and see if it is auto. 174 // So we should get the opposite length unit and see if it is auto.
175 return cssValuePool().createIdentifierValue(CSSValueAuto); 175 return cssValuePool().createIdentifierValue(CSSValueAuto);
176 } 176 }
177 177
178 return zoomAdjustedPixelValueForLength(offset, style); 178 return zoomAdjustedPixelValueForLength(offset, style);
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 if (!position.namedGridLine().isNull()) 628 if (!position.namedGridLine().isNull())
629 list->append(cssValuePool().createValue(position.namedGridLine(), CSSPri mitiveValue::CSS_STRING)); 629 list->append(cssValuePool().createValue(position.namedGridLine(), CSSPri mitiveValue::CSS_STRING));
630 return list; 630 return list;
631 } 631 }
632 632
633 static LayoutRect sizingBox(const LayoutObject* renderer) 633 static LayoutRect sizingBox(const LayoutObject* renderer)
634 { 634 {
635 if (!renderer->isBox()) 635 if (!renderer->isBox())
636 return LayoutRect(); 636 return LayoutRect();
637 637
638 const RenderBox* box = toRenderBox(renderer); 638 const LayoutBox* box = toLayoutBox(renderer);
639 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box- >computedCSSContentBoxRect(); 639 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box- >computedCSSContentBoxRect();
640 } 640 }
641 641
642 static PassRefPtrWillBeRawPtr<CSSValue> scrollBlocksOnFlagsToCSSValue(WebScrollB locksOn scrollBlocksOn) 642 static PassRefPtrWillBeRawPtr<CSSValue> scrollBlocksOnFlagsToCSSValue(WebScrollB locksOn scrollBlocksOn)
643 { 643 {
644 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 644 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
645 645
646 if (scrollBlocksOn == WebScrollBlocksOnNone) 646 if (scrollBlocksOn == WebScrollBlocksOnNone)
647 return cssValuePool().createIdentifierValue(CSSValueNone); 647 return cssValuePool().createIdentifierValue(CSSValueNone);
648 648
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 return transformValue.release(); 920 return transformValue.release();
921 } 921 }
922 922
923 static PassRefPtrWillBeRawPtr<CSSValue> computedTransform(const LayoutObject* re nderer, const LayoutStyle& style) 923 static PassRefPtrWillBeRawPtr<CSSValue> computedTransform(const LayoutObject* re nderer, const LayoutStyle& style)
924 { 924 {
925 if (!renderer || !renderer->hasTransformRelatedProperty() || !style.hasTrans form()) 925 if (!renderer || !renderer->hasTransformRelatedProperty() || !style.hasTrans form())
926 return cssValuePool().createIdentifierValue(CSSValueNone); 926 return cssValuePool().createIdentifierValue(CSSValueNone);
927 927
928 IntRect box; 928 IntRect box;
929 if (renderer->isBox()) 929 if (renderer->isBox())
930 box = pixelSnappedIntRect(toRenderBox(renderer)->borderBoxRect()); 930 box = pixelSnappedIntRect(toLayoutBox(renderer)->borderBoxRect());
931 931
932 TransformationMatrix transform; 932 TransformationMatrix transform;
933 style.applyTransform(transform, LayoutSize(box.size()), LayoutStyle::Exclude TransformOrigin, LayoutStyle::ExcludeMotionPath); 933 style.applyTransform(transform, LayoutSize(box.size()), LayoutStyle::Exclude TransformOrigin, LayoutStyle::ExcludeMotionPath);
934 934
935 // FIXME: Need to print out individual functions (https://bugs.webkit.org/sh ow_bug.cgi?id=23924) 935 // FIXME: Need to print out individual functions (https://bugs.webkit.org/sh ow_bug.cgi?id=23924)
936 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 936 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
937 list->append(valueForMatrixTransform(transform, style)); 937 list->append(valueForMatrixTransform(transform, style));
938 938
939 return list.release(); 939 return list.release();
940 } 940 }
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 case CSSPropertyListStyleType: 1689 case CSSPropertyListStyleType:
1690 return cssValuePool().createValue(style.listStyleType()); 1690 return cssValuePool().createValue(style.listStyleType());
1691 case CSSPropertyWebkitLocale: 1691 case CSSPropertyWebkitLocale:
1692 if (style.locale().isNull()) 1692 if (style.locale().isNull())
1693 return cssValuePool().createIdentifierValue(CSSValueAuto); 1693 return cssValuePool().createIdentifierValue(CSSValueAuto);
1694 return cssValuePool().createValue(style.locale(), CSSPrimitiveValue::CSS _STRING); 1694 return cssValuePool().createValue(style.locale(), CSSPrimitiveValue::CSS _STRING);
1695 case CSSPropertyMarginTop: { 1695 case CSSPropertyMarginTop: {
1696 Length marginTop = style.marginTop(); 1696 Length marginTop = style.marginTop();
1697 if (marginTop.isFixed() || !renderer || !renderer->isBox()) 1697 if (marginTop.isFixed() || !renderer || !renderer->isBox())
1698 return zoomAdjustedPixelValueForLength(marginTop, style); 1698 return zoomAdjustedPixelValueForLength(marginTop, style);
1699 return zoomAdjustedPixelValue(toRenderBox(renderer)->marginTop(), style) ; 1699 return zoomAdjustedPixelValue(toLayoutBox(renderer)->marginTop(), style) ;
1700 } 1700 }
1701 case CSSPropertyMarginRight: { 1701 case CSSPropertyMarginRight: {
1702 Length marginRight = style.marginRight(); 1702 Length marginRight = style.marginRight();
1703 if (marginRight.isFixed() || !renderer || !renderer->isBox()) 1703 if (marginRight.isFixed() || !renderer || !renderer->isBox())
1704 return zoomAdjustedPixelValueForLength(marginRight, style); 1704 return zoomAdjustedPixelValueForLength(marginRight, style);
1705 float value; 1705 float value;
1706 if (marginRight.isPercent()) { 1706 if (marginRight.isPercent()) {
1707 // RenderBox gives a marginRight() that is the distance between the right-edge of the child box 1707 // LayoutBox gives a marginRight() that is the distance between the right-edge of the child box
1708 // and the right-edge of the containing box, when display == BLOCK. Let's calculate the absolute 1708 // and the right-edge of the containing box, when display == BLOCK. Let's calculate the absolute
1709 // value of the specified margin-right % instead of relying on Rende rBox's marginRight() value. 1709 // value of the specified margin-right % instead of relying on Layou tBox's marginRight() value.
1710 value = minimumValueForLength(marginRight, toRenderBox(renderer)->co ntainingBlockLogicalWidthForContent()).toFloat(); 1710 value = minimumValueForLength(marginRight, toLayoutBox(renderer)->co ntainingBlockLogicalWidthForContent()).toFloat();
1711 } else { 1711 } else {
1712 value = toRenderBox(renderer)->marginRight().toFloat(); 1712 value = toLayoutBox(renderer)->marginRight().toFloat();
1713 } 1713 }
1714 return zoomAdjustedPixelValue(value, style); 1714 return zoomAdjustedPixelValue(value, style);
1715 } 1715 }
1716 case CSSPropertyMarginBottom: { 1716 case CSSPropertyMarginBottom: {
1717 Length marginBottom = style.marginBottom(); 1717 Length marginBottom = style.marginBottom();
1718 if (marginBottom.isFixed() || !renderer || !renderer->isBox()) 1718 if (marginBottom.isFixed() || !renderer || !renderer->isBox())
1719 return zoomAdjustedPixelValueForLength(marginBottom, style); 1719 return zoomAdjustedPixelValueForLength(marginBottom, style);
1720 return zoomAdjustedPixelValue(toRenderBox(renderer)->marginBottom(), sty le); 1720 return zoomAdjustedPixelValue(toLayoutBox(renderer)->marginBottom(), sty le);
1721 } 1721 }
1722 case CSSPropertyMarginLeft: { 1722 case CSSPropertyMarginLeft: {
1723 Length marginLeft = style.marginLeft(); 1723 Length marginLeft = style.marginLeft();
1724 if (marginLeft.isFixed() || !renderer || !renderer->isBox()) 1724 if (marginLeft.isFixed() || !renderer || !renderer->isBox())
1725 return zoomAdjustedPixelValueForLength(marginLeft, style); 1725 return zoomAdjustedPixelValueForLength(marginLeft, style);
1726 return zoomAdjustedPixelValue(toRenderBox(renderer)->marginLeft(), style ); 1726 return zoomAdjustedPixelValue(toLayoutBox(renderer)->marginLeft(), style );
1727 } 1727 }
1728 case CSSPropertyWebkitUserModify: 1728 case CSSPropertyWebkitUserModify:
1729 return cssValuePool().createValue(style.userModify()); 1729 return cssValuePool().createValue(style.userModify());
1730 case CSSPropertyMaxHeight: { 1730 case CSSPropertyMaxHeight: {
1731 const Length& maxHeight = style.maxHeight(); 1731 const Length& maxHeight = style.maxHeight();
1732 if (maxHeight.isMaxSizeNone()) 1732 if (maxHeight.isMaxSizeNone())
1733 return cssValuePool().createIdentifierValue(CSSValueNone); 1733 return cssValuePool().createIdentifierValue(CSSValueNone);
1734 return zoomAdjustedPixelValueForLength(maxHeight, style); 1734 return zoomAdjustedPixelValueForLength(maxHeight, style);
1735 } 1735 }
1736 case CSSPropertyMaxWidth: { 1736 case CSSPropertyMaxWidth: {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 case CSSPropertyOverflowWrap: 1778 case CSSPropertyOverflowWrap:
1779 return cssValuePool().createValue(style.overflowWrap()); 1779 return cssValuePool().createValue(style.overflowWrap());
1780 case CSSPropertyOverflowX: 1780 case CSSPropertyOverflowX:
1781 return cssValuePool().createValue(style.overflowX()); 1781 return cssValuePool().createValue(style.overflowX());
1782 case CSSPropertyOverflowY: 1782 case CSSPropertyOverflowY:
1783 return cssValuePool().createValue(style.overflowY()); 1783 return cssValuePool().createValue(style.overflowY());
1784 case CSSPropertyPaddingTop: { 1784 case CSSPropertyPaddingTop: {
1785 Length paddingTop = style.paddingTop(); 1785 Length paddingTop = style.paddingTop();
1786 if (paddingTop.isFixed() || !renderer || !renderer->isBox()) 1786 if (paddingTop.isFixed() || !renderer || !renderer->isBox())
1787 return zoomAdjustedPixelValueForLength(paddingTop, style); 1787 return zoomAdjustedPixelValueForLength(paddingTop, style);
1788 return zoomAdjustedPixelValue(toRenderBox(renderer)->computedCSSPaddingT op(), style); 1788 return zoomAdjustedPixelValue(toLayoutBox(renderer)->computedCSSPaddingT op(), style);
1789 } 1789 }
1790 case CSSPropertyPaddingRight: { 1790 case CSSPropertyPaddingRight: {
1791 Length paddingRight = style.paddingRight(); 1791 Length paddingRight = style.paddingRight();
1792 if (paddingRight.isFixed() || !renderer || !renderer->isBox()) 1792 if (paddingRight.isFixed() || !renderer || !renderer->isBox())
1793 return zoomAdjustedPixelValueForLength(paddingRight, style); 1793 return zoomAdjustedPixelValueForLength(paddingRight, style);
1794 return zoomAdjustedPixelValue(toRenderBox(renderer)->computedCSSPaddingR ight(), style); 1794 return zoomAdjustedPixelValue(toLayoutBox(renderer)->computedCSSPaddingR ight(), style);
1795 } 1795 }
1796 case CSSPropertyPaddingBottom: { 1796 case CSSPropertyPaddingBottom: {
1797 Length paddingBottom = style.paddingBottom(); 1797 Length paddingBottom = style.paddingBottom();
1798 if (paddingBottom.isFixed() || !renderer || !renderer->isBox()) 1798 if (paddingBottom.isFixed() || !renderer || !renderer->isBox())
1799 return zoomAdjustedPixelValueForLength(paddingBottom, style); 1799 return zoomAdjustedPixelValueForLength(paddingBottom, style);
1800 return zoomAdjustedPixelValue(toRenderBox(renderer)->computedCSSPaddingB ottom(), style); 1800 return zoomAdjustedPixelValue(toLayoutBox(renderer)->computedCSSPaddingB ottom(), style);
1801 } 1801 }
1802 case CSSPropertyPaddingLeft: { 1802 case CSSPropertyPaddingLeft: {
1803 Length paddingLeft = style.paddingLeft(); 1803 Length paddingLeft = style.paddingLeft();
1804 if (paddingLeft.isFixed() || !renderer || !renderer->isBox()) 1804 if (paddingLeft.isFixed() || !renderer || !renderer->isBox())
1805 return zoomAdjustedPixelValueForLength(paddingLeft, style); 1805 return zoomAdjustedPixelValueForLength(paddingLeft, style);
1806 return zoomAdjustedPixelValue(toRenderBox(renderer)->computedCSSPaddingL eft(), style); 1806 return zoomAdjustedPixelValue(toLayoutBox(renderer)->computedCSSPaddingL eft(), style);
1807 } 1807 }
1808 case CSSPropertyPageBreakAfter: 1808 case CSSPropertyPageBreakAfter:
1809 return cssValuePool().createValue(style.pageBreakAfter()); 1809 return cssValuePool().createValue(style.pageBreakAfter());
1810 case CSSPropertyPageBreakBefore: 1810 case CSSPropertyPageBreakBefore:
1811 return cssValuePool().createValue(style.pageBreakBefore()); 1811 return cssValuePool().createValue(style.pageBreakBefore());
1812 case CSSPropertyPageBreakInside: { 1812 case CSSPropertyPageBreakInside: {
1813 EPageBreak pageBreak = style.pageBreakInside(); 1813 EPageBreak pageBreak = style.pageBreakInside();
1814 ASSERT(pageBreak != PBALWAYS); 1814 ASSERT(pageBreak != PBALWAYS);
1815 if (pageBreak == PBALWAYS) 1815 if (pageBreak == PBALWAYS)
1816 return nullptr; 1816 return nullptr;
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 case CSSPropertyWebkitPerspective: 2153 case CSSPropertyWebkitPerspective:
2154 if (!style.hasPerspective()) 2154 if (!style.hasPerspective())
2155 return cssValuePool().createIdentifierValue(CSSValueNone); 2155 return cssValuePool().createIdentifierValue(CSSValueNone);
2156 return zoomAdjustedPixelValue(style.perspective(), style); 2156 return zoomAdjustedPixelValue(style.perspective(), style);
2157 case CSSPropertyPerspectiveOrigin: 2157 case CSSPropertyPerspectiveOrigin:
2158 case CSSPropertyWebkitPerspectiveOrigin: { 2158 case CSSPropertyWebkitPerspectiveOrigin: {
2159 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed(); 2159 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed();
2160 if (renderer) { 2160 if (renderer) {
2161 LayoutRect box; 2161 LayoutRect box;
2162 if (renderer->isBox()) 2162 if (renderer->isBox())
2163 box = toRenderBox(renderer)->borderBoxRect(); 2163 box = toLayoutBox(renderer)->borderBoxRect();
2164 2164
2165 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers pectiveOriginX(), box.width()), style)); 2165 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers pectiveOriginX(), box.width()), style));
2166 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers pectiveOriginY(), box.height()), style)); 2166 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers pectiveOriginY(), box.height()), style));
2167 } else { 2167 } else {
2168 list->append(zoomAdjustedPixelValueForLength(style.perspectiveOrigin X(), style)); 2168 list->append(zoomAdjustedPixelValueForLength(style.perspectiveOrigin X(), style));
2169 list->append(zoomAdjustedPixelValueForLength(style.perspectiveOrigin Y(), style)); 2169 list->append(zoomAdjustedPixelValueForLength(style.perspectiveOrigin Y(), style));
2170 } 2170 }
2171 return list.release(); 2171 return list.release();
2172 } 2172 }
2173 case CSSPropertyWebkitRtlOrdering: 2173 case CSSPropertyWebkitRtlOrdering:
(...skipping 26 matching lines...) Expand all
2200 return cssValuePool().createValue(style.speak()); 2200 return cssValuePool().createValue(style.speak());
2201 case CSSPropertyTransform: 2201 case CSSPropertyTransform:
2202 case CSSPropertyWebkitTransform: 2202 case CSSPropertyWebkitTransform:
2203 return computedTransform(renderer, style); 2203 return computedTransform(renderer, style);
2204 case CSSPropertyTransformOrigin: 2204 case CSSPropertyTransformOrigin:
2205 case CSSPropertyWebkitTransformOrigin: { 2205 case CSSPropertyWebkitTransformOrigin: {
2206 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed(); 2206 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed();
2207 if (renderer) { 2207 if (renderer) {
2208 LayoutRect box; 2208 LayoutRect box;
2209 if (renderer->isBox()) 2209 if (renderer->isBox())
2210 box = toRenderBox(renderer)->borderBoxRect(); 2210 box = toLayoutBox(renderer)->borderBoxRect();
2211 2211
2212 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran sformOriginX(), box.width()), style)); 2212 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran sformOriginX(), box.width()), style));
2213 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran sformOriginY(), box.height()), style)); 2213 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran sformOriginY(), box.height()), style));
2214 if (style.transformOriginZ() != 0) 2214 if (style.transformOriginZ() != 0)
2215 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st yle)); 2215 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st yle));
2216 } else { 2216 } else {
2217 list->append(zoomAdjustedPixelValueForLength(style.transformOriginX( ), style)); 2217 list->append(zoomAdjustedPixelValueForLength(style.transformOriginX( ), style));
2218 list->append(zoomAdjustedPixelValueForLength(style.transformOriginY( ), style)); 2218 list->append(zoomAdjustedPixelValueForLength(style.transformOriginY( ), style));
2219 if (style.transformOriginZ() != 0) 2219 if (style.transformOriginZ() != 0)
2220 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st yle)); 2220 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st yle));
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2564 return zoomAdjustedPixelValueForLength(svgStyle.y(), style); 2564 return zoomAdjustedPixelValueForLength(svgStyle.y(), style);
2565 2565
2566 case CSSPropertyAll: 2566 case CSSPropertyAll:
2567 return nullptr; 2567 return nullptr;
2568 } 2568 }
2569 ASSERT_NOT_REACHED(); 2569 ASSERT_NOT_REACHED();
2570 return nullptr; 2570 return nullptr;
2571 } 2571 }
2572 2572
2573 } 2573 }
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698