| 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/paint/BlockPainter.h" | 5 #include "core/paint/BlockPainter.h" |
| 6 | 6 |
| 7 #include "core/editing/DragCaretController.h" | 7 #include "core/editing/DragCaretController.h" |
| 8 #include "core/editing/FrameSelection.h" | 8 #include "core/editing/FrameSelection.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/layout/LayoutBlockFlow.h" | 10 #include "core/layout/LayoutBlockFlow.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 overflowRect.move(-m_layoutBlock.scrolledContentOffset()); | 234 overflowRect.move(-m_layoutBlock.scrolledContentOffset()); |
| 235 } | 235 } |
| 236 m_layoutBlock.flipForWritingMode(overflowRect); | 236 m_layoutBlock.flipForWritingMode(overflowRect); |
| 237 overflowRect.moveBy(adjustedPaintOffset); | 237 overflowRect.moveBy(adjustedPaintOffset); |
| 238 return paintInfo.cullRect().intersectsCullRect(overflowRect); | 238 return paintInfo.cullRect().intersectsCullRect(overflowRect); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void BlockPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) | 241 void BlockPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) |
| 242 { | 242 { |
| 243 // Avoid painting descendants of the root element when stylesheets haven't l
oaded. This eliminates FOUC. | 243 // Avoid painting descendants of the root element when stylesheets haven't l
oaded. This eliminates FOUC. |
| 244 // It's ok not to draw, because later on, when all the stylesheets do load,
styleResolverChanged() on the Document | 244 // It's ok not to draw, because later on, when all the stylesheets do load,
styleResolverMayHaveChanged() |
| 245 // will do a full paint invalidation. | 245 // on Document will trigger a full paint invalidation. |
| 246 if (m_layoutBlock.document().didLayoutWithPendingStylesheets() && !m_layoutB
lock.isLayoutView()) | 246 if (m_layoutBlock.document().didLayoutWithPendingStylesheets() && !m_layoutB
lock.isLayoutView()) |
| 247 return; | 247 return; |
| 248 | 248 |
| 249 if (m_layoutBlock.childrenInline()) { | 249 if (m_layoutBlock.childrenInline()) { |
| 250 if (shouldPaintDescendantOutlines(paintInfo.phase)) | 250 if (shouldPaintDescendantOutlines(paintInfo.phase)) |
| 251 ObjectPainter(m_layoutBlock).paintInlineChildrenOutlines(paintInfo,
paintOffset); | 251 ObjectPainter(m_layoutBlock).paintInlineChildrenOutlines(paintInfo,
paintOffset); |
| 252 else | 252 else |
| 253 LineBoxListPainter(m_layoutBlock.lineBoxes()).paint(m_layoutBlock, p
aintInfo, paintOffset); | 253 LineBoxListPainter(m_layoutBlock.lineBoxes()).paint(m_layoutBlock, p
aintInfo, paintOffset); |
| 254 } else { | 254 } else { |
| 255 PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); | 255 PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); |
| 256 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); | 256 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace blink | 260 } // namespace blink |
| OLD | NEW |