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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 1473363003: Invalidate first line display item clients when first line style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate block and line code Created 5 years 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 /* 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 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 3105
3106 FrameView* frameView = document().view(); 3106 FrameView* frameView = document().view();
3107 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 3107 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
3108 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 3108 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
3109 if (size().height() < visibleHeight) 3109 if (size().height() < visibleHeight)
3110 top += (visibleHeight - size().height()) / 2; 3110 top += (visibleHeight - size().height()) / 2;
3111 setY(top); 3111 setY(top);
3112 dialog->setCentered(top); 3112 dialog->setCentered(top);
3113 } 3113 }
3114 3114
3115 static void invalidateDisplayItemClientsOfInlineBoxRecursively(InlineBox& box)
mstensho (USE GERRIT) 2015/12/03 12:08:10 All of this should go into LayoutBlockFlowLine.cpp
Xianzhu 2015/12/03 17:38:22 Done.
3116 {
3117 box.layoutObject().invalidateDisplayItemClient(box);
3118 if (!box.isInlineFlowBox())
3119 return;
3120 for (InlineBox* child = toInlineFlowBox(box).firstChild(); child; child = ch ild->nextOnLine())
mstensho (USE GERRIT) 2015/12/03 12:08:10 @eae: can you comment on this, please? I don't kno
3121 invalidateDisplayItemClientsOfInlineBoxRecursively(*child);
3122 }
3123
3124 void LayoutBlockFlow::invalidateDisplayItemClientsOfFirstLine()
3125 {
3126 ASSERT(childrenInline());
3127 if (RootInlineBox* firstRootBox = this->firstRootBox())
3128 invalidateDisplayItemClientsOfInlineBoxRecursively(*firstRootBox);
3129 }
3130
3115 } // namespace blink 3131 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698