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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
12 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
13 * | 13 * |
14 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 * Library General Public License for more details. | 17 * Library General Public License for more details. |
18 * | 18 * |
19 * You should have received a copy of the GNU Library General Public License | 19 * You should have received a copy of the GNU Library General Public License |
20 * along with this library; see the file COPYING.LIB. If not, write to | 20 * along with this library; see the file COPYING.LIB. If not, write to |
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
22 * Boston, MA 02110-1301, USA. | 22 * Boston, MA 02110-1301, USA. |
23 * | 23 * |
24 */ | 24 */ |
25 | 25 |
26 #include "core/layout/LayoutBox.h" | 26 #include "core/layout/LayoutBox.h" |
27 | 27 |
28 #include "core/HTMLNames.h" | |
29 #include "core/dom/Document.h" | 28 #include "core/dom/Document.h" |
30 #include "core/editing/EditingUtilities.h" | 29 #include "core/editing/EditingUtilities.h" |
31 #include "core/frame/FrameHost.h" | |
32 #include "core/frame/FrameView.h" | 30 #include "core/frame/FrameView.h" |
33 #include "core/frame/LocalFrame.h" | 31 #include "core/frame/LocalFrame.h" |
34 #include "core/frame/Settings.h" | 32 #include "core/frame/Settings.h" |
35 #include "core/html/HTMLElement.h" | 33 #include "core/html/HTMLElement.h" |
36 #include "core/html/HTMLFrameElementBase.h" | 34 #include "core/html/HTMLFrameElementBase.h" |
37 #include "core/html/HTMLFrameOwnerElement.h" | 35 #include "core/html/HTMLFrameOwnerElement.h" |
38 #include "core/input/EventHandler.h" | 36 #include "core/input/EventHandler.h" |
39 #include "core/layout/HitTestResult.h" | 37 #include "core/layout/HitTestResult.h" |
40 #include "core/layout/LayoutAnalyzer.h" | 38 #include "core/layout/LayoutAnalyzer.h" |
41 #include "core/layout/LayoutDeprecatedFlexibleBox.h" | 39 #include "core/layout/LayoutDeprecatedFlexibleBox.h" |
42 #include "core/layout/LayoutFlexibleBox.h" | 40 #include "core/layout/LayoutFlexibleBox.h" |
43 #include "core/layout/LayoutGeometryMap.h" | |
44 #include "core/layout/LayoutGrid.h" | 41 #include "core/layout/LayoutGrid.h" |
45 #include "core/layout/LayoutInline.h" | 42 #include "core/layout/LayoutInline.h" |
46 #include "core/layout/LayoutListMarker.h" | 43 #include "core/layout/LayoutListMarker.h" |
| 44 #include "core/layout/LayoutMultiColumnFlowThread.h" |
47 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 45 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
48 #include "core/layout/LayoutPart.h" | 46 #include "core/layout/LayoutPart.h" |
49 #include "core/layout/LayoutReplica.h" | 47 #include "core/layout/LayoutReplica.h" |
50 #include "core/layout/LayoutTableCell.h" | 48 #include "core/layout/LayoutTableCell.h" |
51 #include "core/layout/LayoutView.h" | 49 #include "core/layout/LayoutView.h" |
52 #include "core/layout/api/LineLayoutBox.h" | 50 #include "core/layout/api/LineLayoutBox.h" |
53 #include "core/layout/compositing/PaintLayerCompositor.h" | 51 #include "core/layout/compositing/PaintLayerCompositor.h" |
54 #include "core/layout/shapes/ShapeOutsideInfo.h" | 52 #include "core/layout/shapes/ShapeOutsideInfo.h" |
55 #include "core/page/AutoscrollController.h" | 53 #include "core/page/AutoscrollController.h" |
56 #include "core/page/Page.h" | 54 #include "core/page/Page.h" |
57 #include "core/page/scrolling/SnapCoordinator.h" | 55 #include "core/page/scrolling/SnapCoordinator.h" |
58 #include "core/paint/BackgroundImageGeometry.h" | 56 #include "core/paint/BackgroundImageGeometry.h" |
59 #include "core/paint/BoxPainter.h" | 57 #include "core/paint/BoxPainter.h" |
60 #include "core/paint/PaintLayer.h" | 58 #include "core/paint/PaintLayer.h" |
61 #include "core/style/ShadowList.h" | 59 #include "core/style/ShadowList.h" |
62 #include "platform/LengthFunctions.h" | 60 #include "platform/LengthFunctions.h" |
63 #include "platform/geometry/DoubleRect.h" | 61 #include "platform/geometry/DoubleRect.h" |
64 #include "platform/geometry/FloatQuad.h" | 62 #include "platform/geometry/FloatQuad.h" |
65 #include "platform/geometry/FloatRoundedRect.h" | 63 #include "platform/geometry/FloatRoundedRect.h" |
66 #include "platform/geometry/TransformState.h" | |
67 #include "platform/graphics/GraphicsContext.h" | |
68 #include "platform/graphics/paint/PaintController.h" | |
69 #include <algorithm> | 64 #include <algorithm> |
70 #include <math.h> | 65 #include <math.h> |
71 | 66 |
72 namespace blink { | 67 namespace blink { |
73 | 68 |
74 using namespace HTMLNames; | |
75 | |
76 // Used by flexible boxes when flexing this element and by table cells. | 69 // Used by flexible boxes when flexing this element and by table cells. |
77 typedef WTF::HashMap<const LayoutBox*, LayoutUnit> OverrideSizeMap; | 70 typedef WTF::HashMap<const LayoutBox*, LayoutUnit> OverrideSizeMap; |
78 | 71 |
79 // Used by grid elements to properly size their grid items. | 72 // Used by grid elements to properly size their grid items. |
80 // FIXME: Move these into LayoutBoxRareData. | 73 // FIXME: Move these into LayoutBoxRareData. |
81 static OverrideSizeMap* gOverrideContainingBlockLogicalHeightMap = nullptr; | 74 static OverrideSizeMap* gOverrideContainingBlockLogicalHeightMap = nullptr; |
82 static OverrideSizeMap* gOverrideContainingBlockLogicalWidthMap = nullptr; | 75 static OverrideSizeMap* gOverrideContainingBlockLogicalWidthMap = nullptr; |
83 static OverrideSizeMap* gExtraInlineOffsetMap = nullptr; | 76 static OverrideSizeMap* gExtraInlineOffsetMap = nullptr; |
84 static OverrideSizeMap* gExtraBlockOffsetMap = nullptr; | 77 static OverrideSizeMap* gExtraBlockOffsetMap = nullptr; |
85 | 78 |
(...skipping 4863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4949 m_rareData->m_snapAreas->remove(&snapArea); | 4942 m_rareData->m_snapAreas->remove(&snapArea); |
4950 } | 4943 } |
4951 } | 4944 } |
4952 | 4945 |
4953 SnapAreaSet* LayoutBox::snapAreas() const | 4946 SnapAreaSet* LayoutBox::snapAreas() const |
4954 { | 4947 { |
4955 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4948 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4956 } | 4949 } |
4957 | 4950 |
4958 } // namespace blink | 4951 } // namespace blink |
OLD | NEW |