Changeset 80439 in webkit
- Timestamp:
- Mar 6, 2011 4:22:46 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r80438 r80439 1 2011-03-06 Daniel Bates <dbates@rim.com> 2 3 Reviewed by Darin Adler. 4 5 style.borderSpacing always returns empty string 6 https://bugs.webkit.org/show_bug.cgi?id=54816 7 8 Tests that style.borderSpacing returns the correct result for valid, negative, and missing border-spacing values. 9 10 * fast/css/table-border-spacing-expected.txt: Added. 11 * fast/css/table-border-spacing.html: Added. 12 1 13 2011-03-06 Dan Bernstein <mitz@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r80438 r80439 1 2011-03-06 Daniel Bates <dbates@rim.com> 2 3 Reviewed by Darin Adler. 4 5 style.borderSpacing always returns empty string 6 https://bugs.webkit.org/show_bug.cgi?id=54816 7 8 Teach CSSMutableStyleDeclaration::getPropertyValue() how to reconstitute 9 the value for border-spacing from the value of the WebKit internal CSS 10 property -webkit-border-horizontal-spacing and -webkit-border-vertical-spacing. 11 12 The CSS property border-spacing describes the horizontal and vertical border 13 spacing for an HTML Table element. Notice, WebKit internally represents the value 14 of this property as two properties: -webkit-border-horizontal-spacing and 15 -webkit-border-vertical-spacing, for the horizontal and vertical border spacing, 16 respectively. And WebKit doesn't know to reconstitute these internal properties. 17 Therefore style.borderSpacing always returns the empty string. 18 19 Test: fast/css/table-border-spacing.html 20 21 * css/CSSMutableStyleDeclaration.cpp: 22 (WebCore::CSSMutableStyleDeclaration::getPropertyValue): 23 (WebCore::CSSMutableStyleDeclaration::borderSpacingValue): Added. 24 * css/CSSMutableStyleDeclaration.h: 25 1 26 2011-03-06 Dan Bernstein <mitz@apple.com> 2 27 -
trunk/Source/WebCore/css/CSSMutableStyleDeclaration.cpp
r79985 r80439 2 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 3 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 5 * 5 6 * This library is free software; you can redistribute it and/or … … 35 36 #include "InspectorInstrumentation.h" 36 37 #include "StyledElement.h" 38 #include <wtf/text/StringConcatenate.h> 37 39 38 40 using namespace std; … … 121 123 // Shorthand and 4-values properties 122 124 switch (propertyID) { 125 case CSSPropertyBorderSpacing: { 126 const int properties[2] = { CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderVerticalSpacing }; 127 return borderSpacingValue(properties); 128 } 123 129 case CSSPropertyBackgroundPosition: { 124 130 // FIXME: Is this correct? The code in cssparser.cpp is confusing … … 267 273 } 268 274 return String(); 275 } 276 277 String CSSMutableStyleDeclaration::borderSpacingValue(const int properties[2]) const 278 { 279 RefPtr<CSSValue> horizontalValue = getPropertyCSSValue(properties[0]); 280 RefPtr<CSSValue> verticalValue = getPropertyCSSValue(properties[1]); 281 282 if (!horizontalValue) 283 return String(); 284 ASSERT(verticalValue); // By <http://www.w3.org/TR/CSS21/tables.html#separated-borders>. 285 286 String horizontalValueCSSText = horizontalValue->cssText(); 287 String verticalValueCSSText = verticalValue->cssText(); 288 if (horizontalValueCSSText == verticalValueCSSText) 289 return horizontalValueCSSText; 290 return makeString(horizontalValueCSSText, ' ', verticalValueCSSText); 269 291 } 270 292 -
trunk/Source/WebCore/css/CSSMutableStyleDeclaration.h
r79985 r80439 157 157 String getLayeredShorthandValue(const int* properties, unsigned number) const; 158 158 String get4Values(const int* properties) const; 159 String borderSpacingValue(const int properties[2]) const; 159 160 160 161 void setPropertyInternal(const CSSProperty&, CSSProperty* slot = 0);
Note: See TracChangeset
for help on using the changeset viewer.