Closed Bug 795468 Opened 7 years ago Closed 7 years ago

minor optimizations to accessible creation

Categories

(Core :: Disability Access APIs, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: tbsaunde, Assigned: tbsaunde)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Attached patch patchSplinter Review
There's no reason to check the object we just recreated isn't null, new
is infalable.
- use AsContent() instead of QueryInterface
- don't use a weakFrame since the world will end if we modify the dom or
  layout while creating an accessible anyway.
Attachment #666053 - Flags: review?(surkov.alexander)
Comment on attachment 666053 [details] [diff] [review]
patch

Review of attachment 666053 [details] [diff] [review]:
-----------------------------------------------------------------

nice, thank you

::: accessible/src/base/nsAccessibilityService.cpp
@@ +997,5 @@
>  
>      roleMapEntry = nullptr;
>    }
>  
> +  if ( !newAcc && isHTML) {  // HTML accessibles

nit: excess space after (

@@ +998,5 @@
>      roleMapEntry = nullptr;
>    }
>  
> +  if ( !newAcc && isHTML) {  // HTML accessibles
> +    nsIAtom *frameType = frame->GetType();

nit: type* name

@@ +1098,5 @@
>          // the table caption would still be created. By setting
>          // *aIsSubtreeHidden = true we ensure that no descendant accessibles
>          // are created.
> +        if (frame->GetType() == nsGkAtoms::tableCaptionFrame &&
> +           frame->GetRect().IsEmpty()) {

nit: wrong indent of second line
Attachment #666053 - Flags: review?(surkov.alexander) → review+
https://hg.mozilla.org/mozilla-central/rev/333a7d8241f0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.