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

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

Issue 164803002: Handle CSSImageValue URLs in inline styles in templates correctly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed template usage Created 6 years, 9 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/html/HTMLBodyElement.cpp ('k') | Source/core/html/HTMLTablePartElement.cpp » ('j') | 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 else if (name == borderAttr) 301 else if (name == borderAttr)
302 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidth, p arseBorderWidthAttribute(value), CSSPrimitiveValue::CSS_PX); 302 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidth, p arseBorderWidthAttribute(value), CSSPrimitiveValue::CSS_PX);
303 else if (name == bordercolorAttr) { 303 else if (name == bordercolorAttr) {
304 if (!value.isEmpty()) 304 if (!value.isEmpty())
305 addHTMLColorToStyle(style, CSSPropertyBorderColor, value); 305 addHTMLColorToStyle(style, CSSPropertyBorderColor, value);
306 } else if (name == bgcolorAttr) 306 } else if (name == bgcolorAttr)
307 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); 307 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
308 else if (name == backgroundAttr) { 308 else if (name == backgroundAttr) {
309 String url = stripLeadingAndTrailingHTMLSpaces(value); 309 String url = stripLeadingAndTrailingHTMLSpaces(value);
310 if (!url.isEmpty()) 310 if (!url.isEmpty())
311 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, CSSImageV alue::create(document().completeURL(url)))); 311 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, CSSImageV alue::create(url, document().completeURL(url))));
312 } else if (name == valignAttr) { 312 } else if (name == valignAttr) {
313 if (!value.isEmpty()) 313 if (!value.isEmpty())
314 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAl ign, value); 314 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAl ign, value);
315 } else if (name == cellspacingAttr) { 315 } else if (name == cellspacingAttr) {
316 if (!value.isEmpty()) 316 if (!value.isEmpty())
317 addHTMLLengthToStyle(style, CSSPropertyBorderSpacing, value); 317 addHTMLLengthToStyle(style, CSSPropertyBorderSpacing, value);
318 } else if (name == vspaceAttr) { 318 } else if (name == vspaceAttr) {
319 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); 319 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
320 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); 320 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
321 } else if (name == hspaceAttr) { 321 } else if (name == hspaceAttr) {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 { 553 {
554 return getAttribute(rulesAttr); 554 return getAttribute(rulesAttr);
555 } 555 }
556 556
557 const AtomicString& HTMLTableElement::summary() const 557 const AtomicString& HTMLTableElement::summary() const
558 { 558 {
559 return getAttribute(summaryAttr); 559 return getAttribute(summaryAttr);
560 } 560 }
561 561
562 } 562 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLBodyElement.cpp ('k') | Source/core/html/HTMLTablePartElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698