Commit a059000f authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Unreviewed, rolling out r162354.

http://trac.webkit.org/changeset/162354
https://bugs.webkit.org/show_bug.cgi?id=127354

Appears to have broken accessibility in a non-trivial way
(Requested by ap on #webkit).

* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 73f71181
2014-01-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r162354.
http://trac.webkit.org/changeset/162354
https://bugs.webkit.org/show_bug.cgi?id=127354
Appears to have broken accessibility in a non-trivial way
(Requested by ap on #webkit).
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
2014-01-21 Commit Queue <commit-queue@webkit.org>
 
Unreviewed, rolling out r162445.
......@@ -505,12 +505,10 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
if (m_inUpdateScrollbars || prohibitsScrolling() || platformWidget())
return;
bool hasOverlayScrollbars = (!m_horizontalScrollbar || m_horizontalScrollbar->isOverlayScrollbar()) && (!m_verticalScrollbar || m_verticalScrollbar->isOverlayScrollbar());
// If we came in here with the view already needing a layout, then go ahead and do that
// first. (This will be the common case, e.g., when the page changes due to window resizing for example).
// This layout will not re-enter updateScrollbars and does not count towards our max layout pass total.
if (!m_scrollbarsSuppressed && !hasOverlayScrollbars) {
if (!m_scrollbarsSuppressed) {
m_inUpdateScrollbars = true;
visibleContentsResized();
m_inUpdateScrollbars = false;
......@@ -550,30 +548,29 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
IntSize docSize = totalContentsSize();
IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size();
if (hScroll == ScrollbarAuto)
if (hScroll == ScrollbarAuto) {
newHasHorizontalScrollbar = docSize.width() > visibleWidth();
if (vScroll == ScrollbarAuto)
if (newHasHorizontalScrollbar && !m_updateScrollbarsPass && docSize.width() <= fullVisibleSize.width() && docSize.height() <= fullVisibleSize.height())
newHasHorizontalScrollbar = false;
}
if (vScroll == ScrollbarAuto) {
newHasVerticalScrollbar = docSize.height() > visibleHeight();
if (newHasVerticalScrollbar && !m_updateScrollbarsPass && docSize.width() <= fullVisibleSize.width() && docSize.height() <= fullVisibleSize.height())
newHasVerticalScrollbar = false;
}
bool needAnotherPass = false;
if (!hasOverlayScrollbars) {
// If we ever turn one scrollbar off, always turn the other one off too. Never ever
// try to both gain/lose a scrollbar in the same pass.
if (!m_updateScrollbarsPass && docSize.width() <= fullVisibleSize.width() && docSize.height() <= fullVisibleSize.height()) {
if (hScroll == ScrollbarAuto)
newHasHorizontalScrollbar = false;
if (vScroll == ScrollbarAuto)
newHasVerticalScrollbar = false;
}
bool needAnotherPass = false;
if (!newHasHorizontalScrollbar && hasHorizontalScrollbar && vScroll != ScrollbarAlwaysOn) {
newHasVerticalScrollbar = false;
needAnotherPass = true;
}
if (!newHasVerticalScrollbar && hasVerticalScrollbar && hScroll != ScrollbarAlwaysOn) {
newHasHorizontalScrollbar = false;
needAnotherPass = true;
}
}
if (hasHorizontalScrollbar != newHasHorizontalScrollbar && (hasHorizontalScrollbar || !avoidScrollbarCreation())) {
if (scrollOrigin().y() && !newHasHorizontalScrollbar)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment