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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro ll = programmaticScroll; } | 328 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro ll = programmaticScroll; } |
329 | 329 |
330 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; } | 330 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; } |
331 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; } | 331 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; } |
332 | 332 |
333 virtual bool isActive() const OVERRIDE; | 333 virtual bool isActive() const OVERRIDE; |
334 | 334 |
335 // DEPRECATED: Use viewportConstrainedVisibleContentRect() instead. | 335 // DEPRECATED: Use viewportConstrainedVisibleContentRect() instead. |
336 IntSize scrollOffsetForFixedPosition() const; | 336 IntSize scrollOffsetForFixedPosition() const; |
337 | 337 |
338 bool shouldStopPartialLayout() const { return m_shouldStopPartialLayout; } | |
339 bool checkPartialLayoutComplete(RenderObject*); | |
340 void setStopLayoutAtRenderer(RenderObject* renderer) { m_stopLayoutAtRendere r = renderer; } | |
341 void resetPartialLayoutState() { m_stopLayoutAtRenderer = 0; m_shouldStopPar tialLayout = false; } | |
342 | |
338 protected: | 343 protected: |
339 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect); | 344 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect); |
340 virtual void scrollContentsSlowPath(const IntRect& updateRect); | 345 virtual void scrollContentsSlowPath(const IntRect& updateRect); |
341 | 346 |
342 virtual bool isVerticalDocument() const; | 347 virtual bool isVerticalDocument() const; |
343 virtual bool isFlippedDocument() const; | 348 virtual bool isFlippedDocument() const; |
344 | 349 |
345 private: | 350 private: |
346 explicit FrameView(Frame*); | 351 explicit FrameView(Frame*); |
347 | 352 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
413 | 418 |
414 bool hasCustomScrollbars() const; | 419 bool hasCustomScrollbars() const; |
415 | 420 |
416 virtual void updateScrollCorner(); | 421 virtual void updateScrollCorner(); |
417 | 422 |
418 FrameView* parentFrameView() const; | 423 FrameView* parentFrameView() const; |
419 | 424 |
420 virtual AXObjectCache* axObjectCache() const; | 425 virtual AXObjectCache* axObjectCache() const; |
421 void removeFromAXObjectCache(); | 426 void removeFromAXObjectCache(); |
422 | 427 |
428 #ifndef NDEBUG | |
429 void checkPartialLayoutAllowed(); | |
430 #endif | |
431 | |
423 static double s_currentFrameTimeStamp; // used for detecting decoded resourc e thrash in the cache | 432 static double s_currentFrameTimeStamp; // used for detecting decoded resourc e thrash in the cache |
424 static bool s_inPaintContents; | 433 static bool s_inPaintContents; |
425 | 434 |
426 LayoutSize m_size; | 435 LayoutSize m_size; |
427 LayoutSize m_margins; | 436 LayoutSize m_margins; |
428 | 437 |
429 typedef HashSet<RenderObject*> RenderObjectSet; | 438 typedef HashSet<RenderObject*> RenderObjectSet; |
430 OwnPtr<RenderObjectSet> m_widgetUpdateSet; | 439 OwnPtr<RenderObjectSet> m_widgetUpdateSet; |
431 RefPtr<Frame> m_frame; | 440 RefPtr<Frame> m_frame; |
432 | 441 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
521 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; | 530 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; |
522 | 531 |
523 static double s_normalDeferredRepaintDelay; | 532 static double s_normalDeferredRepaintDelay; |
524 static double s_initialDeferredRepaintDelayDuringLoading; | 533 static double s_initialDeferredRepaintDelayDuringLoading; |
525 static double s_maxDeferredRepaintDelayDuringLoading; | 534 static double s_maxDeferredRepaintDelayDuringLoading; |
526 static double s_deferredRepaintDelayIncrementDuringLoading; | 535 static double s_deferredRepaintDelayIncrementDuringLoading; |
527 | 536 |
528 bool m_hasSoftwareFilters; | 537 bool m_hasSoftwareFilters; |
529 | 538 |
530 float m_visibleContentScaleFactor; | 539 float m_visibleContentScaleFactor; |
540 | |
541 bool m_shouldStopPartialLayout; | |
542 RenderObject* m_stopLayoutAtRenderer; | |
531 }; | 543 }; |
532 | 544 |
545 inline bool FrameView::checkPartialLayoutComplete(RenderObject* renderer) | |
546 { | |
547 if (m_shouldStopPartialLayout) | |
548 return true; | |
549 | |
550 if (renderer == m_stopLayoutAtRenderer) { | |
551 #ifndef NDEBUG | |
552 checkPartialLayoutAllowed(); | |
553 #endif | |
554 m_shouldStopPartialLayout = true; | |
eseidel
2013/08/20 21:00:39
I think when you do this, you should also clear m_
pdr.
2013/08/26 05:50:40
Done.
| |
555 return true; | |
556 } | |
557 return false; | |
558 } | |
559 | |
533 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 560 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
534 { | 561 { |
535 if (m_isVisuallyNonEmpty) | 562 if (m_isVisuallyNonEmpty) |
536 return; | 563 return; |
537 m_visuallyNonEmptyCharacterCount += count; | 564 m_visuallyNonEmptyCharacterCount += count; |
538 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. | 565 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. |
539 // The first few hundred characters rarely contain the interesting content o f the page. | 566 // The first few hundred characters rarely contain the interesting content o f the page. |
540 static const unsigned visualCharacterThreshold = 200; | 567 static const unsigned visualCharacterThreshold = 200; |
541 if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold) | 568 if (m_visuallyNonEmptyCharacterCount > visualCharacterThreshold) |
542 setIsVisuallyNonEmpty(); | 569 setIsVisuallyNonEmpty(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
574 ASSERT(!widget || widget->isFrameView()); | 601 ASSERT(!widget || widget->isFrameView()); |
575 return static_cast<const FrameView*>(widget); | 602 return static_cast<const FrameView*>(widget); |
576 } | 603 } |
577 | 604 |
578 // This will catch anyone doing an unnecessary cast. | 605 // This will catch anyone doing an unnecessary cast. |
579 void toFrameView(const FrameView*); | 606 void toFrameView(const FrameView*); |
580 | 607 |
581 } // namespace WebCore | 608 } // namespace WebCore |
582 | 609 |
583 #endif // FrameView_h | 610 #endif // FrameView_h |
OLD | NEW |