OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 #include "core/rendering/shapes/ShapeOutsideInfo.h" | 31 #include "core/rendering/shapes/ShapeOutsideInfo.h" |
32 | 32 |
33 #include "core/rendering/RenderBox.h" | 33 #include "core/rendering/RenderBox.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 bool ShapeOutsideInfo::isEnabledFor(const RenderBox* box) | 36 bool ShapeOutsideInfo::isEnabledFor(const RenderBox* box) |
37 { | 37 { |
38 ShapeValue* shapeValue = box->style()->shapeOutside(); | 38 ShapeValue* shapeValue = box->style()->shapeOutside(); |
39 if (!box->isFloatingWithShapeOutside() || !shapeValue) | 39 if (!box->isFloating() || !shapeValue) |
40 return false; | 40 return false; |
41 | 41 |
42 switch (shapeValue->type()) { | 42 switch (shapeValue->type()) { |
43 case ShapeValue::Shape: | 43 case ShapeValue::Shape: |
44 return shapeValue->shape(); | 44 return shapeValue->shape(); |
45 case ShapeValue::Image: | 45 case ShapeValue::Image: |
46 return shapeValue->isImageValid(); | 46 return shapeValue->isImageValid(); |
47 case ShapeValue::Outside: | 47 case ShapeValue::Outside: |
48 return false; | 48 return false; |
49 } | 49 } |
(...skipping 17 matching lines...) Expand all Loading... |
67 m_leftSegmentMarginBoxDelta = m_renderer->logicalWidth() + m_rendere
r->marginStart(); | 67 m_leftSegmentMarginBoxDelta = m_renderer->logicalWidth() + m_rendere
r->marginStart(); |
68 m_rightSegmentMarginBoxDelta = -m_renderer->logicalWidth() - m_rende
rer->marginEnd(); | 68 m_rightSegmentMarginBoxDelta = -m_renderer->logicalWidth() - m_rende
rer->marginEnd(); |
69 } | 69 } |
70 m_lineTop = lineTop; | 70 m_lineTop = lineTop; |
71 } | 71 } |
72 | 72 |
73 return m_segments.size(); | 73 return m_segments.size(); |
74 } | 74 } |
75 | 75 |
76 } | 76 } |
OLD | NEW |