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

Unified Diff: Source/core/layout/LayoutTextControlSingleLine.cpp

Issue 1223173006: Get rid of clampScrollOffset and make maximumScrollPosition sane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert changes to Element::clientWidth, etc. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTextControlSingleLine.cpp
diff --git a/Source/core/layout/LayoutTextControlSingleLine.cpp b/Source/core/layout/LayoutTextControlSingleLine.cpp
index 94827d4975153eba78161a27bb9b0f77f7a041a7..32fbfe5c4488431415cf20f508d4e13f211addd5 100644
--- a/Source/core/layout/LayoutTextControlSingleLine.cpp
+++ b/Source/core/layout/LayoutTextControlSingleLine.cpp
@@ -398,10 +398,7 @@ LayoutUnit LayoutTextControlSingleLine::scrollWidth() const
// Adjust scrollWidth to inculde input element horizontal paddings and
// decoration width
LayoutUnit adjustment = clientWidth() - inner->clientWidth();
- // TODO(leviw): We floor to avoid breaking JS that tries to scroll to
- // scrollWidth - clientWidth.
- // TODO(leviw): These values are broken when zooming. crbug.com/471412
- return inner->scrollWidth().floor() + adjustment;
+ return inner->scrollWidth() + adjustment;
}
return LayoutBlockFlow::scrollWidth();
}
@@ -412,10 +409,7 @@ LayoutUnit LayoutTextControlSingleLine::scrollHeight() const
// Adjust scrollHeight to include input element vertical paddings and
// decoration height
LayoutUnit adjustment = clientHeight() - inner->clientHeight();
- // TODO(leviw): We floor to avoid breaking JS that tries to scroll to
- // scrollHeight - clientHeight.
- // TODO(leviw): These values are broken when zooming. crbug.com/471412
- return inner->scrollHeight().floor() + adjustment;
+ return inner->scrollHeight() + adjustment;
}
return LayoutBlockFlow::scrollHeight();
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698