[ImageMap] Don't use GetPrimaryFrame when not needed

RESOLVED FIXED in mozilla11

Status

()

Core
Layout: Images
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

unspecified
mozilla11
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 570504 [details] [diff] [review]
patch

Since we have the strange setup that area elements get the primary frame of
img, there is really no need to use GetPrimaryFrame in nsImageMap.
Especially because we should get rid of that strange setup.
(Assignee)

Comment 1

6 years ago
Comment on attachment 570504 [details] [diff] [review]
patch

surkov, could you test that a11y still works ok.
It is the only using GetBoundsForAreaContent, IIRC.
Attachment #570504 - Attachment is patch: true
Attachment #570504 - Flags: review?(matspal)
Attachment #570504 - Flags: feedback?(surkov.alexander)
(Assignee)

Comment 2

6 years ago
https://tbpl.mozilla.org/?tree=Try&rev=aca8dcfb5f49
Comment on attachment 570504 [details] [diff] [review]
patch

>-  if (NS_SUCCEEDED(aEvent->GetTarget(getter_AddRefs(target))) && target) {
>+  if (mImageFrame &&
>+      NS_SUCCEEDED(aEvent->GetTarget(getter_AddRefs(target))) && target) {

Hmm, this doesn't seem right.  Shouldn't we still do 
area->HasFocus(focus) even if the frame is gone?
(Assignee)

Comment 4

6 years ago
Well, if mImageFrame is null, ImageMap has been disconnected from imageframe.

I'll move the place of mImageFrame check to be where if (imgFrame) used to be.

Comment 5

6 years ago
(In reply to Olli Pettay [:smaug] from comment #1)

> surkov, could you test that a11y still works ok.
> It is the only using GetBoundsForAreaContent, IIRC.

Marco, could you make sure imagemaps work and expose correct boundaries please?
Comment on attachment 570504 [details] [diff] [review]
patch

> I'll move the place of mImageFrame check to be where if (imgFrame) used to
> be.

ok, r=mats with that.
Attachment #570504 - Flags: review?(matspal) → review+

Comment 7

6 years ago
Comment on attachment 570504 [details] [diff] [review]
patch

sorry it took long time, f=me. I don't see a difference between x,y,width,height values between patched trunk Firefox and Firefox 8.
Attachment #570504 - Flags: feedback?(surkov.alexander) → feedback+
(Assignee)

Comment 8

6 years ago
https://hg.mozilla.org/mozilla-central/rev/b70bd1e1fd1e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
Assignee: nobody → bugs

Updated

6 years ago
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.