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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased once again to master, fixed layout test. Created 6 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * Copyright (C) 2013 Opera Software ASA. All rights reserved.
5 * 6 *
6 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
10 * 11 *
11 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 15 * Library General Public License for more details.
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 void RenderStyle::setContent(QuoteType quote, bool add) 786 void RenderStyle::setContent(QuoteType quote, bool add)
786 { 787 {
787 if (add) { 788 if (add) {
788 appendContent(ContentData::create(quote)); 789 appendContent(ContentData::create(quote));
789 return; 790 return;
790 } 791 }
791 792
792 rareNonInheritedData.access()->m_content = ContentData::create(quote); 793 rareNonInheritedData.access()->m_content = ContentData::create(quote);
793 } 794 }
794 795
796 void RenderStyle::setNavigation(const StyleNavigationData& data)
797 {
798 rareNonInheritedData.access()->m_navigation = adoptPtr(new StyleNavigationDa ta(data));
799 }
800
801 void RenderStyle::setNavigation(StyleNavigationData::NavigationDirection directi on, const StyleNavigationValue& value, bool add)
802 {
803 if (add && rareNonInheritedData->m_navigation) {
804 rareNonInheritedData.access()->m_navigation->SetProperty(direction, valu e);
805 return;
806 }
807
808 StyleNavigationData data(direction, value);
809 setNavigation(data);
810 }
811
795 blink::WebBlendMode RenderStyle::blendMode() const 812 blink::WebBlendMode RenderStyle::blendMode() const
796 { 813 {
797 if (RuntimeEnabledFeatures::cssCompositingEnabled()) 814 if (RuntimeEnabledFeatures::cssCompositingEnabled())
798 return static_cast<blink::WebBlendMode>(rareNonInheritedData->m_effectiv eBlendMode); 815 return static_cast<blink::WebBlendMode>(rareNonInheritedData->m_effectiv eBlendMode);
799 return blink::WebBlendModeNormal; 816 return blink::WebBlendModeNormal;
800 } 817 }
801 818
802 void RenderStyle::setBlendMode(blink::WebBlendMode v) 819 void RenderStyle::setBlendMode(blink::WebBlendMode v)
803 { 820 {
804 if (RuntimeEnabledFeatures::cssCompositingEnabled()) 821 if (RuntimeEnabledFeatures::cssCompositingEnabled())
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 // right 1671 // right
1655 radiiSum = radii.topRight().height() + radii.bottomRight().height(); 1672 radiiSum = radii.topRight().height() + radii.bottomRight().height();
1656 if (radiiSum > rect.height()) 1673 if (radiiSum > rect.height())
1657 factor = std::min(rect.height() / radiiSum, factor); 1674 factor = std::min(rect.height() / radiiSum, factor);
1658 1675
1659 ASSERT(factor <= 1); 1676 ASSERT(factor <= 1);
1660 return factor; 1677 return factor;
1661 } 1678 }
1662 1679
1663 } // namespace WebCore 1680 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698