| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "sky/engine/config.h" | 44 #include "sky/engine/config.h" |
| 45 #include "sky/engine/core/rendering/RenderLayerClipper.h" | 45 #include "sky/engine/core/rendering/RenderLayerClipper.h" |
| 46 | 46 |
| 47 #include "sky/engine/core/rendering/RenderLayer.h" | 47 #include "sky/engine/core/rendering/RenderLayer.h" |
| 48 #include "sky/engine/core/rendering/RenderView.h" | 48 #include "sky/engine/core/rendering/RenderView.h" |
| 49 | 49 |
| 50 namespace blink { | 50 namespace blink { |
| 51 | 51 |
| 52 static void adjustClipRectsForChildren(const RenderObject& renderer, ClipRects&
clipRects) | 52 static void adjustClipRectsForChildren(const RenderObject& renderer, ClipRects&
clipRects) |
| 53 { | 53 { |
| 54 EPosition position = renderer.style()->position(); | 54 if (renderer.style()->position() == AbsolutePosition) { |
| 55 if (position == RelativePosition) { | |
| 56 clipRects.setPosClipRect(clipRects.overflowClipRect()); | |
| 57 } else if (position == AbsolutePosition) { | |
| 58 clipRects.setOverflowClipRect(clipRects.posClipRect()); | 55 clipRects.setOverflowClipRect(clipRects.posClipRect()); |
| 59 } | 56 } |
| 60 } | 57 } |
| 61 | 58 |
| 62 static void applyClipRects(const ClipRectsContext& context, RenderObject& render
er, LayoutPoint offset, ClipRects& clipRects) | 59 static void applyClipRects(const ClipRectsContext& context, RenderObject& render
er, LayoutPoint offset, ClipRects& clipRects) |
| 63 { | 60 { |
| 64 ASSERT(renderer.hasOverflowClip() || renderer.hasClip()); | 61 ASSERT(renderer.hasOverflowClip() || renderer.hasClip()); |
| 65 | 62 |
| 66 if (renderer.hasOverflowClip()) { | 63 if (renderer.hasOverflowClip()) { |
| 67 ClipRect newOverflowClip = toRenderBox(renderer).overflowClipRect(offset
); | 64 ClipRect newOverflowClip = toRenderBox(renderer).overflowClipRect(offset
); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 ASSERT(current); | 319 ASSERT(current); |
| 323 if (current->transform()) | 320 if (current->transform()) |
| 324 return const_cast<RenderLayer*>(current); | 321 return const_cast<RenderLayer*>(current); |
| 325 } | 322 } |
| 326 | 323 |
| 327 ASSERT_NOT_REACHED(); | 324 ASSERT_NOT_REACHED(); |
| 328 return 0; | 325 return 0; |
| 329 } | 326 } |
| 330 | 327 |
| 331 } // namespace blink | 328 } // namespace blink |
| OLD | NEW |