Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: third_party/WebKit/Source/core/paint/BlockPainter.cpp

Issue 1716803002: Trigger repaint on first paint only on pending stylesheet decrement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.cpp ('k') | third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698