Closed Bug 1207931 Opened 4 years ago Closed 4 years ago

RenderFrameParent::mBackgroundColor is unused

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: njn, Assigned: njn)

References

Details

Attachments

(1 file, 1 obsolete file)

RenderFrameParent::mBackgroundColor can be set via SetBackgroundColor(), but
the value is never read. So that means TabParent::RecvSetBackgroundColor() is a
no-op.

billm, is this expected? It seems weird to me. Though maybe this message
doesn't matter and can be excised on both the child and the parent sides.
Patch demonstrating the situation.
Attachment #8665264 - Flags: feedback?(wmccloskey)
That's really more of a layout question than an IPC one.
Component: IPC → Layout
It looks like the use of the variable was added in bug 694706 and removed in bug 1056427. Just a bit of dead code that was missed. So I think it is okay to remove the message.
Attachment #8665264 - Flags: feedback?(wmccloskey)
Yeah, I think we can get rid of this entirely.
This seems to work.
Attachment #8665743 - Flags: review?(matt.woodrow)
Attachment #8665264 - Attachment is obsolete: true
Comment on attachment 8665743 [details] [diff] [review]
Remove no-longer-needed SetBackgroundColor IPC message

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

::: layout/base/nsPresShell.cpp
@@ -5292,5 @@
>    // color we actually draw.
>    if (!FrameConstructor()->GetRootElementFrame()) {
>      mCanvasBackgroundColor = GetDefaultBackgroundColorToDraw();
>    }
> -  if (XRE_IsContentProcess() && mPresContext->IsRoot()) {

Nice. This is the code that was fixed in bug 1199534 because it was spamming messages constantly. Turns out it wasn't needed at all!
Attachment #8665743 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/22e54267e6c9
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.