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

Unified Diff: Source/core/rendering/RenderThemeChromiumSkia.cpp

Issue 173433002: Do not crash if custom scrollbars have -webkit-appearane:searchfield-foo. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderThemeChromiumSkia.cpp
diff --git a/Source/core/rendering/RenderThemeChromiumSkia.cpp b/Source/core/rendering/RenderThemeChromiumSkia.cpp
index 26396e859b712454734e6b63e7d4c1359a437293..b08f1213abad3cad7e9ae7c63d96e4ba5c17a8a1 100644
--- a/Source/core/rendering/RenderThemeChromiumSkia.cpp
+++ b/Source/core/rendering/RenderThemeChromiumSkia.cpp
@@ -222,6 +222,8 @@ IntRect RenderThemeChromiumSkia::convertToPaintingRect(RenderObject* inputRender
bool RenderThemeChromiumSkia::paintSearchFieldCancelButton(RenderObject* cancelButtonObject, const PaintInfo& paintInfo, const IntRect& r)
{
// Get the renderer of <input> element.
+ if (!cancelButtonObject->node())
+ return false;
Node* input = cancelButtonObject->node()->shadowHost();
RenderObject* baseRenderer = input ? input->renderer() : cancelButtonObject;
if (!baseRenderer->isBox())
@@ -265,6 +267,8 @@ void RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle(RenderStyl
bool RenderThemeChromiumSkia::paintSearchFieldResultsDecoration(RenderObject* magnifierObject, const PaintInfo& paintInfo, const IntRect& r)
{
// Get the renderer of <input> element.
+ if (!magnifierObject->node())
+ return false;
Node* input = magnifierObject->node()->shadowHost();
RenderObject* baseRenderer = input ? input->renderer() : magnifierObject;
if (!baseRenderer->isBox())
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698