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

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

Issue 2722553003: [WIP] Test moving stacking context flag update on ComputedStyle (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 !layoutParentStyleForcesZIndexToCreateStackingContext( 441 !layoutParentStyleForcesZIndexToCreateStackingContext(
442 layoutParentStyle)) { 442 layoutParentStyle)) {
443 style.setIsStackingContext(false); 443 style.setIsStackingContext(false);
444 // TODO(alancutter): Avoid altering z-index here. 444 // TODO(alancutter): Avoid altering z-index here.
445 if (!style.hasAutoZIndex()) 445 if (!style.hasAutoZIndex())
446 style.setZIndex(0); 446 style.setZIndex(0);
447 } else if (!style.hasAutoZIndex()) { 447 } else if (!style.hasAutoZIndex()) {
448 style.setIsStackingContext(true); 448 style.setIsStackingContext(true);
449 } 449 }
450 450
451 style.updateIsStackingContext(
452 element == element->document().documentElement(),
453 element->isInTopLayer());
454
451 if (style.overflowX() != EOverflow::kVisible || 455 if (style.overflowX() != EOverflow::kVisible ||
452 style.overflowY() != EOverflow::kVisible) 456 style.overflowY() != EOverflow::kVisible)
453 adjustOverflow(style); 457 adjustOverflow(style);
454 458
455 if (doesNotInheritTextDecoration(style, element)) 459 if (doesNotInheritTextDecoration(style, element))
456 style.clearAppliedTextDecorations(); 460 style.clearAppliedTextDecorations();
457 else 461 else
458 style.restoreParentTextDecorations(parentStyle); 462 style.restoreParentTextDecorations(parentStyle);
459 style.applyTextDecorations( 463 style.applyTextDecorations(
460 parentStyle.visitedDependentColor(CSSPropertyTextDecorationColor), 464 parentStyle.visitedDependentColor(CSSPropertyTextDecorationColor),
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 style.setDisplay(EDisplay::Block); 507 style.setDisplay(EDisplay::Block);
504 508
505 // Columns don't apply to svg text elements. 509 // Columns don't apply to svg text elements.
506 if (isSVGTextElement(*element)) 510 if (isSVGTextElement(*element))
507 style.clearMultiCol(); 511 style.clearMultiCol();
508 } 512 }
509 adjustStyleForAlignment(style, parentStyle); 513 adjustStyleForAlignment(style, parentStyle);
510 } 514 }
511 515
512 } // namespace blink 516 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698