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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/TransformState.cpp

Issue 1661153002: Remove unreachable code from TransformState::move(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 void TransformState::move(const LayoutSize& offset, TransformAccumulation accumu late) 69 void TransformState::move(const LayoutSize& offset, TransformAccumulation accumu late)
70 { 70 {
71 if (accumulate == FlattenTransform || !m_accumulatedTransform) { 71 if (accumulate == FlattenTransform || !m_accumulatedTransform) {
72 m_accumulatedOffset += offset; 72 m_accumulatedOffset += offset;
73 } else { 73 } else {
74 applyAccumulatedOffset(); 74 applyAccumulatedOffset();
75 if (m_accumulatingTransform && m_accumulatedTransform) { 75 if (m_accumulatingTransform && m_accumulatedTransform) {
76 // If we're accumulating into an existing transform, apply the trans lation. 76 // If we're accumulating into an existing transform, apply the trans lation.
77 translateTransform(offset); 77 translateTransform(offset);
78
79 // Then flatten if necessary.
80 if (accumulate == FlattenTransform)
81 flatten();
82 } else { 78 } else {
83 // Just move the point and/or quad. 79 // Just move the point and/or quad.
84 translateMappedCoordinates(offset); 80 translateMappedCoordinates(offset);
85 } 81 }
86 } 82 }
87 m_accumulatingTransform = accumulate == AccumulateTransform; 83 m_accumulatingTransform = accumulate == AccumulateTransform;
88 } 84 }
89 85
90 void TransformState::applyAccumulatedOffset() 86 void TransformState::applyAccumulatedOffset()
91 { 87 {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 197
202 // We could throw away m_accumulatedTransform if we wanted to here, but that 198 // We could throw away m_accumulatedTransform if we wanted to here, but that
203 // would cause thrash when traversing hierarchies with alternating 199 // would cause thrash when traversing hierarchies with alternating
204 // preserve-3d and flat elements. 200 // preserve-3d and flat elements.
205 if (m_accumulatedTransform) 201 if (m_accumulatedTransform)
206 m_accumulatedTransform->makeIdentity(); 202 m_accumulatedTransform->makeIdentity();
207 m_accumulatingTransform = false; 203 m_accumulatingTransform = false;
208 } 204 }
209 205
210 } // namespace blink 206 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698