| 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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 // A single rectangle that encompasses all of the selected objects within this | 1478 // A single rectangle that encompasses all of the selected objects within this |
| 1479 // object. Used to determine the tightest possible bounding box for the | 1479 // object. Used to determine the tightest possible bounding box for the |
| 1480 // selection. The rect returned is in the object's local coordinate space. | 1480 // selection. The rect returned is in the object's local coordinate space. |
| 1481 virtual LayoutRect LocalSelectionRect() const { return LayoutRect(); } | 1481 virtual LayoutRect LocalSelectionRect() const { return LayoutRect(); } |
| 1482 | 1482 |
| 1483 // View coordinates means the coordinate space of |view()|. | 1483 // View coordinates means the coordinate space of |view()|. |
| 1484 LayoutRect SelectionRectInViewCoordinates() const; | 1484 LayoutRect SelectionRectInViewCoordinates() const; |
| 1485 | 1485 |
| 1486 virtual bool CanBeSelectionLeaf() const { return false; } | 1486 virtual bool CanBeSelectionLeaf() const { return false; } |
| 1487 bool HasSelectedChildren() const { | 1487 bool HasSelectedChildren() const { |
| 1488 return GetSelectionState() != SelectionNone; | 1488 return GetSelectionState() != SelectionState::kNone; |
| 1489 } | 1489 } |
| 1490 | 1490 |
| 1491 bool IsSelectable() const; | 1491 bool IsSelectable() const; |
| 1492 // Obtains the selection colors that should be used when painting a selection. | 1492 // Obtains the selection colors that should be used when painting a selection. |
| 1493 Color SelectionBackgroundColor() const; | 1493 Color SelectionBackgroundColor() const; |
| 1494 Color SelectionForegroundColor(const GlobalPaintFlags) const; | 1494 Color SelectionForegroundColor(const GlobalPaintFlags) const; |
| 1495 Color SelectionEmphasisMarkColor(const GlobalPaintFlags) const; | 1495 Color SelectionEmphasisMarkColor(const GlobalPaintFlags) const; |
| 1496 | 1496 |
| 1497 /** | 1497 /** |
| 1498 * Returns the local coordinates of the caret within this layout object. | 1498 * Returns the local coordinates of the caret within this layout object. |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2296 has_box_decoration_background_(false), | 2296 has_box_decoration_background_(false), |
| 2297 has_previous_location_in_backing_(false), | 2297 has_previous_location_in_backing_(false), |
| 2298 has_previous_selection_visual_rect_(false), | 2298 has_previous_selection_visual_rect_(false), |
| 2299 needs_paint_property_update_(true), | 2299 needs_paint_property_update_(true), |
| 2300 subtree_needs_paint_property_update_(true), | 2300 subtree_needs_paint_property_update_(true), |
| 2301 descendant_needs_paint_property_update_(true), | 2301 descendant_needs_paint_property_update_(true), |
| 2302 background_changed_since_last_paint_invalidation_(false), | 2302 background_changed_since_last_paint_invalidation_(false), |
| 2303 outline_may_be_affected_by_descendants_(false), | 2303 outline_may_be_affected_by_descendants_(false), |
| 2304 previous_outline_may_be_affected_by_descendants_(false), | 2304 previous_outline_may_be_affected_by_descendants_(false), |
| 2305 positioned_state_(kIsStaticallyPositioned), | 2305 positioned_state_(kIsStaticallyPositioned), |
| 2306 selection_state_(SelectionNone), | 2306 selection_state_(static_cast<unsigned>(SelectionState::kNone)), |
| 2307 background_obscuration_state_(kBackgroundObscurationStatusInvalid), | 2307 background_obscuration_state_(kBackgroundObscurationStatusInvalid), |
| 2308 full_paint_invalidation_reason_( | 2308 full_paint_invalidation_reason_( |
| 2309 static_cast<unsigned>(PaintInvalidationReason::kNone)) {} | 2309 static_cast<unsigned>(PaintInvalidationReason::kNone)) {} |
| 2310 | 2310 |
| 2311 // Self needs layout means that this layout object is marked for a full | 2311 // Self needs layout means that this layout object is marked for a full |
| 2312 // layout. This is the default layout but it is expensive as it recomputes | 2312 // layout. This is the default layout but it is expensive as it recomputes |
| 2313 // everything. For CSS boxes, this includes the width (laying out the line | 2313 // everything. For CSS boxes, this includes the width (laying out the line |
| 2314 // boxes again), the margins (due to block collapsing margins), the | 2314 // boxes again), the margins (due to block collapsing margins), the |
| 2315 // positions, the height and the potential overflow. | 2315 // positions, the height and the potential overflow. |
| 2316 ADD_BOOLEAN_BITFIELD(self_needs_layout_, SelfNeedsLayout); | 2316 ADD_BOOLEAN_BITFIELD(self_needs_layout_, SelfNeedsLayout); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2560 } | 2560 } |
| 2561 } | 2561 } |
| 2562 void ClearPositionedState() { | 2562 void ClearPositionedState() { |
| 2563 positioned_state_ = static_cast<unsigned>(EPosition::kStatic); | 2563 positioned_state_ = static_cast<unsigned>(EPosition::kStatic); |
| 2564 } | 2564 } |
| 2565 | 2565 |
| 2566 ALWAYS_INLINE SelectionState GetSelectionState() const { | 2566 ALWAYS_INLINE SelectionState GetSelectionState() const { |
| 2567 return static_cast<SelectionState>(selection_state_); | 2567 return static_cast<SelectionState>(selection_state_); |
| 2568 } | 2568 } |
| 2569 ALWAYS_INLINE void SetSelectionState(SelectionState selection_state) { | 2569 ALWAYS_INLINE void SetSelectionState(SelectionState selection_state) { |
| 2570 selection_state_ = selection_state; | 2570 selection_state_ = static_cast<unsigned>(selection_state); |
| 2571 } | 2571 } |
| 2572 | 2572 |
| 2573 ALWAYS_INLINE BackgroundObscurationState | 2573 ALWAYS_INLINE BackgroundObscurationState |
| 2574 GetBackgroundObscurationState() const { | 2574 GetBackgroundObscurationState() const { |
| 2575 return static_cast<BackgroundObscurationState>( | 2575 return static_cast<BackgroundObscurationState>( |
| 2576 background_obscuration_state_); | 2576 background_obscuration_state_); |
| 2577 } | 2577 } |
| 2578 ALWAYS_INLINE void SetBackgroundObscurationState( | 2578 ALWAYS_INLINE void SetBackgroundObscurationState( |
| 2579 BackgroundObscurationState s) const { | 2579 BackgroundObscurationState s) const { |
| 2580 background_obscuration_state_ = s; | 2580 background_obscuration_state_ = s; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2837 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2837 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
| 2838 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2838 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
| 2839 // We don't make object2 an optional parameter so that showLayoutTree | 2839 // We don't make object2 an optional parameter so that showLayoutTree |
| 2840 // can be called from gdb easily. | 2840 // can be called from gdb easily. |
| 2841 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2841 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
| 2842 const blink::LayoutObject* object2); | 2842 const blink::LayoutObject* object2); |
| 2843 | 2843 |
| 2844 #endif | 2844 #endif |
| 2845 | 2845 |
| 2846 #endif // LayoutObject_h | 2846 #endif // LayoutObject_h |
| OLD | NEW |