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

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

Issue 131233003: Refactor ResourceLoadPriorityOptimizer to avoid walking render tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use esprehn's suggestion. Created 6 years, 11 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
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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 void deferredRepaintTimerFired(Timer<FrameView>*); 427 void deferredRepaintTimerFired(Timer<FrameView>*);
428 void doDeferredRepaints(); 428 void doDeferredRepaints();
429 void updateDeferredRepaintDelayAfterRepaint(); 429 void updateDeferredRepaintDelayAfterRepaint();
430 double adjustedDeferredRepaintDelay() const; 430 double adjustedDeferredRepaintDelay() const;
431 431
432 void updateWidgetsTimerFired(Timer<FrameView>*); 432 void updateWidgetsTimerFired(Timer<FrameView>*);
433 bool updateWidgets(); 433 bool updateWidgets();
434 434
435 void scrollToAnchor(); 435 void scrollToAnchor();
436 void scrollPositionChanged(); 436 void scrollPositionChanged();
437 void didScrollTimerFired(Timer<FrameView>*);
437 438
438 bool hasCustomScrollbars() const; 439 bool hasCustomScrollbars() const;
439 bool shouldUseCustomScrollbars(Element*& customScrollbarElement, Frame*& cus tomScrollbarFrame); 440 bool shouldUseCustomScrollbars(Element*& customScrollbarElement, Frame*& cus tomScrollbarFrame);
440 441
441 virtual void updateScrollCorner() OVERRIDE; 442 virtual void updateScrollCorner() OVERRIDE;
442 443
443 FrameView* parentFrameView() const; 444 FrameView* parentFrameView() const;
444 445
445 AXObjectCache* axObjectCache() const; 446 AXObjectCache* axObjectCache() const;
446 void removeFromAXObjectCache(); 447 void removeFromAXObjectCache();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 552
552 bool m_hasSoftwareFilters; 553 bool m_hasSoftwareFilters;
553 554
554 float m_visibleContentScaleFactor; 555 float m_visibleContentScaleFactor;
555 IntSize m_inputEventsOffsetForEmulation; 556 IntSize m_inputEventsOffsetForEmulation;
556 float m_inputEventsScaleFactorForEmulation; 557 float m_inputEventsScaleFactorForEmulation;
557 558
558 PartialLayoutState m_partialLayout; 559 PartialLayoutState m_partialLayout;
559 IntSize m_layoutSize; 560 IntSize m_layoutSize;
560 bool m_layoutSizeFixedToFrameSize; 561 bool m_layoutSizeFixedToFrameSize;
562
563 Timer<FrameView> m_didScrollTimer;
561 }; 564 };
562 565
563 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 566 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
564 { 567 {
565 if (m_isVisuallyNonEmpty) 568 if (m_isVisuallyNonEmpty)
566 return; 569 return;
567 m_visuallyNonEmptyCharacterCount += count; 570 m_visuallyNonEmptyCharacterCount += count;
568 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 571 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
569 // The first few hundred characters rarely contain the interesting content o f the page. 572 // The first few hundred characters rarely contain the interesting content o f the page.
570 static const unsigned visualCharacterThreshold = 200; 573 static const unsigned visualCharacterThreshold = 200;
(...skipping 10 matching lines...) Expand all
581 static const unsigned visualPixelThreshold = 32 * 32; 584 static const unsigned visualPixelThreshold = 32 * 32;
582 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 585 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
583 setIsVisuallyNonEmpty(); 586 setIsVisuallyNonEmpty();
584 } 587 }
585 588
586 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 589 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
587 590
588 } // namespace WebCore 591 } // namespace WebCore
589 592
590 #endif // FrameView_h 593 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698