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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 BoxPainter(*this).paint(paintInfo, paintOffset); | 1082 BoxPainter(*this).paint(paintInfo, paintOffset); |
1082 } | 1083 } |
1083 | 1084 |
1084 | 1085 |
1085 void RenderBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutP
oint& paintOffset) | 1086 void RenderBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutP
oint& paintOffset) |
1086 { | 1087 { |
1087 BoxPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); | 1088 BoxPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); |
1088 } | 1089 } |
1089 | 1090 |
1090 | 1091 |
1091 bool RenderBox::getBackgroundPaintedExtent(LayoutRect& paintedExtent) const | 1092 bool RenderBox::getBackgroundPaintedExtent(LayoutRect& paintedExtent) |
1092 { | 1093 { |
1093 ASSERT(hasBackground()); | 1094 ASSERT(hasBackground()); |
1094 LayoutRect backgroundRect = pixelSnappedIntRect(borderBoxRect()); | 1095 LayoutRect backgroundRect = pixelSnappedIntRect(borderBoxRect()); |
1095 | 1096 |
1096 Color backgroundColor = resolveColor(CSSPropertyBackgroundColor); | 1097 Color backgroundColor = resolveColor(CSSPropertyBackgroundColor); |
1097 if (backgroundColor.alpha()) { | 1098 if (backgroundColor.alpha()) { |
1098 paintedExtent = backgroundRect; | 1099 paintedExtent = backgroundRect; |
1099 return true; | 1100 return true; |
1100 } | 1101 } |
1101 | 1102 |
1102 if (!style()->backgroundLayers().image() || style()->backgroundLayers().next
()) { | 1103 if (!style()->backgroundLayers().image() || style()->backgroundLayers().next
()) { |
1103 paintedExtent = backgroundRect; | 1104 paintedExtent = backgroundRect; |
1104 return true; | 1105 return true; |
1105 } | 1106 } |
1106 | 1107 |
1107 BackgroundImageGeometry geometry; | 1108 BackgroundImageGeometry geometry; |
1108 calculateBackgroundImageGeometry(0, style()->backgroundLayers(), backgroundR
ect, geometry); | 1109 BoxPainter::calculateBackgroundImageGeometry(*this, 0, style()->backgroundLa
yers(), backgroundRect, geometry); |
1109 if (geometry.hasNonLocalGeometry()) | 1110 if (geometry.hasNonLocalGeometry()) |
1110 return false; | 1111 return false; |
1111 paintedExtent = geometry.destRect(); | 1112 paintedExtent = geometry.destRect(); |
1112 return true; | 1113 return true; |
1113 } | 1114 } |
1114 | 1115 |
1115 bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c
onst | 1116 bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c
onst |
1116 { | 1117 { |
1117 if (isBody() && skipBodyBackground(this)) | 1118 if (isBody() && skipBodyBackground(this)) |
1118 return false; | 1119 return false; |
(...skipping 3402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4521 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); | 4522 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); |
4522 | 4523 |
4523 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) | 4524 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) |
4524 return m_rareData->m_previousBorderBoxSize; | 4525 return m_rareData->m_previousBorderBoxSize; |
4525 | 4526 |
4526 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. | 4527 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. |
4527 return previousBoundsSize; | 4528 return previousBoundsSize; |
4528 } | 4529 } |
4529 | 4530 |
4530 } // namespace blink | 4531 } // namespace blink |
OLD | NEW |