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

Side by Side Diff: Source/core/rendering/RenderIFrame.cpp

Issue 14871008: Remove RenderFrameBase. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/rendering/RenderIFrame.h ('k') | Source/core/rendering/RenderPart.h » ('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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 21 matching lines...) Expand all
32 #include "core/page/FrameView.h" 32 #include "core/page/FrameView.h"
33 #include "core/page/Page.h" 33 #include "core/page/Page.h"
34 #include "core/page/Settings.h" 34 #include "core/page/Settings.h"
35 #include "core/rendering/RenderView.h" 35 #include "core/rendering/RenderView.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 using namespace HTMLNames; 39 using namespace HTMLNames;
40 40
41 RenderIFrame::RenderIFrame(Element* element) 41 RenderIFrame::RenderIFrame(Element* element)
42 : RenderFrameBase(element) 42 : RenderPart(element)
43 { 43 {
44 } 44 }
45 45
46 bool RenderIFrame::shouldComputeSizeAsReplaced() const 46 bool RenderIFrame::shouldComputeSizeAsReplaced() const
47 { 47 {
48 // When we're seamless, we use normal block/box sizing code except when inli ne. 48 // When we're seamless, we use normal block/box sizing code except when inli ne.
49 return !isSeamless(); 49 return !isSeamless();
50 } 50 }
51 51
52 bool RenderIFrame::isInlineBlockOrInlineTable() const 52 bool RenderIFrame::isInlineBlockOrInlineTable() const
53 { 53 {
54 return isSeamless() && isInline(); 54 return isSeamless() && isInline();
55 } 55 }
56 56
57 LayoutUnit RenderIFrame::minPreferredLogicalWidth() const 57 LayoutUnit RenderIFrame::minPreferredLogicalWidth() const
58 { 58 {
59 if (!isSeamless()) 59 if (!isSeamless())
60 return RenderFrameBase::minPreferredLogicalWidth(); 60 return RenderPart::minPreferredLogicalWidth();
61 61
62 RenderView* childRoot = contentRootRenderer(); 62 RenderView* childRoot = contentRootRenderer();
63 if (!childRoot) 63 if (!childRoot)
64 return 0; 64 return 0;
65 65
66 return childRoot->minPreferredLogicalWidth() + borderAndPaddingLogicalWidth( ); 66 return childRoot->minPreferredLogicalWidth() + borderAndPaddingLogicalWidth( );
67 } 67 }
68 68
69 LayoutUnit RenderIFrame::maxPreferredLogicalWidth() const 69 LayoutUnit RenderIFrame::maxPreferredLogicalWidth() const
70 { 70 {
71 if (!isSeamless()) 71 if (!isSeamless())
72 return RenderFrameBase::maxPreferredLogicalWidth(); 72 return RenderPart::maxPreferredLogicalWidth();
73 73
74 RenderView* childRoot = contentRootRenderer(); 74 RenderView* childRoot = contentRootRenderer();
75 if (!childRoot) 75 if (!childRoot)
76 return 0; 76 return 0;
77 77
78 return childRoot->maxPreferredLogicalWidth() + borderAndPaddingLogicalWidth( ); 78 return childRoot->maxPreferredLogicalWidth() + borderAndPaddingLogicalWidth( );
79 } 79 }
80 80
81 bool RenderIFrame::isSeamless() const 81 bool RenderIFrame::isSeamless() const
82 { 82 {
83 return node() && node()->hasTagName(iframeTag) && static_cast<HTMLIFrameElem ent*>(node())->shouldDisplaySeamlessly(); 83 return node() && node()->hasTagName(iframeTag) && static_cast<HTMLIFrameElem ent*>(node())->shouldDisplaySeamlessly();
84 } 84 }
85 85
86 bool RenderIFrame::requiresLayer() const 86 bool RenderIFrame::requiresLayer() const
87 { 87 {
88 return RenderFrameBase::requiresLayer() || style()->resize() != RESIZE_NONE; 88 return RenderPart::requiresLayer() || style()->resize() != RESIZE_NONE;
89 } 89 }
90 90
91 RenderView* RenderIFrame::contentRootRenderer() const 91 RenderView* RenderIFrame::contentRootRenderer() const
92 { 92 {
93 // FIXME: Is this always a valid cast? What about plugins? 93 // FIXME: Is this always a valid cast? What about plugins?
94 ASSERT(!widget() || widget()->isFrameView()); 94 ASSERT(!widget() || widget()->isFrameView());
95 FrameView* childFrameView = toFrameView(widget()); 95 FrameView* childFrameView = toFrameView(widget());
96 return childFrameView ? childFrameView->frame()->contentRenderer() : 0; 96 return childFrameView ? childFrameView->frame()->contentRenderer() : 0;
97 } 97 }
98 98
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 m_overflow.clear(); 138 m_overflow.clear();
139 addVisualEffectOverflow(); 139 addVisualEffectOverflow();
140 updateLayerTransform(); 140 updateLayerTransform();
141 141
142 setNeedsLayout(false); 142 setNeedsLayout(false);
143 } 143 }
144 144
145 } 145 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderIFrame.h ('k') | Source/core/rendering/RenderPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698