Changeset 87006 in webkit
- Timestamp:
- May 20, 2011 5:52:40 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r87004 r87006 1 2011-05-20 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> 2 3 Reviewed by Simon Fraser. 4 5 If both border-radius and box-shadow applied, shadow is not fully visible 6 https://bugs.webkit.org/show_bug.cgi?id=59577 7 8 * fast/css/box-shadow-and-border-radius.html: Added. 9 * platform/qt/fast/css/box-shadow-and-border-radius-expected.png: Added. 10 * platform/qt/fast/css/box-shadow-and-border-radius-expected.txt: Added. 11 * platform/win/fast/css/box-shadow-and-border-radius-expected.png: Added. 12 * platform/win/fast/css/box-shadow-and-border-radius-expected.txt: Added. 13 1 14 2011-05-20 Kenneth Russell <kbr@google.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r87001 r87006 1 2011-05-20 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> 2 3 Reviewed by Simon Fraser. 4 5 If both border-radius and box-shadow applied, shadow is not fully visible 6 https://bugs.webkit.org/show_bug.cgi?id=59577 7 8 The current implementation of RoundedIntRect::inflateWithRadii() inflates 9 its rect size and corner radii out of sync. This leads to validation failure in 10 Path::addRoundedRect() and results in ignoring radii in the path. 11 When this invalid path is used to clip out the rounded corner box before painting 12 the box shadow, the entire rectangle is clipped out without the corner radii. 13 14 This patch implements RoundedIntRect::inflateWithRadii() properly to inflate 15 rounded rect radii based on inflate ratios of rect size. 16 17 Test: fast/css/box-shadow-and-border-radius.html 18 19 * platform/graphics/RoundedIntRect.cpp: 20 (WebCore::RoundedIntRect::inflateWithRadii): 21 * platform/graphics/RoundedIntRect.h: 22 1 23 2011-05-20 Michael Nordman <michaeln@google.com> 2 24 -
trunk/Source/WebCore/platform/graphics/RoundedIntRect.cpp
r84273 r87006 76 76 } 77 77 78 void RoundedIntRect::inflateWithRadii(int size) 79 { 80 IntRect old = m_rect; 81 82 m_rect.inflate(size); 83 // Considering the inflation factor of shorter size to scale the radii seems appropriate here 84 float factor; 85 if (m_rect.width() < m_rect.height()) 86 factor = old.width() ? (float)m_rect.width() / old.width() : 0; 87 else 88 factor = old.height() ? (float)m_rect.height() / old.height() : 0; 89 90 m_radii.scale(factor); 91 } 92 78 93 void RoundedIntRect::Radii::includeLogicalEdges(const RoundedIntRect::Radii& edges, bool isHorizontal, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) 79 94 { -
trunk/Source/WebCore/platform/graphics/RoundedIntRect.h
r84273 r87006 87 87 void move(const IntSize& size) { m_rect.move(size); } 88 88 void inflate(int size) { m_rect.inflate(size); } 89 void inflateWithRadii(int size) { m_rect.inflate(size); m_radii.expand(size); }89 void inflateWithRadii(int size); 90 90 void expandRadii(int size) { m_radii.expand(size); } 91 91 void shrinkRadii(int size) { m_radii.shrink(size); }
Note: See TracChangeset
for help on using the changeset viewer.