Ignore:
Timestamp:
Jul 4, 2013, 8:51:44 AM (12 years ago)
Author:
Antti Koivisto
Message:

Take document height into account when determining when it is considered visually non-empy
https://bugs.webkit.org/show_bug.cgi?id=118272

Reviewed by Darin Adler.

The current visually non-empy mechanism takes into account only the amount of contents in renderers.
Add a simple layout dependency so that we don't consider page non-empty until the document height
exceed a (low) height threshold (or the load completes).

  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks):

Don't send layout callbacks until we have actually some content.

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
(WebCore::FrameView::updateIsVisuallyNonEmpty):

Factor into functions.

  • page/FrameView.h:

(WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
(WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):

  • rendering/RenderHTMLCanvas.cpp:

(WebCore::RenderHTMLCanvas::RenderHTMLCanvas):

The size is not known but the estimate provided here is always bigger than the threshold so
the functionality is unchanged.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp

    r148949 r152401  
    4545    : RenderReplaced(element, element->size())
    4646{
    47     view()->frameView()->setIsVisuallyNonEmpty();
     47    // Actual size is not known yet, report the default intrinsic size.
     48    view()->frameView()->incrementVisuallyNonEmptyPixelCount(roundedIntSize(intrinsicSize()));
    4849}
    4950
Note: See TracChangeset for help on using the changeset viewer.