| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #include "core/HTMLNames.h" | 26 #include "core/HTMLNames.h" |
| 27 #include "core/dom/Document.h" | 27 #include "core/dom/Document.h" |
| 28 #include "core/dom/Element.h" | 28 #include "core/dom/Element.h" |
| 29 #include "core/dom/StyleEngine.h" | 29 #include "core/dom/StyleEngine.h" |
| 30 #include "core/dom/shadow/ShadowRoot.h" | 30 #include "core/dom/shadow/ShadowRoot.h" |
| 31 #include "core/editing/DragCaretController.h" | 31 #include "core/editing/DragCaretController.h" |
| 32 #include "core/editing/EditingUtilities.h" | 32 #include "core/editing/EditingUtilities.h" |
| 33 #include "core/editing/FrameSelection.h" | 33 #include "core/editing/FrameSelection.h" |
| 34 #include "core/frame/FrameView.h" | 34 #include "core/frame/FrameView.h" |
| 35 #include "core/frame/LocalFrame.h" | |
| 36 #include "core/frame/Settings.h" | 35 #include "core/frame/Settings.h" |
| 37 #include "core/html/HTMLMarqueeElement.h" | 36 #include "core/html/HTMLMarqueeElement.h" |
| 38 #include "core/layout/HitTestLocation.h" | 37 #include "core/layout/HitTestLocation.h" |
| 39 #include "core/layout/HitTestResult.h" | 38 #include "core/layout/HitTestResult.h" |
| 40 #include "core/layout/LayoutAnalyzer.h" | 39 #include "core/layout/LayoutAnalyzer.h" |
| 41 #include "core/layout/LayoutFlexibleBox.h" | 40 #include "core/layout/LayoutFlexibleBox.h" |
| 42 #include "core/layout/LayoutFlowThread.h" | 41 #include "core/layout/LayoutFlowThread.h" |
| 43 #include "core/layout/LayoutGrid.h" | 42 #include "core/layout/LayoutGrid.h" |
| 44 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 43 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
| 45 #include "core/layout/LayoutTableCell.h" | 44 #include "core/layout/LayoutTableCell.h" |
| 46 #include "core/layout/LayoutTheme.h" | 45 #include "core/layout/LayoutTheme.h" |
| 47 #include "core/layout/LayoutView.h" | 46 #include "core/layout/LayoutView.h" |
| 48 #include "core/layout/TextAutosizer.h" | 47 #include "core/layout/TextAutosizer.h" |
| 49 #include "core/layout/api/LineLayoutBox.h" | 48 #include "core/layout/api/LineLayoutBox.h" |
| 50 #include "core/layout/api/LineLayoutItem.h" | 49 #include "core/layout/api/LineLayoutItem.h" |
| 51 #include "core/layout/line/InlineTextBox.h" | 50 #include "core/layout/line/InlineTextBox.h" |
| 52 #include "core/page/Page.h" | 51 #include "core/page/Page.h" |
| 52 #include "core/paint/BlockPaintInvalidator.h" |
| 53 #include "core/paint/BlockPainter.h" | 53 #include "core/paint/BlockPainter.h" |
| 54 #include "core/paint/ObjectPaintInvalidator.h" | 54 #include "core/paint/ObjectPaintInvalidator.h" |
| 55 #include "core/paint/PaintLayer.h" | 55 #include "core/paint/PaintLayer.h" |
| 56 #include "core/style/ComputedStyle.h" | 56 #include "core/style/ComputedStyle.h" |
| 57 #include "platform/RuntimeEnabledFeatures.h" | 57 #include "platform/RuntimeEnabledFeatures.h" |
| 58 #include "wtf/PtrUtil.h" | 58 #include "wtf/PtrUtil.h" |
| 59 #include "wtf/StdLibExtras.h" | 59 #include "wtf/StdLibExtras.h" |
| 60 #include <memory> | 60 #include <memory> |
| 61 | 61 |
| 62 namespace blink { | 62 namespace blink { |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 ASSERT(positionedDescendants && positionedDescendants->contains(o)); | 923 ASSERT(positionedDescendants && positionedDescendants->contains(o)); |
| 924 positionedDescendants->remove(o); | 924 positionedDescendants->remove(o); |
| 925 if (positionedDescendants->isEmpty()) { | 925 if (positionedDescendants->isEmpty()) { |
| 926 gPositionedDescendantsMap->remove(container); | 926 gPositionedDescendantsMap->remove(container); |
| 927 container->m_hasPositionedObjects = false; | 927 container->m_hasPositionedObjects = false; |
| 928 } | 928 } |
| 929 } | 929 } |
| 930 | 930 |
| 931 PaintInvalidationReason LayoutBlock::invalidatePaintIfNeeded(const PaintInvalida
tionState& paintInvalidationState) | 931 PaintInvalidationReason LayoutBlock::invalidatePaintIfNeeded(const PaintInvalida
tionState& paintInvalidationState) |
| 932 { | 932 { |
| 933 PaintInvalidationReason reason = LayoutBox::invalidatePaintIfNeeded(paintInv
alidationState); | 933 return LayoutBox::invalidatePaintIfNeeded(paintInvalidationState); |
| 934 if (reason != PaintInvalidationNone && hasCaret()) { | 934 } |
| 935 frame()->selection().setCaretRectNeedsUpdate(); | 935 |
| 936 frame()->selection().invalidateCaretRect(true); | 936 PaintInvalidationReason LayoutBlock::invalidatePaintIfNeeded(const PaintInvalida
torContext& context) const |
| 937 } | 937 { |
| 938 return reason; | 938 return BlockPaintInvalidator(*this, context).invalidatePaintIfNeeded(); |
| 939 } | 939 } |
| 940 | 940 |
| 941 void LayoutBlock::removePositionedObjects(LayoutBlock* o, ContainingBlockState c
ontainingBlockState) | 941 void LayoutBlock::removePositionedObjects(LayoutBlock* o, ContainingBlockState c
ontainingBlockState) |
| 942 { | 942 { |
| 943 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects(); | 943 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects(); |
| 944 if (!positionedDescendants) | 944 if (!positionedDescendants) |
| 945 return; | 945 return; |
| 946 | 946 |
| 947 Vector<LayoutBox*, 16> deadObjects; | 947 Vector<LayoutBox*, 16> deadObjects; |
| 948 for (auto* positionedObject : *positionedDescendants) { | 948 for (auto* positionedObject : *positionedDescendants) { |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 | 1946 |
| 1947 return availableHeight; | 1947 return availableHeight; |
| 1948 } | 1948 } |
| 1949 | 1949 |
| 1950 bool LayoutBlock::hasDefiniteLogicalHeight() const | 1950 bool LayoutBlock::hasDefiniteLogicalHeight() const |
| 1951 { | 1951 { |
| 1952 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 1952 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 1953 } | 1953 } |
| 1954 | 1954 |
| 1955 } // namespace blink | 1955 } // namespace blink |
| OLD | NEW |