| 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 15 matching lines...) Expand all Loading... |
| 26 * Boston, MA 02110-1301, USA. | 26 * Boston, MA 02110-1301, USA. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "core/css/resolver/StyleAdjuster.h" | 29 #include "core/css/resolver/StyleAdjuster.h" |
| 30 | 30 |
| 31 #include "core/HTMLNames.h" | 31 #include "core/HTMLNames.h" |
| 32 #include "core/SVGNames.h" | 32 #include "core/SVGNames.h" |
| 33 #include "core/dom/ContainerNode.h" | 33 #include "core/dom/ContainerNode.h" |
| 34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "core/dom/Element.h" | 35 #include "core/dom/Element.h" |
| 36 #include "core/dom/Fullscreen.h" |
| 37 #include "core/frame/FrameHost.h" |
| 36 #include "core/frame/FrameView.h" | 38 #include "core/frame/FrameView.h" |
| 37 #include "core/frame/Settings.h" | 39 #include "core/frame/Settings.h" |
| 38 #include "core/frame/UseCounter.h" | 40 #include "core/frame/UseCounter.h" |
| 41 #include "core/frame/VisualViewport.h" |
| 39 #include "core/html/HTMLIFrameElement.h" | 42 #include "core/html/HTMLIFrameElement.h" |
| 40 #include "core/html/HTMLInputElement.h" | 43 #include "core/html/HTMLInputElement.h" |
| 41 #include "core/html/HTMLPlugInElement.h" | 44 #include "core/html/HTMLPlugInElement.h" |
| 42 #include "core/html/HTMLTableCellElement.h" | 45 #include "core/html/HTMLTableCellElement.h" |
| 43 #include "core/html/HTMLTextAreaElement.h" | 46 #include "core/html/HTMLTextAreaElement.h" |
| 44 #include "core/layout/LayoutTheme.h" | 47 #include "core/layout/LayoutTheme.h" |
| 48 #include "core/page/Page.h" |
| 45 #include "core/style/ComputedStyle.h" | 49 #include "core/style/ComputedStyle.h" |
| 46 #include "core/style/ComputedStyleConstants.h" | 50 #include "core/style/ComputedStyleConstants.h" |
| 47 #include "core/svg/SVGSVGElement.h" | 51 #include "core/svg/SVGSVGElement.h" |
| 48 #include "platform/Length.h" | 52 #include "platform/Length.h" |
| 49 #include "platform/transforms/TransformOperations.h" | 53 #include "platform/transforms/TransformOperations.h" |
| 50 #include "wtf/Assertions.h" | 54 #include "wtf/Assertions.h" |
| 51 | 55 |
| 52 namespace blink { | 56 namespace blink { |
| 53 | 57 |
| 54 using namespace HTMLNames; | 58 using namespace HTMLNames; |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // We don't adjust the first letter style earlier because we may change
the display setting in | 387 // We don't adjust the first letter style earlier because we may change
the display setting in |
| 384 // adjustStyeForTagName() above. | 388 // adjustStyeForTagName() above. |
| 385 adjustStyleForFirstLetter(style); | 389 adjustStyleForFirstLetter(style); |
| 386 | 390 |
| 387 adjustStyleForDisplay(style, parentStyle, element ? &element->document()
: 0); | 391 adjustStyleForDisplay(style, parentStyle, element ? &element->document()
: 0); |
| 388 | 392 |
| 389 // Paint containment forces a block formatting context, so we must coerc
e from inline. | 393 // Paint containment forces a block formatting context, so we must coerc
e from inline. |
| 390 // https://drafts.csswg.org/css-containment/#containment-paint | 394 // https://drafts.csswg.org/css-containment/#containment-paint |
| 391 if (style.containsPaint() && style.display() == INLINE) | 395 if (style.containsPaint() && style.display() == INLINE) |
| 392 style.setDisplay(BLOCK); | 396 style.setDisplay(BLOCK); |
| 397 |
| 398 if (element && Fullscreen::isActiveFullScreenElement(*element)) { |
| 399 // We need to size the fullscreen element to the inner viewport and
not to the |
| 400 // outer viewport (what percentage would do). Unfortunately CSS can'
t handle |
| 401 // that as we don't expose the inner viewport information. |
| 402 // |
| 403 // TODO(dsinclair): We should find a way to get this standardized. c
rbug.com/534924 |
| 404 IntSize viewportSize = element->document().page()->frameHost().visua
lViewport().size(); |
| 405 style.setWidth(Length(viewportSize.width(), Fixed)); |
| 406 style.setHeight(Length(viewportSize.height(), Fixed)); |
| 407 } |
| 393 } else { | 408 } else { |
| 394 adjustStyleForFirstLetter(style); | 409 adjustStyleForFirstLetter(style); |
| 395 } | 410 } |
| 396 | 411 |
| 397 if (element && element->hasCompositorProxy()) | 412 if (element && element->hasCompositorProxy()) |
| 398 style.setHasCompositorProxy(true); | 413 style.setHasCompositorProxy(true); |
| 399 | 414 |
| 400 // Make sure our z-index value is only applied if the object is positioned. | 415 // Make sure our z-index value is only applied if the object is positioned. |
| 401 if (style.position() == StaticPosition && !parentStyleForcesZIndexToCreateSt
ackingContext(parentStyle)) | 416 if (style.position() == StaticPosition && !parentStyleForcesZIndexToCreateSt
ackingContext(parentStyle)) |
| 402 style.setHasAutoZIndex(); | 417 style.setHasAutoZIndex(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 style.setDisplay(BLOCK); | 467 style.setDisplay(BLOCK); |
| 453 | 468 |
| 454 // Columns don't apply to svg text elements. | 469 // Columns don't apply to svg text elements. |
| 455 if (isSVGTextElement(*element)) | 470 if (isSVGTextElement(*element)) |
| 456 style.clearMultiCol(); | 471 style.clearMultiCol(); |
| 457 } | 472 } |
| 458 adjustStyleForAlignment(style, parentStyle); | 473 adjustStyleForAlignment(style, parentStyle); |
| 459 } | 474 } |
| 460 | 475 |
| 461 } // namespace blink | 476 } // namespace blink |
| OLD | NEW |