| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 , m_skipRecording(skipRecording) | 47 , m_skipRecording(skipRecording) |
| 48 { | 48 { |
| 49 if (!shouldRecordLayoutRects()) | 49 if (!shouldRecordLayoutRects()) |
| 50 return; | 50 return; |
| 51 if (m_skipRecording) | 51 if (m_skipRecording) |
| 52 return; | 52 return; |
| 53 | 53 |
| 54 if (!m_object.layoutDidGetCalled()) { | 54 if (!m_object.layoutDidGetCalled()) { |
| 55 RenderLayerModelObject* containerForRepaint = m_object.containerForRepai
nt(); | 55 RenderLayerModelObject* containerForRepaint = m_object.containerForRepai
nt(); |
| 56 m_object.setOldRepaintRect(m_object.clippedOverflowRectForRepaint(contai
nerForRepaint)); | 56 m_object.setOldRepaintRect(m_object.clippedOverflowRectForRepaint(contai
nerForRepaint)); |
| 57 | |
| 58 if (m_object.hasOutline()) | |
| 59 m_object.setOldOutlineRect(m_object.outlineBoundsForRepaint(containe
rForRepaint)); | |
| 60 } | 57 } |
| 61 | 58 |
| 62 // If should do repaint was set previously make sure we don't accidentally u
nset it. | 59 // If should do repaint was set previously make sure we don't accidentally u
nset it. |
| 63 if (!m_object.shouldDoFullRepaintAfterLayout()) | 60 if (!m_object.shouldDoFullRepaintAfterLayout()) |
| 64 m_object.setShouldDoFullRepaintAfterLayout(m_object.selfNeedsLayout()); | 61 m_object.setShouldDoFullRepaintAfterLayout(m_object.selfNeedsLayout()); |
| 65 if (m_object.needsPositionedMovementLayoutOnly()) | 62 if (m_object.needsPositionedMovementLayoutOnly()) |
| 66 m_object.setOnlyNeededPositionedMovementLayout(true); | 63 m_object.setOnlyNeededPositionedMovementLayout(true); |
| 67 | 64 |
| 68 m_object.setLayoutDidGetCalled(true); | 65 m_object.setLayoutDidGetCalled(true); |
| 69 } | 66 } |
| 70 | 67 |
| 71 LayoutRectRecorder::~LayoutRectRecorder() | 68 LayoutRectRecorder::~LayoutRectRecorder() |
| 72 { | 69 { |
| 73 if (!shouldRecordLayoutRects()) | 70 if (!shouldRecordLayoutRects()) |
| 74 return; | 71 return; |
| 75 if (m_skipRecording) | 72 if (m_skipRecording) |
| 76 return; | 73 return; |
| 77 | 74 |
| 78 // Note, we don't store the repaint container because it can change during l
ayout. | 75 // Note, we don't store the repaint container because it can change during l
ayout. |
| 79 RenderLayerModelObject* containerForRepaint = m_object.containerForRepaint()
; | 76 RenderLayerModelObject* containerForRepaint = m_object.containerForRepaint()
; |
| 80 m_object.setNewRepaintRect(m_object.clippedOverflowRectForRepaint(containerF
orRepaint)); | 77 m_object.setNewRepaintRect(m_object.clippedOverflowRectForRepaint(containerF
orRepaint)); |
| 81 | |
| 82 if (m_object.hasOutline()) | |
| 83 m_object.setNewOutlineRect(m_object.outlineBoundsForRepaint(containerFor
Repaint)); | |
| 84 } | 78 } |
| 85 | 79 |
| 86 } // namespace WebCore | 80 } // namespace WebCore |
| 87 | 81 |
| OLD | NEW |