Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp

Issue 15820002: Page::chrome() should return a reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 WebViewImpl* AutofillPopupMenuClient::getWebView() const 332 WebViewImpl* AutofillPopupMenuClient::getWebView() const
333 { 333 {
334 Frame* frame = m_textField->document()->frame(); 334 Frame* frame = m_textField->document()->frame();
335 if (!frame) 335 if (!frame)
336 return 0; 336 return 0;
337 337
338 Page* page = frame->page(); 338 Page* page = frame->page();
339 if (!page) 339 if (!page)
340 return 0; 340 return 0;
341 341
342 return static_cast<WebViewImpl*>(page->chrome()->client()->webView()); 342 return static_cast<WebViewImpl*>(page->chrome().client()->webView());
343 } 343 }
344 344
345 RenderStyle* AutofillPopupMenuClient::textFieldStyle() const 345 RenderStyle* AutofillPopupMenuClient::textFieldStyle() const
346 { 346 {
347 RenderStyle* style = m_textField->computedStyle(); 347 RenderStyle* style = m_textField->computedStyle();
348 if (!style) { 348 if (!style) {
349 // It seems we can only have a 0 style in a TextField if the 349 // It seems we can only have a 0 style in a TextField if the
350 // node is detached, in which case we the popup should not be 350 // node is detached, in which case we the popup should not be
351 // showing. Please report this in http://crbug.com/7708 and 351 // showing. Please report this in http://crbug.com/7708 and
352 // include the page you were visiting. 352 // include the page you were visiting.
353 ASSERT_NOT_REACHED(); 353 ASSERT_NOT_REACHED();
354 } 354 }
355 return style; 355 return style;
356 } 356 }
357 357
358 } // namespace WebKit 358 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698