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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp

Issue 2047283002: Avoid touching z-index in StyleAdjuster by using an isStackingContext flag instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments 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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 LayoutFlexibleBox::willBeDestroyed(); 92 LayoutFlexibleBox::willBeDestroyed();
93 } 93 }
94 94
95 void LayoutFullScreen::updateStyle() 95 void LayoutFullScreen::updateStyle()
96 { 96 {
97 RefPtr<ComputedStyle> fullscreenStyle = ComputedStyle::create(); 97 RefPtr<ComputedStyle> fullscreenStyle = ComputedStyle::create();
98 98
99 // Create a stacking context: 99 // Create a stacking context:
100 fullscreenStyle->setZIndex(INT_MAX); 100 fullscreenStyle->setZIndex(INT_MAX);
101 fullscreenStyle->setIsStackingContext(true);
101 102
102 fullscreenStyle->setFontDescription(FontDescription()); 103 fullscreenStyle->setFontDescription(FontDescription());
103 fullscreenStyle->font().update(nullptr); 104 fullscreenStyle->font().update(nullptr);
104 105
105 fullscreenStyle->setDisplay(FLEX); 106 fullscreenStyle->setDisplay(FLEX);
106 fullscreenStyle->setJustifyContentPosition(ContentPositionCenter); 107 fullscreenStyle->setJustifyContentPosition(ContentPositionCenter);
107 fullscreenStyle->setAlignItemsPosition(ItemPositionCenter); 108 fullscreenStyle->setAlignItemsPosition(ItemPositionCenter);
108 fullscreenStyle->setFlexDirection(FlowColumn); 109 fullscreenStyle->setFlexDirection(FlowColumn);
109 110
110 fullscreenStyle->setPosition(FixedPosition); 111 fullscreenStyle->setPosition(FixedPosition);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 m_placeholder->setStyleWithWritingModeOfParent(style); 197 m_placeholder->setStyleWithWritingModeOfParent(style);
197 if (parent()) { 198 if (parent()) {
198 parent()->addChildWithWritingModeOfParent(m_placeholder, this); 199 parent()->addChildWithWritingModeOfParent(m_placeholder, this);
199 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( LayoutInvalidationReason::Fullscreen); 200 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( LayoutInvalidationReason::Fullscreen);
200 } 201 }
201 } else { 202 } else {
202 m_placeholder->setStyle(style); 203 m_placeholder->setStyle(style);
203 m_placeholder->setStyleWithWritingModeOfParent(style); 204 m_placeholder->setStyleWithWritingModeOfParent(style);
204 } 205 }
205 } 206 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698