Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 19 matching lines...) Expand all Loading... | |
| 30 | 30 |
| 31 #include "HTMLNames.h" | 31 #include "HTMLNames.h" |
| 32 #include "core/editing/FrameSelection.h" | 32 #include "core/editing/FrameSelection.h" |
| 33 #include "core/fetch/ImageResource.h" | 33 #include "core/fetch/ImageResource.h" |
| 34 #include "core/html/HTMLAreaElement.h" | 34 #include "core/html/HTMLAreaElement.h" |
| 35 #include "core/html/HTMLImageElement.h" | 35 #include "core/html/HTMLImageElement.h" |
| 36 #include "core/html/HTMLInputElement.h" | 36 #include "core/html/HTMLInputElement.h" |
| 37 #include "core/html/HTMLMapElement.h" | 37 #include "core/html/HTMLMapElement.h" |
| 38 #include "core/inspector/InspectorInstrumentation.h" | 38 #include "core/inspector/InspectorInstrumentation.h" |
| 39 #include "core/frame/Frame.h" | 39 #include "core/frame/Frame.h" |
| 40 #include "core/page/Page.h" | 40 #include "core/page/Page.h" |
|
Nico
2013/10/29 15:51:30
Can this include go now too?
lgombos
2013/10/29 17:33:16
Yes, good catch.
| |
| 41 #include "core/platform/graphics/Font.h" | 41 #include "core/platform/graphics/Font.h" |
| 42 #include "core/platform/graphics/FontCache.h" | 42 #include "core/platform/graphics/FontCache.h" |
| 43 #include "core/platform/graphics/GraphicsContext.h" | 43 #include "core/platform/graphics/GraphicsContext.h" |
| 44 #include "core/platform/graphics/GraphicsContextStateSaver.h" | 44 #include "core/platform/graphics/GraphicsContextStateSaver.h" |
| 45 #include "core/rendering/HitTestResult.h" | 45 #include "core/rendering/HitTestResult.h" |
| 46 #include "core/rendering/PaintInfo.h" | 46 #include "core/rendering/PaintInfo.h" |
| 47 #include "core/rendering/RenderView.h" | 47 #include "core/rendering/RenderView.h" |
| 48 #include "core/svg/graphics/SVGImage.h" | 48 #include "core/svg/graphics/SVGImage.h" |
| 49 #include "wtf/UnusedParam.h" | 49 #include "wtf/UnusedParam.h" |
| 50 | 50 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |