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

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

Issue 1660863002: Force all LayoutUnit construction to be explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix LayoutRectTest.cpp 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 | « third_party/WebKit/Source/platform/geometry/LayoutSize.h ('k') | 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 { 102 {
103 applyTransform(transformFromContainer.toTransformationMatrix(), accumulate, wasClamped); 103 applyTransform(transformFromContainer.toTransformationMatrix(), accumulate, wasClamped);
104 } 104 }
105 105
106 void TransformState::applyTransform(const TransformationMatrix& transformFromCon tainer, TransformAccumulation accumulate, bool* wasClamped) 106 void TransformState::applyTransform(const TransformationMatrix& transformFromCon tainer, TransformAccumulation accumulate, bool* wasClamped)
107 { 107 {
108 if (wasClamped) 108 if (wasClamped)
109 *wasClamped = false; 109 *wasClamped = false;
110 110
111 if (transformFromContainer.isIntegerTranslation()) { 111 if (transformFromContainer.isIntegerTranslation()) {
112 move(LayoutSize(transformFromContainer.e(), transformFromContainer.f()), accumulate); 112 move(LayoutSize(LayoutUnit(transformFromContainer.e()), LayoutUnit(trans formFromContainer.f())), accumulate);
113 return; 113 return;
114 } 114 }
115 115
116 applyAccumulatedOffset(); 116 applyAccumulatedOffset();
117 117
118 // If we have an accumulated transform from last time, multiply in this tran sform 118 // If we have an accumulated transform from last time, multiply in this tran sform
119 if (m_accumulatedTransform) { 119 if (m_accumulatedTransform) {
120 if (m_direction == ApplyTransformDirection) 120 if (m_direction == ApplyTransformDirection)
121 m_accumulatedTransform = TransformationMatrix::create(transformFromC ontainer * *m_accumulatedTransform); 121 m_accumulatedTransform = TransformationMatrix::create(transformFromC ontainer * *m_accumulatedTransform);
122 else 122 else
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 // 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
199 // would cause thrash when traversing hierarchies with alternating 199 // would cause thrash when traversing hierarchies with alternating
200 // preserve-3d and flat elements. 200 // preserve-3d and flat elements.
201 if (m_accumulatedTransform) 201 if (m_accumulatedTransform)
202 m_accumulatedTransform->makeIdentity(); 202 m_accumulatedTransform->makeIdentity();
203 m_accumulatingTransform = false; 203 m_accumulatingTransform = false;
204 } 204 }
205 205
206 } // namespace blink 206 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/LayoutSize.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698