| 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/page/Frame.h" | 29 #include "core/page/Frame.h" |
| 30 #include "core/page/Page.h" | 30 #include "core/page/Page.h" |
| 31 #include "core/platform/graphics/transforms/TransformState.h" | 31 #include "core/platform/graphics/transforms/TransformState.h" |
| 32 #include "core/rendering/RenderLayer.h" | 32 #include "core/rendering/RenderLayer.h" |
| 33 #include "core/rendering/RenderView.h" | 33 #include "core/rendering/RenderView.h" |
| 34 #include "wtf/TemporaryChange.h" | 34 #include "wtf/TemporaryChange.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 RenderGeometryMap::RenderGeometryMap(MapCoordinatesFlags flags) | 38 RenderGeometryMap::RenderGeometryMap(MapCoordinatesFlags flags) |
| 39 : m_insertionPosition(notFound) | 39 : m_insertionPosition(kNotFound) |
| 40 , m_nonUniformStepsCount(0) | 40 , m_nonUniformStepsCount(0) |
| 41 , m_transformedStepsCount(0) | 41 , m_transformedStepsCount(0) |
| 42 , m_fixedStepsCount(0) | 42 , m_fixedStepsCount(0) |
| 43 , m_mapCoordinatesFlags(flags) | 43 , m_mapCoordinatesFlags(flags) |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 RenderGeometryMap::~RenderGeometryMap() | 47 RenderGeometryMap::~RenderGeometryMap() |
| 48 { | 48 { |
| 49 } | 49 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 return; | 222 return; |
| 223 } | 223 } |
| 224 const RenderLayerModelObject* ancestorRenderer = ancestorLayer ? ancestorLay
er->renderer() : 0; | 224 const RenderLayerModelObject* ancestorRenderer = ancestorLayer ? ancestorLay
er->renderer() : 0; |
| 225 pushMappingsToAncestor(renderer, ancestorRenderer); | 225 pushMappingsToAncestor(renderer, ancestorRenderer); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void RenderGeometryMap::push(const RenderObject* renderer, const LayoutSize& off
setFromContainer, bool accumulatingTransform, bool isNonUniform, bool isFixedPos
ition, bool hasTransform, LayoutSize offsetForFixedPosition) | 228 void RenderGeometryMap::push(const RenderObject* renderer, const LayoutSize& off
setFromContainer, bool accumulatingTransform, bool isNonUniform, bool isFixedPos
ition, bool hasTransform, LayoutSize offsetForFixedPosition) |
| 229 { | 229 { |
| 230 // fprintf(stderr, "RenderGeometryMap::push %p %d,%d isNonUniform=%d\n", rend
erer, offsetFromContainer.width().toInt(), offsetFromContainer.height().toInt(),
isNonUniform); | 230 // fprintf(stderr, "RenderGeometryMap::push %p %d,%d isNonUniform=%d\n", rend
erer, offsetFromContainer.width().toInt(), offsetFromContainer.height().toInt(),
isNonUniform); |
| 231 | 231 |
| 232 ASSERT(m_insertionPosition != notFound); | 232 ASSERT(m_insertionPosition != kNotFound); |
| 233 ASSERT(!renderer->isRenderView() || !m_insertionPosition || m_mapCoordinates
Flags & TraverseDocumentBoundaries); | 233 ASSERT(!renderer->isRenderView() || !m_insertionPosition || m_mapCoordinates
Flags & TraverseDocumentBoundaries); |
| 234 ASSERT(offsetForFixedPosition.isZero() || renderer->isRenderView()); | 234 ASSERT(offsetForFixedPosition.isZero() || renderer->isRenderView()); |
| 235 | 235 |
| 236 m_mapping.insert(m_insertionPosition, RenderGeometryMapStep(renderer, accumu
latingTransform, isNonUniform, isFixedPosition, hasTransform)); | 236 m_mapping.insert(m_insertionPosition, RenderGeometryMapStep(renderer, accumu
latingTransform, isNonUniform, isFixedPosition, hasTransform)); |
| 237 | 237 |
| 238 RenderGeometryMapStep& step = m_mapping[m_insertionPosition]; | 238 RenderGeometryMapStep& step = m_mapping[m_insertionPosition]; |
| 239 step.m_offset = offsetFromContainer; | 239 step.m_offset = offsetFromContainer; |
| 240 step.m_offsetForFixedPosition = offsetForFixedPosition; | 240 step.m_offsetForFixedPosition = offsetForFixedPosition; |
| 241 | 241 |
| 242 stepInserted(step); | 242 stepInserted(step); |
| 243 } | 243 } |
| 244 | 244 |
| 245 void RenderGeometryMap::push(const RenderObject* renderer, const TransformationM
atrix& t, bool accumulatingTransform, bool isNonUniform, bool isFixedPosition, b
ool hasTransform, LayoutSize offsetForFixedPosition) | 245 void RenderGeometryMap::push(const RenderObject* renderer, const TransformationM
atrix& t, bool accumulatingTransform, bool isNonUniform, bool isFixedPosition, b
ool hasTransform, LayoutSize offsetForFixedPosition) |
| 246 { | 246 { |
| 247 ASSERT(m_insertionPosition != notFound); | 247 ASSERT(m_insertionPosition != kNotFound); |
| 248 ASSERT(!renderer->isRenderView() || !m_insertionPosition || m_mapCoordinates
Flags & TraverseDocumentBoundaries); | 248 ASSERT(!renderer->isRenderView() || !m_insertionPosition || m_mapCoordinates
Flags & TraverseDocumentBoundaries); |
| 249 ASSERT(offsetForFixedPosition.isZero() || renderer->isRenderView()); | 249 ASSERT(offsetForFixedPosition.isZero() || renderer->isRenderView()); |
| 250 | 250 |
| 251 m_mapping.insert(m_insertionPosition, RenderGeometryMapStep(renderer, accumu
latingTransform, isNonUniform, isFixedPosition, hasTransform)); | 251 m_mapping.insert(m_insertionPosition, RenderGeometryMapStep(renderer, accumu
latingTransform, isNonUniform, isFixedPosition, hasTransform)); |
| 252 | 252 |
| 253 RenderGeometryMapStep& step = m_mapping[m_insertionPosition]; | 253 RenderGeometryMapStep& step = m_mapping[m_insertionPosition]; |
| 254 step.m_offsetForFixedPosition = offsetForFixedPosition; | 254 step.m_offsetForFixedPosition = offsetForFixedPosition; |
| 255 | 255 |
| 256 if (!t.isIntegerTranslation()) | 256 if (!t.isIntegerTranslation()) |
| 257 step.m_transform = adoptPtr(new TransformationMatrix(t)); | 257 step.m_transform = adoptPtr(new TransformationMatrix(t)); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // "topmost" (to preserve original behavior). | 321 // "topmost" (to preserve original behavior). |
| 322 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) | 322 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) |
| 323 return true; | 323 return true; |
| 324 | 324 |
| 325 Frame* thisFrame = renderer->frame(); | 325 Frame* thisFrame = renderer->frame(); |
| 326 return thisFrame == thisFrame->page()->mainFrame(); | 326 return thisFrame == thisFrame->page()->mainFrame(); |
| 327 } | 327 } |
| 328 #endif | 328 #endif |
| 329 | 329 |
| 330 } // namespace WebCore | 330 } // namespace WebCore |
| OLD | NEW |