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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 21081004: Add UseCounters for display:run-in and display:compact. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: include header Created 7 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/UseCounter.h ('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) 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 25 matching lines...) Expand all
36 #include "core/editing/htmlediting.h" 36 #include "core/editing/htmlediting.h"
37 #include "core/html/HTMLAnchorElement.h" 37 #include "core/html/HTMLAnchorElement.h"
38 #include "core/html/HTMLElement.h" 38 #include "core/html/HTMLElement.h"
39 #include "core/html/HTMLHtmlElement.h" 39 #include "core/html/HTMLHtmlElement.h"
40 #include "core/html/HTMLTableElement.h" 40 #include "core/html/HTMLTableElement.h"
41 #include "core/page/EventHandler.h" 41 #include "core/page/EventHandler.h"
42 #include "core/page/Frame.h" 42 #include "core/page/Frame.h"
43 #include "core/page/FrameView.h" 43 #include "core/page/FrameView.h"
44 #include "core/page/Page.h" 44 #include "core/page/Page.h"
45 #include "core/page/Settings.h" 45 #include "core/page/Settings.h"
46 #include "core/page/UseCounter.h"
46 #include "core/page/animation/AnimationController.h" 47 #include "core/page/animation/AnimationController.h"
47 #include "core/platform/graphics/FloatQuad.h" 48 #include "core/platform/graphics/FloatQuad.h"
48 #include "core/platform/graphics/GraphicsContext.h" 49 #include "core/platform/graphics/GraphicsContext.h"
49 #include "core/platform/graphics/transforms/TransformState.h" 50 #include "core/platform/graphics/transforms/TransformState.h"
50 #include "core/rendering/FlowThreadController.h" 51 #include "core/rendering/FlowThreadController.h"
51 #include "core/rendering/HitTestResult.h" 52 #include "core/rendering/HitTestResult.h"
52 #include "core/rendering/RenderArena.h" 53 #include "core/rendering/RenderArena.h"
53 #include "core/rendering/RenderCounter.h" 54 #include "core/rendering/RenderCounter.h"
54 #include "core/rendering/RenderDeprecatedFlexibleBox.h" 55 #include "core/rendering/RenderDeprecatedFlexibleBox.h"
55 #include "core/rendering/RenderFlexibleBox.h" 56 #include "core/rendering/RenderFlexibleBox.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // treat <rt> as ruby text ONLY if it still has its default treatment of blo ck 168 // treat <rt> as ruby text ONLY if it still has its default treatment of blo ck
168 if (element->hasTagName(rtTag) && style->display() == BLOCK) 169 if (element->hasTagName(rtTag) && style->display() == BLOCK)
169 return new (arena) RenderRubyText(element); 170 return new (arena) RenderRubyText(element);
170 if (RuntimeEnabledFeatures::cssRegionsEnabled() && style->isDisplayRegionTyp e() && !style->regionThread().isEmpty() && doc->renderView()) 171 if (RuntimeEnabledFeatures::cssRegionsEnabled() && style->isDisplayRegionTyp e() && !style->regionThread().isEmpty() && doc->renderView())
171 return new (arena) RenderRegion(element, 0); 172 return new (arena) RenderRegion(element, 0);
172 switch (style->display()) { 173 switch (style->display()) {
173 case NONE: 174 case NONE:
174 return 0; 175 return 0;
175 case INLINE: 176 case INLINE:
176 return new (arena) RenderInline(element); 177 return new (arena) RenderInline(element);
178 case RUN_IN:
179 UseCounter::count(doc, UseCounter::Feature::CSSDisplayRunIn);
180 // Intentionally fall through.
181 case COMPACT:
182 UseCounter::count(doc, UseCounter::Feature::CSSDisplayCompact);
eseidel 2013/07/31 16:47:02 Do you really want to count run-in as compact?
ojan 2013/07/31 17:20:10 lol. whoops.
183 // Intentionally fall through.
177 case BLOCK: 184 case BLOCK:
178 case INLINE_BLOCK: 185 case INLINE_BLOCK:
179 case RUN_IN:
180 case COMPACT:
181 if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && do c->regionBasedColumnsEnabled()) 186 if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && do c->regionBasedColumnsEnabled())
182 return new (arena) RenderMultiColumnBlock(element); 187 return new (arena) RenderMultiColumnBlock(element);
183 return new (arena) RenderBlock(element); 188 return new (arena) RenderBlock(element);
184 case LIST_ITEM: 189 case LIST_ITEM:
185 return new (arena) RenderListItem(element); 190 return new (arena) RenderListItem(element);
186 case TABLE: 191 case TABLE:
187 case INLINE_TABLE: 192 case INLINE_TABLE:
188 return new (arena) RenderTable(element); 193 return new (arena) RenderTable(element);
189 case TABLE_ROW_GROUP: 194 case TABLE_ROW_GROUP:
190 case TABLE_HEADER_GROUP: 195 case TABLE_HEADER_GROUP:
(...skipping 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 { 3284 {
3280 if (object1) { 3285 if (object1) {
3281 const WebCore::RenderObject* root = object1; 3286 const WebCore::RenderObject* root = object1;
3282 while (root->parent()) 3287 while (root->parent())
3283 root = root->parent(); 3288 root = root->parent();
3284 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3289 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3285 } 3290 }
3286 } 3291 }
3287 3292
3288 #endif 3293 #endif
OLDNEW
« no previous file with comments | « Source/core/page/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698