-
commit-queue@webkit.org authored
Text Autosizing - elements much narrower than its parent autosizing clusters should be autosized separately. https://bugs.webkit.org/show_bug.cgi?id=105188 Patch by Anton Vayvod <avayvod@chromium.org> on 2013-01-11 Reviewed by Kenneth Rohde Christiansen. Source/WebCore: Some blocks of text might be narrower than their parent clusters and should be autosized separately. This helps with autosizing for the pages implementing the sidebars as a narrow blocks of text with wide margins and the main content being positioned atop this margin (or vice versa). * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::isContainerAutosizingCluster): Returns true if the container is more than 200 pixels narrower than its parent cluster's lowest common ancestor of all the text nodes. LayoutTests: Checked that a narrow autosizing container becomes an autosizing cluster. Fixed other tests that used narrow descendant blocks. * fast/text-autosizing/cluster-narrow-in-wide-expected.html: * fast/text-autosizing/cluster-narrow-in-wide-ohidden-expected.html: * fast/text-autosizing/cluster-narrow-in-wide-ohidden.html: * fast/text-autosizing/cluster-narrow-in-wide.html: * fast/text-autosizing/cluster-with-wide-lca-expected.html: * fast/text-autosizing/cluster-with-wide-lca.html: * fast/text-autosizing/narrow-child-expected.html: * fast/text-autosizing/narrow-child.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
commit-queue@webkit.org authoredText Autosizing - elements much narrower than its parent autosizing clusters should be autosized separately. https://bugs.webkit.org/show_bug.cgi?id=105188 Patch by Anton Vayvod <avayvod@chromium.org> on 2013-01-11 Reviewed by Kenneth Rohde Christiansen. Source/WebCore: Some blocks of text might be narrower than their parent clusters and should be autosized separately. This helps with autosizing for the pages implementing the sidebars as a narrow blocks of text with wide margins and the main content being positioned atop this margin (or vice versa). * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::isContainerAutosizingCluster): Returns true if the container is more than 200 pixels narrower than its parent cluster's lowest common ancestor of all the text nodes. LayoutTests: Checked that a narrow autosizing container becomes an autosizing cluster. Fixed other tests that used narrow descendant blocks. * fast/text-autosizing/cluster-narrow-in-wide-expected.html: * fast/text-autosizing/cluster-narrow-in-wide-ohidden-expected.html: * fast/text-autosizing/cluster-narrow-in-wide-ohidden.html: * fast/text-autosizing/cluster-narrow-in-wide.html: * fast/text-autosizing/cluster-with-wide-lca-expected.html: * fast/text-autosizing/cluster-with-wide-lca.html: * fast/text-autosizing/narrow-child-expected.html: * fast/text-autosizing/narrow-child.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Loading