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

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 270663003: Remove FrameView::m_doFullRepaint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeRe nderObject(this); 358 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeRe nderObject(this);
359 else 359 else
360 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addRende rObject(this); 360 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addRende rObject(this);
361 } 361 }
362 362
363 void RenderBlock::repaintTreeAfterLayout(const RenderLayerModelObject& repaintCo ntainer) 363 void RenderBlock::repaintTreeAfterLayout(const RenderLayerModelObject& repaintCo ntainer)
364 { 364 {
365 if (!shouldCheckForInvalidationAfterLayout()) 365 if (!shouldCheckForInvalidationAfterLayout())
366 return; 366 return;
367 367
368 RenderBox::repaintTreeAfterLayout(repaintContainer);
369
370 // Take care of positioned objects. This is required as LayoutState keeps a single clip rect. 368 // Take care of positioned objects. This is required as LayoutState keeps a single clip rect.
371 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects( )) { 369 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects( )) {
372 TrackedRendererListHashSet::iterator end = positionedObjects->end(); 370 TrackedRendererListHashSet::iterator end = positionedObjects->end();
373 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l ocationOffset()); 371 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l ocationOffset());
374 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin( ); it != end; ++it) { 372 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin( ); it != end; ++it) {
375 RenderBox* box = *it; 373 RenderBox* box = *it;
376 374
377 // One of the renderers we're skipping over here may be the child's repaint container, 375 // One of the renderers we're skipping over here may be the child's repaint container,
378 // so we can't pass our own repaint container along. 376 // so we can't pass our own repaint container along.
379 const RenderLayerModelObject& repaintContainerForChild = *box->conta inerForRepaint(); 377 const RenderLayerModelObject& repaintContainerForChild = *box->conta inerForRepaint();
380 378
381 // If the positioned renderer is absolutely positioned and it is ins ide 379 // If the positioned renderer is absolutely positioned and it is ins ide
382 // a relatively positioend inline element, we need to account for 380 // a relatively positioend inline element, we need to account for
383 // the inline elements position in LayoutState. 381 // the inline elements position in LayoutState.
384 if (box->style()->position() == AbsolutePosition) { 382 if (box->style()->position() == AbsolutePosition) {
385 RenderObject* container = box->container(&repaintContainerForChi ld, 0); 383 RenderObject* container = box->container(&repaintContainerForChi ld, 0);
386 if (container->isInFlowPositioned() && container->isRenderInline ()) { 384 if (container->isInFlowPositioned() && container->isRenderInline ()) {
387 // FIXME: We should be able to use layout-state for this. 385 // FIXME: We should be able to use layout-state for this.
388 // Currently, we will place absolutly positioned elements in side 386 // Currently, we will place absolutly positioned elements in side
389 // relatively positioned inline blocks in the wrong location . crbug.com/371485 387 // relatively positioned inline blocks in the wrong location . crbug.com/371485
390 LayoutStateDisabler disable(*this); 388 LayoutStateDisabler disable(*this);
391 box->repaintTreeAfterLayout(repaintContainerForChild); 389 box->repaintTreeAfterLayout(repaintContainerForChild);
392 continue; 390 continue;
393 } 391 }
394 } 392 }
395 393
396 box->repaintTreeAfterLayout(repaintContainerForChild); 394 box->repaintTreeAfterLayout(repaintContainerForChild);
397 } 395 }
398 } 396 }
397
398 RenderBox::repaintTreeAfterLayout(repaintContainer);
dsinclair 2014/05/20 17:37:39 This seems wrong to me. We should invalidate the p
Xianzhu 2014/05/20 18:32:21 Made the change because I'm using the RenderView::
dsinclair 2014/05/20 18:36:42 I don't have any specific consequences, it just st
399 } 399 }
400 400
401 RenderBlock* RenderBlock::continuationBefore(RenderObject* beforeChild) 401 RenderBlock* RenderBlock::continuationBefore(RenderObject* beforeChild)
402 { 402 {
403 if (beforeChild && beforeChild->parent() == this) 403 if (beforeChild && beforeChild->parent() == this)
404 return this; 404 return this;
405 405
406 RenderBlock* curr = toRenderBlock(continuation()); 406 RenderBlock* curr = toRenderBlock(continuation());
407 RenderBlock* nextToLast = this; 407 RenderBlock* nextToLast = this;
408 RenderBlock* last = this; 408 RenderBlock* last = this;
(...skipping 4583 matching lines...) Expand 10 before | Expand all | Expand 10 after
4992 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 4992 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
4993 { 4993 {
4994 showRenderObject(); 4994 showRenderObject();
4995 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 4995 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
4996 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 4996 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
4997 } 4997 }
4998 4998
4999 #endif 4999 #endif
5000 5000
5001 } // namespace WebCore 5001 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698