| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |