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

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

Issue 22482004: Add support for the object-fit CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oops, sorry! Forgot to update UseCounter.cpp Created 7 years, 4 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 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 , m_appearance(RenderStyle::initialAppearance()) 68 , m_appearance(RenderStyle::initialAppearance())
69 , m_borderFit(RenderStyle::initialBorderFit()) 69 , m_borderFit(RenderStyle::initialBorderFit())
70 , m_textCombine(RenderStyle::initialTextCombine()) 70 , m_textCombine(RenderStyle::initialTextCombine())
71 , m_textDecorationStyle(RenderStyle::initialTextDecorationStyle()) 71 , m_textDecorationStyle(RenderStyle::initialTextDecorationStyle())
72 , m_wrapFlow(RenderStyle::initialWrapFlow()) 72 , m_wrapFlow(RenderStyle::initialWrapFlow())
73 , m_wrapThrough(RenderStyle::initialWrapThrough()) 73 , m_wrapThrough(RenderStyle::initialWrapThrough())
74 , m_runningAcceleratedAnimation(false) 74 , m_runningAcceleratedAnimation(false)
75 , m_hasAspectRatio(false) 75 , m_hasAspectRatio(false)
76 , m_effectiveBlendMode(RenderStyle::initialBlendMode()) 76 , m_effectiveBlendMode(RenderStyle::initialBlendMode())
77 , m_touchAction(RenderStyle::initialTouchAction()) 77 , m_touchAction(RenderStyle::initialTouchAction())
78 , m_objectFit(RenderStyle::initialObjectFit())
78 { 79 {
79 m_maskBoxImage.setMaskDefaults(); 80 m_maskBoxImage.setMaskDefaults();
80 } 81 }
81 82
82 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited Data& o) 83 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited Data& o)
83 : RefCounted<StyleRareNonInheritedData>() 84 : RefCounted<StyleRareNonInheritedData>()
84 , opacity(o.opacity) 85 , opacity(o.opacity)
85 , m_aspectRatioDenominator(o.m_aspectRatioDenominator) 86 , m_aspectRatioDenominator(o.m_aspectRatioDenominator)
86 , m_aspectRatioNumerator(o.m_aspectRatioNumerator) 87 , m_aspectRatioNumerator(o.m_aspectRatioNumerator)
87 , m_perspective(o.m_perspective) 88 , m_perspective(o.m_perspective)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 , m_appearance(o.m_appearance) 141 , m_appearance(o.m_appearance)
141 , m_borderFit(o.m_borderFit) 142 , m_borderFit(o.m_borderFit)
142 , m_textCombine(o.m_textCombine) 143 , m_textCombine(o.m_textCombine)
143 , m_textDecorationStyle(o.m_textDecorationStyle) 144 , m_textDecorationStyle(o.m_textDecorationStyle)
144 , m_wrapFlow(o.m_wrapFlow) 145 , m_wrapFlow(o.m_wrapFlow)
145 , m_wrapThrough(o.m_wrapThrough) 146 , m_wrapThrough(o.m_wrapThrough)
146 , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation) 147 , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation)
147 , m_hasAspectRatio(o.m_hasAspectRatio) 148 , m_hasAspectRatio(o.m_hasAspectRatio)
148 , m_effectiveBlendMode(o.m_effectiveBlendMode) 149 , m_effectiveBlendMode(o.m_effectiveBlendMode)
149 , m_touchAction(o.m_touchAction) 150 , m_touchAction(o.m_touchAction)
151 , m_objectFit(o.m_objectFit)
150 { 152 {
151 } 153 }
152 154
153 StyleRareNonInheritedData::~StyleRareNonInheritedData() 155 StyleRareNonInheritedData::~StyleRareNonInheritedData()
154 { 156 {
155 } 157 }
156 158
157 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c onst 159 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c onst
158 { 160 {
159 return opacity == o.opacity 161 return opacity == o.opacity
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 && marginAfterCollapse == o.marginAfterCollapse 216 && marginAfterCollapse == o.marginAfterCollapse
215 && m_appearance == o.m_appearance 217 && m_appearance == o.m_appearance
216 && m_borderFit == o.m_borderFit 218 && m_borderFit == o.m_borderFit
217 && m_textCombine == o.m_textCombine 219 && m_textCombine == o.m_textCombine
218 && m_textDecorationStyle == o.m_textDecorationStyle 220 && m_textDecorationStyle == o.m_textDecorationStyle
219 && m_wrapFlow == o.m_wrapFlow 221 && m_wrapFlow == o.m_wrapFlow
220 && m_wrapThrough == o.m_wrapThrough 222 && m_wrapThrough == o.m_wrapThrough
221 && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation 223 && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation
222 && m_effectiveBlendMode == o.m_effectiveBlendMode 224 && m_effectiveBlendMode == o.m_effectiveBlendMode
223 && m_hasAspectRatio == o.m_hasAspectRatio 225 && m_hasAspectRatio == o.m_hasAspectRatio
224 && m_touchAction == o.m_touchAction; 226 && m_touchAction == o.m_touchAction
227 && m_objectFit == o.m_objectFit;
225 } 228 }
226 229
227 bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInherite dData& o) const 230 bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInherite dData& o) const
228 { 231 {
229 ContentData* a = m_content.get(); 232 ContentData* a = m_content.get();
230 ContentData* b = o.m_content.get(); 233 ContentData* b = o.m_content.get();
231 234
232 while (a && b && *a == *b) { 235 while (a && b && *a == *b) {
233 a = a->next(); 236 a = a->next();
234 b = b->next(); 237 b = b->next();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 bool StyleRareNonInheritedData::transitionDataEquivalent(const StyleRareNonInher itedData& o) const 282 bool StyleRareNonInheritedData::transitionDataEquivalent(const StyleRareNonInher itedData& o) const
280 { 283 {
281 if ((!m_transitions && o.m_transitions) || (m_transitions && !o.m_transition s)) 284 if ((!m_transitions && o.m_transitions) || (m_transitions && !o.m_transition s))
282 return false; 285 return false;
283 if (m_transitions && o.m_transitions && (*m_transitions != *o.m_transitions) ) 286 if (m_transitions && o.m_transitions && (*m_transitions != *o.m_transitions) )
284 return false; 287 return false;
285 return true; 288 return true;
286 } 289 }
287 290
288 } // namespace WebCore 291 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698