[Mac] Don't paint linen pattern when contents size is not available.

This was causing auto-complete popup windows to have their contents always overpainted by the linen texture, since contents_size was empty for them.

BUG=92645
TEST=see bug

Review URL: http://codereview.chromium.org/7640018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96594 0039d316-1c4b-4281-b951-d872f2087c98
parent 30975ed3
...@@ -1640,6 +1640,11 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) { ...@@ -1640,6 +1640,11 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
if (![NSColor respondsToSelector:@selector(_linenPatternImage)]) if (![NSColor respondsToSelector:@selector(_linenPatternImage)])
return; return;
// Don't paint over-scroll areas if |contents_size| is empty, which indicates
// that the render widget is not a RenderView.
if (renderWidgetHostView_->render_widget_host_->contents_size().IsEmpty())
return;
NSRect visibleContentRect = [self computeVisibleContentRect]; NSRect visibleContentRect = [self computeVisibleContentRect];
NSSize frameSize = [self frame].size; NSSize frameSize = [self frame].size;
bool hasHorizontalOverflow = (NSWidth(visibleContentRect) < frameSize.width); bool hasHorizontalOverflow = (NSWidth(visibleContentRect) < frameSize.width);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment