| OLD | NEW |
| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 ASSERT(m_mapping.size()); | 306 ASSERT(m_mapping.size()); |
| 307 | 307 |
| 308 bool mightBeSaturated = false; | 308 bool mightBeSaturated = false; |
| 309 while (m_mapping.size() && | 309 while (m_mapping.size() && |
| 310 m_mapping.last().m_layoutObject != ancestorLayoutObject) { | 310 m_mapping.last().m_layoutObject != ancestorLayoutObject) { |
| 311 mightBeSaturated = | 311 mightBeSaturated = |
| 312 mightBeSaturated || m_accumulatedOffset.width().mightBeSaturated(); | 312 mightBeSaturated || m_accumulatedOffset.width().mightBeSaturated(); |
| 313 mightBeSaturated = | 313 mightBeSaturated = |
| 314 mightBeSaturated || m_accumulatedOffset.height().mightBeSaturated(); | 314 mightBeSaturated || m_accumulatedOffset.height().mightBeSaturated(); |
| 315 stepRemoved(m_mapping.last()); | 315 stepRemoved(m_mapping.last()); |
| 316 m_mapping.removeLast(); | 316 m_mapping.pop_back(); |
| 317 } | 317 } |
| 318 if (UNLIKELY(mightBeSaturated)) { | 318 if (UNLIKELY(mightBeSaturated)) { |
| 319 m_accumulatedOffset = LayoutSize(); | 319 m_accumulatedOffset = LayoutSize(); |
| 320 for (const auto& step : m_mapping) | 320 for (const auto& step : m_mapping) |
| 321 m_accumulatedOffset += step.m_offset; | 321 m_accumulatedOffset += step.m_offset; |
| 322 } | 322 } |
| 323 } | 323 } |
| 324 | 324 |
| 325 void LayoutGeometryMap::popMappingsToAncestor(const PaintLayer* ancestorLayer) { | 325 void LayoutGeometryMap::popMappingsToAncestor(const PaintLayer* ancestorLayer) { |
| 326 const LayoutBoxModelObject* ancestorLayoutObject = | 326 const LayoutBoxModelObject* ancestorLayoutObject = |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 // If we're not working with multiple LayoutViews, then any view is considered | 369 // If we're not working with multiple LayoutViews, then any view is considered |
| 370 // "topmost" (to preserve original behavior). | 370 // "topmost" (to preserve original behavior). |
| 371 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) | 371 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) |
| 372 return true; | 372 return true; |
| 373 | 373 |
| 374 return layoutObject->frame()->isMainFrame(); | 374 return layoutObject->frame()->isMainFrame(); |
| 375 } | 375 } |
| 376 #endif | 376 #endif |
| 377 | 377 |
| 378 } // namespace blink | 378 } // namespace blink |
| OLD | NEW |