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 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 return GetSelectionState() != SelectionState::kNone; | 1492 return GetSelectionState() != SelectionState::kNone; |
1493 } | 1493 } |
1494 | 1494 |
1495 bool IsSelectable() const; | 1495 bool IsSelectable() const; |
1496 // Obtains the selection colors that should be used when painting a selection. | 1496 // Obtains the selection colors that should be used when painting a selection. |
1497 Color SelectionBackgroundColor() const; | 1497 Color SelectionBackgroundColor() const; |
1498 Color SelectionForegroundColor(const GlobalPaintFlags) const; | 1498 Color SelectionForegroundColor(const GlobalPaintFlags) const; |
1499 Color SelectionEmphasisMarkColor(const GlobalPaintFlags) const; | 1499 Color SelectionEmphasisMarkColor(const GlobalPaintFlags) const; |
1500 | 1500 |
1501 /** | 1501 /** |
1502 * Returns the local coordinates of the caret within this layout object. | 1502 * Returns the local coordinates of the caret within this layout object. |
1503 * @param caretOffset zero-based offset determining position within the | 1503 * @param caretOffset zero-based offset determining position within the |
1504 * layout object. | 1504 * layout object. |
1505 * @param extraWidthToEndOfLine optional out arg to give extra width to end | 1505 * @param extraWidthToEndOfLine optional out arg to give extra width to end |
1506 * of line - | 1506 * of line - |
1507 * useful for character range rect computations | 1507 * useful for character range rect computations |
1508 */ | 1508 */ |
1509 virtual LayoutRect LocalCaretRect( | 1509 virtual LayoutRect LocalCaretRect( |
1510 InlineBox*, | 1510 InlineBox*, |
1511 int caret_offset, | 1511 int caret_offset, |
1512 LayoutUnit* extra_width_to_end_of_line = nullptr); | 1512 LayoutUnit* extra_width_to_end_of_line = nullptr); |
1513 | 1513 |
1514 // When performing a global document tear-down, the layoutObject of the | 1514 // When performing a global document tear-down, the layoutObject of the |
1515 // document is cleared. We use this as a hook to detect the case of document | 1515 // document is cleared. We use this as a hook to detect the case of document |
1516 // destruction and don't waste time doing unnecessary work. | 1516 // destruction and don't waste time doing unnecessary work. |
1517 bool DocumentBeingDestroyed() const; | 1517 bool DocumentBeingDestroyed() const; |
1518 | 1518 |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2512 // Use protected to avoid warning about unused variable. | 2512 // Use protected to avoid warning about unused variable. |
2513 unsigned unused_bits_ : 3; | 2513 unsigned unused_bits_ : 3; |
2514 | 2514 |
2515 private: | 2515 private: |
2516 // This is the cached 'position' value of this object | 2516 // This is the cached 'position' value of this object |
2517 // (see ComputedStyle::position). | 2517 // (see ComputedStyle::position). |
2518 unsigned positioned_state_ : 2; // PositionedState | 2518 unsigned positioned_state_ : 2; // PositionedState |
2519 unsigned selection_state_ : 3; // SelectionState | 2519 unsigned selection_state_ : 3; // SelectionState |
2520 // Mutable for getter which lazily update this field. | 2520 // Mutable for getter which lazily update this field. |
2521 mutable unsigned | 2521 mutable unsigned |
2522 background_obscuration_state_ : 2; // BackgroundObscurationState | 2522 background_obscuration_state_ : 2; // BackgroundObscurationState |
2523 | 2523 |
2524 unsigned full_paint_invalidation_reason_ : 5; // PaintInvalidationReason | 2524 unsigned full_paint_invalidation_reason_ : 5; // PaintInvalidationReason |
2525 static_assert(static_cast<unsigned>(PaintInvalidationReason::kMax) < | 2525 static_assert(static_cast<unsigned>(PaintInvalidationReason::kMax) < |
2526 (1u << 5), | 2526 (1u << 5), |
2527 "PaintInvalidationReason should fit in the bit field"); | 2527 "PaintInvalidationReason should fit in the bit field"); |
2528 | 2528 |
2529 public: | 2529 public: |
2530 bool IsOutOfFlowPositioned() const { | 2530 bool IsOutOfFlowPositioned() const { |
2531 return positioned_state_ == kIsOutOfFlowPositioned; | 2531 return positioned_state_ == kIsOutOfFlowPositioned; |
2532 } | 2532 } |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2844 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2844 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
2845 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2845 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
2846 // We don't make object2 an optional parameter so that showLayoutTree | 2846 // We don't make object2 an optional parameter so that showLayoutTree |
2847 // can be called from gdb easily. | 2847 // can be called from gdb easily. |
2848 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2848 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
2849 const blink::LayoutObject* object2); | 2849 const blink::LayoutObject* object2); |
2850 | 2850 |
2851 #endif | 2851 #endif |
2852 | 2852 |
2853 #endif // LayoutObject_h | 2853 #endif // LayoutObject_h |
OLD | NEW |