| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google, Inc. | 2 * Copyright (C) 2013 Google, Inc. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 (border_left_color_is_current_color == | 54 (border_left_color_is_current_color == |
| 55 other.BorderLeftColorIsCurrentColor() && | 55 other.BorderLeftColorIsCurrentColor() && |
| 56 border_right_color_is_current_color == | 56 border_right_color_is_current_color == |
| 57 other.BorderRightColorIsCurrentColor() && | 57 other.BorderRightColorIsCurrentColor() && |
| 58 border_top_color_is_current_color == | 58 border_top_color_is_current_color == |
| 59 other.BorderTopColorIsCurrentColor() && | 59 other.BorderTopColorIsCurrentColor() && |
| 60 border_bottom_color_is_current_color == | 60 border_bottom_color_is_current_color == |
| 61 other.BorderBottomColorIsCurrentColor()); | 61 other.BorderBottomColorIsCurrentColor()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool BorderWidthEquals(const ComputedStyle& other) const { |
| 65 return (border_left_width == other.BorderLeftWidth() && |
| 66 border_right_width == other.BorderRightWidth() && |
| 67 border_top_width == other.BorderTopWidth() && |
| 68 border_bottom_width == other.BorderBottomWidth()); |
| 69 } |
| 70 |
| 71 bool BorderRadiiEquals(const ComputedStyle& other) const { |
| 72 return top_left_ == other.BorderTopLeftRadius() && |
| 73 top_right_ == other.BorderTopRightRadius() && |
| 74 bottom_left_ == other.BorderBottomLeftRadius() && |
| 75 bottom_right_ == other.BorderBottomRightRadius(); |
| 76 } |
| 77 |
| 78 bool BorderStyleEquals(const ComputedStyle& other) const { |
| 79 return ( |
| 80 border_left_style == static_cast<unsigned>(other.BorderLeftStyle()) && |
| 81 border_right_style == static_cast<unsigned>(other.BorderRightStyle()) && |
| 82 border_top_style == static_cast<unsigned>(other.BorderTopStyle()) && |
| 83 border_bottom_style == |
| 84 static_cast<unsigned>(other.BorderBottomStyle())); |
| 85 } |
| 86 |
| 64 BorderData border; | 87 BorderData border; |
| 65 LengthSize top_left_; | 88 LengthSize top_left_; |
| 66 LengthSize top_right_; | 89 LengthSize top_right_; |
| 67 LengthSize bottom_left_; | 90 LengthSize bottom_left_; |
| 68 LengthSize bottom_right_; | 91 LengthSize bottom_right_; |
| 69 Color border_left_color; | 92 Color border_left_color; |
| 70 Color border_right_color; | 93 Color border_right_color; |
| 71 Color border_top_color; | 94 Color border_top_color; |
| 72 Color border_bottom_color; | 95 Color border_bottom_color; |
| 73 bool border_left_color_is_current_color; | 96 bool border_left_color_is_current_color; |
| 74 bool border_right_color_is_current_color; | 97 bool border_right_color_is_current_color; |
| 75 bool border_top_color_is_current_color; | 98 bool border_top_color_is_current_color; |
| 76 bool border_bottom_color_is_current_color; | 99 bool border_bottom_color_is_current_color; |
| 100 unsigned border_left_style : 4; // EBorderStyle |
| 101 unsigned border_right_style : 4; // EBorderStyle |
| 102 unsigned border_top_style : 4; // EBorderStyle |
| 103 unsigned border_bottom_style : 4; // EBorderStyle |
| 77 float border_left_width; | 104 float border_left_width; |
| 78 float border_right_width; | 105 float border_right_width; |
| 79 float border_top_width; | 106 float border_top_width; |
| 80 float border_bottom_width; | 107 float border_bottom_width; |
| 81 FillLayer background_layers; | 108 FillLayer background_layers; |
| 82 StyleColor background_color; | 109 StyleColor background_color; |
| 83 | 110 |
| 84 private: | 111 private: |
| 85 explicit CachedUAStyle(const ComputedStyle* style) | 112 explicit CachedUAStyle(const ComputedStyle* style) |
| 86 : border(style->Border()), | 113 : border(style->Border()), |
| 87 top_left_(style->BorderTopLeftRadius()), | 114 top_left_(style->BorderTopLeftRadius()), |
| 88 top_right_(style->BorderTopRightRadius()), | 115 top_right_(style->BorderTopRightRadius()), |
| 89 bottom_left_(style->BorderBottomLeftRadius()), | 116 bottom_left_(style->BorderBottomLeftRadius()), |
| 90 bottom_right_(style->BorderBottomRightRadius()), | 117 bottom_right_(style->BorderBottomRightRadius()), |
| 91 border_left_color(style->BorderLeftColorInternal()), | 118 border_left_color(style->BorderLeftColorInternal()), |
| 92 border_right_color(style->BorderRightColorInternal()), | 119 border_right_color(style->BorderRightColorInternal()), |
| 93 border_top_color(style->BorderTopColorInternal()), | 120 border_top_color(style->BorderTopColorInternal()), |
| 94 border_bottom_color(style->BorderBottomColorInternal()), | 121 border_bottom_color(style->BorderBottomColorInternal()), |
| 95 border_left_color_is_current_color( | 122 border_left_color_is_current_color( |
| 96 style->BorderLeftColorIsCurrentColor()), | 123 style->BorderLeftColorIsCurrentColor()), |
| 97 border_right_color_is_current_color( | 124 border_right_color_is_current_color( |
| 98 style->BorderRightColorIsCurrentColor()), | 125 style->BorderRightColorIsCurrentColor()), |
| 99 border_top_color_is_current_color( | 126 border_top_color_is_current_color( |
| 100 style->BorderTopColorIsCurrentColor()), | 127 style->BorderTopColorIsCurrentColor()), |
| 101 border_bottom_color_is_current_color( | 128 border_bottom_color_is_current_color( |
| 102 style->BorderBottomColorIsCurrentColor()), | 129 style->BorderBottomColorIsCurrentColor()), |
| 130 border_left_style(static_cast<unsigned>(style->BorderLeftStyle())), |
| 131 border_right_style(static_cast<unsigned>(style->BorderRightStyle())), |
| 132 border_top_style(static_cast<unsigned>(style->BorderTopStyle())), |
| 133 border_bottom_style(static_cast<unsigned>(style->BorderBottomStyle())), |
| 103 border_left_width(style->BorderLeftWidth()), | 134 border_left_width(style->BorderLeftWidth()), |
| 104 border_right_width(style->BorderRightWidth()), | 135 border_right_width(style->BorderRightWidth()), |
| 105 border_top_width(style->BorderTopWidth()), | 136 border_top_width(style->BorderTopWidth()), |
| 106 border_bottom_width(style->BorderBottomWidth()), | 137 border_bottom_width(style->BorderBottomWidth()), |
| 107 background_layers(style->BackgroundLayers()), | 138 background_layers(style->BackgroundLayers()), |
| 108 background_color(style->BackgroundColor()) {} | 139 background_color(style->BackgroundColor()) {} |
| 109 }; | 140 }; |
| 110 | 141 |
| 111 } // namespace blink | 142 } // namespace blink |
| 112 | 143 |
| 113 #endif // CachedUAStyle_h | 144 #endif // CachedUAStyle_h |
| OLD | NEW |