summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSourav Kundu <skundu@codeaurora.org>2012-10-02 11:49:08 -0700
committerSteve Kondik <shade@chemlab.org>2013-01-21 01:19:50 -0800
commit861433c933e8af5fa97db1174266f81f605c721c (patch)
treec7a795d92ff0e2e730e8ff01e94449656813eb9d
parent3b32931252a51d5aed91e2028928be907ebdff7c (diff)
downloadexternal_webkit-861433c933e8af5fa97db1174266f81f605c721c.zip
external_webkit-861433c933e8af5fa97db1174266f81f605c721c.tar.gz
external_webkit-861433c933e8af5fa97db1174266f81f605c721c.tar.bz2
Performance enhancement. Don't process non-visible lines for layout.
Change-Id: Ie2b594afb4f5244e18719e4feea51966ad4745cd
-rw-r--r--Source/WebCore/rendering/RenderBlockLineLayout.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
index a2469a0..3189ad0 100644
--- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -1141,6 +1141,13 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintLogica
lineMidpointState.reset();
resolver.setPosition(end);
+ // Exit loop if we have already filled the container
+ // when overflow mode is 'hidden'
+ if (style()->height().value()) {
+ EOverflow ov = style()->overflowY();
+ if (ov == OHIDDEN && logicalHeight() > style()->height().value())
+ break;
+ }
}
if (endLine) {