| 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 |
| 11 License as published by the Free Software Foundation; either | 11 License as published by the Free Software Foundation; either |
| 12 version 2 of the License, or (at your option) any later version. | 12 version 2 of the License, or (at your option) any later version. |
| 13 | 13 |
| 14 This library is distributed in the hope that it will be useful, | 14 This library is distributed in the hope that it will be useful, |
| 15 but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 Library General Public License for more details. | 17 Library General Public License for more details. |
| 18 | 18 |
| 19 You should have received a copy of the GNU Library General Public License | 19 You should have received a copy of the GNU Library General Public License |
| 20 along with this library; see the file COPYING.LIB. If not, write to | 20 along with this library; see the file COPYING.LIB. If not, write to |
| 21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 22 Boston, MA 02110-1301, USA. | 22 Boston, MA 02110-1301, USA. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef FrameView_h | 25 #ifndef FrameView_h |
| 26 #define FrameView_h | 26 #define FrameView_h |
| 27 | 27 |
| 28 #include "core/rendering/PaintPhase.h" | 28 #include "core/rendering/PaintPhase.h" |
| 29 #include "core/rendering/RenderIFrame.h" |
| 29 #include "platform/HostWindow.h" | 30 #include "platform/HostWindow.h" |
| 30 #include "platform/RuntimeEnabledFeatures.h" | 31 #include "platform/RuntimeEnabledFeatures.h" |
| 31 #include "platform/Widget.h" | 32 #include "platform/Widget.h" |
| 32 #include "platform/geometry/LayoutRect.h" | 33 #include "platform/geometry/LayoutRect.h" |
| 33 #include "platform/graphics/Color.h" | 34 #include "platform/graphics/Color.h" |
| 34 #include "platform/scroll/ScrollableArea.h" | 35 #include "platform/scroll/ScrollableArea.h" |
| 35 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
| 36 #include "wtf/HashSet.h" | 37 #include "wtf/HashSet.h" |
| 37 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 38 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 IntRect contentsToWindow(const IntRect& contentsRect) const { return content
sRect; } | 202 IntRect contentsToWindow(const IntRect& contentsRect) const { return content
sRect; } |
| 202 | 203 |
| 203 bool scheduleAnimation(); | 204 bool scheduleAnimation(); |
| 204 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t { return IntRect(IntPoint(), expandedIntSize(frameRect().size())); } | 205 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons
t { return IntRect(IntPoint(), expandedIntSize(frameRect().size())); } |
| 205 IntSize unscaledVisibleContentSize(IncludeScrollbarsInRect = ExcludeScrollba
rs) const { return frameRect().size(); } | 206 IntSize unscaledVisibleContentSize(IncludeScrollbarsInRect = ExcludeScrollba
rs) const { return frameRect().size(); } |
| 206 // FIXME(sky): Not clear what values these should return. This is just what
they happen to be | 207 // FIXME(sky): Not clear what values these should return. This is just what
they happen to be |
| 207 // returning today. | 208 // returning today. |
| 208 bool paintsEntireContents() const { return false; } | 209 bool paintsEntireContents() const { return false; } |
| 209 bool clipsPaintInvalidations() const { return true; } | 210 bool clipsPaintInvalidations() const { return true; } |
| 210 | 211 |
| 212 void addIFrame(RenderIFrame* iframe); |
| 213 void removeIFrame(RenderIFrame* iframe); |
| 214 void updateIFramesAfterLayout(); |
| 215 |
| 211 protected: | 216 protected: |
| 212 bool isVerticalDocument() const; | 217 bool isVerticalDocument() const; |
| 213 bool isFlippedDocument() const; | 218 bool isFlippedDocument() const; |
| 214 | 219 |
| 215 private: | 220 private: |
| 216 explicit FrameView(LocalFrame*); | 221 explicit FrameView(LocalFrame*); |
| 217 | 222 |
| 218 void reset(); | 223 void reset(); |
| 219 void init(); | 224 void init(); |
| 220 | 225 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 bool m_hasSoftwareFilters; | 302 bool m_hasSoftwareFilters; |
| 298 | 303 |
| 299 float m_visibleContentScaleFactor; | 304 float m_visibleContentScaleFactor; |
| 300 IntSize m_inputEventsOffsetForEmulation; | 305 IntSize m_inputEventsOffsetForEmulation; |
| 301 float m_inputEventsScaleFactorForEmulation; | 306 float m_inputEventsScaleFactorForEmulation; |
| 302 | 307 |
| 303 IntSize m_layoutSize; | 308 IntSize m_layoutSize; |
| 304 bool m_layoutSizeFixedToFrameSize; | 309 bool m_layoutSizeFixedToFrameSize; |
| 305 | 310 |
| 306 Vector<IntRect> m_tickmarks; | 311 Vector<IntRect> m_tickmarks; |
| 312 |
| 313 WTF::HashSet<RenderIFrame*> m_iframes; |
| 307 }; | 314 }; |
| 308 | 315 |
| 309 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 316 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 310 | 317 |
| 311 class AllowPaintInvalidationScope { | 318 class AllowPaintInvalidationScope { |
| 312 public: | 319 public: |
| 313 explicit AllowPaintInvalidationScope(FrameView* view) | 320 explicit AllowPaintInvalidationScope(FrameView* view) |
| 314 : m_view(view) | 321 : m_view(view) |
| 315 , m_originalValue(view ? view->canInvalidatePaintDuringPerformLayout() :
false) | 322 , m_originalValue(view ? view->canInvalidatePaintDuringPerformLayout() :
false) |
| 316 { | 323 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 328 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); | 335 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); |
| 329 } | 336 } |
| 330 private: | 337 private: |
| 331 FrameView* m_view; | 338 FrameView* m_view; |
| 332 bool m_originalValue; | 339 bool m_originalValue; |
| 333 }; | 340 }; |
| 334 | 341 |
| 335 } // namespace blink | 342 } // namespace blink |
| 336 | 343 |
| 337 #endif // FrameView_h | 344 #endif // FrameView_h |
| OLD | NEW |