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

Side by Side Diff: sky/engine/core/rendering/style/RenderStyle.h

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/rendering/shapes/Shape.cpp ('k') | sky/engine/platform/LengthBox.h » ('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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // Accessors for positioned object edges that take into account writing mode . 391 // Accessors for positioned object edges that take into account writing mode .
392 const Length& logicalLeft() const { return surround->offset.logicalLeft(); } 392 const Length& logicalLeft() const { return surround->offset.logicalLeft(); }
393 const Length& logicalRight() const { return surround->offset.logicalRight(); } 393 const Length& logicalRight() const { return surround->offset.logicalRight(); }
394 const Length& logicalTop() const { return surround->offset.before(); } 394 const Length& logicalTop() const { return surround->offset.before(); }
395 const Length& logicalBottom() const { return surround->offset.after(); } 395 const Length& logicalBottom() const { return surround->offset.after(); }
396 396
397 // Whether or not a positioned element requires normal flow x/y to be comput ed 397 // Whether or not a positioned element requires normal flow x/y to be comput ed
398 // to determine its position. 398 // to determine its position.
399 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); } 399 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); }
400 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); } 400 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); }
401 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? ha sAutoLeftAndRight() : hasAutoTopAndBottom(); } 401 bool hasStaticInlinePosition() const { return hasAutoLeftAndRight(); }
402 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? has AutoTopAndBottom() : hasAutoLeftAndRight(); } 402 bool hasStaticBlockPosition() const { return hasAutoTopAndBottom(); }
403 403
404 EPosition position() const { return static_cast<EPosition>(noninherited_flag s.position); } 404 EPosition position() const { return static_cast<EPosition>(noninherited_flag s.position); }
405 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition; } 405 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition; }
406 bool hasInFlowPosition() const { return position() == RelativePosition; } 406 bool hasInFlowPosition() const { return position() == RelativePosition; }
407 EFloat floating() const { return static_cast<EFloat>(noninherited_flags.floa ting); } 407 EFloat floating() const { return static_cast<EFloat>(noninherited_flags.floa ting); }
408 408
409 const Length& width() const { return m_box->width(); } 409 const Length& width() const { return m_box->width(); }
410 const Length& height() const { return m_box->height(); } 410 const Length& height() const { return m_box->height(); }
411 const Length& minWidth() const { return m_box->minWidth(); } 411 const Length& minWidth() const { return m_box->minWidth(); }
412 const Length& maxWidth() const { return m_box->maxWidth(); } 412 const Length& maxWidth() const { return m_box->maxWidth(); }
413 const Length& minHeight() const { return m_box->minHeight(); } 413 const Length& minHeight() const { return m_box->minHeight(); }
414 const Length& maxHeight() const { return m_box->maxHeight(); } 414 const Length& maxHeight() const { return m_box->maxHeight(); }
415 415
416 const Length& logicalWidth() const { return isHorizontalWritingMode() ? widt h() : height(); } 416 const Length& logicalWidth() const { return width(); }
417 const Length& logicalHeight() const { return isHorizontalWritingMode() ? hei ght() : width(); } 417 const Length& logicalHeight() const { return height(); }
418 const Length& logicalMinWidth() const { return isHorizontalWritingMode() ? m inWidth() : minHeight(); } 418 const Length& logicalMinWidth() const { return minWidth(); }
419 const Length& logicalMaxWidth() const { return isHorizontalWritingMode() ? m axWidth() : maxHeight(); } 419 const Length& logicalMaxWidth() const { return maxWidth(); }
420 const Length& logicalMinHeight() const { return isHorizontalWritingMode() ? minHeight() : minWidth(); } 420 const Length& logicalMinHeight() const { return minHeight(); }
421 const Length& logicalMaxHeight() const { return isHorizontalWritingMode() ? maxHeight() : maxWidth(); } 421 const Length& logicalMaxHeight() const { return maxHeight(); }
422 422
423 const BorderData& border() const { return surround->border; } 423 const BorderData& border() const { return surround->border; }
424 const BorderValue& borderLeft() const { return surround->border.left(); } 424 const BorderValue& borderLeft() const { return surround->border.left(); }
425 const BorderValue& borderRight() const { return surround->border.right(); } 425 const BorderValue& borderRight() const { return surround->border.right(); }
426 const BorderValue& borderTop() const { return surround->border.top(); } 426 const BorderValue& borderTop() const { return surround->border.top(); }
427 const BorderValue& borderBottom() const { return surround->border.bottom(); } 427 const BorderValue& borderBottom() const { return surround->border.bottom(); }
428 428
429 const BorderValue& borderBefore() const; 429 const BorderValue& borderBefore() const;
430 const BorderValue& borderAfter() const; 430 const BorderValue& borderAfter() const;
431 const BorderValue& borderStart() const; 431 const BorderValue& borderStart() const;
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 824
825 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; } 825 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; }
826 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; } 826 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; }
827 bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedD ata->m_runningFilterAnimationOnCompositor; } 827 bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedD ata->m_runningFilterAnimationOnCompositor; }
828 bool isRunningAnimationOnCompositor() { return isRunningOpacityAnimationOnCo mpositor() || isRunningTransformAnimationOnCompositor() || isRunningFilterAnimat ionOnCompositor(); } 828 bool isRunningAnimationOnCompositor() { return isRunningOpacityAnimationOnCo mpositor() || isRunningTransformAnimationOnCompositor() || isRunningFilterAnimat ionOnCompositor(); }
829 829
830 LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxC ontain; } 830 LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxC ontain; }
831 const LineClampValue& lineClamp() const { return rareNonInheritedData->lineC lamp; } 831 const LineClampValue& lineClamp() const { return rareNonInheritedData->lineC lamp; }
832 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo r; } 832 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo r; }
833 833
834 bool isHorizontalWritingMode() const { return blink::isHorizontalWritingMode (); } 834 // FIXME(sky): Remove these.
835 bool isFlippedLinesWritingMode() const { return blink::isFlippedLinesWriting Mode(); } 835 bool isHorizontalWritingMode() const { return true; }
836 bool isFlippedBlocksWritingMode() const { return blink::isFlippedBlocksWriti ngMode(); } 836 bool isFlippedLinesWritingMode() const { return false; }
837 bool isFlippedBlocksWritingMode() const { return false; }
837 838
838 EImageRendering imageRendering() const { return static_cast<EImageRendering> (rareInheritedData->m_imageRendering); } 839 EImageRendering imageRendering() const { return static_cast<EImageRendering> (rareInheritedData->m_imageRendering); }
839 840
840 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); } 841 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); }
841 842
842 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_ filter.access()->m_operations; } 843 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_ filter.access()->m_operations; }
843 const FilterOperations& filter() const { return rareNonInheritedData->m_filt er->m_operations; } 844 const FilterOperations& filter() const { return rareNonInheritedData->m_filt er->m_operations; }
844 bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operation s.operations().isEmpty(); } 845 bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operation s.operations().isEmpty(); }
845 846
846 WebBlendMode blendMode() const; 847 WebBlendMode blendMode() const;
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 Color colorIncludingFallback(int colorProperty) const; 1523 Color colorIncludingFallback(int colorProperty) const;
1523 1524
1524 private: 1525 private:
1525 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; } 1526 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; }
1526 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const; 1527 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
1527 LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const; 1528 LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const;
1528 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const; 1529 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const;
1529 void getShadowVerticalExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& bottom) const; 1530 void getShadowVerticalExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& bottom) const;
1530 void getShadowInlineDirectionExtent(const ShadowList* shadow, LayoutUnit& lo gicalLeft, LayoutUnit& logicalRight) const 1531 void getShadowInlineDirectionExtent(const ShadowList* shadow, LayoutUnit& lo gicalLeft, LayoutUnit& logicalRight) const
1531 { 1532 {
1532 return isHorizontalWritingMode() ? getShadowHorizontalExtent(shadow, log icalLeft, logicalRight) : getShadowVerticalExtent(shadow, logicalLeft, logicalRi ght); 1533 return getShadowHorizontalExtent(shadow, logicalLeft, logicalRight);
1533 } 1534 }
1534 void getShadowBlockDirectionExtent(const ShadowList* shadow, LayoutUnit& log icalTop, LayoutUnit& logicalBottom) const 1535 void getShadowBlockDirectionExtent(const ShadowList* shadow, LayoutUnit& log icalTop, LayoutUnit& logicalBottom) const
1535 { 1536 {
1536 return isHorizontalWritingMode() ? getShadowVerticalExtent(shadow, logic alTop, logicalBottom) : getShadowHorizontalExtent(shadow, logicalTop, logicalBot tom); 1537 return getShadowVerticalExtent(shadow, logicalTop, logicalBottom);
1537 } 1538 }
1538 1539
1539 bool isDisplayFlexibleBox(EDisplay display) const 1540 bool isDisplayFlexibleBox(EDisplay display) const
1540 { 1541 {
1541 return display == FLEX || display == INLINE_FLEX; 1542 return display == FLEX || display == INLINE_FLEX;
1542 } 1543 }
1543 1544
1544 bool isDisplayGridBox(EDisplay display) const 1545 bool isDisplayGridBox(EDisplay display) const
1545 { 1546 {
1546 return display == GRID || display == INLINE_GRID; 1547 return display == GRID || display == INLINE_GRID;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 1649
1649 rareInheritedData.access()->m_textOrientation = textOrientation; 1650 rareInheritedData.access()->m_textOrientation = textOrientation;
1650 return true; 1651 return true;
1651 } 1652 }
1652 1653
1653 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1654 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1654 1655
1655 } // namespace blink 1656 } // namespace blink
1656 1657
1657 #endif // RenderStyle_h 1658 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/shapes/Shape.cpp ('k') | sky/engine/platform/LengthBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698