Closed Bug 698228 Opened 13 years ago Closed 13 years ago

[ImageMap] Don't use GetPrimaryFrame when not needed

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
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.
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)
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?
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.
(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 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+
https://hg.mozilla.org/mozilla-central/rev/b70bd1e1fd1e
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee: nobody → bugs
Target Milestone: --- → mozilla11
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: