Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Side by Side Diff: Source/core/layout/LayerClipper.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/Layer.cpp ('k') | Source/core/layout/LayerFilterInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 #include "config.h" 44 #include "config.h"
45 #include "core/layout/LayerClipper.h" 45 #include "core/layout/LayerClipper.h"
46 46
47 #include "core/frame/Settings.h" 47 #include "core/frame/Settings.h"
48 #include "core/layout/Layer.h" 48 #include "core/layout/Layer.h"
49 #include "core/rendering/RenderView.h" 49 #include "core/rendering/RenderView.h"
50 50
51 namespace blink { 51 namespace blink {
52 52
53 static void adjustClipRectsForChildren(const RenderObject& renderer, ClipRects& clipRects) 53 static void adjustClipRectsForChildren(const LayoutObject& renderer, ClipRects& clipRects)
54 { 54 {
55 EPosition position = renderer.style()->position(); 55 EPosition position = renderer.style()->position();
56 // A fixed object is essentially the root of its containing block hierarchy, so when 56 // A fixed object is essentially the root of its containing block hierarchy, so when
57 // we encounter such an object, we reset our clip rects to the fixedClipRect . 57 // we encounter such an object, we reset our clip rects to the fixedClipRect .
58 if (position == FixedPosition) { 58 if (position == FixedPosition) {
59 clipRects.setPosClipRect(clipRects.fixedClipRect()); 59 clipRects.setPosClipRect(clipRects.fixedClipRect());
60 clipRects.setOverflowClipRect(clipRects.fixedClipRect()); 60 clipRects.setOverflowClipRect(clipRects.fixedClipRect());
61 clipRects.setFixed(true); 61 clipRects.setFixed(true);
62 } else if (position == RelativePosition) { 62 } else if (position == RelativePosition) {
63 clipRects.setPosClipRect(clipRects.overflowClipRect()); 63 clipRects.setPosClipRect(clipRects.overflowClipRect());
64 } else if (position == AbsolutePosition) { 64 } else if (position == AbsolutePosition) {
65 clipRects.setOverflowClipRect(clipRects.posClipRect()); 65 clipRects.setOverflowClipRect(clipRects.posClipRect());
66 } 66 }
67 } 67 }
68 68
69 static void applyClipRects(const ClipRectsContext& context, RenderObject& render er, LayoutPoint offset, ClipRects& clipRects) 69 static void applyClipRects(const ClipRectsContext& context, LayoutObject& render er, LayoutPoint offset, ClipRects& clipRects)
70 { 70 {
71 ASSERT(renderer.hasOverflowClip() || renderer.hasClip()); 71 ASSERT(renderer.hasOverflowClip() || renderer.hasClip());
72 72
73 RenderView* view = renderer.view(); 73 RenderView* view = renderer.view();
74 ASSERT(view); 74 ASSERT(view);
75 if (clipRects.fixed() && context.rootLayer->renderer() == view) 75 if (clipRects.fixed() && context.rootLayer->renderer() == view)
76 offset -= view->frameView()->scrollOffsetForViewportConstrainedObjects() ; 76 offset -= view->frameView()->scrollOffsetForViewportConstrainedObjects() ;
77 77
78 if (renderer.hasOverflowClip()) { 78 if (renderer.hasOverflowClip()) {
79 ClipRect newOverflowClip = toRenderBox(renderer).overflowClipRect(offset , context.scrollbarRelevancy); 79 ClipRect newOverflowClip = toRenderBox(renderer).overflowClipRect(offset , context.scrollbarRelevancy);
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 ASSERT(current); 365 ASSERT(current);
366 if (current->transform() || current->isPaintInvalidationContainer()) 366 if (current->transform() || current->isPaintInvalidationContainer())
367 return const_cast<Layer*>(current); 367 return const_cast<Layer*>(current);
368 } 368 }
369 369
370 ASSERT_NOT_REACHED(); 370 ASSERT_NOT_REACHED();
371 return 0; 371 return 0;
372 } 372 }
373 373
374 } // namespace blink 374 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/Layer.cpp ('k') | Source/core/layout/LayerFilterInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698