OLD | NEW |
---|---|
1 /* | 1 /* |
skobes
2014/06/09 17:53:54
revert this file (no significant change)
| |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
11 * Copyright (C) 2013 Google Inc. All rights reserved. | 11 * Copyright (C) 2013 Google Inc. All rights reserved. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 // FIXME: This is duplicated with StyleResolver.cpp | 57 // FIXME: This is duplicated with StyleResolver.cpp |
58 // Perhaps this should move onto ElementResolveContext or even Element? | 58 // Perhaps this should move onto ElementResolveContext or even Element? |
59 static inline bool isAtShadowBoundary(const Element* element) | 59 static inline bool isAtShadowBoundary(const Element* element) |
60 { | 60 { |
61 if (!element) | 61 if (!element) |
62 return false; | 62 return false; |
63 ContainerNode* parentNode = element->parentNode(); | 63 ContainerNode* parentNode = element->parentNode(); |
64 return parentNode && parentNode->isShadowRoot(); | 64 return parentNode && parentNode->isShadowRoot(); |
65 } | 65 } |
66 | 66 |
67 | |
68 static void addIntrinsicMargins(RenderStyle* style) | 67 static void addIntrinsicMargins(RenderStyle* style) |
69 { | 68 { |
70 // Intrinsic margin value. | 69 // Intrinsic margin value. |
71 const int intrinsicMargin = 2 * style->effectiveZoom(); | 70 const int intrinsicMargin = 2 * style->effectiveZoom(); |
72 | 71 |
73 // FIXME: Using width/height alone and not also dealing with min-width/max-w idth is flawed. | 72 // FIXME: Using width/height alone and not also dealing with min-width/max-w idth is flawed. |
74 // FIXME: Using "quirk" to decide the margin wasn't set is kind of lame. | 73 // FIXME: Using "quirk" to decide the margin wasn't set is kind of lame. |
75 if (style->width().isIntrinsicOrAuto()) { | 74 if (style->width().isIntrinsicOrAuto()) { |
76 if (style->marginLeft().quirk()) | 75 if (style->marginLeft().quirk()) |
77 style->setMarginLeft(Length(intrinsicMargin, Fixed)); | 76 style->setMarginLeft(Length(intrinsicMargin, Fixed)); |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX)) | 440 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX)) |
442 style->setWritingMode(TopToBottomWritingMode); | 441 style->setWritingMode(TopToBottomWritingMode); |
443 | 442 |
444 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) { | 443 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) { |
445 style->setFloating(NoFloat); | 444 style->setFloating(NoFloat); |
446 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles)); | 445 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles)); |
447 } | 446 } |
448 } | 447 } |
449 | 448 |
450 } | 449 } |
OLD | NEW |