Last Comment Bug 658785 - Text in plugins (PDF and JAVA) is transparent, showing content behind the browser window, if a sidebar is displayed in Aero glass
: Text in plugins (PDF and JAVA) is transparent, showing content behind the bro...
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: ---
Assigned To: Jim Mathies [:jimm]
:
Mentors:
: 658940 (view as bug list)
Depends on:
Blocks: 633282
  Show dependency treegraph
 
Reported: 2011-05-21 07:40 PDT by Rakshith
Modified: 2011-05-23 06:09 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
See the rendered color of text when opened bookmark sidebar. (240.07 KB, image/png)
2011-05-21 07:43 PDT, Rakshith
no flags Details
bookmarks + pdf (21.09 KB, image/png)
2011-05-22 04:18 PDT, Jim Mathies [:jimm]
no flags Details
fix (2.11 KB, patch)
2011-05-22 09:41 PDT, Jim Mathies [:jimm]
no flags Details | Diff | Review
fix (1.03 KB, patch)
2011-05-22 09:43 PDT, Jim Mathies [:jimm]
no flags Details | Diff | Review
fix (1010 bytes, patch)
2011-05-23 04:39 PDT, Jim Mathies [:jimm]
roc: review+
Details | Diff | Review

Description Rakshith 2011-05-21 07:40:13 PDT
User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:6.0a1) Gecko/20110521 Firefox/6.0a1
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:6.0a1) Gecko/20110521 Firefox/6.0a1

This Flaw occurs when Using the shortcut ctrl+B to open bookmark sidebar hence causing the pdf file to adjust size to fit in the space which as a result causes the text to become transparent. Its Lasting affect varies.

Reproducible: Always

Steps to Reproduce:
1.Open a PDF document in Firefox
2.open bookmark sidebar In the (PDF) opened Page using the shortcut. But since shortcuts dont work in pdf document as per bug here https://bugzilla.mozilla.org/show_bug.cgi?id=78414   ,Click on the location bar and use ctrl+B to open bookmark sidebar
3.Notice the Text color change in the pdf file.

Actual Results:  
The PDF Text Color changes and takes the desktop background color as a replacement. (This only could happen in windows 7/vista as it has aero enabled)

Expected Results:  
text color must not change.

Lasting affect varies though
Comment 1 Rakshith 2011-05-21 07:43:39 PDT
Created attachment 534231 [details]
See the rendered color of text when opened bookmark sidebar.
Comment 2 Bill Gianopoulos [:WG9s] 2011-05-21 11:33:10 PDT
Confirming.  This also happens with the JAVA plug-in.  This is a recent regression, I believe from the fix for bug 633282.  I am doing a bisect now to confirm.
Comment 3 Bill Gianopoulos [:WG9s] 2011-05-21 12:38:25 PDT
Changing the Summary again.  It seems that although the JAVA case I had was only reproducible with a maximized window, for PDF files I see this for non-maximized windows as well.
Comment 4 Bill Gianopoulos [:WG9s] 2011-05-21 20:30:36 PDT
HG bisect said:

Due to skipped revisions, the first bad revision could be any of:
changeset:   69172:b9f2ad2a6954
user:        Jim Mathies <jmathies@mozilla.com>
date:        Fri May 13 11:40:46 2011 -0500
summary:     Bug 633282 - Accumulate exclude glass regions during painting and u
pdate the widget opaque region info. r=roc.

changeset:   69173:7cad85d7872b
user:        Jim Mathies <jmathies@mozilla.com>
date:        Fri May 13 11:40:46 2011 -0500
summary:     Bug 633282 - Change up widget's UpdateTransparentRegion to UpdateOp
aqueRegion. r=roc.
Comment 5 Jim Mathies [:jimm] 2011-05-22 04:18:07 PDT
Created attachment 534288 [details]
bookmarks + pdf

Odd, the area matches that of the width of the sidebar.
Comment 6 Jim Mathies [:jimm] 2011-05-22 09:41:53 PDT
Created attachment 534306 [details] [diff] [review]
fix

mRect has the offset from the parent, so I'm adding that in twice. What I wanted was the size from mRect positioned according to the offset from the root frame. This is a bit fugly but it fixes the bug.
Comment 7 Jim Mathies [:jimm] 2011-05-22 09:43:14 PDT
Created attachment 534307 [details] [diff] [review]
fix

- without the debug printfs.
Comment 8 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-05-22 15:22:08 PDT
Comment on attachment 534307 [details] [diff] [review]
fix

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

::: layout/xul/base/src/nsBoxFrame.cpp
@@ -1303,5 @@
>    // in calculating glass margins on Windows.
>    if (GetContent()->IsXUL()) {
>        const nsStyleDisplay* styles = mStyleContext->GetStyleDisplay();
>        if (styles && styles->mAppearance == NS_THEME_WIN_EXCLUDE_GLASS) {
> -        nsRect rect = mRect + aBuilder->ToReferenceFrame(this);

Just make it mRect + aBuilderToReferenceFrame(GetParent())?
Comment 9 Jim Mathies [:jimm] 2011-05-22 17:13:07 PDT
(In reply to comment #8)
> Comment on attachment 534307 [details] [diff] [review] [review]
> fix
> 
> Review of attachment 534307 [details] [diff] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: layout/xul/base/src/nsBoxFrame.cpp
> @@ -1303,5 @@
> >    // in calculating glass margins on Windows.
> >    if (GetContent()->IsXUL()) {
> >        const nsStyleDisplay* styles = mStyleContext->GetStyleDisplay();
> >        if (styles && styles->mAppearance == NS_THEME_WIN_EXCLUDE_GLASS) {
> > -        nsRect rect = mRect + aBuilder->ToReferenceFrame(this);
> 
> Just make it mRect + aBuilderToReferenceFrame(GetParent())?

Ok, I actually thought of that one, but was wondering if ToReferenceFrame was guaranteed to always returned the top level root frame. I'm assuming it does based on your feedback.
Comment 10 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-05-22 18:12:31 PDT
It does when we're painting the window.
Comment 11 Alice0775 White 2011-05-23 00:08:50 PDT
*** Bug 658940 has been marked as a duplicate of this bug. ***
Comment 12 Jim Mathies [:jimm] 2011-05-23 04:39:37 PDT
Created attachment 534396 [details] [diff] [review]
fix
Comment 13 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-05-23 04:44:38 PDT
Comment on attachment 534396 [details] [diff] [review]
fix

Review of attachment 534396 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 14 Bill Gianopoulos [:WG9s] 2011-05-23 06:03:46 PDT
Can we get this checked in today so it makes it in time for the merge to Aurora?
Comment 15 Jim Mathies [:jimm] 2011-05-23 06:09:28 PDT
http://hg.mozilla.org/mozilla-central/rev/d04cae0f5d22

Note You need to log in before you can comment on or make changes to this bug.