Bug 97804
| Summary: | [CSS Exclusions] ExclusionShape class should provide a lineOverlapsShapeBounds() method | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Hans Muller <giles_joplin> |
| Component: | CSS | Assignee: | Hans Muller <giles_joplin> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | donggwan.kim, zoltan |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 96811 | ||
| Bug Blocks: | |||
Hans Muller
It would be more efficient if the ExclusionShape class provided a lineOverlapsShapeBounds() method, than the current approach where ExclusionShapeInsideInfo computes the result by getting the shape's bounding box:
inline bool ExclusionShapeInsideInfo::lineOverlapsShapeBounds() const
{
ASSERT(m_shape);
FloatRect shapeBounds = m_shape->shapeLogicalBoundingBox();
return m_lineTop <= shapeBounds.maxY() && m_lineBottom >= shapeBounds.y();
}
By calling an ExclusionShape() method directly we could avoid allocating a FloatRect and doing the extra internal to logical conversions.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Zoltan Horvath
It has been fixed earlier.
Current function:
http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/ExclusionShapeInfo.h?rev=147384#L99
bool lineOverlapsShapeBounds() const { return logicalLineTop() < shapeLogicalBottom() && logicalLineBottom() >= shapeLogicalTop(); }