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

Side by Side Diff: sky/engine/core/css/resolver/FontBuilder.cpp

Issue 688213002: First pass at removing dead vertical writing mode 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
« no previous file with comments | « sky/engine/core/css/CSSProperty.h ('k') | sky/engine/core/dom/Position.cpp » ('j') | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 float zoomFactor = effectiveZoom; 434 float zoomFactor = effectiveZoom;
435 // FIXME: Why is this here!!!!?! 435 // FIXME: Why is this here!!!!?!
436 if (LocalFrame* frame = m_document->frame()) 436 if (LocalFrame* frame = m_document->frame())
437 zoomFactor *= frame->textZoomFactor(); 437 zoomFactor *= frame->textZoomFactor();
438 438
439 return FontSize::getComputedSizeFromSpecifiedSize(m_document, zoomFactor, fo ntDescription.isAbsoluteSize(), specifiedSize); 439 return FontSize::getComputedSizeFromSpecifiedSize(m_document, zoomFactor, fo ntDescription.isAbsoluteSize(), specifiedSize);
440 } 440 }
441 441
442 static void getFontAndGlyphOrientation(const RenderStyle* style, FontOrientation & fontOrientation, NonCJKGlyphOrientation& glyphOrientation) 442 static void getFontAndGlyphOrientation(const RenderStyle* style, FontOrientation & fontOrientation, NonCJKGlyphOrientation& glyphOrientation)
443 { 443 {
444 if (style->isHorizontalWritingMode()) { 444 // FIXME(sky): Remove this function now that we don't have writing modes.
445 fontOrientation = Horizontal; 445 fontOrientation = Horizontal;
446 glyphOrientation = NonCJKGlyphOrientationVerticalRight; 446 glyphOrientation = NonCJKGlyphOrientationVerticalRight;
447 return;
448 }
449
450 switch (style->textOrientation()) {
451 case TextOrientationVerticalRight:
452 fontOrientation = Vertical;
453 glyphOrientation = NonCJKGlyphOrientationVerticalRight;
454 return;
455 case TextOrientationUpright:
456 fontOrientation = Vertical;
457 glyphOrientation = NonCJKGlyphOrientationUpright;
458 return;
459 case TextOrientationSideways:
460 fontOrientation = Horizontal;
461 glyphOrientation = NonCJKGlyphOrientationVerticalRight;
462 return;
463 case TextOrientationSidewaysRight:
464 fontOrientation = Horizontal;
465 glyphOrientation = NonCJKGlyphOrientationVerticalRight;
466 return;
467 default:
468 ASSERT_NOT_REACHED();
469 fontOrientation = Horizontal;
470 glyphOrientation = NonCJKGlyphOrientationVerticalRight;
471 return;
472 }
473 } 447 }
474 448
475 void FontBuilder::checkForOrientationChange(RenderStyle* style) 449 void FontBuilder::checkForOrientationChange(RenderStyle* style)
476 { 450 {
477 FontOrientation fontOrientation; 451 FontOrientation fontOrientation;
478 NonCJKGlyphOrientation glyphOrientation; 452 NonCJKGlyphOrientation glyphOrientation;
479 getFontAndGlyphOrientation(style, fontOrientation, glyphOrientation); 453 getFontAndGlyphOrientation(style, fontOrientation, glyphOrientation);
480 454
481 FontDescriptionChangeScope scope(this); 455 FontDescriptionChangeScope scope(this);
482 456
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 FontOrientation fontOrientation; 532 FontOrientation fontOrientation;
559 NonCJKGlyphOrientation glyphOrientation; 533 NonCJKGlyphOrientation glyphOrientation;
560 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ; 534 getFontAndGlyphOrientation(documentStyle, fontOrientation, glyphOrientation) ;
561 fontDescription.setOrientation(fontOrientation); 535 fontDescription.setOrientation(fontOrientation);
562 fontDescription.setNonCJKGlyphOrientation(glyphOrientation); 536 fontDescription.setNonCJKGlyphOrientation(glyphOrientation);
563 documentStyle->setFontDescription(fontDescription); 537 documentStyle->setFontDescription(fontDescription);
564 documentStyle->font().update(fontSelector); 538 documentStyle->font().update(fontSelector);
565 } 539 }
566 540
567 } 541 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSProperty.h ('k') | sky/engine/core/dom/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698