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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 1852663002: Oilpan: Remove WillBe types (part 9) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 * 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 || rareInheritedData->visitedLinkTextFillColor() != other.rareIn heritedData->visitedLinkTextFillColor() 806 || rareInheritedData->visitedLinkTextFillColor() != other.rareIn heritedData->visitedLinkTextFillColor()
807 || rareInheritedData->visitedLinkTextStrokeColor() != other.rare InheritedData->visitedLinkTextStrokeColor() 807 || rareInheritedData->visitedLinkTextStrokeColor() != other.rare InheritedData->visitedLinkTextStrokeColor()
808 || rareInheritedData->visitedLinkTextEmphasisColor() != other.ra reInheritedData->visitedLinkTextEmphasisColor() 808 || rareInheritedData->visitedLinkTextEmphasisColor() != other.ra reInheritedData->visitedLinkTextEmphasisColor()
809 || rareInheritedData->textEmphasisFill != other.rareInheritedDat a->textEmphasisFill 809 || rareInheritedData->textEmphasisFill != other.rareInheritedDat a->textEmphasisFill
810 || rareInheritedData->appliedTextDecorations != other.rareInheri tedData->appliedTextDecorations)) { 810 || rareInheritedData->appliedTextDecorations != other.rareInheri tedData->appliedTextDecorations)) {
811 diff.setTextDecorationOrColorChanged(); 811 diff.setTextDecorationOrColorChanged();
812 } 812 }
813 } 813 }
814 } 814 }
815 815
816 void ComputedStyle::addCursor(PassRefPtrWillBeRawPtr<StyleImage> image, bool hot SpotSpecified, const IntPoint& hotSpot) 816 void ComputedStyle::addCursor(RawPtr<StyleImage> image, bool hotSpotSpecified, c onst IntPoint& hotSpot)
817 { 817 {
818 if (!rareInheritedData.access()->cursorData) { 818 if (!rareInheritedData.access()->cursorData) {
819 #if ENABLE(OILPAN) 819 #if ENABLE(OILPAN)
820 rareInheritedData.access()->cursorData = new CursorList; 820 rareInheritedData.access()->cursorData = new CursorList;
821 #else 821 #else
822 rareInheritedData.access()->cursorData = CursorList::create(); 822 rareInheritedData.access()->cursorData = CursorList::create();
823 #endif 823 #endif
824 } 824 }
825 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpotSpec ified, hotSpot)); 825 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpotSpec ified, hotSpot));
826 } 826 }
827 827
828 void ComputedStyle::setCursorList(PassRefPtrWillBeRawPtr<CursorList> other) 828 void ComputedStyle::setCursorList(RawPtr<CursorList> other)
829 { 829 {
830 rareInheritedData.access()->cursorData = other; 830 rareInheritedData.access()->cursorData = other;
831 } 831 }
832 832
833 void ComputedStyle::setQuotes(PassRefPtr<QuotesData> q) 833 void ComputedStyle::setQuotes(PassRefPtr<QuotesData> q)
834 { 834 {
835 rareInheritedData.access()->quotes = q; 835 rareInheritedData.access()->quotes = q;
836 } 836 }
837 837
838 void ComputedStyle::clearCursorList() 838 void ComputedStyle::clearCursorList()
839 { 839 {
840 if (rareInheritedData->cursorData) 840 if (rareInheritedData->cursorData)
841 rareInheritedData.access()->cursorData = nullptr; 841 rareInheritedData.access()->cursorData = nullptr;
842 } 842 }
843 843
844 void ComputedStyle::addCallbackSelector(const String& selector) 844 void ComputedStyle::addCallbackSelector(const String& selector)
845 { 845 {
846 if (!rareNonInheritedData->m_callbackSelectors.contains(selector)) 846 if (!rareNonInheritedData->m_callbackSelectors.contains(selector))
847 rareNonInheritedData.access()->m_callbackSelectors.append(selector); 847 rareNonInheritedData.access()->m_callbackSelectors.append(selector);
848 } 848 }
849 849
850 void ComputedStyle::clearContent() 850 void ComputedStyle::clearContent()
851 { 851 {
852 if (rareNonInheritedData->m_content) 852 if (rareNonInheritedData->m_content)
853 rareNonInheritedData.access()->m_content = nullptr; 853 rareNonInheritedData.access()->m_content = nullptr;
854 } 854 }
855 855
856 void ComputedStyle::appendContent(PassOwnPtrWillBeRawPtr<ContentData> contentDat a) 856 void ComputedStyle::appendContent(RawPtr<ContentData> contentData)
857 { 857 {
858 OwnPtrWillBePersistent<ContentData>& content = rareNonInheritedData.access() ->m_content; 858 Persistent<ContentData>& content = rareNonInheritedData.access()->m_content;
859 if (!content) { 859 if (!content) {
860 content = contentData; 860 content = contentData;
861 return; 861 return;
862 } 862 }
863 ContentData* lastContent = content.get(); 863 ContentData* lastContent = content.get();
864 while (lastContent->next()) 864 while (lastContent->next())
865 lastContent = lastContent->next(); 865 lastContent = lastContent->next();
866 lastContent->setNext(contentData); 866 lastContent->setNext(contentData);
867 } 867 }
868 868
869 void ComputedStyle::setContent(PassRefPtrWillBeRawPtr<StyleImage> image) 869 void ComputedStyle::setContent(RawPtr<StyleImage> image)
870 { 870 {
871 appendContent(ContentData::create(image)); 871 appendContent(ContentData::create(image));
872 } 872 }
873 873
874 void ComputedStyle::setContent(const String& string) 874 void ComputedStyle::setContent(const String& string)
875 { 875 {
876 OwnPtrWillBePersistent<ContentData>& content = rareNonInheritedData.access() ->m_content; 876 Persistent<ContentData>& content = rareNonInheritedData.access()->m_content;
877 if (!content) { 877 if (!content) {
878 content = ContentData::create(string); 878 content = ContentData::create(string);
879 return; 879 return;
880 } 880 }
881 881
882 ContentData* lastContent = content.get(); 882 ContentData* lastContent = content.get();
883 while (lastContent->next()) 883 while (lastContent->next())
884 lastContent = lastContent->next(); 884 lastContent = lastContent->next();
885 885
886 // We attempt to merge with the last ContentData if possible. 886 // We attempt to merge with the last ContentData if possible.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 floatValueForLength(border.topLeft().height(), size.height().toFloat ())), 1055 floatValueForLength(border.topLeft().height(), size.height().toFloat ())),
1056 FloatSize(floatValueForLength(border.topRight().width(), size.width().to Float()), 1056 FloatSize(floatValueForLength(border.topRight().width(), size.width().to Float()),
1057 floatValueForLength(border.topRight().height(), size.height().toFloa t())), 1057 floatValueForLength(border.topRight().height(), size.height().toFloa t())),
1058 FloatSize(floatValueForLength(border.bottomLeft().width(), size.width(). toFloat()), 1058 FloatSize(floatValueForLength(border.bottomLeft().width(), size.width(). toFloat()),
1059 floatValueForLength(border.bottomLeft().height(), size.height().toFl oat())), 1059 floatValueForLength(border.bottomLeft().height(), size.height().toFl oat())),
1060 FloatSize(floatValueForLength(border.bottomRight().width(), size.width() .toFloat()), 1060 FloatSize(floatValueForLength(border.bottomRight().width(), size.width() .toFloat()),
1061 floatValueForLength(border.bottomRight().height(), size.height().toF loat()))); 1061 floatValueForLength(border.bottomRight().height(), size.height().toF loat())));
1062 } 1062 }
1063 1063
1064 StyleImage* ComputedStyle::listStyleImage() const { return rareInheritedData->li stStyleImage.get(); } 1064 StyleImage* ComputedStyle::listStyleImage() const { return rareInheritedData->li stStyleImage.get(); }
1065 void ComputedStyle::setListStyleImage(PassRefPtrWillBeRawPtr<StyleImage> v) 1065 void ComputedStyle::setListStyleImage(RawPtr<StyleImage> v)
1066 { 1066 {
1067 if (rareInheritedData->listStyleImage != v) 1067 if (rareInheritedData->listStyleImage != v)
1068 rareInheritedData.access()->listStyleImage = v; 1068 rareInheritedData.access()->listStyleImage = v;
1069 } 1069 }
1070 1070
1071 Color ComputedStyle::color() const { return inherited->color; } 1071 Color ComputedStyle::color() const { return inherited->color; }
1072 Color ComputedStyle::visitedLinkColor() const { return inherited->visitedLinkCol or; } 1072 Color ComputedStyle::visitedLinkColor() const { return inherited->visitedLinkCol or; }
1073 void ComputedStyle::setColor(const Color& v) { SET_VAR(inherited, color, v); } 1073 void ComputedStyle::setColor(const Color& v) { SET_VAR(inherited, color, v); }
1074 void ComputedStyle::setVisitedLinkColor(const Color& v) { SET_VAR(inherited, vis itedLinkColor, v); } 1074 void ComputedStyle::setVisitedLinkColor(const Color& v) { SET_VAR(inherited, vis itedLinkColor, v); }
1075 1075
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 1757
1758 LayoutRectOutsets ComputedStyle::imageOutsets(const NinePieceImage& image) const 1758 LayoutRectOutsets ComputedStyle::imageOutsets(const NinePieceImage& image) const
1759 { 1759 {
1760 return LayoutRectOutsets( 1760 return LayoutRectOutsets(
1761 NinePieceImage::computeOutset(image.outset().top(), borderTopWidth()), 1761 NinePieceImage::computeOutset(image.outset().top(), borderTopWidth()),
1762 NinePieceImage::computeOutset(image.outset().right(), borderRightWidth() ), 1762 NinePieceImage::computeOutset(image.outset().right(), borderRightWidth() ),
1763 NinePieceImage::computeOutset(image.outset().bottom(), borderBottomWidth ()), 1763 NinePieceImage::computeOutset(image.outset().bottom(), borderBottomWidth ()),
1764 NinePieceImage::computeOutset(image.outset().left(), borderLeftWidth())) ; 1764 NinePieceImage::computeOutset(image.outset().left(), borderLeftWidth())) ;
1765 } 1765 }
1766 1766
1767 void ComputedStyle::setBorderImageSource(PassRefPtrWillBeRawPtr<StyleImage> imag e) 1767 void ComputedStyle::setBorderImageSource(RawPtr<StyleImage> image)
1768 { 1768 {
1769 if (surround->border.m_image.image() == image.get()) 1769 if (surround->border.m_image.image() == image.get())
1770 return; 1770 return;
1771 surround.access()->border.m_image.setImage(image); 1771 surround.access()->border.m_image.setImage(image);
1772 } 1772 }
1773 1773
1774 void ComputedStyle::setBorderImageSlices(const LengthBox& slices) 1774 void ComputedStyle::setBorderImageSlices(const LengthBox& slices)
1775 { 1775 {
1776 if (surround->border.m_image.imageSlices() == slices) 1776 if (surround->border.m_image.imageSlices() == slices)
1777 return; 1777 return;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 if (!shadowList) 1857 if (!shadowList)
1858 return false; 1858 return false;
1859 for (size_t i = shadowList->shadows().size(); i--; ) { 1859 for (size_t i = shadowList->shadows().size(); i--; ) {
1860 if (shadowList->shadows()[i].color().isCurrentColor()) 1860 if (shadowList->shadows()[i].color().isCurrentColor())
1861 return true; 1861 return true;
1862 } 1862 }
1863 return false; 1863 return false;
1864 } 1864 }
1865 1865
1866 } // namespace blink 1866 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698