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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2667493002: Changed EPosition to an enum class and renamed its members (Closed)
Patch Set: Rebase Created 3 years, 10 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 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 if (!diff.needsFullLayout() && 552 if (!diff.needsFullLayout() &&
553 m_surround->margin != other.m_surround->margin) { 553 m_surround->margin != other.m_surround->margin) {
554 // Relative-positioned elements collapse their margins so need a full 554 // Relative-positioned elements collapse their margins so need a full
555 // layout. 555 // layout.
556 if (hasOutOfFlowPosition()) 556 if (hasOutOfFlowPosition())
557 diff.setNeedsPositionedMovementLayout(); 557 diff.setNeedsPositionedMovementLayout();
558 else 558 else
559 diff.setNeedsFullLayout(); 559 diff.setNeedsFullLayout();
560 } 560 }
561 561
562 if (!diff.needsFullLayout() && position() != StaticPosition && 562 if (!diff.needsFullLayout() && position() != EPosition::kStatic &&
563 m_surround->offset != other.m_surround->offset) { 563 m_surround->offset != other.m_surround->offset) {
564 // Optimize for the case where a positioned layer is moving but not changing 564 // Optimize for the case where a positioned layer is moving but not changing
565 // size. 565 // size.
566 if (dependenceOnContentHeightHasChanged(*this, other)) 566 if (dependenceOnContentHeightHasChanged(*this, other))
567 diff.setNeedsFullLayout(); 567 diff.setNeedsFullLayout();
568 else 568 else
569 diff.setNeedsPositionedMovementLayout(); 569 diff.setNeedsPositionedMovementLayout();
570 } 570 }
571 571
572 if (diffNeedsPaintInvalidationSubtree(other)) 572 if (diffNeedsPaintInvalidationSubtree(other))
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 if (value < 0) 2471 if (value < 0)
2472 fvalue -= 0.5f; 2472 fvalue -= 0.5f;
2473 else 2473 else
2474 fvalue += 0.5f; 2474 fvalue += 0.5f;
2475 } 2475 }
2476 2476
2477 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2477 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2478 } 2478 }
2479 2479
2480 } // namespace blink 2480 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698