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

Side by Side Diff: sky/engine/core/rendering/InlineTextBox.cpp

Issue 714783003: Remove some straggling zoom-related code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 renderer().getTextDecorations(deco, underline, overline, linethrough, true); 984 renderer().getTextDecorations(deco, underline, overline, linethrough, true);
985 if (isFirstLineStyle()) 985 if (isFirstLineStyle())
986 renderer().getTextDecorations(deco, underline, overline, linethrough, tr ue, true); 986 renderer().getTextDecorations(deco, underline, overline, linethrough, tr ue, true);
987 987
988 // Use a special function for underlines to get the positioning exactly righ t. 988 // Use a special function for underlines to get the positioning exactly righ t.
989 989
990 RenderStyle* styleToUse = renderer().style(isFirstLineStyle()); 990 RenderStyle* styleToUse = renderer().style(isFirstLineStyle());
991 int baseline = styleToUse->fontMetrics().ascent(); 991 int baseline = styleToUse->fontMetrics().ascent();
992 992
993 // Set the thick of the line to be 10% (or something else ?)of the computed font size and not less than 1px. 993 // Set the thick of the line to be 10% (or something else ?)of the computed font size and not less than 1px.
994 // Using computedFontSize should take care of zoom as well.
995 994
996 // Update Underline thickness, in case we have Faulty Font Metrics calculati ng underline thickness by old method. 995 // Update Underline thickness, in case we have Faulty Font Metrics calculati ng underline thickness by old method.
997 float textDecorationThickness = styleToUse->fontMetrics().underlineThickness (); 996 float textDecorationThickness = styleToUse->fontMetrics().underlineThickness ();
998 int fontHeightInt = (int)(styleToUse->fontMetrics().floatHeight() + 0.5); 997 int fontHeightInt = (int)(styleToUse->fontMetrics().floatHeight() + 0.5);
999 if ((textDecorationThickness == 0.f) || (textDecorationThickness >= (fontHei ghtInt >> 1))) 998 if ((textDecorationThickness == 0.f) || (textDecorationThickness >= (fontHei ghtInt >> 1)))
1000 textDecorationThickness = std::max(1.f, styleToUse->computedFontSize() / 10.f); 999 textDecorationThickness = std::max(1.f, styleToUse->computedFontSize() / 10.f);
1001 1000
1002 context->setStrokeThickness(textDecorationThickness); 1001 context->setStrokeThickness(textDecorationThickness);
1003 1002
1004 bool antialiasDecoration = shouldSetDecorationAntialias(overline.style, unde rline.style, linethrough.style) 1003 bool antialiasDecoration = shouldSetDecorationAntialias(overline.style, unde rline.style, linethrough.style)
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 1384 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
1386 const int rendererCharacterOffset = 24; 1385 const int rendererCharacterOffset = 24;
1387 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1386 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1388 fputc(' ', stderr); 1387 fputc(' ', stderr);
1389 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1388 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1390 } 1389 }
1391 1390
1392 #endif 1391 #endif
1393 1392
1394 } // namespace blink 1393 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/ImageQualityController.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698