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 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2820 LayoutBoxModelObject* continuation = this->Continuation(); | 2820 LayoutBoxModelObject* continuation = this->Continuation(); |
2821 if (continuation) { | 2821 if (continuation) { |
2822 continuation->Destroy(); | 2822 continuation->Destroy(); |
2823 SetContinuation(nullptr); | 2823 SetContinuation(nullptr); |
2824 } | 2824 } |
2825 | 2825 |
2826 if (!DocumentBeingDestroyed()) { | 2826 if (!DocumentBeingDestroyed()) { |
2827 // TODO(mstensho): figure out if we need this. We have no test coverage for | 2827 // TODO(mstensho): figure out if we need this. We have no test coverage for |
2828 // it. It looks like all line boxes have been removed at this point. | 2828 // it. It looks like all line boxes have been removed at this point. |
2829 if (FirstLineBox()) { | 2829 if (FirstLineBox()) { |
| 2830 // We can't wait for LayoutBox::destroy to clear the selection, |
| 2831 // because by then we will have nuked the line boxes. |
| 2832 // FIXME: The FrameSelection should be responsible for this when it |
| 2833 // is notified of DOM mutations. |
| 2834 if (IsSelectionBorder()) |
| 2835 View()->ClearSelection(); |
| 2836 |
2830 // If we are an anonymous block, then our line boxes might have children | 2837 // If we are an anonymous block, then our line boxes might have children |
2831 // that will outlast this block. In the non-anonymous block case those | 2838 // that will outlast this block. In the non-anonymous block case those |
2832 // children will be destroyed by the time we return from this function. | 2839 // children will be destroyed by the time we return from this function. |
2833 if (IsAnonymousBlock()) { | 2840 if (IsAnonymousBlock()) { |
2834 for (InlineFlowBox* box = FirstLineBox(); box; | 2841 for (InlineFlowBox* box = FirstLineBox(); box; |
2835 box = box->NextLineBox()) { | 2842 box = box->NextLineBox()) { |
2836 while (InlineBox* child_box = box->FirstChild()) | 2843 while (InlineBox* child_box = box->FirstChild()) |
2837 child_box->Remove(); | 2844 child_box->Remove(); |
2838 } | 2845 } |
2839 } | 2846 } |
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4655 return LayoutBlock::InvalidatePaintIfNeeded(paint_invalidation_state); | 4662 return LayoutBlock::InvalidatePaintIfNeeded(paint_invalidation_state); |
4656 } | 4663 } |
4657 | 4664 |
4658 void LayoutBlockFlow::InvalidateDisplayItemClients( | 4665 void LayoutBlockFlow::InvalidateDisplayItemClients( |
4659 PaintInvalidationReason invalidation_reason) const { | 4666 PaintInvalidationReason invalidation_reason) const { |
4660 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients( | 4667 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients( |
4661 invalidation_reason); | 4668 invalidation_reason); |
4662 } | 4669 } |
4663 | 4670 |
4664 } // namespace blink | 4671 } // namespace blink |
OLD | NEW |