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

Side by Side Diff: Source/core/frame/FrameView.h

Issue 151483012: Make sure AllowRepaintScope::m_originalValue is always initialized (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Slight cleanup Created 6 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 | « 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) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 544 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
545 setIsVisuallyNonEmpty(); 545 setIsVisuallyNonEmpty();
546 } 546 }
547 547
548 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 548 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
549 549
550 class AllowRepaintScope { 550 class AllowRepaintScope {
551 public: 551 public:
552 explicit AllowRepaintScope(FrameView* view) 552 explicit AllowRepaintScope(FrameView* view)
553 : m_view(view) 553 : m_view(view)
554 , m_originalValue(view ? view->canRepaintDuringPerformLayout() : false)
554 { 555 {
555 if (!m_view) 556 if (!m_view)
556 return; 557 return;
557 558
558 m_originalValue = m_view->canRepaintDuringPerformLayout();
559 m_view->setCanRepaintDuringPerformLayout(true); 559 m_view->setCanRepaintDuringPerformLayout(true);
560 } 560 }
561 561
562 ~AllowRepaintScope() 562 ~AllowRepaintScope()
563 { 563 {
564 if (!m_view) 564 if (!m_view)
565 return; 565 return;
566 566
567 m_view->setCanRepaintDuringPerformLayout(m_originalValue); 567 m_view->setCanRepaintDuringPerformLayout(m_originalValue);
568 } 568 }
569 private: 569 private:
570 FrameView* m_view; 570 FrameView* m_view;
571 bool m_originalValue; 571 bool m_originalValue;
572 }; 572 };
573 573
574 } // namespace WebCore 574 } // namespace WebCore
575 575
576 #endif // FrameView_h 576 #endif // FrameView_h
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