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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 do { | 193 do { |
194 renderer = renderer->pushMappingToContainer(ancestorRenderer, *this); | 194 renderer = renderer->pushMappingToContainer(ancestorRenderer, *this); |
195 } while (renderer && renderer != ancestorRenderer); | 195 } while (renderer && renderer != ancestorRenderer); |
196 | 196 |
197 ASSERT(m_mapping.isEmpty() || isTopmostLayoutView(m_mapping[0].m_renderer)); | 197 ASSERT(m_mapping.isEmpty() || isTopmostLayoutView(m_mapping[0].m_renderer)); |
198 } | 198 } |
199 | 199 |
200 static bool canMapBetweenRenderers(const LayoutObject* renderer, const LayoutObj
ect* ancestor) | 200 static bool canMapBetweenRenderers(const LayoutObject* renderer, const LayoutObj
ect* ancestor) |
201 { | 201 { |
202 for (const LayoutObject* current = renderer; ; current = current->parent())
{ | 202 for (const LayoutObject* current = renderer; ; current = current->parent())
{ |
203 const LayoutStyle& style = current->styleRef(); | 203 const ComputedStyle& style = current->styleRef(); |
204 if (style.position() == FixedPosition || style.isFlippedBlocksWritingMod
e()) | 204 if (style.position() == FixedPosition || style.isFlippedBlocksWritingMod
e()) |
205 return false; | 205 return false; |
206 | 206 |
207 if (current->hasColumns() || current->hasTransformRelatedProperty() || c
urrent->isLayoutFlowThread() || current->isSVGRoot()) | 207 if (current->hasColumns() || current->hasTransformRelatedProperty() || c
urrent->isLayoutFlowThread() || current->isSVGRoot()) |
208 return false; | 208 return false; |
209 | 209 |
210 if (current == ancestor) | 210 if (current == ancestor) |
211 break; | 211 break; |
212 } | 212 } |
213 | 213 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // If we're not working with multiple LayoutViews, then any view is consider
ed | 341 // If we're not working with multiple LayoutViews, then any view is consider
ed |
342 // "topmost" (to preserve original behavior). | 342 // "topmost" (to preserve original behavior). |
343 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) | 343 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) |
344 return true; | 344 return true; |
345 | 345 |
346 return renderer->frame()->isMainFrame(); | 346 return renderer->frame()->isMainFrame(); |
347 } | 347 } |
348 #endif | 348 #endif |
349 | 349 |
350 } // namespace blink | 350 } // namespace blink |
OLD | NEW |