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

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

Issue 2458143002: Clear floats when we make a ruby base's children inline (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/rubybase-children-made-inline-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after
3067 if (child->continuation()) 3067 if (child->continuation())
3068 return; 3068 return;
3069 // Ruby elements use anonymous wrappers for ruby runs and ruby bases by 3069 // Ruby elements use anonymous wrappers for ruby runs and ruby bases by
3070 // design, so we don't remove them. 3070 // design, so we don't remove them.
3071 if (child->isRubyRun() || child->isRubyBase()) 3071 if (child->isRubyRun() || child->isRubyBase())
3072 return; 3072 return;
3073 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( 3073 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
3074 LayoutInvalidationReason::ChildAnonymousBlockChanged); 3074 LayoutInvalidationReason::ChildAnonymousBlockChanged);
3075 3075
3076 child->moveAllChildrenTo(this, child->nextSibling(), child->hasLayer()); 3076 child->moveAllChildrenTo(this, child->nextSibling(), child->hasLayer());
3077 // If we make an object's children inline we are going to frustrate any future
3078 // attempts to remove floats from its children's float-lists before the next
3079 // layout happens so clear down all the floatlists now - they will be rebuilt
3080 // at layout.
3081 if (child->childrenInline())
3082 removeFloatingObjectsFromDescendants();
3077 setChildrenInline(child->childrenInline()); 3083 setChildrenInline(child->childrenInline());
3078 3084
3079 children()->removeChildNode(this, child, child->hasLayer()); 3085 children()->removeChildNode(this, child, child->hasLayer());
3080 child->destroy(); 3086 child->destroy();
3081 } 3087 }
3082 3088
3083 bool LayoutBlockFlow::mergeSiblingContiguousAnonymousBlock( 3089 bool LayoutBlockFlow::mergeSiblingContiguousAnonymousBlock(
3084 LayoutBlockFlow* siblingThatMayBeDeleted) { 3090 LayoutBlockFlow* siblingThatMayBeDeleted) {
3085 // Note: |this| and |siblingThatMayBeDeleted| may not be adjacent siblings at 3091 // Note: |this| and |siblingThatMayBeDeleted| may not be adjacent siblings at
3086 // this point. There may be an object between them which is about to be 3092 // this point. There may be an object between them which is about to be
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
4462 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4468 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4463 } 4469 }
4464 4470
4465 void LayoutBlockFlow::invalidateDisplayItemClients( 4471 void LayoutBlockFlow::invalidateDisplayItemClients(
4466 PaintInvalidationReason invalidationReason) const { 4472 PaintInvalidationReason invalidationReason) const {
4467 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4473 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4468 invalidationReason); 4474 invalidationReason);
4469 } 4475 }
4470 4476
4471 } // namespace blink 4477 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/rubybase-children-made-inline-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698