Bug 104373 - Harden RenderBox::canBeScrolledAndHasScrollableArea logic
Summary: Harden RenderBox::canBeScrolledAndHasScrollableArea logic
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antonio Gomes
URL:
Keywords:
: 109633 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-07 08:30 PST by Antonio Gomes
Modified: 2013-08-21 07:06 PDT (History)
10 users (show)

See Also:


Attachments
patch 0.1 - for EWS (no tests or changelog added yet) (3.34 KB, patch)
2013-08-20 09:12 PDT, Antonio Gomes
no flags Details | Formatted Diff | Diff
patch 1 - for review (8.50 KB, patch)
2013-08-20 11:47 PDT, Antonio Gomes
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2012-12-07 08:30:01 PST
353 // The RenderBox::canbeScrolledAndHasScrollableArea method returns true for the
354 // following scenario, for example:
355 // (1) a div that has a vertical overflow but no horizontal overflow
356 //     with overflow-y: hidden and overflow-x: auto set.
357 // The version below fixes it.
358 // FIXME: Fix RenderBox::canBeScrolledAndHasScrollableArea method instead.
359 bool InRegionScrollerPrivate::canScrollRenderBox(RenderBox* box)
Comment 1 Terry Anderson 2013-03-01 11:30:01 PST
*** Bug 109633 has been marked as a duplicate of this bug. ***
Comment 2 Antonio Gomes 2013-08-20 09:12:54 PDT
Created attachment 209200 [details]
patch 0.1 - for EWS (no tests or changelog added yet)
Comment 3 Antonio Gomes 2013-08-20 11:47:28 PDT
Created attachment 209213 [details]
patch 1 - for review
Comment 4 Simon Fraser (smfr) 2013-08-20 14:03:15 PDT
Comment on attachment 209213 [details]
patch 1 - for review

View in context: https://bugs.webkit.org/attachment.cgi?id=209213&action=review

> LayoutTests/ChangeLog:9
> +        ayis if it is scrollable in that direction, according to its style.

axis

> Source/WebCore/rendering/RenderBox.h:467
> +    bool hasScrollableOverflowX() const { return scrollsOverflowX() && scrollWidth() != clientWidth(); }
> +    bool hasScrollableOverflowY() const { return scrollsOverflowY() && scrollHeight() != clientHeight(); }

I'm not convinced that scrollWidth() != clientWidth() is right here.  RenderLayer::hasHorizontalOverflow() does:  scrollWidth() > renderBox()->pixelSnappedClientWidth();
Comment 5 Antonio Gomes 2013-08-21 07:06:21 PDT
https://trac.webkit.org/changeset/154383