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

Side by Side Diff: Source/core/page/FrameView.cpp

Issue 23551010: Removing remaining spurrious NULL checks on m_frame in FrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Custom scrollbars should already be destroyed at this point 223 // Custom scrollbars should already be destroyed at this point
224 ASSERT(!horizontalScrollbar() || !horizontalScrollbar()->isCustomScrollbar() ); 224 ASSERT(!horizontalScrollbar() || !horizontalScrollbar()->isCustomScrollbar() );
225 ASSERT(!verticalScrollbar() || !verticalScrollbar()->isCustomScrollbar()); 225 ASSERT(!verticalScrollbar() || !verticalScrollbar()->isCustomScrollbar());
226 226
227 setHasHorizontalScrollbar(false); // Remove native scrollbars now before we lose the connection to the HostWindow. 227 setHasHorizontalScrollbar(false); // Remove native scrollbars now before we lose the connection to the HostWindow.
228 setHasVerticalScrollbar(false); 228 setHasVerticalScrollbar(false);
229 229
230 ASSERT(!m_scrollCorner); 230 ASSERT(!m_scrollCorner);
231 ASSERT(m_actionScheduler->isEmpty()); 231 ASSERT(m_actionScheduler->isEmpty());
232 232
233 if (m_frame) { 233 ASSERT(m_frame);
234 ASSERT(m_frame->view() != this || !m_frame->contentRenderer()); 234 ASSERT(m_frame->view() != this || !m_frame->contentRenderer());
235 RenderPart* renderer = m_frame->ownerRenderer(); 235 RenderPart* renderer = m_frame->ownerRenderer();
236 if (renderer && renderer->widget() == this) 236 if (renderer && renderer->widget() == this)
237 renderer->setWidget(0); 237 renderer->setWidget(0);
238 }
239 } 238 }
240 239
241 void FrameView::reset() 240 void FrameView::reset()
242 { 241 {
243 m_cannotBlitToWindow = false; 242 m_cannotBlitToWindow = false;
244 m_isOverlapped = false; 243 m_isOverlapped = false;
245 m_contentIsOpaque = false; 244 m_contentIsOpaque = false;
246 m_borderX = 30; 245 m_borderX = 30;
247 m_borderY = 30; 246 m_borderY = 30;
248 m_layoutTimer.stop(); 247 m_layoutTimer.stop();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 RELEASE_ASSERT(!isInLayout()); 325 RELEASE_ASSERT(!isInLayout());
327 326
328 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 327 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
329 scrollAnimator->cancelAnimations(); 328 scrollAnimator->cancelAnimations();
330 329
331 detachCustomScrollbars(); 330 detachCustomScrollbars();
332 // When the view is no longer associated with a frame, it needs to be remove d from the ax object cache 331 // When the view is no longer associated with a frame, it needs to be remove d from the ax object cache
333 // right now, otherwise it won't be able to reach the topDocument()'s axObje ct cache later. 332 // right now, otherwise it won't be able to reach the topDocument()'s axObje ct cache later.
334 removeFromAXObjectCache(); 333 removeFromAXObjectCache();
335 334
336 if (m_frame && m_frame->page()) { 335 if (m_frame->page()) {
337 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll ingCoordinator()) 336 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll ingCoordinator())
338 scrollingCoordinator->willDestroyScrollableArea(this); 337 scrollingCoordinator->willDestroyScrollableArea(this);
339 } 338 }
340 } 339 }
341 340
342 void FrameView::detachCustomScrollbars() 341 void FrameView::detachCustomScrollbars()
343 { 342 {
344 Scrollbar* horizontalBar = horizontalScrollbar(); 343 Scrollbar* horizontalBar = horizontalScrollbar();
345 if (horizontalBar && horizontalBar->isCustomScrollbar()) 344 if (horizontalBar && horizontalBar->isCustomScrollbar())
346 setHasHorizontalScrollbar(false); 345 setHasHorizontalScrollbar(false);
(...skipping 27 matching lines...) Expand all
374 if (oldOverlayStyle != overlayStyle) 373 if (oldOverlayStyle != overlayStyle)
375 setScrollbarOverlayStyle(overlayStyle); 374 setScrollbarOverlayStyle(overlayStyle);
376 } 375 }
377 376
378 void FrameView::clear() 377 void FrameView::clear()
379 { 378 {
380 setCanBlitOnScroll(true); 379 setCanBlitOnScroll(true);
381 380
382 reset(); 381 reset();
383 382
384 if (m_frame) { 383 if (RenderPart* renderer = m_frame->ownerRenderer())
385 if (RenderPart* renderer = m_frame->ownerRenderer()) 384 renderer->viewCleared();
386 renderer->viewCleared();
387 }
388 385
389 setScrollbarsSuppressed(true); 386 setScrollbarsSuppressed(true);
390 } 387 }
391 388
392 bool FrameView::didFirstLayout() const 389 bool FrameView::didFirstLayout() const
393 { 390 {
394 return !m_firstLayout; 391 return !m_firstLayout;
395 } 392 }
396 393
397 void FrameView::invalidateRect(const IntRect& rect) 394 void FrameView::invalidateRect(const IntRect& rect)
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 return m_pagination; 2416 return m_pagination;
2420 } 2417 }
2421 2418
2422 void FrameView::setPagination(const Pagination& pagination) 2419 void FrameView::setPagination(const Pagination& pagination)
2423 { 2420 {
2424 if (m_pagination == pagination) 2421 if (m_pagination == pagination)
2425 return; 2422 return;
2426 2423
2427 m_pagination = pagination; 2424 m_pagination = pagination;
2428 2425
2429 if (m_frame) 2426 m_frame->document()->styleResolverChanged(RecalcStyleDeferred);
2430 m_frame->document()->styleResolverChanged(RecalcStyleDeferred);
2431 } 2427 }
2432 2428
2433 IntRect FrameView::windowClipRect(bool clipToContents) const 2429 IntRect FrameView::windowClipRect(bool clipToContents) const
2434 { 2430 {
2435 ASSERT(m_frame->view() == this); 2431 ASSERT(m_frame->view() == this);
2436 2432
2437 if (paintsEntireContents()) 2433 if (paintsEntireContents())
2438 return IntRect(IntPoint(), contentsSize()); 2434 return IntRect(IntPoint(), contentsSize());
2439 2435
2440 // Set our clip rect to be our contents. 2436 // Set our clip rect to be our contents.
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
3372 } 3368 }
3373 3369
3374 AXObjectCache* FrameView::axObjectCache() const 3370 AXObjectCache* FrameView::axObjectCache() const
3375 { 3371 {
3376 if (frame().document()) 3372 if (frame().document())
3377 return frame().document()->existingAXObjectCache(); 3373 return frame().document()->existingAXObjectCache();
3378 return 0; 3374 return 0;
3379 } 3375 }
3380 3376
3381 } // namespace WebCore 3377 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698