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

Side by Side Diff: Source/WebCore/rendering/RenderRubyText.cpp

Issue 7943004: Merge 94991 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderRubyText.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Inset the ruby text by half the inter-ideograph expansion amount, but no more than a full-width 74 // Inset the ruby text by half the inter-ideograph expansion amount, but no more than a full-width
75 // ruby character on each side. 75 // ruby character on each side.
76 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun ityCount + 1); 76 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun ityCount + 1);
77 if (expansionOpportunityCount) 77 if (expansionOpportunityCount)
78 inset = min<float>(2 * style()->fontSize(), inset); 78 inset = min<float>(2 * style()->fontSize(), inset);
79 79
80 logicalLeft += inset / 2; 80 logicalLeft += inset / 2;
81 logicalWidth -= inset; 81 logicalWidth -= inset;
82 } 82 }
83 83
84 bool RenderRubyText::avoidsFloats() const
85 {
86 return true;
87 }
88
84 } // namespace WebCore 89 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderRubyText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698