OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR
eason::TextAutosizing); | 994 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR
eason::TextAutosizing); |
995 break; | 995 break; |
996 | 996 |
997 case LayoutNeeded: | 997 case LayoutNeeded: |
998 layoutObject->setStyle(style.release()); | 998 layoutObject->setStyle(style.release()); |
999 break; | 999 break; |
1000 } | 1000 } |
1001 | 1001 |
1002 if (multiplier != 1) | 1002 if (multiplier != 1) |
1003 m_pageInfo.m_hasAutosized = true; | 1003 m_pageInfo.m_hasAutosized = true; |
| 1004 |
| 1005 layoutObject->clearBaseComputedStyle(); |
1004 } | 1006 } |
1005 | 1007 |
1006 bool TextAutosizer::isWiderOrNarrowerDescendant(Cluster* cluster) | 1008 bool TextAutosizer::isWiderOrNarrowerDescendant(Cluster* cluster) |
1007 { | 1009 { |
1008 // FIXME: Why do we return true when hasExplicitWidth returns false?? | 1010 // FIXME: Why do we return true when hasExplicitWidth returns false?? |
1009 if (!cluster->m_parent || !hasExplicitWidth(cluster->m_root)) | 1011 if (!cluster->m_parent || !hasExplicitWidth(cluster->m_root)) |
1010 return true; | 1012 return true; |
1011 | 1013 |
1012 const LayoutBlock* parentDeepestBlockContainingAllText = deepestBlockContain
ingAllText(cluster->m_parent); | 1014 const LayoutBlock* parentDeepestBlockContainingAllText = deepestBlockContain
ingAllText(cluster->m_parent); |
1013 ASSERT(m_blocksThatHaveBegunLayout.contains(cluster->m_root)); | 1015 ASSERT(m_blocksThatHaveBegunLayout.contains(cluster->m_root)); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 } | 1182 } |
1181 return computedSize; | 1183 return computedSize; |
1182 } | 1184 } |
1183 | 1185 |
1184 DEFINE_TRACE(TextAutosizer) | 1186 DEFINE_TRACE(TextAutosizer) |
1185 { | 1187 { |
1186 visitor->trace(m_document); | 1188 visitor->trace(m_document); |
1187 } | 1189 } |
1188 | 1190 |
1189 } // namespace blink | 1191 } // namespace blink |
OLD | NEW |