| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "platform/graphics/GraphicsContext.h" | 35 #include "platform/graphics/GraphicsContext.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 PassRefPtrWillBeRawPtr<Scrollbar> LayoutScrollbar::createCustomScrollbar(Scrolla
bleArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, Loca
lFrame* owningFrame) | 39 PassRefPtrWillBeRawPtr<Scrollbar> LayoutScrollbar::createCustomScrollbar(Scrolla
bleArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, Loca
lFrame* owningFrame) |
| 40 { | 40 { |
| 41 return adoptRefWillBeNoop(new LayoutScrollbar(scrollableArea, orientation, o
wnerNode, owningFrame)); | 41 return adoptRefWillBeNoop(new LayoutScrollbar(scrollableArea, orientation, o
wnerNode, owningFrame)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 LayoutScrollbar::LayoutScrollbar(ScrollableArea* scrollableArea, ScrollbarOrient
ation orientation, Node* ownerNode, LocalFrame* owningFrame) | 44 LayoutScrollbar::LayoutScrollbar(ScrollableArea* scrollableArea, ScrollbarOrient
ation orientation, Node* ownerNode, LocalFrame* owningFrame) |
| 45 : Scrollbar(scrollableArea, orientation, RegularScrollbar, LayoutScrollbarTh
eme::layoutScrollbarTheme()) | 45 : Scrollbar(scrollableArea, orientation, RegularScrollbar, nullptr, LayoutSc
rollbarTheme::layoutScrollbarTheme()) |
| 46 , m_owner(ownerNode) | 46 , m_owner(ownerNode) |
| 47 , m_owningFrame(owningFrame) | 47 , m_owningFrame(owningFrame) |
| 48 { | 48 { |
| 49 ASSERT(ownerNode || owningFrame); | 49 ASSERT(ownerNode || owningFrame); |
| 50 | 50 |
| 51 // FIXME: We need to do this because LayoutScrollbar::styleChanged is called
as soon as the scrollbar is created. | 51 // FIXME: We need to do this because LayoutScrollbar::styleChanged is called
as soon as the scrollbar is created. |
| 52 | 52 |
| 53 // Update the scrollbar size. | 53 // Update the scrollbar size. |
| 54 IntRect rect(0, 0, 0, 0); | 54 IntRect rect(0, 0, 0, 0); |
| 55 updateScrollbarPart(ScrollbarBGPart); | 55 updateScrollbarPart(ScrollbarBGPart); |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 return orientation() == HorizontalScrollbar ? partLayoutObject->size().width
() : partLayoutObject->size().height(); | 361 return orientation() == HorizontalScrollbar ? partLayoutObject->size().width
() : partLayoutObject->size().height(); |
| 362 } | 362 } |
| 363 | 363 |
| 364 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts(const LayoutB
oxModelObject& paintInvalidationContainer, const LayoutRect& paintInvalidationRe
ct) | 364 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts(const LayoutB
oxModelObject& paintInvalidationContainer, const LayoutRect& paintInvalidationRe
ct) |
| 365 { | 365 { |
| 366 for (auto& part : m_parts) | 366 for (auto& part : m_parts) |
| 367 part.value->invalidateDisplayItemClientsIncludingNonCompositingDescendan
ts(&paintInvalidationContainer, PaintInvalidationScroll, &paintInvalidationRect)
; | 367 part.value->invalidateDisplayItemClientsIncludingNonCompositingDescendan
ts(&paintInvalidationContainer, PaintInvalidationScroll, &paintInvalidationRect)
; |
| 368 } | 368 } |
| 369 | 369 |
| 370 } | 370 } |
| OLD | NEW |