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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2299213003: Fix the inconsistent problem while the content of textNodes is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add layout test cases and fix format issues Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 desc.setComputedSize(size); 1909 desc.setComputedSize(size);
1910 1910
1911 float autosizedFontSize = 1911 float autosizedFontSize =
1912 TextAutosizer::computeAutosizedFontSize(size, multiplier); 1912 TextAutosizer::computeAutosizedFontSize(size, multiplier);
1913 desc.setComputedSize(std::min(maximumAllowedFontSize, autosizedFontSize)); 1913 desc.setComputedSize(std::min(maximumAllowedFontSize, autosizedFontSize));
1914 1914
1915 setFontDescription(desc); 1915 setFontDescription(desc);
1916 font().update(currentFontSelector); 1916 font().update(currentFontSelector);
1917 } 1917 }
1918 1918
1919 void ComputedStyle::setTextAutosizingFingerPrint(unsigned fingerPrint) {
1920 SET_VAR(m_styleInheritedData, textAutosizingFingerPrint, fingerPrint);
1921 }
1922
1919 void ComputedStyle::addAppliedTextDecoration( 1923 void ComputedStyle::addAppliedTextDecoration(
1920 const AppliedTextDecoration& decoration) { 1924 const AppliedTextDecoration& decoration) {
1921 RefPtr<AppliedTextDecorationList>& list = 1925 RefPtr<AppliedTextDecorationList>& list =
1922 m_rareInheritedData.access()->appliedTextDecorations; 1926 m_rareInheritedData.access()->appliedTextDecorations;
1923 1927
1924 if (!list) 1928 if (!list)
1925 list = AppliedTextDecorationList::create(); 1929 list = AppliedTextDecorationList::create();
1926 else if (!list->hasOneRef()) 1930 else if (!list->hasOneRef())
1927 list = list->copy(); 1931 list = list->copy();
1928 1932
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 if (value < 0) 2404 if (value < 0)
2401 fvalue -= 0.5f; 2405 fvalue -= 0.5f;
2402 else 2406 else
2403 fvalue += 0.5f; 2407 fvalue += 0.5f;
2404 } 2408 }
2405 2409
2406 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2410 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2407 } 2411 }
2408 2412
2409 } // namespace blink 2413 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698