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

Side by Side Diff: Source/core/style/ComputedStyle.h

Issue 1165393005: Add helper for computing outset for 'outline' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months 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 | « Source/core/paint/InlinePainter.cpp ('k') | Source/core/style/ComputedStyle.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) 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 unsigned short outlineSize() const { return max(0, outlineWidth() + outlineO ffset()); } 525 unsigned short outlineSize() const { return max(0, outlineWidth() + outlineO ffset()); }
526 unsigned short outlineWidth() const 526 unsigned short outlineWidth() const
527 { 527 {
528 if (m_background->outline().style() == BNONE) 528 if (m_background->outline().style() == BNONE)
529 return 0; 529 return 0;
530 return m_background->outline().width(); 530 return m_background->outline().width();
531 } 531 }
532 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHID DEN; } 532 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHID DEN; }
533 EBorderStyle outlineStyle() const { return m_background->outline().style(); } 533 EBorderStyle outlineStyle() const { return m_background->outline().style(); }
534 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); } 534 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); }
535 int outlineOutset() const;
535 536
536 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_fla gs.overflowX); } 537 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_fla gs.overflowX); }
537 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_fla gs.overflowY); } 538 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_fla gs.overflowY); }
538 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value. 539 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value.
539 bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX () == overflowY()); return overflowX() == OVISIBLE; } 540 bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX () == overflowY()); return overflowX() == OVISIBLE; }
540 bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY() == OPAGEDY; } 541 bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY() == OPAGEDY; }
541 542
542 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f lags._visibility); } 543 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f lags._visibility); }
543 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_flags.verticalAlign); } 544 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_flags.verticalAlign); }
544 const Length& verticalAlignLength() const { return m_box->verticalAlign(); } 545 const Length& verticalAlignLength() const { return m_box->verticalAlign(); }
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 } 1902 }
1902 1903
1903 inline bool ComputedStyle::hasPseudoElementStyle() const 1904 inline bool ComputedStyle::hasPseudoElementStyle() const
1904 { 1905 {
1905 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1906 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1906 } 1907 }
1907 1908
1908 } // namespace blink 1909 } // namespace blink
1909 1910
1910 #endif // ComputedStyle_h 1911 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « Source/core/paint/InlinePainter.cpp ('k') | Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698