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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 21414002: Fix inline-block baseline with overflow: <not visible> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: with .pngs for review Created 7 years, 5 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 | « LayoutTests/platform/win/virtual/softwarecompositing/geometry/foreground-layer-expected.png ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index e49075c00d289cca5a5813e84170f60fae1676e1..bfd28eb03f3e0a10473b46acfb81a6b3e87b15b0 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -6507,8 +6507,10 @@ int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin
// (the content inside them moves). This matches WinIE as well, which just bottom-aligns them.
// We also give up on finding a baseline if we have a vertical scrollbar, or if we are scrolled
// vertically (e.g., an overflow:hidden block that has had scrollTop moved).
+ // inline-block with overflow should use the bottom of margin box as well.
bool ignoreBaseline = (layer() && (isMarquee() || (direction == HorizontalLine ? (layer()->verticalScrollbar() || layer()->scrollYOffset())
- : (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun());
+ : (layer()->horizontalScrollbar() || layer()->scrollXOffset())))) || (isWritingModeRoot() && !isRubyRun())
+ || (style()->isDisplayInlineType() && style()->overflowY() != OVISIBLE);
int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction);
« no previous file with comments | « LayoutTests/platform/win/virtual/softwarecompositing/geometry/foreground-layer-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698