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

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

Issue 1855203002: Revert of Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 || rareInheritedData->visitedLinkTextEmphasisColor() != other.ra reInheritedData->visitedLinkTextEmphasisColor() 811 || rareInheritedData->visitedLinkTextEmphasisColor() != other.ra reInheritedData->visitedLinkTextEmphasisColor()
812 || rareInheritedData->textEmphasisFill != other.rareInheritedDat a->textEmphasisFill 812 || rareInheritedData->textEmphasisFill != other.rareInheritedDat a->textEmphasisFill
813 || rareInheritedData->appliedTextDecorations != other.rareInheri tedData->appliedTextDecorations)) { 813 || rareInheritedData->appliedTextDecorations != other.rareInheri tedData->appliedTextDecorations)) {
814 diff.setTextDecorationOrColorChanged(); 814 diff.setTextDecorationOrColorChanged();
815 } 815 }
816 } 816 }
817 } 817 }
818 818
819 void ComputedStyle::addCursor(RawPtr<StyleImage> image, bool hotSpotSpecified, c onst IntPoint& hotSpot) 819 void ComputedStyle::addCursor(RawPtr<StyleImage> image, bool hotSpotSpecified, c onst IntPoint& hotSpot)
820 { 820 {
821 if (!rareInheritedData.access()->cursorData) 821 if (!rareInheritedData.access()->cursorData) {
822 #if ENABLE(OILPAN)
822 rareInheritedData.access()->cursorData = new CursorList; 823 rareInheritedData.access()->cursorData = new CursorList;
824 #else
825 rareInheritedData.access()->cursorData = CursorList::create();
826 #endif
827 }
823 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpotSpec ified, hotSpot)); 828 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpotSpec ified, hotSpot));
824 } 829 }
825 830
826 void ComputedStyle::setCursorList(RawPtr<CursorList> other) 831 void ComputedStyle::setCursorList(RawPtr<CursorList> other)
827 { 832 {
828 rareInheritedData.access()->cursorData = other; 833 rareInheritedData.access()->cursorData = other;
829 } 834 }
830 835
831 void ComputedStyle::setQuotes(PassRefPtr<QuotesData> q) 836 void ComputedStyle::setQuotes(PassRefPtr<QuotesData> q)
832 { 837 {
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 return TextEmphasisMarkDot; 1737 return TextEmphasisMarkDot;
1733 1738
1734 return TextEmphasisMarkSesame; 1739 return TextEmphasisMarkSesame;
1735 } 1740 }
1736 1741
1737 Color ComputedStyle::initialTapHighlightColor() 1742 Color ComputedStyle::initialTapHighlightColor()
1738 { 1743 {
1739 return LayoutTheme::tapHighlightColor(); 1744 return LayoutTheme::tapHighlightColor();
1740 } 1745 }
1741 1746
1747 #if ENABLE(OILPAN)
1742 const FilterOperations& ComputedStyle::initialFilter() 1748 const FilterOperations& ComputedStyle::initialFilter()
1743 { 1749 {
1744 DEFINE_STATIC_LOCAL(FilterOperationsWrapper, ops, (FilterOperationsWrapper:: create())); 1750 DEFINE_STATIC_LOCAL(Persistent<FilterOperationsWrapper>, ops, (FilterOperati onsWrapper::create()));
1745 return ops.operations(); 1751 return ops->operations();
1746 } 1752 }
1747 1753
1748 const FilterOperations& ComputedStyle::initialBackdropFilter() 1754 const FilterOperations& ComputedStyle::initialBackdropFilter()
1749 { 1755 {
1750 DEFINE_STATIC_LOCAL(FilterOperationsWrapper, ops, (FilterOperationsWrapper:: create())); 1756 DEFINE_STATIC_LOCAL(Persistent<FilterOperationsWrapper>, ops, (FilterOperati onsWrapper::create()));
1751 return ops.operations(); 1757 return ops->operations();
1752 } 1758 }
1759 #endif
1753 1760
1754 LayoutRectOutsets ComputedStyle::imageOutsets(const NinePieceImage& image) const 1761 LayoutRectOutsets ComputedStyle::imageOutsets(const NinePieceImage& image) const
1755 { 1762 {
1756 return LayoutRectOutsets( 1763 return LayoutRectOutsets(
1757 NinePieceImage::computeOutset(image.outset().top(), borderTopWidth()), 1764 NinePieceImage::computeOutset(image.outset().top(), borderTopWidth()),
1758 NinePieceImage::computeOutset(image.outset().right(), borderRightWidth() ), 1765 NinePieceImage::computeOutset(image.outset().right(), borderRightWidth() ),
1759 NinePieceImage::computeOutset(image.outset().bottom(), borderBottomWidth ()), 1766 NinePieceImage::computeOutset(image.outset().bottom(), borderBottomWidth ()),
1760 NinePieceImage::computeOutset(image.outset().left(), borderLeftWidth())) ; 1767 NinePieceImage::computeOutset(image.outset().left(), borderLeftWidth())) ;
1761 } 1768 }
1762 1769
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 if (!shadowList) 1860 if (!shadowList)
1854 return false; 1861 return false;
1855 for (size_t i = shadowList->shadows().size(); i--; ) { 1862 for (size_t i = shadowList->shadows().size(); i--; ) {
1856 if (shadowList->shadows()[i].color().isCurrentColor()) 1863 if (shadowList->shadows()[i].color().isCurrentColor())
1857 return true; 1864 return true;
1858 } 1865 }
1859 return false; 1866 return false;
1860 } 1867 }
1861 1868
1862 } // namespace blink 1869 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698