| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 ASSERT(foundContainer); | 103 ASSERT(foundContainer); |
| 104 transformState.flatten(); | 104 transformState.flatten(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 FloatPoint RenderGeometryMap::mapToContainer(const FloatPoint& p, const RenderLa
yerModelObject* container) const | 107 FloatPoint RenderGeometryMap::mapToContainer(const FloatPoint& p, const RenderLa
yerModelObject* container) const |
| 108 { | 108 { |
| 109 FloatPoint result; | 109 FloatPoint result; |
| 110 | 110 |
| 111 if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() &
& (!container || (m_mapping.size() && container == m_mapping[0].m_renderer))) | 111 if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() &
& (!container || (m_mapping.size() && container == m_mapping[0].m_renderer))) |
| 112 result = p + roundedIntSize(m_accumulatedOffset); | 112 result = p + m_accumulatedOffset; |
| 113 else { | 113 else { |
| 114 TransformState transformState(TransformState::ApplyTransformDirection, p
); | 114 TransformState transformState(TransformState::ApplyTransformDirection, p
); |
| 115 mapToContainer(transformState, container); | 115 mapToContainer(transformState, container); |
| 116 result = transformState.lastPlanarPoint(); | 116 result = transformState.lastPlanarPoint(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 #if !ASSERT_DISABLED | 119 #if !ASSERT_DISABLED |
| 120 if (m_mapping.size() > 0) { | 120 if (m_mapping.size() > 0) { |
| 121 const RenderObject* lastRenderer = m_mapping.last().m_renderer; | 121 const RenderObject* lastRenderer = m_mapping.last().m_renderer; |
| 122 const RenderLayer* layer = lastRenderer->enclosingLayer(); | 122 const RenderLayer* layer = lastRenderer->enclosingLayer(); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 // If we're not working with multiple RenderViews, then any view is consider
ed | 337 // If we're not working with multiple RenderViews, then any view is consider
ed |
| 338 // "topmost" (to preserve original behavior). | 338 // "topmost" (to preserve original behavior). |
| 339 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) | 339 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) |
| 340 return true; | 340 return true; |
| 341 | 341 |
| 342 return renderer->frame()->isMainFrame(); | 342 return renderer->frame()->isMainFrame(); |
| 343 } | 343 } |
| 344 #endif | 344 #endif |
| 345 | 345 |
| 346 } // namespace WebCore | 346 } // namespace WebCore |
| OLD | NEW |