Bug 1052924 - Treat ruby text containers as inline elements for the purposes of finding a font inflation container so that ruby text gets the same font inflation as its ruby bases. r=dbaron
authorXidorn Quan <quanxunzhen@gmail.com>
Wed, 26 Nov 2014 15:52:48 +1100
changeset 241881 2f388e3587016ae713d2add262a4cb93a48f1942
parent 241880 211e462753788f1c55732d0caa936aebee10793f
child 241882 fab3d1117a6a539611813a4050a692bdbdae5af3
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1052924
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1052924 - Treat ruby text containers as inline elements for the purposes of finding a font inflation container so that ruby text gets the same font inflation as its ruby bases. r=dbaron
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -479,22 +479,18 @@ IsFontSizeInflationContainer(nsIFrame* a
    */
 
   // The root frame should always be an inflation container.
   if (!aFrame->GetParent()) {
     return true;
   }
 
   nsIContent *content = aFrame->GetContent();
-  // Ruby text containers are excluded here because they inherit from block
-  // (should not be considered inline).
   bool isInline = (aFrame->GetDisplay() == NS_STYLE_DISPLAY_INLINE ||
-                   (aFrame->StyleDisplay()->IsRubyDisplayType() && 
-                    aFrame->GetDisplay() != 
-                      NS_STYLE_DISPLAY_RUBY_TEXT_CONTAINER) ||
+                   aFrame->StyleDisplay()->IsRubyDisplayType() ||
                    (aFrame->IsFloating() &&
                     aFrame->GetType() == nsGkAtoms::letterFrame) ||
                    // Given multiple frames for the same node, only the
                    // outer one should be considered a container.
                    // (Important, e.g., for nsSelectsAreaFrame.)
                    (aFrame->GetParent()->GetContent() == content) ||
                    (content && (content->IsHTML(nsGkAtoms::option) ||
                                 content->IsHTML(nsGkAtoms::optgroup) ||