Closed
Bug 698232
Opened 13 years ago
Closed 13 years ago
[ImageMap] s/IsInside/GetArea to simplify the code
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(1 file, 1 obsolete file)
4.66 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•13 years ago
|
Attachment #570506 -
Attachment is patch: true
Attachment #570506 -
Flags: review?(matspal)
Assignee | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
Comment on attachment 570506 [details] [diff] [review]
patch
In layout/generic/nsImageFrame.cpp:
> nsImageFrame::GetCursor(const nsPoint& aPoint,
> ...
> nsCOMPtr<nsIContent> area;
>- if (map->IsInside(p.x, p.y, getter_AddRefs(area))) {
>+ if ((area = map->GetArea(p.x, p.y))) {
I'd prefer:
nsCOMPtr<nsIContent> area = map->GetArea(p.x, p.y);
if (area) {
In layout/generic/nsImageMap.h:
>+ * See if the given aX,aY pixel coordinates are in the image
>+ * map. If they are then pointer to the relevant area element is returned.
>+ * If the coordinates are not in the map then nsnull
> * is returned.
Let's try to improve this doc comment while we're here. How about:
"Return the first area element (in content order) for the given aX,aY pixel
coordinate or nsnull if the coordinate is outside all areas."
Attachment #570506 -
Flags: review?(matspal) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Assignee: nobody → Olli.Pettay
Assignee | ||
Comment 4•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Attachment #570506 -
Attachment is obsolete: true
Updated•13 years ago
|
Flags: in-testsuite-
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → mozilla10
Version: unspecified → Trunk
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•