Closed
Bug 378171
Opened 18 years ago
Closed 18 years ago
Offscreen should always be true for hidden elements
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
References
Details
(Keywords: access)
Attachments
(2 files, 1 obsolete file)
|
2.88 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
|
2.91 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
It is not sensible to try to calculate offscreen for hidden elements.
In fact, the ATK code already explicitly sets it.
We should do that in cross-platform code.
In fact this is causing the recursion in bug 377936.
| Assignee | ||
Comment 1•18 years ago
|
||
Attachment #262245 -
Flags: review?(surkov.alexander)
Comment 2•18 years ago
|
||
Comment on attachment 262245 [details] [diff] [review]
Fix IsVisible()
looks ok
Attachment #262245 -
Flags: review?(surkov.alexander) → review+
| Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 4•18 years ago
|
||
Aaron, it looks patch isn't correct totally.
Now we can have invisible=true and offscreen=false (because initial value of offscreen is false) and it means atk will have visible=false and showing=true, that is not correct.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 5•18 years ago
|
||
Attachment #262276 -
Flags: review?(surkov.alexander)
Comment 6•18 years ago
|
||
Comment on attachment 262276 [details] [diff] [review]
How does this look?
>+ if (rectVisibility == nsRectVisibility_kZeroAreaRect || !mDOMNode) {
>+ *aIsOffscreen = PR_TRUE; // Offscreen always set to true for hidden elements
You don't need to do *aIsOffscreen = PR_TRUE
>+ return PR_FALSE;
>+ }
>+
>+ // Currently one of:
>+ // nsRectVisibility_kVisible,
>+ // nsRectVisibility_kAboveViewport,
>+ // nsRectVisibility_kBelowViewport,
>+ // nsRectVisibility_kLeftOfViewport,
>+ // nsRectVisibility_kRightOfViewport
>+ // This view says it is visible, but we need to check the parent view chain :(
>+ nsCOMPtr<nsIDOMDocument> domDoc;
>+ mDOMNode->GetOwnerDocument(getter_AddRefs(domDoc));
>+ NS_ENSURE_TRUE(domDoc, NS_ERROR_FAILURE);
I would prefer to return PR_TRUE/PR_FALSE explicetly.
>
>- nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
>- NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
>+ nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
>+ NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
here too
| Assignee | ||
Comment 7•18 years ago
|
||
Attachment #262276 -
Attachment is obsolete: true
Attachment #262495 -
Flags: review?(surkov.alexander)
Attachment #262276 -
Flags: review?(surkov.alexander)
Updated•18 years ago
|
Attachment #262495 -
Flags: review?(surkov.alexander) → review+
| Assignee | ||
Updated•18 years ago
|
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•