OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the render object implementation for KHTML. | 2 * This file is part of the render object implementation for KHTML. |
3 * | 3 * |
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 5 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
6 * Copyright (C) 2003 Apple Computer, Inc. | 6 * Copyright (C) 2003 Apple Computer, Inc. |
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 |
11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
12 * | 12 * |
13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 * Library General Public License for more details. | 16 * Library General Public License for more details. |
17 * | 17 * |
18 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
19 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "config.h" | 25 #include "config.h" |
26 #include "RenderDeprecatedFlexibleBox.h" | 26 #include "RenderDeprecatedFlexibleBox.h" |
27 | 27 |
28 #include "FeatureObserver.h" | 28 #include "UseCounter.h" |
29 #include "Font.h" | 29 #include "Font.h" |
30 #include "LayoutRepainter.h" | 30 #include "LayoutRepainter.h" |
31 #include "RenderLayer.h" | 31 #include "RenderLayer.h" |
32 #include "RenderView.h" | 32 #include "RenderView.h" |
33 #include <wtf/StdLibExtras.h> | 33 #include <wtf/StdLibExtras.h> |
34 #include <wtf/unicode/CharacterNames.h> | 34 #include <wtf/unicode/CharacterNames.h> |
35 | 35 |
36 using namespace std; | 36 using namespace std; |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 }; | 121 }; |
122 | 122 |
123 RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox(Element* element) | 123 RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox(Element* element) |
124 : RenderBlock(element) | 124 : RenderBlock(element) |
125 { | 125 { |
126 setChildrenInline(false); // All of our children must be block-level | 126 setChildrenInline(false); // All of our children must be block-level |
127 m_stretchingChildren = false; | 127 m_stretchingChildren = false; |
128 if (!isAnonymous()) { | 128 if (!isAnonymous()) { |
129 const KURL& url = document()->url(); | 129 const KURL& url = document()->url(); |
130 if (url.protocolIs("chrome")) | 130 if (url.protocolIs("chrome")) |
131 FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlex
boxChrome); | 131 UseCounter::observe(document(), UseCounter::DeprecatedFlexboxChrome)
; |
132 else if (url.protocolIs("chrome-extension")) | 132 else if (url.protocolIs("chrome-extension")) |
133 FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlex
boxChromeExtension); | 133 UseCounter::observe(document(), UseCounter::DeprecatedFlexboxChromeE
xtension); |
134 else | 134 else |
135 FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlex
boxWebContent); | 135 UseCounter::observe(document(), UseCounter::DeprecatedFlexboxWebCont
ent); |
136 } | 136 } |
137 } | 137 } |
138 | 138 |
139 RenderDeprecatedFlexibleBox::~RenderDeprecatedFlexibleBox() | 139 RenderDeprecatedFlexibleBox::~RenderDeprecatedFlexibleBox() |
140 { | 140 { |
141 } | 141 } |
142 | 142 |
143 RenderDeprecatedFlexibleBox* RenderDeprecatedFlexibleBox::createAnonymous(Docume
nt* document) | 143 RenderDeprecatedFlexibleBox* RenderDeprecatedFlexibleBox::createAnonymous(Docume
nt* document) |
144 { | 144 { |
145 RenderDeprecatedFlexibleBox* renderer = new (document->renderArena()) Render
DeprecatedFlexibleBox(0); | 145 RenderDeprecatedFlexibleBox* renderer = new (document->renderArena()) Render
DeprecatedFlexibleBox(0); |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 if (isPseudoElement()) | 1099 if (isPseudoElement()) |
1100 return "RenderDeprecatedFlexibleBox (generated)"; | 1100 return "RenderDeprecatedFlexibleBox (generated)"; |
1101 if (isAnonymous()) | 1101 if (isAnonymous()) |
1102 return "RenderDeprecatedFlexibleBox (generated)"; | 1102 return "RenderDeprecatedFlexibleBox (generated)"; |
1103 if (isRelPositioned()) | 1103 if (isRelPositioned()) |
1104 return "RenderDeprecatedFlexibleBox (relative positioned)"; | 1104 return "RenderDeprecatedFlexibleBox (relative positioned)"; |
1105 return "RenderDeprecatedFlexibleBox"; | 1105 return "RenderDeprecatedFlexibleBox"; |
1106 } | 1106 } |
1107 | 1107 |
1108 } // namespace WebCore | 1108 } // namespace WebCore |
OLD | NEW |