OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |