OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 rare_non_inherited_data_->backface_visibility_); | 410 rare_non_inherited_data_->backface_visibility_); |
411 } | 411 } |
412 void SetBackfaceVisibility(EBackfaceVisibility b) { | 412 void SetBackfaceVisibility(EBackfaceVisibility b) { |
413 SET_VAR(rare_non_inherited_data_, backface_visibility_, b); | 413 SET_VAR(rare_non_inherited_data_, backface_visibility_, b); |
414 } | 414 } |
415 | 415 |
416 // Background properties. | 416 // Background properties. |
417 // background-color | 417 // background-color |
418 static Color InitialBackgroundColor() { return Color::kTransparent; } | 418 static Color InitialBackgroundColor() { return Color::kTransparent; } |
419 void SetBackgroundColor(const StyleColor& v) { | 419 void SetBackgroundColor(const StyleColor& v) { |
420 SET_VAR(background_data_, color_, v); | 420 SET_VAR(background_data_, background_color_, v); |
421 } | 421 } |
422 | 422 |
423 // background-image | 423 // background-image |
424 bool HasBackgroundImage() const { | 424 bool HasBackgroundImage() const { |
425 return background_data_->Background().HasImage(); | 425 return background_data_->background_.HasImage(); |
426 } | 426 } |
427 bool HasFixedBackgroundImage() const { | 427 bool HasFixedBackgroundImage() const { |
428 return background_data_->Background().HasFixedImage(); | 428 return background_data_->background_.HasFixedImage(); |
429 } | 429 } |
430 bool HasEntirelyFixedBackground() const; | 430 bool HasEntirelyFixedBackground() const; |
431 | 431 |
432 // background-clip | 432 // background-clip |
433 EFillBox BackgroundClip() const { | 433 EFillBox BackgroundClip() const { |
434 return static_cast<EFillBox>(background_data_->Background().Clip()); | 434 return static_cast<EFillBox>(background_data_->background_.Clip()); |
435 } | 435 } |
436 | 436 |
437 // Border properties. | 437 // Border properties. |
438 // -webkit-border-image | 438 // -webkit-border-image |
439 static NinePieceImage InitialNinePieceImage() { return NinePieceImage(); } | 439 static NinePieceImage InitialNinePieceImage() { return NinePieceImage(); } |
440 const NinePieceImage& BorderImage() const { | 440 const NinePieceImage& BorderImage() const { |
441 return surround_data_->border_.GetImage(); | 441 return surround_data_->border_.GetImage(); |
442 } | 442 } |
443 void SetBorderImage(const NinePieceImage& b) { | 443 void SetBorderImage(const NinePieceImage& b) { |
444 SET_VAR(surround_data_, border_.image_, b); | 444 SET_VAR(surround_data_, border_.image_, b); |
(...skipping 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3354 bool HasBoxDecorationBackground() const { | 3354 bool HasBoxDecorationBackground() const { |
3355 return HasBackground() || HasBorderDecoration() || HasAppearance() || | 3355 return HasBackground() || HasBorderDecoration() || HasAppearance() || |
3356 BoxShadow(); | 3356 BoxShadow(); |
3357 } | 3357 } |
3358 | 3358 |
3359 // Background utility functions. | 3359 // Background utility functions. |
3360 FillLayer& AccessBackgroundLayers() { | 3360 FillLayer& AccessBackgroundLayers() { |
3361 return background_data_.Access()->background_; | 3361 return background_data_.Access()->background_; |
3362 } | 3362 } |
3363 const FillLayer& BackgroundLayers() const { | 3363 const FillLayer& BackgroundLayers() const { |
3364 return background_data_->Background(); | 3364 return background_data_->background_; |
3365 } | 3365 } |
3366 void AdjustBackgroundLayers() { | 3366 void AdjustBackgroundLayers() { |
3367 if (BackgroundLayers().Next()) { | 3367 if (BackgroundLayers().Next()) { |
3368 AccessBackgroundLayers().CullEmptyLayers(); | 3368 AccessBackgroundLayers().CullEmptyLayers(); |
3369 AccessBackgroundLayers().FillUnsetProperties(); | 3369 AccessBackgroundLayers().FillUnsetProperties(); |
3370 } | 3370 } |
3371 } | 3371 } |
3372 bool HasBackgroundRelatedColorReferencingCurrentColor() const { | 3372 bool HasBackgroundRelatedColorReferencingCurrentColor() const { |
3373 if (BackgroundColor().IsCurrentColor() || | 3373 if (BackgroundColor().IsCurrentColor() || |
3374 VisitedLinkBackgroundColor().IsCurrentColor()) | 3374 VisitedLinkBackgroundColor().IsCurrentColor()) |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3489 } | 3489 } |
3490 StyleColor BorderRightColor() const { | 3490 StyleColor BorderRightColor() const { |
3491 return surround_data_->border_.Right().GetColor(); | 3491 return surround_data_->border_.Right().GetColor(); |
3492 } | 3492 } |
3493 StyleColor BorderTopColor() const { | 3493 StyleColor BorderTopColor() const { |
3494 return surround_data_->border_.Top().GetColor(); | 3494 return surround_data_->border_.Top().GetColor(); |
3495 } | 3495 } |
3496 StyleColor BorderBottomColor() const { | 3496 StyleColor BorderBottomColor() const { |
3497 return surround_data_->border_.Bottom().GetColor(); | 3497 return surround_data_->border_.Bottom().GetColor(); |
3498 } | 3498 } |
3499 StyleColor BackgroundColor() const { return background_data_->GetColor(); } | 3499 StyleColor BackgroundColor() const { |
| 3500 return background_data_->background_color_; |
| 3501 } |
3500 StyleAutoColor CaretColor() const { | 3502 StyleAutoColor CaretColor() const { |
3501 return rare_inherited_data_->CaretColor(); | 3503 return rare_inherited_data_->CaretColor(); |
3502 } | 3504 } |
3503 Color GetColor() const; | 3505 Color GetColor() const; |
3504 StyleColor ColumnRuleColor() const { | 3506 StyleColor ColumnRuleColor() const { |
3505 return rare_non_inherited_data_->multi_col_->rule_.GetColor(); | 3507 return rare_non_inherited_data_->multi_col_->rule_.GetColor(); |
3506 } | 3508 } |
3507 StyleColor OutlineColor() const { | 3509 StyleColor OutlineColor() const { |
3508 return rare_non_inherited_data_->outline_.GetColor(); | 3510 return rare_non_inherited_data_->outline_.GetColor(); |
3509 } | 3511 } |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3686 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3688 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
3687 } | 3689 } |
3688 | 3690 |
3689 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3691 inline bool ComputedStyle::HasPseudoElementStyle() const { |
3690 return PseudoBitsInternal() & kElementPseudoIdMask; | 3692 return PseudoBitsInternal() & kElementPseudoIdMask; |
3691 } | 3693 } |
3692 | 3694 |
3693 } // namespace blink | 3695 } // namespace blink |
3694 | 3696 |
3695 #endif // ComputedStyle_h | 3697 #endif // ComputedStyle_h |
OLD | NEW |