OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 DEFINE_TRACE(FrameHost) { | 166 DEFINE_TRACE(FrameHost) { |
167 visitor->trace(m_page); | 167 visitor->trace(m_page); |
168 visitor->trace(m_browserControls); | 168 visitor->trace(m_browserControls); |
169 visitor->trace(m_visualViewport); | 169 visitor->trace(m_visualViewport); |
170 visitor->trace(m_overscrollController); | 170 visitor->trace(m_overscrollController); |
171 visitor->trace(m_eventHandlerRegistry); | 171 visitor->trace(m_eventHandlerRegistry); |
172 visitor->trace(m_consoleMessageStorage); | 172 visitor->trace(m_consoleMessageStorage); |
173 visitor->trace(m_globalRootScrollerController); | 173 visitor->trace(m_globalRootScrollerController); |
174 } | 174 } |
175 | 175 |
176 #if ENABLE(ASSERT) | 176 #if DCHECK_IS_ON() |
177 void checkFrameCountConsistency(int expectedFrameCount, Frame* frame) { | 177 void checkFrameCountConsistency(int expectedFrameCount, Frame* frame) { |
178 ASSERT(expectedFrameCount >= 0); | 178 ASSERT(expectedFrameCount >= 0); |
179 | 179 |
180 int actualFrameCount = 0; | 180 int actualFrameCount = 0; |
181 for (; frame; frame = frame->tree().traverseNext()) | 181 for (; frame; frame = frame->tree().traverseNext()) |
182 ++actualFrameCount; | 182 ++actualFrameCount; |
183 | 183 |
184 ASSERT(expectedFrameCount == actualFrameCount); | 184 ASSERT(expectedFrameCount == actualFrameCount); |
185 } | 185 } |
186 #endif | 186 #endif |
187 | 187 |
188 int FrameHost::subframeCount() const { | 188 int FrameHost::subframeCount() const { |
189 #if ENABLE(ASSERT) | 189 #if DCHECK_IS_ON() |
190 checkFrameCountConsistency(m_subframeCount + 1, m_page->mainFrame()); | 190 checkFrameCountConsistency(m_subframeCount + 1, m_page->mainFrame()); |
191 #endif | 191 #endif |
192 return m_subframeCount; | 192 return m_subframeCount; |
193 } | 193 } |
194 | 194 |
195 void FrameHost::setDefaultPageScaleLimits(float minScale, float maxScale) { | 195 void FrameHost::setDefaultPageScaleLimits(float minScale, float maxScale) { |
196 PageScaleConstraints newDefaults = | 196 PageScaleConstraints newDefaults = |
197 pageScaleConstraintsSet().defaultConstraints(); | 197 pageScaleConstraintsSet().defaultConstraints(); |
198 newDefaults.minimumScale = minScale; | 198 newDefaults.minimumScale = minScale; |
199 newDefaults.maximumScale = maxScale; | 199 newDefaults.maximumScale = maxScale; |
(...skipping 28 matching lines...) Expand all Loading... |
228 | 228 |
229 FrameView* rootView = page().deprecatedLocalMainFrame()->view(); | 229 FrameView* rootView = page().deprecatedLocalMainFrame()->view(); |
230 | 230 |
231 if (!rootView) | 231 if (!rootView) |
232 return; | 232 return; |
233 | 233 |
234 rootView->setNeedsLayout(); | 234 rootView->setNeedsLayout(); |
235 } | 235 } |
236 | 236 |
237 } // namespace blink | 237 } // namespace blink |
OLD | NEW |