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

Side by Side Diff: Source/core/rendering/shapes/ShapeInsideInfo.cpp

Issue 200633005: [CSS Shapes] Remove deprecated shapes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectations Created 6 years, 9 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
« no previous file with comments | « Source/core/rendering/shapes/Shape.cpp ('k') | Source/core/rendering/style/BasicShapes.h » ('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) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 bool ShapeInsideInfo::isEnabledFor(const RenderBlock& renderer) 44 bool ShapeInsideInfo::isEnabledFor(const RenderBlock& renderer)
45 { 45 {
46 ShapeValue* shapeValue = renderer.style()->resolvedShapeInside(); 46 ShapeValue* shapeValue = renderer.style()->resolvedShapeInside();
47 if (!shapeValue) 47 if (!shapeValue)
48 return false; 48 return false;
49 49
50 switch (shapeValue->type()) { 50 switch (shapeValue->type()) {
51 case ShapeValue::Shape: 51 case ShapeValue::Shape:
52 return shapeValue->shape() && shapeValue->shape()->type() != BasicShape: :BasicShapeInsetRectangleType && shapeValue->shape()->type() != BasicShape::Basi cShapeInsetType; 52 return shapeValue->shape() && shapeValue->shape()->type() != BasicShape: :BasicShapeInsetType;
53 case ShapeValue::Image: 53 case ShapeValue::Image:
54 return shapeValue->isImageValid() && checkShapeImageOrigin(renderer.docu ment(), *(shapeValue->image()->cachedImage())); 54 return shapeValue->isImageValid() && checkShapeImageOrigin(renderer.docu ment(), *(shapeValue->image()->cachedImage()));
55 case ShapeValue::Box: 55 case ShapeValue::Box:
56 return true; 56 return true;
57 case ShapeValue::Outside: 57 case ShapeValue::Outside:
58 return false; 58 return false;
59 } 59 }
60 60
61 return false; 61 return false;
62 } 62 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return 0; 118 return 0;
119 119
120 LayoutUnit firstFitPosition = 0; 120 LayoutUnit firstFitPosition = 0;
121 if (computedShape().firstIncludedIntervalLogicalTop(m_referenceBoxLineTop, f loatSize, firstFitPosition) && (m_referenceBoxLineTop <= firstFitPosition)) 121 if (computedShape().firstIncludedIntervalLogicalTop(m_referenceBoxLineTop, f loatSize, firstFitPosition) && (m_referenceBoxLineTop <= firstFitPosition))
122 return firstFitPosition; 122 return firstFitPosition;
123 123
124 return 0; 124 return 0;
125 } 125 }
126 126
127 } 127 }
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/Shape.cpp ('k') | Source/core/rendering/style/BasicShapes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698