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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 #include "core/frame/FrameView.h" | 33 #include "core/frame/FrameView.h" |
| 34 #include "core/frame/LocalFrame.h" | 34 #include "core/frame/LocalFrame.h" |
| 35 #include "core/frame/PinchViewport.h" | 35 #include "core/frame/PinchViewport.h" |
| 36 #include "core/frame/Settings.h" | 36 #include "core/frame/Settings.h" |
| 37 #include "core/html/HTMLElement.h" | 37 #include "core/html/HTMLElement.h" |
| 38 #include "core/html/HTMLFrameElementBase.h" | 38 #include "core/html/HTMLFrameElementBase.h" |
| 39 #include "core/html/HTMLFrameOwnerElement.h" | 39 #include "core/html/HTMLFrameOwnerElement.h" |
| 40 #include "core/page/AutoscrollController.h" | 40 #include "core/page/AutoscrollController.h" |
| 41 #include "core/page/EventHandler.h" | 41 #include "core/page/EventHandler.h" |
| 42 #include "core/page/Page.h" | 42 #include "core/page/Page.h" |
| 43 #include "core/paint/BackgroundImageGeometry.h" | |
| 43 #include "core/paint/BoxPainter.h" | 44 #include "core/paint/BoxPainter.h" |
| 44 #include "core/rendering/HitTestResult.h" | 45 #include "core/rendering/HitTestResult.h" |
| 45 #include "core/rendering/PaintInfo.h" | 46 #include "core/rendering/PaintInfo.h" |
| 46 #include "core/rendering/RenderDeprecatedFlexibleBox.h" | 47 #include "core/rendering/RenderDeprecatedFlexibleBox.h" |
| 47 #include "core/rendering/RenderFlexibleBox.h" | 48 #include "core/rendering/RenderFlexibleBox.h" |
| 48 #include "core/rendering/RenderGeometryMap.h" | 49 #include "core/rendering/RenderGeometryMap.h" |
| 49 #include "core/rendering/RenderGrid.h" | 50 #include "core/rendering/RenderGrid.h" |
| 50 #include "core/rendering/RenderInline.h" | 51 #include "core/rendering/RenderInline.h" |
| 51 #include "core/rendering/RenderLayer.h" | 52 #include "core/rendering/RenderLayer.h" |
| 52 #include "core/rendering/RenderListBox.h" | 53 #include "core/rendering/RenderListBox.h" |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1080 BoxPainter(*this).paint(paintInfo, paintOffset); | 1081 BoxPainter(*this).paint(paintInfo, paintOffset); |
| 1081 } | 1082 } |
| 1082 | 1083 |
| 1083 | 1084 |
| 1084 void RenderBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutP oint& paintOffset) | 1085 void RenderBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutP oint& paintOffset) |
| 1085 { | 1086 { |
| 1086 BoxPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); | 1087 BoxPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); |
| 1087 } | 1088 } |
| 1088 | 1089 |
| 1089 | 1090 |
| 1090 bool RenderBox::getBackgroundPaintedExtent(LayoutRect& paintedExtent) const | 1091 bool RenderBox::getBackgroundPaintedExtent(LayoutRect& paintedExtent) |
| 1091 { | 1092 { |
| 1092 ASSERT(hasBackground()); | 1093 ASSERT(hasBackground()); |
| 1093 LayoutRect backgroundRect = pixelSnappedIntRect(borderBoxRect()); | 1094 LayoutRect backgroundRect = pixelSnappedIntRect(borderBoxRect()); |
| 1094 | 1095 |
| 1095 Color backgroundColor = resolveColor(CSSPropertyBackgroundColor); | 1096 Color backgroundColor = resolveColor(CSSPropertyBackgroundColor); |
| 1096 if (backgroundColor.alpha()) { | 1097 if (backgroundColor.alpha()) { |
| 1097 paintedExtent = backgroundRect; | 1098 paintedExtent = backgroundRect; |
| 1098 return true; | 1099 return true; |
| 1099 } | 1100 } |
| 1100 | 1101 |
| 1101 if (!style()->backgroundLayers().image() || style()->backgroundLayers().next ()) { | 1102 if (!style()->backgroundLayers().image() || style()->backgroundLayers().next ()) { |
| 1102 paintedExtent = backgroundRect; | 1103 paintedExtent = backgroundRect; |
| 1103 return true; | 1104 return true; |
| 1104 } | 1105 } |
| 1105 | 1106 |
| 1106 BackgroundImageGeometry geometry; | 1107 BackgroundImageGeometry geometry; |
| 1107 calculateBackgroundImageGeometry(0, style()->backgroundLayers(), backgroundR ect, geometry); | 1108 BoxPainter(*this).calculateBackgroundImageGeometry(0, style()->backgroundLay ers(), backgroundRect, geometry); |
|
pdr.
2014/09/11 05:59:13
I only saw that this changed after BoxPainter land
chrishtr
2014/09/11 17:45:53
Ack.
| |
| 1108 if (geometry.hasNonLocalGeometry()) | 1109 if (geometry.hasNonLocalGeometry()) |
| 1109 return false; | 1110 return false; |
| 1110 paintedExtent = geometry.destRect(); | 1111 paintedExtent = geometry.destRect(); |
| 1111 return true; | 1112 return true; |
| 1112 } | 1113 } |
| 1113 | 1114 |
| 1114 bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c onst | 1115 bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c onst |
| 1115 { | 1116 { |
| 1116 if (isBody() && skipBodyBackground(this)) | 1117 if (isBody() && skipBodyBackground(this)) |
| 1117 return false; | 1118 return false; |
| (...skipping 3402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4520 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); | 4521 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); |
| 4521 | 4522 |
| 4522 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) | 4523 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) |
| 4523 return m_rareData->m_previousBorderBoxSize; | 4524 return m_rareData->m_previousBorderBoxSize; |
| 4524 | 4525 |
| 4525 // We didn't save the old border box size because it was the same as the siz e of oldBounds. | 4526 // We didn't save the old border box size because it was the same as the siz e of oldBounds. |
| 4526 return previousBoundsSize; | 4527 return previousBoundsSize; |
| 4527 } | 4528 } |
| 4528 | 4529 |
| 4529 } // namespace blink | 4530 } // namespace blink |
| OLD | NEW |