| Index: Source/core/rendering/RenderImage.cpp
|
| diff --git a/Source/core/rendering/RenderImage.cpp b/Source/core/rendering/RenderImage.cpp
|
| index 81799184d4c68016008e3c5cc3e5ffe7b919a00f..10736959f84e0c0c84c25f74bb3253a3186265cd 100644
|
| --- a/Source/core/rendering/RenderImage.cpp
|
| +++ b/Source/core/rendering/RenderImage.cpp
|
| @@ -282,17 +282,17 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf
|
| LayoutUnit leftPad = paddingLeft();
|
| LayoutUnit topPad = paddingTop();
|
|
|
| - GraphicsContext* context = paintInfo.context;
|
| + GraphicsContext* context = paintInfo.getContext();
|
|
|
| Page* page = 0;
|
| if (Frame* frame = this->frame())
|
| page = frame->page();
|
|
|
| if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) {
|
| - if (paintInfo.phase == PaintPhaseSelection)
|
| + if (paintInfo.getPhase() == PaintPhaseSelection)
|
| return;
|
|
|
| - if (page && paintInfo.phase == PaintPhaseForeground)
|
| + if (page && paintInfo.getPhase() == PaintPhaseForeground)
|
| page->addRelevantUnpaintedObject(this, visualOverflowRect());
|
|
|
| if (cWidth > 2 && cHeight > 2) {
|
| @@ -358,7 +358,7 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf
|
| } else if (m_imageResource->hasImage() && cWidth > 0 && cHeight > 0) {
|
| RefPtr<Image> img = m_imageResource->image(cWidth, cHeight);
|
| if (!img || img->isNull()) {
|
| - if (page && paintInfo.phase == PaintPhaseForeground)
|
| + if (page && paintInfo.getPhase() == PaintPhaseForeground)
|
| page->addRelevantUnpaintedObject(this, visualOverflowRect());
|
| return;
|
| }
|
| @@ -368,7 +368,7 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf
|
| contentLocation.move(leftBorder + leftPad, topBorder + topPad);
|
| paintIntoRect(context, LayoutRect(contentLocation, contentSize));
|
|
|
| - if (cachedImage() && page && paintInfo.phase == PaintPhaseForeground) {
|
| + if (cachedImage() && page && paintInfo.getPhase() == PaintPhaseForeground) {
|
| // For now, count images as unpainted if they are still progressively loading. We may want
|
| // to refine this in the future to account for the portion of the image that has painted.
|
| if (cachedImage()->isLoading())
|
| @@ -383,7 +383,7 @@ void RenderImage::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
|
| {
|
| RenderReplaced::paint(paintInfo, paintOffset);
|
|
|
| - if (paintInfo.phase == PaintPhaseOutline)
|
| + if (paintInfo.getPhase() == PaintPhaseOutline)
|
| paintAreaElementFocusRing(paintInfo);
|
| }
|
|
|
| @@ -394,7 +394,7 @@ void RenderImage::paintAreaElementFocusRing(PaintInfo& paintInfo)
|
| if (document->printing() || !document->frame()->selection()->isFocusedAndActive())
|
| return;
|
|
|
| - if (paintInfo.context->paintingDisabled() && !paintInfo.context->updatingControlTints())
|
| + if (paintInfo.getContext()->paintingDisabled() && !paintInfo.getContext()->updatingControlTints())
|
| return;
|
|
|
| Element* focusedElement = document->focusedElement();
|
| @@ -419,9 +419,9 @@ void RenderImage::paintAreaElementFocusRing(PaintInfo& paintInfo)
|
|
|
| // FIXME: Clip path instead of context when Skia pathops is ready.
|
| // https://crbug.com/251206
|
| - GraphicsContextStateSaver savedContext(*paintInfo.context);
|
| - paintInfo.context->clip(absoluteContentBox());
|
| - paintInfo.context->drawFocusRing(path, outlineWidth,
|
| + GraphicsContextStateSaver savedContext(*(paintInfo.getContext()));
|
| + paintInfo.getContext()->clip(absoluteContentBox());
|
| + paintInfo.getContext()->drawFocusRing(path, outlineWidth,
|
| areaElementStyle->outlineOffset(),
|
| resolveColor(areaElementStyle, CSSPropertyOutlineColor));
|
| }
|
|
|