| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // layoutObjects. | 56 // layoutObjects. |
| 57 if (hasNonUniformStep()) { | 57 if (hasNonUniformStep()) { |
| 58 m_mapping.back().m_layoutObject->mapLocalToAncestor( | 58 m_mapping.back().m_layoutObject->mapLocalToAncestor( |
| 59 ancestor, transformState, ApplyContainerFlip | m_mapCoordinatesFlags); | 59 ancestor, transformState, ApplyContainerFlip | m_mapCoordinatesFlags); |
| 60 transformState.flatten(); | 60 transformState.flatten(); |
| 61 return; | 61 return; |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool inFixed = false; | 64 bool inFixed = false; |
| 65 #if DCHECK_IS_ON() | 65 #if DCHECK_IS_ON() |
| 66 bool foundAncestor = !ancestor || (m_mapping.size() && | 66 bool foundAncestor = |
| 67 m_mapping[0].m_layoutObject == ancestor); | 67 !ancestor || |
| 68 (m_mapping.size() && m_mapping[0].m_layoutObject == ancestor); |
| 68 #endif | 69 #endif |
| 69 | 70 |
| 70 for (int i = m_mapping.size() - 1; i >= 0; --i) { | 71 for (int i = m_mapping.size() - 1; i >= 0; --i) { |
| 71 const LayoutGeometryMapStep& currentStep = m_mapping[i]; | 72 const LayoutGeometryMapStep& currentStep = m_mapping[i]; |
| 72 | 73 |
| 73 // If container is the root LayoutView (step 0) we want to apply its fixed | 74 // If container is the root LayoutView (step 0) we want to apply its fixed |
| 74 // position offset. | 75 // position offset. |
| 75 if (i > 0 && currentStep.m_layoutObject == ancestor) { | 76 if (i > 0 && currentStep.m_layoutObject == ancestor) { |
| 76 #if DCHECK_IS_ON() | 77 #if DCHECK_IS_ON() |
| 77 foundAncestor = true; | 78 foundAncestor = true; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 // If we're not working with multiple LayoutViews, then any view is considered | 374 // If we're not working with multiple LayoutViews, then any view is considered |
| 374 // "topmost" (to preserve original behavior). | 375 // "topmost" (to preserve original behavior). |
| 375 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) | 376 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) |
| 376 return true; | 377 return true; |
| 377 | 378 |
| 378 return layoutObject->frame()->isMainFrame(); | 379 return layoutObject->frame()->isMainFrame(); |
| 379 } | 380 } |
| 380 #endif | 381 #endif |
| 381 | 382 |
| 382 } // namespace blink | 383 } // namespace blink |
| OLD | NEW |