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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 const ComputedStyle& newStyle) { 1106 const ComputedStyle& newStyle) {
1107 // If we've become (or are about to become) a container for absolutely 1107 // If we've become (or are about to become) a container for absolutely
1108 // positioned descendants, or if we're no longer going to be one, we need to 1108 // positioned descendants, or if we're no longer going to be one, we need to
1109 // re-evaluate the need for column sets. There may be out-of-flow descendants 1109 // re-evaluate the need for column sets. There may be out-of-flow descendants
1110 // further down that become part of the flow thread, or cease to be part of 1110 // further down that become part of the flow thread, or cease to be part of
1111 // the flow thread, because of this change. 1111 // the flow thread, because of this change.
1112 if (oldStyle.hasTransformRelatedProperty() != 1112 if (oldStyle.hasTransformRelatedProperty() !=
1113 newStyle.hasTransformRelatedProperty()) 1113 newStyle.hasTransformRelatedProperty())
1114 return true; 1114 return true;
1115 return (oldStyle.hasInFlowPosition() && 1115 return (oldStyle.hasInFlowPosition() &&
1116 newStyle.position() == StaticPosition) || 1116 newStyle.position() == EPosition::kStatic) ||
1117 (newStyle.hasInFlowPosition() && 1117 (newStyle.hasInFlowPosition() &&
1118 oldStyle.position() == StaticPosition); 1118 oldStyle.position() == EPosition::kStatic);
1119 } 1119 }
1120 1120
1121 static inline bool needsToRemoveFromFlowThread(const ComputedStyle& oldStyle, 1121 static inline bool needsToRemoveFromFlowThread(const ComputedStyle& oldStyle,
1122 const ComputedStyle& newStyle) { 1122 const ComputedStyle& newStyle) {
1123 // If an in-flow descendant goes out-of-flow, we may have to remove column 1123 // If an in-flow descendant goes out-of-flow, we may have to remove column
1124 // sets and spanner placeholders. 1124 // sets and spanner placeholders.
1125 return (newStyle.hasOutOfFlowPosition() && 1125 return (newStyle.hasOutOfFlowPosition() &&
1126 !oldStyle.hasOutOfFlowPosition()) || 1126 !oldStyle.hasOutOfFlowPosition()) ||
1127 needsToReinsertIntoFlowThread(oldStyle, newStyle); 1127 needsToReinsertIntoFlowThread(oldStyle, newStyle);
1128 } 1128 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 const { 1369 const {
1370 return MultiColumnLayoutState(m_lastSetWorkedOn); 1370 return MultiColumnLayoutState(m_lastSetWorkedOn);
1371 } 1371 }
1372 1372
1373 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState( 1373 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState(
1374 const MultiColumnLayoutState& state) { 1374 const MultiColumnLayoutState& state) {
1375 m_lastSetWorkedOn = state.columnSet(); 1375 m_lastSetWorkedOn = state.columnSet();
1376 } 1376 }
1377 1377
1378 } // namespace blink 1378 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698