| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |