OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 backgroundRect.move(roundedIntSize(context.subPixelAccumulation)); | 220 backgroundRect.move(roundedIntSize(context.subPixelAccumulation)); |
221 backgroundRect.intersect(paintDirtyRect); | 221 backgroundRect.intersect(paintDirtyRect); |
222 } else { | 222 } else { |
223 backgroundRect = paintDirtyRect; | 223 backgroundRect = paintDirtyRect; |
224 } | 224 } |
225 | 225 |
226 foregroundRect = backgroundRect; | 226 foregroundRect = backgroundRect; |
227 outlineRect = backgroundRect; | 227 outlineRect = backgroundRect; |
228 | 228 |
229 LayoutPoint offset; | 229 LayoutPoint offset; |
230 if (offsetFromRoot) | 230 if (offsetFromRoot) { |
231 offset = *offsetFromRoot; | 231 offset = *offsetFromRoot; |
232 else | 232 foregroundRect.move(context.subPixelAccumulation); |
pdr.
2015/08/07 23:20:31
Why don't we need to move backgroundRect too?
qiankun
2015/08/13 10:36:03
Thanks for review. backgroundRect also needs to mo
| |
233 outlineRect.move(context.subPixelAccumulation); | |
234 } else { | |
233 m_layoutObject.layer()->convertToLayerCoords(context.rootLayer, offset); | 235 m_layoutObject.layer()->convertToLayerCoords(context.rootLayer, offset); |
236 } | |
234 layerBounds = LayoutRect(offset, LayoutSize(m_layoutObject.layer()->size())) ; | 237 layerBounds = LayoutRect(offset, LayoutSize(m_layoutObject.layer()->size())) ; |
235 | 238 |
236 // Update the clip rects that will be passed to child layers. | 239 // Update the clip rects that will be passed to child layers. |
237 if (m_layoutObject.hasOverflowClip()) { | 240 if (m_layoutObject.hasOverflowClip()) { |
238 // This layer establishes a clip of some kind. | 241 // This layer establishes a clip of some kind. |
239 if (shouldRespectOverflowClip(context)) { | 242 if (shouldRespectOverflowClip(context)) { |
240 foregroundRect.intersect(toLayoutBox(m_layoutObject).overflowClipRec t(offset, context.scrollbarRelevancy)); | 243 foregroundRect.intersect(toLayoutBox(m_layoutObject).overflowClipRec t(offset, context.scrollbarRelevancy)); |
241 if (m_layoutObject.style()->hasBorderRadius()) | 244 if (m_layoutObject.style()->hasBorderRadius()) |
242 foregroundRect.setHasRadius(true); | 245 foregroundRect.setHasRadius(true); |
243 } | 246 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 if (context.respectOverflowClip == IgnoreOverflowClip) | 386 if (context.respectOverflowClip == IgnoreOverflowClip) |
384 return false; | 387 return false; |
385 | 388 |
386 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore OverflowClip) | 389 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore OverflowClip) |
387 return false; | 390 return false; |
388 | 391 |
389 return true; | 392 return true; |
390 } | 393 } |
391 | 394 |
392 } // namespace blink | 395 } // namespace blink |
OLD | NEW |