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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 LayoutRectRecorder::LayoutRectRecorder(RenderObject& object, bool skipRecording) | 45 LayoutRectRecorder::LayoutRectRecorder(RenderObject& object, bool skipRecording) |
46 : m_object(object) | 46 : m_object(object) |
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 m_object.setOldRepaintRect(m_object.clippedOverflowRectForRepaint(m_obje
ct.containerForRepaint())); | 55 RenderLayerModelObject* containerForRepaint = m_object.containerForRepai
nt(); |
| 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 } |
56 | 61 |
57 // If should do repaint was set previously make sure we don't accidentally u
nset it. | 62 // If should do repaint was set previously make sure we don't accidentally u
nset it. |
58 if (!m_object.shouldDoFullRepaintAfterLayout()) | 63 if (!m_object.shouldDoFullRepaintAfterLayout()) |
59 m_object.setShouldDoFullRepaintAfterLayout(m_object.selfNeedsLayout()); | 64 m_object.setShouldDoFullRepaintAfterLayout(m_object.selfNeedsLayout()); |
| 65 if (m_object.needsPositionedMovementLayoutOnly()) |
| 66 m_object.setOnlyNeededPositionedMovementLayout(true); |
60 | 67 |
61 m_object.setLayoutDidGetCalled(true); | 68 m_object.setLayoutDidGetCalled(true); |
62 } | 69 } |
63 | 70 |
64 LayoutRectRecorder::~LayoutRectRecorder() | 71 LayoutRectRecorder::~LayoutRectRecorder() |
65 { | 72 { |
66 if (!shouldRecordLayoutRects()) | 73 if (!shouldRecordLayoutRects()) |
67 return; | 74 return; |
68 if (m_skipRecording) | 75 if (m_skipRecording) |
69 return; | 76 return; |
70 | 77 |
71 // Note, we don't store the repaint container because it can change during l
ayout. | 78 // Note, we don't store the repaint container because it can change during l
ayout. |
72 m_object.setNewRepaintRect(m_object.clippedOverflowRectForRepaint(m_object.c
ontainerForRepaint())); | 79 RenderLayerModelObject* containerForRepaint = m_object.containerForRepaint()
; |
| 80 m_object.setNewRepaintRect(m_object.clippedOverflowRectForRepaint(containerF
orRepaint)); |
| 81 |
| 82 if (m_object.hasOutline()) |
| 83 m_object.setNewOutlineRect(m_object.outlineBoundsForRepaint(containerFor
Repaint)); |
73 } | 84 } |
74 | 85 |
75 } // namespace WebCore | 86 } // namespace WebCore |
76 | 87 |
OLD | NEW |