OLD | NEW |
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 | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * 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. |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 return NoInherit; | 232 return NoInherit; |
233 } | 233 } |
234 | 234 |
235 // TODO(sashab): Generate this function. | 235 // TODO(sashab): Generate this function. |
236 void ComputedStyle::propagateIndependentInheritedProperties( | 236 void ComputedStyle::propagateIndependentInheritedProperties( |
237 const ComputedStyle& parentStyle) { | 237 const ComputedStyle& parentStyle) { |
238 if (m_nonInheritedData.m_isPointerEventsInherited) | 238 if (m_nonInheritedData.m_isPointerEventsInherited) |
239 setPointerEvents(parentStyle.pointerEvents()); | 239 setPointerEvents(parentStyle.pointerEvents()); |
240 if (m_nonInheritedData.m_isVisibilityInherited) | 240 if (m_nonInheritedData.m_isVisibilityInherited) |
241 setVisibility(parentStyle.visibility()); | 241 setVisibility(parentStyle.visibility()); |
| 242 if (m_nonInheritedData.m_isWhiteSpaceInherited) |
| 243 setWhiteSpace(parentStyle.whiteSpace()); |
242 } | 244 } |
243 | 245 |
244 StyleSelfAlignmentData resolvedSelfAlignment( | 246 StyleSelfAlignmentData resolvedSelfAlignment( |
245 const StyleSelfAlignmentData& value, | 247 const StyleSelfAlignmentData& value, |
246 ItemPosition normalValueBehavior) { | 248 ItemPosition normalValueBehavior) { |
247 // To avoid needing to copy the RareNonInheritedData, we repurpose the 'auto' | 249 // To avoid needing to copy the RareNonInheritedData, we repurpose the 'auto' |
248 // flag to not just mean 'auto' prior to running the StyleAdjuster but also | 250 // flag to not just mean 'auto' prior to running the StyleAdjuster but also |
249 // mean 'normal' after running it. | 251 // mean 'normal' after running it. |
250 if (value.position() == ItemPositionNormal || | 252 if (value.position() == ItemPositionNormal || |
251 value.position() == ItemPositionAuto) | 253 value.position() == ItemPositionAuto) |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 // m_nonInheritedData.m_affectedByActive | 421 // m_nonInheritedData.m_affectedByActive |
420 // m_nonInheritedData.m_affectedByDrag | 422 // m_nonInheritedData.m_affectedByDrag |
421 // m_nonInheritedData.m_isLink | 423 // m_nonInheritedData.m_isLink |
422 | 424 |
423 // Any properties that are inherited on a style are also inherited on elements | 425 // Any properties that are inherited on a style are also inherited on elements |
424 // that share this style. | 426 // that share this style. |
425 m_nonInheritedData.m_isPointerEventsInherited = | 427 m_nonInheritedData.m_isPointerEventsInherited = |
426 other.m_nonInheritedData.m_isPointerEventsInherited; | 428 other.m_nonInheritedData.m_isPointerEventsInherited; |
427 m_nonInheritedData.m_isVisibilityInherited = | 429 m_nonInheritedData.m_isVisibilityInherited = |
428 other.m_nonInheritedData.m_isVisibilityInherited; | 430 other.m_nonInheritedData.m_isVisibilityInherited; |
| 431 m_nonInheritedData.m_isWhiteSpaceInherited = |
| 432 other.m_nonInheritedData.m_isWhiteSpaceInherited; |
429 | 433 |
430 if (m_svgStyle != other.m_svgStyle) | 434 if (m_svgStyle != other.m_svgStyle) |
431 m_svgStyle.access()->copyNonInheritedFromCached(other.m_svgStyle.get()); | 435 m_svgStyle.access()->copyNonInheritedFromCached(other.m_svgStyle.get()); |
432 DCHECK_EQ(zoom(), initialZoom()); | 436 DCHECK_EQ(zoom(), initialZoom()); |
433 } | 437 } |
434 | 438 |
435 bool ComputedStyle::operator==(const ComputedStyle& o) const { | 439 bool ComputedStyle::operator==(const ComputedStyle& o) const { |
436 return inheritedEqual(o) && nonInheritedEqual(o); | 440 return inheritedEqual(o) && nonInheritedEqual(o); |
437 } | 441 } |
438 | 442 |
(...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2467 if (value < 0) | 2471 if (value < 0) |
2468 fvalue -= 0.5f; | 2472 fvalue -= 0.5f; |
2469 else | 2473 else |
2470 fvalue += 0.5f; | 2474 fvalue += 0.5f; |
2471 } | 2475 } |
2472 | 2476 |
2473 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2477 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
2474 } | 2478 } |
2475 | 2479 |
2476 } // namespace blink | 2480 } // namespace blink |
OLD | NEW |