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

Side by Side Diff: Source/core/html/HTMLTableElement.cpp

Issue 260713002: Add use counters for the hspace/vspace attributes on <table> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 7 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/frame/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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Apple Inc. 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
(...skipping 18 matching lines...) Expand all
29 #include "CSSValueKeywords.h" 29 #include "CSSValueKeywords.h"
30 #include "HTMLNames.h" 30 #include "HTMLNames.h"
31 #include "bindings/v8/ExceptionState.h" 31 #include "bindings/v8/ExceptionState.h"
32 #include "bindings/v8/ExceptionStatePlaceholder.h" 32 #include "bindings/v8/ExceptionStatePlaceholder.h"
33 #include "core/css/CSSImageValue.h" 33 #include "core/css/CSSImageValue.h"
34 #include "core/css/CSSValuePool.h" 34 #include "core/css/CSSValuePool.h"
35 #include "core/css/StylePropertySet.h" 35 #include "core/css/StylePropertySet.h"
36 #include "core/dom/Attribute.h" 36 #include "core/dom/Attribute.h"
37 #include "core/dom/ElementTraversal.h" 37 #include "core/dom/ElementTraversal.h"
38 #include "core/dom/ExceptionCode.h" 38 #include "core/dom/ExceptionCode.h"
39 #include "core/frame/UseCounter.h"
39 #include "core/html/HTMLTableCaptionElement.h" 40 #include "core/html/HTMLTableCaptionElement.h"
40 #include "core/html/HTMLTableCellElement.h" 41 #include "core/html/HTMLTableCellElement.h"
41 #include "core/html/HTMLTableRowElement.h" 42 #include "core/html/HTMLTableRowElement.h"
42 #include "core/html/HTMLTableRowsCollection.h" 43 #include "core/html/HTMLTableRowsCollection.h"
43 #include "core/html/HTMLTableSectionElement.h" 44 #include "core/html/HTMLTableSectionElement.h"
44 #include "core/html/parser/HTMLParserIdioms.h" 45 #include "core/html/parser/HTMLParserIdioms.h"
45 #include "core/rendering/RenderTable.h" 46 #include "core/rendering/RenderTable.h"
46 #include "wtf/StdLibExtras.h" 47 #include "wtf/StdLibExtras.h"
47 48
48 namespace WebCore { 49 namespace WebCore {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 imageValue->setReferrer(document().outgoingReferrer()); 310 imageValue->setReferrer(document().outgoingReferrer());
310 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu e.release())); 311 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu e.release()));
311 } 312 }
312 } else if (name == valignAttr) { 313 } else if (name == valignAttr) {
313 if (!value.isEmpty()) 314 if (!value.isEmpty())
314 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAl ign, value); 315 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAl ign, value);
315 } else if (name == cellspacingAttr) { 316 } else if (name == cellspacingAttr) {
316 if (!value.isEmpty()) 317 if (!value.isEmpty())
317 addHTMLLengthToStyle(style, CSSPropertyBorderSpacing, value); 318 addHTMLLengthToStyle(style, CSSPropertyBorderSpacing, value);
318 } else if (name == vspaceAttr) { 319 } else if (name == vspaceAttr) {
320 UseCounter::count(document(), UseCounter::HTMLTableElementVspace);
319 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); 321 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
320 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); 322 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
321 } else if (name == hspaceAttr) { 323 } else if (name == hspaceAttr) {
324 UseCounter::count(document(), UseCounter::HTMLTableElementHspace);
322 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); 325 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
323 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); 326 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
324 } else if (name == alignAttr) { 327 } else if (name == alignAttr) {
325 if (!value.isEmpty()) { 328 if (!value.isEmpty()) {
326 if (equalIgnoringCase(value, "center")) { 329 if (equalIgnoringCase(value, "center")) {
327 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkit MarginStart, CSSValueAuto); 330 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkit MarginStart, CSSValueAuto);
328 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkit MarginEnd, CSSValueAuto); 331 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkit MarginEnd, CSSValueAuto);
329 } else 332 } else
330 addPropertyToPresentationAttributeStyle(style, CSSPropertyFloat, value); 333 addPropertyToPresentationAttributeStyle(style, CSSPropertyFloat, value);
331 } 334 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 { 566 {
564 return getAttribute(rulesAttr); 567 return getAttribute(rulesAttr);
565 } 568 }
566 569
567 const AtomicString& HTMLTableElement::summary() const 570 const AtomicString& HTMLTableElement::summary() const
568 { 571 {
569 return getAttribute(summaryAttr); 572 return getAttribute(summaryAttr);
570 } 573 }
571 574
572 } 575 }
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698