WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 121708
[CSS Shapes] Determining if a line is inside of a shape should only happen in one place
https://bugs.webkit.org/show_bug.cgi?id=121708
Summary
[CSS Shapes] Determining if a line is inside of a shape should only happen in...
Bem Jones-Bey
Reported
2013-09-20 13:24:09 PDT
Right now, we are checking if a line is inside a shape both in the ShapeInfo classes and in the Shape classes. And right now, they're not doing is the same thing all the time. The expected behavior is that both lines and shapes are closed on the top and open on the bottom. Also, for the purposes of shape-outside, a zero height shape should still affect a line that it intersects. (eg. shapeTop == lineTop).
Attachments
Patch
(4.17 KB, patch)
2013-11-12 13:03 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Patch
(4.13 KB, patch)
2013-11-12 13:10 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Patch
(4.17 KB, patch)
2013-11-13 09:09 PST
,
Hans Muller
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Hans Muller
Comment 1
2013-11-12 13:03:01 PST
Created
attachment 216710
[details]
Patch The ShapeInfo::lineOverlapsShapeBounds() methods now delegate to the Shape object. The logic for the Shape overlap test is now the same for ShapeInsideInfo and ShapeOutsideInfo.
Hans Muller
Comment 2
2013-11-12 13:10:37 PST
Created
attachment 216711
[details]
Patch Resync'd
Zoltan Horvath
Comment 3
2013-11-13 01:05:01 PST
Comment on
attachment 216711
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=216711&action=review
I like the change. 2 comments from me:
> Source/WebCore/rendering/shapes/Shape.h:90 > + bool lineOverlapsLayoutRect(LayoutUnit lineTop, LayoutUnit lineHeight, const LayoutRect& rect) const
The naming of this function is a bit confusing to me, because we usually don't include the typename in the function, but rather the functionality. What do you think about lineOverlapsRectangle or lineOverlapsBoundingBox?
> Source/WebCore/rendering/shapes/Shape.h:92 > + return !rect.isEmpty() && ((lineTop < rect.maxY() && lineTop + lineHeight > rect.y()) || (!lineHeight && lineTop == rect.y()));
I would early return false for rect.isEmpty then the second part of the condition would be more straightforward in its own line.
Hans Muller
Comment 4
2013-11-13 09:09:17 PST
Created
attachment 216809
[details]
Patch Made the suggested changes.
WebKit Commit Bot
Comment 5
2013-11-13 09:45:28 PST
Comment on
attachment 216809
[details]
Patch Clearing flags on attachment: 216809 Committed
r159205
: <
http://trac.webkit.org/changeset/159205
>
WebKit Commit Bot
Comment 6
2013-11-13 09:45:30 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug