RenderFrameParent::mBackgroundColor is unused

RESOLVED FIXED in Firefox 44

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla44
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox44 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8665264 [details] [diff] [review]
RenderFrameParent::mBackgroundColor is unused

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.
(Assignee)

Comment 5

3 years ago
Created attachment 8665743 [details] [diff] [review]
Remove no-longer-needed SetBackgroundColor IPC message

This seems to work.
Attachment #8665743 - Flags: review?(matt.woodrow)
(Assignee)

Updated

3 years ago
Attachment #8665264 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Blocks: 1208300
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!
(Assignee)

Updated

3 years ago
Depends on: 1199534
Attachment #8665743 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/22e54267e6c9
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.