Changeset 65791 in webkit
- Timestamp:
- Aug 22, 2010 5:52:13 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r65788 r65791 1 2010-08-22 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] GraphicsContext: Simplify getting the clip bounding rect 6 https://bugs.webkit.org/show_bug.cgi?id=44396 7 8 Move the Qt 4.8 version check for QPainter::clipBoundingRect() 9 into a GraphicsContextPlatformPrivate method. 10 11 * platform/graphics/qt/GraphicsContextQt.cpp: 12 (WebCore::GraphicsContextPlatformPrivate::clipBoundingRect): 13 (WebCore::GraphicsContext::beginTransparencyLayer): 14 (WebCore::GraphicsContext::clipOut): 15 (WebCore::GraphicsContext::clipOutEllipseInRect): 16 1 17 2010-08-22 Juha Savolainen <juha.savolainen@weego.fi> 2 18 -
trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
r65782 r65791 208 208 { 209 209 return shadow.type != ContextShadow::NoShadow; 210 } 211 212 QRectF clipBoundingRect() const 213 { 214 #if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0) 215 return painter->clipBoundingRect(); 216 #else 217 return painter->clipRegion().boundingRect(); 218 #endif 210 219 } 211 220 … … 912 921 h = device->height(); 913 922 914 QRectF clip = p->clipPath().boundingRect();923 QRectF clip = m_data->clipBoundingRect(); 915 924 QRectF deviceClip = p->transform().mapRect(clip); 916 925 x = int(qBound(qreal(0), deviceClip.x(), (qreal)w)); … … 1075 1084 newClip.setFillRule(Qt::OddEvenFill); 1076 1085 if (p->hasClipping()) { 1077 #if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0) 1078 newClip.addRect(p->clipBoundingRect()); 1079 #else 1080 newClip.addRect(p->clipRegion().boundingRect()); 1081 #endif 1086 newClip.addRect(m_data->clipBoundingRect()); 1082 1087 newClip.addPath(clippedOut); 1083 1088 p->setClipPath(newClip, Qt::IntersectClip); … … 1149 1154 newClip.setFillRule(Qt::OddEvenFill); 1150 1155 if (p->hasClipping()) { 1151 #if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0) 1152 newClip.addRect(p->clipBoundingRect()); 1153 #else 1154 newClip.addRect(p->clipRegion().boundingRect()); 1155 #endif 1156 newClip.addRect(m_data->clipBoundingRect()); 1156 1157 newClip.addRect(QRect(rect)); 1157 1158 p->setClipPath(newClip, Qt::IntersectClip); … … 1175 1176 newClip.setFillRule(Qt::OddEvenFill); 1176 1177 if (p->hasClipping()) { 1177 #if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0) 1178 newClip.addRect(p->clipBoundingRect()); 1179 #else 1180 newClip.addRect(p->clipRegion().boundingRect()); 1181 #endif 1178 newClip.addRect(m_data->clipBoundingRect()); 1182 1179 newClip.addEllipse(QRect(rect)); 1183 1180 p->setClipPath(newClip, Qt::IntersectClip);
Note: See TracChangeset
for help on using the changeset viewer.