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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 ComputedStyle* GetCachedPseudoStyle(PseudoId) const; | 304 ComputedStyle* GetCachedPseudoStyle(PseudoId) const; |
305 ComputedStyle* AddCachedPseudoStyle(RefPtr<ComputedStyle>); | 305 ComputedStyle* AddCachedPseudoStyle(RefPtr<ComputedStyle>); |
306 void RemoveCachedPseudoStyle(PseudoId); | 306 void RemoveCachedPseudoStyle(PseudoId); |
307 | 307 |
308 const PseudoStyleCache* CachedPseudoStyles() const { | 308 const PseudoStyleCache* CachedPseudoStyles() const { |
309 return cached_pseudo_styles_.get(); | 309 return cached_pseudo_styles_.get(); |
310 } | 310 } |
311 | 311 |
312 /** | 312 /** |
313 * ComputedStyle properties | 313 * ComputedStyle properties |
314 * | 314 * |
315 * Each property stored in ComputedStyle is made up of fields. Fields have | 315 * Each property stored in ComputedStyle is made up of fields. Fields have |
316 * initial value functions, getters and setters. A field is preferably a | 316 * initial value functions, getters and setters. A field is preferably a |
317 * basic data type or enum, but can be any type. A set of fields should be | 317 * basic data type or enum, but can be any type. A set of fields should be |
318 * preceded by the property the field is stored for. | 318 * preceded by the property the field is stored for. |
319 * | 319 * |
320 * Field method naming should be done like so: | 320 * Field method naming should be done like so: |
321 * // name-of-property | 321 * // name-of-property |
322 * static int initialNameOfProperty(); | 322 * static int initialNameOfProperty(); |
323 * int nameOfProperty() const; | 323 * int nameOfProperty() const; |
324 * void setNameOfProperty(int); | 324 * void setNameOfProperty(int); |
325 * If the property has multiple fields, add the field name to the end of the | 325 * If the property has multiple fields, add the field name to the end of the |
326 * method name. | 326 * method name. |
327 * | 327 * |
328 * Avoid nested types by splitting up fields where possible, e.g.: | 328 * Avoid nested types by splitting up fields where possible, e.g.: |
329 * int getBorderTopWidth(); | 329 * int getBorderTopWidth(); |
330 * int getBorderBottomWidth(); | 330 * int getBorderBottomWidth(); |
331 * int getBorderLeftWidth(); | 331 * int getBorderLeftWidth(); |
332 * int getBorderRightWidth(); | 332 * int getBorderRightWidth(); |
333 * is preferable to: | 333 * is preferable to: |
334 * BorderWidths getBorderWidths(); | 334 * BorderWidths getBorderWidths(); |
335 * | 335 * |
336 * Utility functions should go in a separate section at the end of the | 336 * Utility functions should go in a separate section at the end of the |
337 * class, and be kept to a minimum. | 337 * class, and be kept to a minimum. |
338 */ | 338 */ |
339 | 339 |
340 // Non-Inherited properties. | 340 // Non-Inherited properties. |
341 | 341 |
342 // Content alignment properties. | 342 // Content alignment properties. |
343 static StyleContentAlignmentData InitialContentAlignment() { | 343 static StyleContentAlignmentData InitialContentAlignment() { |
344 return StyleContentAlignmentData(kContentPositionNormal, | 344 return StyleContentAlignmentData(kContentPositionNormal, |
345 kContentDistributionDefault, | 345 kContentDistributionDefault, |
346 kOverflowAlignmentDefault); | 346 kOverflowAlignmentDefault); |
347 } | 347 } |
348 | 348 |
(...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3574 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3574 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
3575 } | 3575 } |
3576 | 3576 |
3577 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3577 inline bool ComputedStyle::HasPseudoElementStyle() const { |
3578 return PseudoBitsInternal() & kElementPseudoIdMask; | 3578 return PseudoBitsInternal() & kElementPseudoIdMask; |
3579 } | 3579 } |
3580 | 3580 |
3581 } // namespace blink | 3581 } // namespace blink |
3582 | 3582 |
3583 #endif // ComputedStyle_h | 3583 #endif // ComputedStyle_h |
OLD | NEW |