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

Side by Side Diff: Source/core/rendering/RenderImage.cpp

Issue 47623002: Fix more warnings on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests. Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
10 * 10 *
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 { 296 {
297 LayoutUnit cWidth = contentWidth(); 297 LayoutUnit cWidth = contentWidth();
298 LayoutUnit cHeight = contentHeight(); 298 LayoutUnit cHeight = contentHeight();
299 LayoutUnit leftBorder = borderLeft(); 299 LayoutUnit leftBorder = borderLeft();
300 LayoutUnit topBorder = borderTop(); 300 LayoutUnit topBorder = borderTop();
301 LayoutUnit leftPad = paddingLeft(); 301 LayoutUnit leftPad = paddingLeft();
302 LayoutUnit topPad = paddingTop(); 302 LayoutUnit topPad = paddingTop();
303 303
304 GraphicsContext* context = paintInfo.context; 304 GraphicsContext* context = paintInfo.context;
305 305
306 Page* page = 0;
307 if (Frame* frame = this->frame())
308 page = frame->page();
309
310 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) { 306 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) {
311 if (paintInfo.phase == PaintPhaseSelection) 307 if (paintInfo.phase == PaintPhaseSelection)
312 return; 308 return;
313 309
314 if (cWidth > 2 && cHeight > 2) { 310 if (cWidth > 2 && cHeight > 2) {
315 const int borderWidth = 1; 311 const int borderWidth = 1;
316 312
317 // Draw an outline rect where the image should be. 313 // Draw an outline rect where the image should be.
318 context->setStrokeStyle(SolidStroke); 314 context->setStrokeStyle(SolidStroke);
319 context->setStrokeColor(Color::lightGray); 315 context->setStrokeColor(Color::lightGray);
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 return 0; 600 return 0;
605 601
606 ImageResource* cachedImage = m_imageResource->cachedImage(); 602 ImageResource* cachedImage = m_imageResource->cachedImage();
607 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 603 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
608 return toSVGImage(cachedImage->image())->embeddedContentBox(); 604 return toSVGImage(cachedImage->image())->embeddedContentBox();
609 605
610 return 0; 606 return 0;
611 } 607 }
612 608
613 } // namespace WebCore 609 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698