Changeset 46097 in webkit
- Timestamp:
- Jul 18, 2009 3:58:15 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r46096 r46097 1 2009-07-18 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Anders Carlsson. 4 5 Test box-shadow spread radius 6 https://bugs.webkit.org/show_bug.cgi?id=27417 7 8 * fast/box-shadow/spread.html: Added. 9 * platform/mac/fast/box-shadow/spread-expected.checksum: Added. 10 * platform/mac/fast/box-shadow/spread-expected.png: Added. 11 * platform/mac/fast/box-shadow/spread-expected.txt: Added. 12 1 13 2009-07-18 Jan Michael Alonzo <jmalonzo@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r46094 r46097 1 2009-07-18 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Anders Carlsson. 4 5 Add spread radius support to -webkit-box-shadow 6 https://bugs.webkit.org/show_bug.cgi?id=27417 7 8 Test: fast/box-shadow/spread.html 9 10 * css/CSSComputedStyleDeclaration.cpp: 11 (WebCore::valueForShadow): Added a property ID parameter and used it to 12 include the spread length for box-shadow but not for text-shadow. 13 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 14 Pass the property ID to valueForShadow(). 15 16 * css/CSSParser.cpp: 17 (WebCore::ShadowParseContext::ShadowParseContext): Added property, 18 spread, and allowSpread members. Added a property ID parameter to 19 the constructor. Initialize the property and allowSpread members. 20 (WebCore::ShadowParseContext::allowLength): Added allowSpread. 21 (WebCore::ShadowParseContext::commitValue): Pass the spread value to 22 the ShadowValue constructor. Reset allowSpread. 23 (WebCore::ShadowParseContext::commitLength): Allow spread after blur 24 for the box-shadow property. 25 (WebCore::ShadowParseContext::commitColor): Reset allowSpread. 26 (WebCore::CSSParser::parseShadow): Pass the property ID to 27 ShadowParseContext(). 28 29 * css/CSSStyleSelector.cpp: 30 (WebCore::CSSStyleSelector::applyProperty): Get the spread value from 31 the shadow value and pass it to the ShadowData constructor. 32 33 * css/ShadowValue.cpp: 34 (WebCore::ShadowValue::ShadowValue): Added spread. 35 (WebCore::ShadowValue::cssText): Added spread. 36 37 * css/ShadowValue.h: 38 (WebCore::ShadowValue::create): Added spread. 39 40 * page/animation/AnimationBase.cpp: 41 (WebCore::blendFunc): Blend the spread value. 42 (WebCore::PropertyWrapperShadow::blend): Added 0 spread to the default 43 shadow. 44 45 * rendering/InlineFlowBox.cpp: 46 (WebCore::InlineFlowBox::placeBoxesHorizontally): Account for spread in 47 the visual overflow calculations. 48 (WebCore::InlineFlowBox::placeBoxesVertically): Ditto. 49 (WebCore::InlineFlowBox::paint): Ditto. 50 51 * rendering/RenderBlock.cpp: 52 (WebCore::RenderBlock::overflowHeight): Ditto. 53 (WebCore::RenderBlock::overflowWidth): Ditto. 54 (WebCore::RenderBlock::overflowLeft): Ditto. 55 (WebCore::RenderBlock::overflowTop): Ditto. 56 (WebCore::RenderBlock::overflowRect): Ditto. 57 (WebCore::RenderBlock::layoutBlock): Ditto. 58 59 * rendering/RenderBoxModelObject.cpp: 60 (WebCore::RenderBoxModelObject::paintBoxShadow): Inflate the shadow- 61 casting rect by the shadow spread value. Adjust border radii if 62 necessary. 63 64 * rendering/RenderFlexibleBox.cpp: 65 (WebCore::RenderFlexibleBox::layoutBlock): Account for spread in the 66 visual overflow calculations. 67 * rendering/RenderLayer.cpp: 68 (WebCore::RenderLayer::calculateRects): Ditto. 69 70 * rendering/RenderObject.cpp: 71 (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Account for spread. 72 (WebCore::RenderObject::adjustRectForOutlineAndShadow): Ditto. 73 74 * rendering/RenderReplaced.cpp: 75 (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect): Ditto. 76 77 * rendering/style/RenderStyle.cpp: 78 (WebCore::RenderStyle::setTextShadow): Assert that text shadows do not 79 have spread. 80 81 * rendering/style/ShadowData.cpp: 82 (WebCore::ShadowData::ShadowData): Added spread. 83 (WebCore::ShadowData::operator==): Compare spread. 84 * rendering/style/ShadowData.h: 85 (WebCore::ShadowData::ShadowData): Added spread. 86 1 87 2009-07-18 Adam Barth <abarth@webkit.org> 2 88 -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r45014 r46097 262 262 const unsigned numComputedProperties = sizeof(computedProperties) / sizeof(computedProperties[0]); 263 263 264 static PassRefPtr<CSSValue> valueForShadow(const ShadowData* shadow )264 static PassRefPtr<CSSValue> valueForShadow(const ShadowData* shadow, CSSPropertyID propertyID) 265 265 { 266 266 if (!shadow) … … 272 272 RefPtr<CSSPrimitiveValue> y = CSSPrimitiveValue::create(s->y, CSSPrimitiveValue::CSS_PX); 273 273 RefPtr<CSSPrimitiveValue> blur = CSSPrimitiveValue::create(s->blur, CSSPrimitiveValue::CSS_PX); 274 RefPtr<CSSPrimitiveValue> spread = propertyID == CSSPropertyTextShadow ? 0 : CSSPrimitiveValue::create(s->spread, CSSPrimitiveValue::CSS_PX); 274 275 RefPtr<CSSPrimitiveValue> color = CSSPrimitiveValue::createColor(s->color.rgb()); 275 list->prepend(ShadowValue::create(x.release(), y.release(), blur.release(), color.release()));276 list->prepend(ShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), color.release())); 276 277 } 277 278 return list.release(); … … 723 724 return valueForReflection(style->boxReflect()); 724 725 case CSSPropertyWebkitBoxShadow: 725 return valueForShadow(style->boxShadow() );726 return valueForShadow(style->boxShadow(), static_cast<CSSPropertyID>(propertyID)); 726 727 case CSSPropertyCaptionSide: 727 728 return CSSPrimitiveValue::create(style->captionSide()); … … 1050 1051 return CSSPrimitiveValue::create(style->textIndent()); 1051 1052 case CSSPropertyTextShadow: 1052 return valueForShadow(style->textShadow() );1053 return valueForShadow(style->textShadow(), static_cast<CSSPropertyID>(propertyID)); 1053 1054 case CSSPropertyWebkitTextSecurity: 1054 1055 return CSSPrimitiveValue::create(style->textSecurity()); -
trunk/WebCore/css/CSSParser.cpp
r46061 r46097 3442 3442 // without the allowBreak bit being set, then it will clean up all of the objects and destroy them. 3443 3443 struct ShadowParseContext { 3444 ShadowParseContext() 3445 : allowX(true) 3446 , allowY(false) 3447 , allowBlur(false) 3448 , allowColor(true) 3449 , allowBreak(true) 3450 {} 3451 3452 bool allowLength() { return allowX || allowY || allowBlur; } 3444 ShadowParseContext(CSSPropertyID prop) 3445 : property(prop) 3446 , allowX(true) 3447 , allowY(false) 3448 , allowBlur(false) 3449 , allowSpread(false) 3450 , allowColor(true) 3451 , allowBreak(true) 3452 { 3453 } 3454 3455 bool allowLength() { return allowX || allowY || allowBlur || allowSpread; } 3453 3456 3454 3457 void commitValue() 3455 3458 { 3456 3459 // Handle the ,, case gracefully by doing nothing. 3457 if (x || y || blur || color) {3460 if (x || y || blur || spread || color) { 3458 3461 if (!values) 3459 3462 values = CSSValueList::createCommaSeparated(); 3460 3463 3461 3464 // Construct the current shadow value and add it to the list. 3462 values->append(ShadowValue::create(x.release(), y.release(), blur.release(), color.release()));3463 } 3464 3465 values->append(ShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), color.release())); 3466 } 3467 3465 3468 // Now reset for the next shadow value. 3466 x = y = blur = color = 0; 3467 allowX = allowColor = allowBreak = true; 3468 allowY = allowBlur = false; 3469 x = 0; 3470 y = 0; 3471 blur = 0; 3472 spread = 0; 3473 color = 0; 3474 3475 allowX = true; 3476 allowColor = true; 3477 allowBreak = true; 3478 allowY = false; 3479 allowBlur = false; 3480 allowSpread = false; 3469 3481 } 3470 3482 … … 3475 3487 if (allowX) { 3476 3488 x = val.release(); 3477 allowX = false; allowY = true; allowColor = false; allowBreak = false; 3478 } 3479 else if (allowY) { 3489 allowX = false; 3490 allowY = true; 3491 allowColor = false; 3492 allowBreak = false; 3493 } else if (allowY) { 3480 3494 y = val.release(); 3481 allowY = false; allowBlur = true; allowColor = true; allowBreak = true; 3482 } 3483 else if (allowBlur) { 3495 allowY = false; 3496 allowBlur = true; 3497 allowColor = true; 3498 allowBreak = true; 3499 } else if (allowBlur) { 3484 3500 blur = val.release(); 3485 3501 allowBlur = false; 3502 allowSpread = property == CSSPropertyWebkitBoxShadow; 3503 } else if (allowSpread) { 3504 spread = val.release(); 3505 allowSpread = false; 3486 3506 } 3487 3507 } … … 3493 3513 if (allowX) 3494 3514 allowBreak = false; 3495 else 3515 else { 3496 3516 allowBlur = false; 3497 } 3498 3517 allowSpread = false; 3518 } 3519 } 3520 3521 CSSPropertyID property; 3522 3499 3523 RefPtr<CSSValueList> values; 3500 3524 RefPtr<CSSPrimitiveValue> x; 3501 3525 RefPtr<CSSPrimitiveValue> y; 3502 3526 RefPtr<CSSPrimitiveValue> blur; 3527 RefPtr<CSSPrimitiveValue> spread; 3503 3528 RefPtr<CSSPrimitiveValue> color; 3504 3529 … … 3506 3531 bool allowY; 3507 3532 bool allowBlur; 3533 bool allowSpread; 3508 3534 bool allowColor; 3509 3535 bool allowBreak; … … 3512 3538 bool CSSParser::parseShadow(int propId, bool important) 3513 3539 { 3514 ShadowParseContext context ;3540 ShadowParseContext context(static_cast<CSSPropertyID>(propId)); 3515 3541 CSSParserValue* val; 3516 3542 while ((val = m_valueList->current())) { … … 3524 3550 // The value is good. Commit it. 3525 3551 context.commitValue(); 3526 } 3527 // Check to see if we're a length. 3528 else if (validUnit(val, FLength, true)) { 3552 } else if (validUnit(val, FLength, true)) { 3529 3553 // We required a length and didn't get one. Invalid. 3530 3554 if (!context.allowLength()) … … 3533 3557 // A length is allowed here. Construct the value and add it. 3534 3558 context.commitLength(val); 3535 } 3536 else { 3559 } else { 3537 3560 // The only other type of value that's ok is a color value. 3538 3561 RefPtr<CSSPrimitiveValue> parsedColor; … … 3555 3578 context.commitColor(parsedColor.release()); 3556 3579 } 3557 3580 3558 3581 m_valueList->next(); 3559 3582 } … … 3567 3590 } 3568 3591 } 3569 3592 3570 3593 return false; 3571 3594 } -
trunk/WebCore/css/CSSStyleSelector.cpp
r46062 r46097 4540 4540 int y = item->y->computeLengthInt(style(), m_rootElementStyle, zoomFactor); 4541 4541 int blur = item->blur ? item->blur->computeLengthInt(style(), m_rootElementStyle, zoomFactor) : 0; 4542 int spread = item->spread ? item->spread->computeLengthInt(style(), m_rootElementStyle, zoomFactor) : 0; 4542 4543 Color color; 4543 4544 if (item->color) 4544 4545 color = getColorFromPrimitiveValue(item->color.get()); 4545 ShadowData* shadowData = new ShadowData(x, y, blur, color.isValid() ? color : Color::transparent);4546 ShadowData* shadowData = new ShadowData(x, y, blur, spread, color.isValid() ? color : Color::transparent); 4546 4547 if (id == CSSPropertyTextShadow) 4547 4548 m_style->setTextShadow(shadowData, i != 0); -
trunk/WebCore/css/ShadowValue.cpp
r25754 r46097 32 32 PassRefPtr<CSSPrimitiveValue> _y, 33 33 PassRefPtr<CSSPrimitiveValue> _blur, 34 PassRefPtr<CSSPrimitiveValue> _spread, 34 35 PassRefPtr<CSSPrimitiveValue> _color) 35 36 : x(_x) 36 37 , y(_y) 37 38 , blur(_blur) 39 , spread(_spread) 38 40 , color(_color) 39 41 { … … 61 63 text += blur->cssText(); 62 64 } 65 if (spread) { 66 if (!text.isEmpty()) 67 text += " "; 68 text += spread->cssText(); 69 } 63 70 64 71 return text; -
trunk/WebCore/css/ShadowValue.h
r34627 r46097 36 36 PassRefPtr<CSSPrimitiveValue> y, 37 37 PassRefPtr<CSSPrimitiveValue> blur, 38 PassRefPtr<CSSPrimitiveValue> spread, 38 39 PassRefPtr<CSSPrimitiveValue> color) 39 40 { 40 return adoptRef(new ShadowValue(x, y, blur, color));41 return adoptRef(new ShadowValue(x, y, blur, spread, color)); 41 42 } 42 43 … … 46 47 RefPtr<CSSPrimitiveValue> y; 47 48 RefPtr<CSSPrimitiveValue> blur; 49 RefPtr<CSSPrimitiveValue> spread; 48 50 RefPtr<CSSPrimitiveValue> color; 49 51 … … 52 54 PassRefPtr<CSSPrimitiveValue> y, 53 55 PassRefPtr<CSSPrimitiveValue> blur, 56 PassRefPtr<CSSPrimitiveValue> spread, 54 57 PassRefPtr<CSSPrimitiveValue> color); 55 58 }; -
trunk/WebCore/page/animation/AnimationBase.cpp
r45556 r46097 118 118 ASSERT(from && to); 119 119 return new ShadowData(blendFunc(anim, from->x, to->x, progress), blendFunc(anim, from->y, to->y, progress), 120 blendFunc(anim, from->blur, to->blur, progress), blendFunc(anim, from->color, to->color, progress)); 120 blendFunc(anim, from->blur, to->blur, progress), blendFunc(anim, from->spread, to->spread, progress), 121 blendFunc(anim, from->color, to->color, progress)); 121 122 } 122 123 … … 301 302 ShadowData* shadowA = (a->*m_getter)(); 302 303 ShadowData* shadowB = (b->*m_getter)(); 303 ShadowData defaultShadowData(0, 0, 0, Color::transparent);304 ShadowData defaultShadowData(0, 0, 0, 0, Color::transparent); 304 305 305 306 if (!shadowA) -
trunk/WebCore/rendering/InlineFlowBox.cpp
r45702 r46097 257 257 int boxShadowRight = 0; 258 258 for (ShadowData* boxShadow = renderer()->style(m_firstLine)->boxShadow(); boxShadow; boxShadow = boxShadow->next) { 259 boxShadowLeft = min(boxShadow->x - boxShadow->blur , boxShadowLeft);260 boxShadowRight = max(boxShadow->x + boxShadow->blur , boxShadowRight);259 boxShadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, boxShadowLeft); 260 boxShadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread, boxShadowRight); 261 261 } 262 262 leftPosition = min(xPos + boxShadowLeft, leftPosition); … … 530 530 531 531 for (ShadowData* boxShadow = curr->renderer()->style(m_firstLine)->boxShadow(); boxShadow; boxShadow = boxShadow->next) { 532 overflowTop = min(overflowTop, boxShadow->y - boxShadow->blur );533 overflowBottom = max(overflowBottom, boxShadow->y + boxShadow->blur );532 overflowTop = min(overflowTop, boxShadow->y - boxShadow->blur - boxShadow->spread); 533 overflowBottom = max(overflowBottom, boxShadow->y + boxShadow->blur + boxShadow->spread); 534 534 } 535 535 … … 602 602 int shadowRight = 0; 603 603 for (ShadowData* boxShadow = renderer()->style(m_firstLine)->boxShadow(); boxShadow; boxShadow = boxShadow->next) { 604 shadowLeft = min(boxShadow->x - boxShadow->blur , shadowLeft);605 shadowRight = max(boxShadow->x + boxShadow->blur , shadowRight);604 shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, shadowLeft); 605 shadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread, shadowRight); 606 606 } 607 607 for (ShadowData* textShadow = renderer()->style(m_firstLine)->textShadow(); textShadow; textShadow = textShadow->next) { -
trunk/WebCore/rendering/RenderBlock.cpp
r46044 r46097 556 556 int shadowHeight = 0; 557 557 for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) 558 shadowHeight = max(boxShadow->y + boxShadow->blur , shadowHeight);558 shadowHeight = max(boxShadow->y + boxShadow->blur + boxShadow->spread, shadowHeight); 559 559 int inflatedHeight = height() + shadowHeight; 560 560 if (hasReflection()) … … 570 570 int shadowWidth = 0; 571 571 for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) 572 shadowWidth = max(boxShadow->x + boxShadow->blur , shadowWidth);572 shadowWidth = max(boxShadow->x + boxShadow->blur + boxShadow->spread, shadowWidth); 573 573 int inflatedWidth = width() + shadowWidth; 574 574 if (hasReflection()) … … 584 584 int shadowLeft = 0; 585 585 for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) 586 shadowLeft = min(boxShadow->x - boxShadow->blur , shadowLeft);586 shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, shadowLeft); 587 587 int left = shadowLeft; 588 588 if (hasReflection()) … … 598 598 int shadowTop = 0; 599 599 for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) 600 shadowTop = min(boxShadow->y - boxShadow->blur , shadowTop);600 shadowTop = min(boxShadow->y - boxShadow->blur - boxShadow->spread, shadowTop); 601 601 int top = shadowTop; 602 602 if (hasReflection()) … … 617 617 618 618 for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) { 619 shadowLeft = min(boxShadow->x - boxShadow->blur , shadowLeft);620 shadowRight = max(boxShadow->x + boxShadow->blur , shadowRight);621 shadowTop = min(boxShadow->y - boxShadow->blur , shadowTop);622 shadowBottom = max(boxShadow->y + boxShadow->blur , shadowBottom);619 shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread, shadowLeft); 620 shadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread, shadowRight); 621 shadowTop = min(boxShadow->y - boxShadow->blur - boxShadow->spread, shadowTop); 622 shadowBottom = max(boxShadow->y + boxShadow->blur + boxShadow->spread, shadowBottom); 623 623 } 624 624 … … 872 872 if (!hasOverflowClip()) { 873 873 for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) { 874 m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur );875 m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur );876 m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur );877 m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur );874 m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur - boxShadow->spread); 875 m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur + boxShadow->spread); 876 m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur - boxShadow->spread); 877 m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur + boxShadow->spread); 878 878 } 879 879 -
trunk/WebCore/rendering/RenderBoxModelObject.cpp
r45988 r46097 1139 1139 bool hasOpaqueBackground = s->backgroundColor().isValid() && s->backgroundColor().alpha() == 255; 1140 1140 for (ShadowData* shadow = s->boxShadow(); shadow; shadow = shadow->next) { 1141 context->save();1142 1143 1141 IntSize shadowOffset(shadow->x, shadow->y); 1144 1142 int shadowBlur = shadow->blur; 1143 int shadowSpread = shadow->spread; 1145 1144 IntRect fillRect(rect); 1145 fillRect.inflate(shadowSpread); 1146 if (fillRect.isEmpty()) 1147 continue; 1146 1148 1147 1149 IntRect shadowRect(rect); 1148 shadowRect.inflate(shadowBlur );1150 shadowRect.inflate(shadowBlur + shadowSpread); 1149 1151 shadowRect.move(shadowOffset); 1152 1153 context->save(); 1150 1154 context->clip(shadowRect); 1151 1155 1152 1156 // Move the fill just outside the clip, adding 1 pixel separation so that the fill does not 1153 1157 // bleed in (due to antialiasing) if the context is transformed. 1154 IntSize extraOffset(w + max(0, shadowOffset.width()) + shadowBlur + 1, 0);1158 IntSize extraOffset(w + max(0, shadowOffset.width()) + shadowBlur + 2 * shadowSpread + 1, 0); 1155 1159 shadowOffset -= extraOffset; 1156 1160 fillRect.move(extraOffset); … … 1171 1175 IntSize bottomLeftToClipOut = bottomLeft; 1172 1176 IntSize bottomRightToClipOut = bottomRight; 1177 1178 if (shadowSpread < 0) { 1179 topLeft.expand(shadowSpread, shadowSpread); 1180 topLeft.clampNegativeToZero(); 1181 1182 topRight.expand(shadowSpread, shadowSpread); 1183 topRight.clampNegativeToZero(); 1184 1185 bottomLeft.expand(shadowSpread, shadowSpread); 1186 bottomLeft.clampNegativeToZero(); 1187 1188 bottomRight.expand(shadowSpread, shadowSpread); 1189 bottomRight.clampNegativeToZero(); 1190 } 1173 1191 1174 1192 // If the box is opaque, it is unnecessary to clip it out. However, doing so saves time -
trunk/WebCore/rendering/RenderFlexibleBox.cpp
r46044 r46097 281 281 if (!hasOverflowClip()) { 282 282 for (ShadowData* boxShadow = style()->boxShadow(); boxShadow; boxShadow = boxShadow->next) { 283 m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur );284 m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur );285 m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur );286 m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur );283 m_overflowLeft = min(m_overflowLeft, boxShadow->x - boxShadow->blur - boxShadow->spread); 284 m_overflowWidth = max(m_overflowWidth, width() + boxShadow->x + boxShadow->blur + boxShadow->spread); 285 m_overflowTop = min(m_overflowTop, boxShadow->y - boxShadow->blur - boxShadow->spread); 286 m_overflowHeight = max(m_overflowHeight, height() + boxShadow->y + boxShadow->blur + boxShadow->spread); 287 287 } 288 288 -
trunk/WebCore/rendering/RenderLayer.cpp
r45715 r46097 2710 2710 IntRect shadowRect = layerBounds; 2711 2711 shadowRect.move(boxShadow->x, boxShadow->y); 2712 shadowRect.inflate(boxShadow->blur );2712 shadowRect.inflate(boxShadow->blur + boxShadow->spread); 2713 2713 overflow.unite(shadowRect); 2714 2714 boxShadow = boxShadow->next; -
trunk/WebCore/rendering/RenderObject.cpp
r45624 r46097 1219 1219 int shadowRight = 0; 1220 1220 for (ShadowData* shadow = boxShadow; shadow; shadow = shadow->next) 1221 shadowRight = max(shadow->x + shadow->blur , shadowRight);1221 shadowRight = max(shadow->x + shadow->blur + shadow->spread, shadowRight); 1222 1222 1223 1223 int borderRight = isBox() ? toRenderBox(this)->borderRight() : 0; … … 1237 1237 int shadowBottom = 0; 1238 1238 for (ShadowData* shadow = boxShadow; shadow; shadow = shadow->next) 1239 shadowBottom = max(shadow->y + shadow->blur , shadowBottom);1239 shadowBottom = max(shadow->y + shadow->blur + shadow->spread, shadowBottom); 1240 1240 1241 1241 int borderBottom = isBox() ? toRenderBox(this)->borderBottom() : 0; … … 2241 2241 2242 2242 do { 2243 shadowLeft = min(boxShadow->x - boxShadow->blur - outlineSize, shadowLeft);2244 shadowRight = max(boxShadow->x + boxShadow->blur + outlineSize, shadowRight);2245 shadowTop = min(boxShadow->y - boxShadow->blur - outlineSize, shadowTop);2246 shadowBottom = max(boxShadow->y + boxShadow->blur + outlineSize, shadowBottom);2243 shadowLeft = min(boxShadow->x - boxShadow->blur - boxShadow->spread - outlineSize, shadowLeft); 2244 shadowRight = max(boxShadow->x + boxShadow->blur + boxShadow->spread + outlineSize, shadowRight); 2245 shadowTop = min(boxShadow->y - boxShadow->blur - boxShadow->spread - outlineSize, shadowTop); 2246 shadowBottom = max(boxShadow->y + boxShadow->blur + boxShadow->spread + outlineSize, shadowBottom); 2247 2247 2248 2248 boxShadow = boxShadow->next; -
trunk/WebCore/rendering/RenderReplaced.cpp
r45486 r46097 334 334 IntRect shadow = borderBoxRect(); 335 335 shadow.move(boxShadow->x, boxShadow->y); 336 shadow.inflate(boxShadow->blur );336 shadow.inflate(boxShadow->blur + boxShadow->spread); 337 337 overflow.unite(shadow); 338 338 } -
trunk/WebCore/rendering/style/RenderStyle.cpp
r45612 r46097 696 696 void RenderStyle::setTextShadow(ShadowData* val, bool add) 697 697 { 698 ASSERT(!val || !val->spread); 699 698 700 StyleRareInheritedData* rareData = rareInheritedData.access(); 699 701 if (!add) { -
trunk/WebCore/rendering/style/ShadowData.cpp
r36619 r46097 29 29 , y(o.y) 30 30 , blur(o.blur) 31 , spread(o.spread) 31 32 , color(o.color) 32 33 { … … 40 41 return false; 41 42 42 return x == o.x && y == o.y && blur == o.blur && color == o.color;43 return x == o.x && y == o.y && blur == o.blur && spread == o.spread && color == o.color; 43 44 } 44 45 -
trunk/WebCore/rendering/style/ShadowData.h
r36619 r46097 37 37 , y(0) 38 38 , blur(0) 39 , spread(0) 39 40 , next(0) 40 41 { 41 42 } 42 43 43 ShadowData(int _x, int _y, int _blur, const Color& _color) 44 : x(_x) 45 , y(_y) 46 , blur(_blur) 47 , color(_color) 44 ShadowData(int x, int y, int blur, int spread, const Color& color) 45 : x(x) 46 , y(y) 47 , blur(blur) 48 , spread(spread) 49 , color(color) 48 50 , next(0) 49 51 { … … 63 65 int y; 64 66 int blur; 67 int spread; 65 68 Color color; 66 69 ShadowData* next;
Note: See TracChangeset
for help on using the changeset viewer.