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

Issue 11859014: Merge 138111 (Closed)

Created:
7 years, 11 months ago by kerz_chromium
Modified:
7 years, 11 months ago
Reviewers:
commit-queue
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Visibility:
Public.

Description

Merge 138111 > Text Autosizing: containers wider than their enclosing clusters should be autosized as separate clusters > https://bugs.webkit.org/show_bug.cgi?id=103627 > > Patch by Anton Vayvod <avayvod@chromium.org>; on 2012-12-18 > Reviewed by Julien Chaffraix. > > Source/WebCore: > > Some blocks of texts might be wider than their parent clusters and need to be autosized separately. > > isAutosizingCluster() now checks for the width of the container being greater than the width of the lowest > common ancestor of the text nodes of the enclosing cluster. This block containing all text is passed to all > tree traversal methods. > An overloaded version is added for cases when we don't have the lowest common ancestor yet. > > The change fixes several cases covered by existing tests. > > * rendering/TextAutosizer.cpp: > (WebCore::TextAutosizer::processSubtree): > > Calls processCluster with a new number of arguments. > > (WebCore::TextAutosizer::processCluster): > > Passes block containing all text nodes into processContainer. Assertion removed since it can no longer be > checked without passing an additional parameter (the parent block containing all text) to the function > for the sake of this assertion only. > > (WebCore::TextAutosizer::processContainer): > > |parentBlockContainingAllText| parameter passed into isAutosizingCluster. > > (WebCore::TextAutosizer::isAutosizingCluster(const RenderBlock*, const RenderBlock*)): > > The overloaded method that is used when the render block checked is already known to be an autosizing > container and there's full information necessary to determine if it's a cluster like the parent block > containing all text within the enclosing cluster. > Considers a block a cluster if it is wider than its parent block containing all text within enclosing > cluster. > > (WebCore::TextAutosizer::isAutosizingCluster(const RenderObject*)): > > The overloaded method that checks for the given object to be an autosizing container first (for > convenience of the caller) and doesn't require information about the parent cluster. Used when such > information is not available, for example, in the process of retrieving the information for the parent > cluster or when looking for the root cluster in the tree. > > (WebCore::TextAutosizer::clusterShouldBeAutosized): > > Passes new parameter to measureDescendantTextWidth. > > (WebCore::TextAutosizer::measureDescendantTextWidth): > > Uses blockContainingAllText parameter to pass to isAutosizingCluster. > > (WebCore::TextAutosizer::findDeepestBlockContainingAllText): > > Assertion removed since it can no longer be checked without passing an additional parameter (the > parent block containing all text) to the function for the sake of this assertion only. > > (WebCore::TextAutosizer::findFirstTextLeafNotInCluster): > Uses shorter isAutosizingCluster call. > > LayoutTests: > > Modified existing tests to reflect the new autosizing approach to handling of the elements that are > wider than the lowest common ancestor of the text nodes of the enclosing autosizing cluster. > > * fast/text-autosizing/cluster-wide-in-narrow-expected.html: > * fast/text-autosizing/cluster-wide-in-narrow.html: > * fast/text-autosizing/wide-child-expected.html: > * fast/text-autosizing/wide-child.html: > * fast/text-autosizing/wide-in-narrow-overflow-scroll-expected.html: > * fast/text-autosizing/wide-in-narrow-overflow-scroll.html: TBR=commit-queue@webkit.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=139473

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -67 lines) Patch
M LayoutTests/ChangeLog View 1 chunk +18 lines, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/cluster-wide-in-narrow.html View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/text-autosizing/cluster-wide-in-narrow-expected.html View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/text-autosizing/wide-child.html View 1 chunk +1 line, -2 lines 0 comments Download
M LayoutTests/fast/text-autosizing/wide-child-expected.html View 1 chunk +3 lines, -4 lines 0 comments Download
M LayoutTests/fast/text-autosizing/wide-in-narrow-overflow-scroll.html View 1 chunk +7 lines, -7 lines 0 comments Download
M LayoutTests/fast/text-autosizing/wide-in-narrow-overflow-scroll-expected.html View 1 chunk +7 lines, -7 lines 0 comments Download
M Source/WebCore/ChangeLog View 1 chunk +63 lines, -1 line 0 comments Download
M Source/WebCore/rendering/TextAutosizer.h View 2 chunks +7 lines, -11 lines 0 comments Download
M Source/WebCore/rendering/TextAutosizer.cpp View 13 chunks +35 lines, -28 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
kerz_chromium
7 years, 11 months ago (2013-01-11 19:41:58 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698