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

Side by Side Diff: third_party/WebKit/Source/core/layout/TextAutosizer.cpp

Issue 1816103002: Clear baseComputedStyle when text-autosizing changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('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) 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698