| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/PaintInvalidationState.h" | 5 #include "core/layout/PaintInvalidationState.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/layout/LayoutInline.h" | 9 #include "core/layout/LayoutInline.h" |
| 10 #include "core/layout/LayoutPart.h" | 10 #include "core/layout/LayoutPart.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 if (!m_currentObject.hasOverflowClip()) | 235 if (!m_currentObject.hasOverflowClip()) |
| 236 return; | 236 return; |
| 237 | 237 |
| 238 const LayoutBox& box = toLayoutBox(m_currentObject); | 238 const LayoutBox& box = toLayoutBox(m_currentObject); |
| 239 | 239 |
| 240 // Do not clip scroll layer contents because the compositor expects the whol
e layer | 240 // Do not clip scroll layer contents because the compositor expects the whol
e layer |
| 241 // to be always invalidated in-time. | 241 // to be always invalidated in-time. |
| 242 if (box.usesCompositedScrolling()) | 242 if (box.usesCompositedScrolling()) |
| 243 ASSERT(!m_clipped); // The box should establish paint invalidation conta
iner, so no m_clipped inherited. | 243 ASSERT(!m_clipped); // The box should establish paint invalidation conta
iner, so no m_clipped inherited. |
| 244 else | 244 else |
| 245 addClipRectRelativeToPaintOffset(LayoutRect(LayoutPoint(), LayoutSize(bo
x.layer()->size()))); | 245 addClipRectRelativeToPaintOffset(box.overflowClipRect(LayoutPoint())); |
| 246 | 246 |
| 247 m_paintOffset -= box.scrolledContentOffset(); | 247 m_paintOffset -= box.scrolledContentOffset(); |
| 248 | 248 |
| 249 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip
if present. | 249 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip
if present. |
| 250 } | 250 } |
| 251 | 251 |
| 252 static FloatPoint slowLocalToAncestorPoint(const LayoutObject& object, const Lay
outBoxModelObject& ancestor, const FloatPoint& point) | 252 static FloatPoint slowLocalToAncestorPoint(const LayoutObject& object, const Lay
outBoxModelObject& ancestor, const FloatPoint& point) |
| 253 { | 253 { |
| 254 if (object.isLayoutView()) | 254 if (object.isLayoutView()) |
| 255 return toLayoutView(object).localToAncestorPoint(point, &ancestor, Trave
rseDocumentBoundaries | InputIsInFrameCoordinates); | 255 return toLayoutView(object).localToAncestorPoint(point, &ancestor, Trave
rseDocumentBoundaries | InputIsInFrameCoordinates); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 372 |
| 373 PaintLayer& PaintInvalidationState::enclosingSelfPaintingLayer(const LayoutObjec
t& layoutObject) const | 373 PaintLayer& PaintInvalidationState::enclosingSelfPaintingLayer(const LayoutObjec
t& layoutObject) const |
| 374 { | 374 { |
| 375 if (layoutObject.hasLayer() && toLayoutBoxModelObject(layoutObject).hasSelfP
aintingLayer()) | 375 if (layoutObject.hasLayer() && toLayoutBoxModelObject(layoutObject).hasSelfP
aintingLayer()) |
| 376 return *toLayoutBoxModelObject(layoutObject).layer(); | 376 return *toLayoutBoxModelObject(layoutObject).layer(); |
| 377 | 377 |
| 378 return m_enclosingSelfPaintingLayer; | 378 return m_enclosingSelfPaintingLayer; |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace blink | 381 } // namespace blink |
| OLD | NEW |