Changeset 18676 in webkit
- Timestamp:
- Jan 8, 2007 11:55:56 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r18675 r18676 1 2007-01-08 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Darin. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=12162 6 The inheritableProperties array is duplicated 7 8 No test possible (no change to functionality). 9 10 * css/CSSComputedStyleDeclaration.cpp: 11 (WebCore::CSSComputedStyleDeclaration::removeComputedInheritablePropertiesFrom): Added. 12 Removes the inheritable properties that CSSComputedStyleDeclaration knows how to compute 13 from the given mutable declaration. 14 * css/CSSComputedStyleDeclaration.h: 15 * css/CSSMutableStyleDeclaration.cpp: Removed one copy of the inheritableProperties array. 16 * css/CSSMutableStyleDeclaration.h: 17 * editing/ReplaceSelectionCommand.cpp: 18 (WebCore::ReplaceSelectionCommand::removeRedundantStyles): Changed to call 19 CSSComputedStyleDeclaration::removeComputedInheritablePropertiesFrom. 20 1 21 2007-01-08 Alexey Proskuryakov <ap@webkit.org> 2 22 … … 39 59 Added this method to DOM and IDL, too. Made namedItem() non-virtual. 40 60 61 >>>>>>> .r18675 41 62 2007-01-08 Beth Dakin <bdakin@apple.com> 42 63 -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r18666 r18676 1541 1541 // It is the intersection of the list of inherited CSS properties and the 1542 1542 // properties for which we have a computed implementation in this file. 1543 // FIXME: This array is duplicated in CSSMutableStyleDeclaration.cpp! Both must be patched if1544 // you add something here!1545 1543 const int inheritableProperties[] = { 1546 1544 CSS_PROP_BORDER_COLLAPSE, … … 1571 1569 const unsigned numInheritableProperties = sizeof(inheritableProperties) / sizeof(inheritableProperties[0]); 1572 1570 1571 void CSSComputedStyleDeclaration::removeComputedInheritablePropertiesFrom(CSSMutableStyleDeclaration* declaration) 1572 { 1573 declaration->removePropertiesInSet(inheritableProperties, numInheritableProperties); 1574 } 1575 1573 1576 PassRefPtr<CSSMutableStyleDeclaration> CSSComputedStyleDeclaration::copyInheritableProperties() const 1574 1577 { -
trunk/WebCore/css/CSSComputedStyleDeclaration.h
r14407 r18676 59 59 PassRefPtr<CSSMutableStyleDeclaration> copyInheritableProperties() const; 60 60 61 static void removeComputedInheritablePropertiesFrom(CSSMutableStyleDeclaration*); 62 61 63 private: 62 64 virtual void setCssText(const String&, ExceptionCode&); -
trunk/WebCore/css/CSSMutableStyleDeclaration.cpp
r18660 r18676 417 417 } 418 418 419 // This is the list of properties we want to copy in the copyInheritableProperties() function.420 // It is the intersection of the list of inherited CSS properties and the421 // properties for which we have a computed implementation in this file.422 // FIXME: This array is duplicated in CSSComputedStyleDeclaration.cpp! Both must be patched if423 // you add something here!424 const int inheritableProperties[] = {425 CSS_PROP_BORDER_COLLAPSE,426 CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING,427 CSS_PROP__WEBKIT_BORDER_VERTICAL_SPACING,428 CSS_PROP_COLOR,429 CSS_PROP_FONT_FAMILY,430 CSS_PROP_FONT_SIZE,431 CSS_PROP_FONT_STYLE,432 CSS_PROP_FONT_VARIANT,433 CSS_PROP_FONT_WEIGHT,434 CSS_PROP_LETTER_SPACING,435 CSS_PROP_LINE_HEIGHT,436 CSS_PROP_TEXT_ALIGN,437 CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT,438 CSS_PROP__WEBKIT_TEXT_FILL_COLOR,439 CSS_PROP_TEXT_INDENT,440 CSS_PROP__WEBKIT_TEXT_SIZE_ADJUST,441 CSS_PROP__WEBKIT_TEXT_STROKE_COLOR,442 CSS_PROP__WEBKIT_TEXT_STROKE_WIDTH,443 CSS_PROP_TEXT_TRANSFORM,444 CSS_PROP_ORPHANS,445 CSS_PROP_WHITE_SPACE,446 CSS_PROP_WIDOWS,447 CSS_PROP_WORD_SPACING,448 };449 450 const unsigned numInheritableProperties = sizeof(inheritableProperties) / sizeof(inheritableProperties[0]);451 452 419 // This is the list of properties we want to copy in the copyBlockProperties() function. 453 420 // It is the list of CSS properties that apply specially to block-level elements. … … 484 451 } 485 452 486 void CSSMutableStyleDeclaration::removeInheritableProperties()487 {488 removePropertiesInSet(inheritableProperties, numInheritableProperties);489 }490 491 453 void CSSMutableStyleDeclaration::removePropertiesInSet(const int *set, unsigned length) 492 454 { -
trunk/WebCore/css/CSSMutableStyleDeclaration.h
r14408 r18676 93 93 PassRefPtr<CSSMutableStyleDeclaration> copyBlockProperties() const; 94 94 void removeBlockProperties(); 95 void removeInheritableProperties();96 95 void removePropertiesInSet(const int* set, unsigned length); 97 96 -
trunk/WebCore/editing/ReplaceSelectionCommand.cpp
r18255 r18676 437 437 CSSMutableStyleDeclaration* inlineStyleDecl = element->inlineStyleDecl(); 438 438 if (inlineStyleDecl) { 439 inlineStyleDecl->removeInheritableProperties();439 CSSComputedStyleDeclaration::removeComputedInheritablePropertiesFrom(inlineStyleDecl); 440 440 inlineStyleDecl->merge(style, true); 441 441 setNodeAttribute(element, styleAttr, inlineStyleDecl->cssText());
Note: See TracChangeset
for help on using the changeset viewer.