OLD | NEW |
1 /* | 1 /* |
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. |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "core/css/resolver/StyleAdjuster.h" | 30 #include "core/css/resolver/StyleAdjuster.h" |
31 | 31 |
32 #include "HTMLNames.h" | 32 #include "HTMLNames.h" |
33 #include "SVGNames.h" | 33 #include "SVGNames.h" |
34 #include "core/dom/ContainerNode.h" | 34 #include "core/dom/ContainerNode.h" |
35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
36 #include "core/dom/Element.h" | 36 #include "core/dom/Element.h" |
37 #include "core/dom/NodeRenderStyle.h" | 37 #include "core/dom/NodeRenderStyle.h" |
38 #include "core/html/HTMLIFrameElement.h" | 38 #include "core/html/HTMLIFrameElement.h" |
39 #include "core/html/HTMLInputElement.h" | 39 #include "core/html/HTMLInputElement.h" |
| 40 #include "core/html/HTMLPlugInElement.h" |
40 #include "core/html/HTMLTableCellElement.h" | 41 #include "core/html/HTMLTableCellElement.h" |
41 #include "core/html/HTMLTextAreaElement.h" | 42 #include "core/html/HTMLTextAreaElement.h" |
42 #include "core/frame/FrameView.h" | 43 #include "core/frame/FrameView.h" |
43 #include "core/frame/Settings.h" | 44 #include "core/frame/Settings.h" |
44 #include "core/rendering/RenderTheme.h" | 45 #include "core/rendering/RenderTheme.h" |
45 #include "core/rendering/style/GridPosition.h" | 46 #include "core/rendering/style/GridPosition.h" |
46 #include "core/rendering/style/RenderStyle.h" | 47 #include "core/rendering/style/RenderStyle.h" |
47 #include "core/rendering/style/RenderStyleConstants.h" | 48 #include "core/rendering/style/RenderStyleConstants.h" |
48 #include "core/svg/SVGSVGElement.h" | 49 #include "core/svg/SVGSVGElement.h" |
49 #include "platform/Length.h" | 50 #include "platform/Length.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 365 |
365 // Important: Intrinsic margins get added to controls before the theme h
as adjusted the style, | 366 // Important: Intrinsic margins get added to controls before the theme h
as adjusted the style, |
366 // since the theme will alter fonts and heights/widths. | 367 // since the theme will alter fonts and heights/widths. |
367 // | 368 // |
368 // Don't apply intrinsic margins to image buttons. The designer knows ho
w big the images are, | 369 // Don't apply intrinsic margins to image buttons. The designer knows ho
w big the images are, |
369 // so we have to treat all image buttons as though they were explicitly
sized. | 370 // so we have to treat all image buttons as though they were explicitly
sized. |
370 if (style->fontSize() >= 11 && (!isHTMLInputElement(element) || !toHTMLI
nputElement(element).isImageButton())) | 371 if (style->fontSize() >= 11 && (!isHTMLInputElement(element) || !toHTMLI
nputElement(element).isImageButton())) |
371 addIntrinsicMargins(style); | 372 addIntrinsicMargins(style); |
372 return; | 373 return; |
373 } | 374 } |
| 375 |
| 376 if (isHTMLPlugInElement(element)) { |
| 377 style->setRequiresAcceleratedCompositingForExternalReasons(toHTMLPlugInE
lement(element).shouldAccelerate()); |
| 378 return; |
| 379 } |
374 } | 380 } |
375 | 381 |
376 void StyleAdjuster::adjustOverflow(RenderStyle* style) | 382 void StyleAdjuster::adjustOverflow(RenderStyle* style) |
377 { | 383 { |
378 ASSERT(style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE); | 384 ASSERT(style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE); |
379 | 385 |
380 // If either overflow value is not visible, change to auto. | 386 // If either overflow value is not visible, change to auto. |
381 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { | 387 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { |
382 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden | 388 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden |
383 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it | 389 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 447 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
442 style->setWritingMode(TopToBottomWritingMode); | 448 style->setWritingMode(TopToBottomWritingMode); |
443 | 449 |
444 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { | 450 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { |
445 style->setFloating(NoFloat); | 451 style->setFloating(NoFloat); |
446 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 452 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
447 } | 453 } |
448 } | 454 } |
449 | 455 |
450 } | 456 } |
OLD | NEW |