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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 2168373002: Revert of Reland "Implement FullScreen using top layer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve WebFrameTest.cpp conflict and appease presubmit Created 4 years, 5 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 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
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"
38 #include "core/frame/FrameView.h" 36 #include "core/frame/FrameView.h"
39 #include "core/frame/Settings.h" 37 #include "core/frame/Settings.h"
40 #include "core/frame/UseCounter.h" 38 #include "core/frame/UseCounter.h"
41 #include "core/frame/VisualViewport.h"
42 #include "core/html/HTMLIFrameElement.h" 39 #include "core/html/HTMLIFrameElement.h"
43 #include "core/html/HTMLInputElement.h" 40 #include "core/html/HTMLInputElement.h"
44 #include "core/html/HTMLPlugInElement.h" 41 #include "core/html/HTMLPlugInElement.h"
45 #include "core/html/HTMLTableCellElement.h" 42 #include "core/html/HTMLTableCellElement.h"
46 #include "core/html/HTMLTextAreaElement.h" 43 #include "core/html/HTMLTextAreaElement.h"
47 #include "core/layout/LayoutTheme.h" 44 #include "core/layout/LayoutTheme.h"
48 #include "core/page/Page.h"
49 #include "core/style/ComputedStyle.h" 45 #include "core/style/ComputedStyle.h"
50 #include "core/style/ComputedStyleConstants.h" 46 #include "core/style/ComputedStyleConstants.h"
51 #include "core/svg/SVGSVGElement.h" 47 #include "core/svg/SVGSVGElement.h"
52 #include "platform/Length.h" 48 #include "platform/Length.h"
53 #include "platform/transforms/TransformOperations.h" 49 #include "platform/transforms/TransformOperations.h"
54 #include "wtf/Assertions.h" 50 #include "wtf/Assertions.h"
55 51
56 namespace blink { 52 namespace blink {
57 53
58 using namespace HTMLNames; 54 using namespace HTMLNames;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 // We don't adjust the first letter style earlier because we may change the display setting in 353 // We don't adjust the first letter style earlier because we may change the display setting in
358 // adjustStyeForTagName() above. 354 // adjustStyeForTagName() above.
359 adjustStyleForFirstLetter(style); 355 adjustStyleForFirstLetter(style);
360 356
361 adjustStyleForDisplay(style, parentStyle, element ? &element->document() : 0); 357 adjustStyleForDisplay(style, parentStyle, element ? &element->document() : 0);
362 358
363 // Paint containment forces a block formatting context, so we must coerc e from inline. 359 // Paint containment forces a block formatting context, so we must coerc e from inline.
364 // https://drafts.csswg.org/css-containment/#containment-paint 360 // https://drafts.csswg.org/css-containment/#containment-paint
365 if (style.containsPaint() && style.display() == INLINE) 361 if (style.containsPaint() && style.display() == INLINE)
366 style.setDisplay(BLOCK); 362 style.setDisplay(BLOCK);
367
368 if (element && Fullscreen::isActiveFullScreenElement(*element)) {
369 // We need to size the fullscreen element to the inner viewport and not to the
370 // outer viewport (what percentage would do). Unfortunately CSS can' t handle
371 // that as we don't expose the inner viewport information.
372 //
373 // TODO(dsinclair): We should find a way to get this standardized. c rbug.com/534924
374 IntSize viewportSize = element->document().page()->frameHost().visua lViewport().size();
375 style.setWidth(Length(viewportSize.width(), Fixed));
376 style.setHeight(Length(viewportSize.height(), Fixed));
377 }
378 } else { 363 } else {
379 adjustStyleForFirstLetter(style); 364 adjustStyleForFirstLetter(style);
380 } 365 }
381 366
382 if (element && element->hasCompositorProxy()) 367 if (element && element->hasCompositorProxy())
383 style.setHasCompositorProxy(true); 368 style.setHasCompositorProxy(true);
384 369
385 // Make sure our z-index value is only applied if the object is positioned. 370 // Make sure our z-index value is only applied if the object is positioned.
386 if (style.position() == StaticPosition && !parentStyleForcesZIndexToCreateSt ackingContext(parentStyle)) { 371 if (style.position() == StaticPosition && !parentStyleForcesZIndexToCreateSt ackingContext(parentStyle)) {
387 style.setIsStackingContext(false); 372 style.setIsStackingContext(false);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 style.setDisplay(BLOCK); 410 style.setDisplay(BLOCK);
426 411
427 // Columns don't apply to svg text elements. 412 // Columns don't apply to svg text elements.
428 if (isSVGTextElement(*element)) 413 if (isSVGTextElement(*element))
429 style.clearMultiCol(); 414 style.clearMultiCol();
430 } 415 }
431 adjustStyleForAlignment(style, parentStyle); 416 adjustStyleForAlignment(style, parentStyle);
432 } 417 }
433 418
434 } // namespace blink 419 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/html.css ('k') | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698