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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart p
artType, PseudoId pseudoId) | 140 PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart p
artType, PseudoId pseudoId) |
141 { | 141 { |
142 if (!owningRenderer()) | 142 if (!owningRenderer()) |
143 return nullptr; | 143 return nullptr; |
144 | 144 |
145 RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(Pseudo
StyleRequest(pseudoId, this, partType), owningRenderer()->style()); | 145 RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(Pseudo
StyleRequest(pseudoId, this, partType), owningRenderer()->style()); |
146 // Scrollbars for root frames should always have background color | 146 // Scrollbars for root frames should always have background color |
147 // unless explicitly specified as transparent. So we force it. | 147 // unless explicitly specified as transparent. So we force it. |
148 // This is because WebKit assumes scrollbar to be always painted and missing
background | 148 // This is because WebKit assumes scrollbar to be always painted and missing
background |
149 // causes visual artifact like non-repainted dirty region. | 149 // causes visual artifact like non-paint invalidated dirty region. |
150 if (result && m_owningFrame && m_owningFrame->view() && !m_owningFrame->view
()->isTransparent() && !result->hasBackground()) | 150 if (result && m_owningFrame && m_owningFrame->view() && !m_owningFrame->view
()->isTransparent() && !result->hasBackground()) |
151 result->setBackgroundColor(StyleColor(Color::white)); | 151 result->setBackgroundColor(StyleColor(Color::white)); |
152 | 152 |
153 return result; | 153 return result; |
154 } | 154 } |
155 | 155 |
156 void RenderScrollbar::updateScrollbarParts(bool destroy) | 156 void RenderScrollbar::updateScrollbarParts(bool destroy) |
157 { | 157 { |
158 updateScrollbarPart(ScrollbarBGPart, destroy); | 158 updateScrollbarPart(ScrollbarBGPart, destroy); |
159 updateScrollbarPart(BackButtonStartPart, destroy); | 159 updateScrollbarPart(BackButtonStartPart, destroy); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 int RenderScrollbar::minimumThumbLength() | 342 int RenderScrollbar::minimumThumbLength() |
343 { | 343 { |
344 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); | 344 RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart); |
345 if (!partRenderer) | 345 if (!partRenderer) |
346 return 0; | 346 return 0; |
347 partRenderer->layout(); | 347 partRenderer->layout(); |
348 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); | 348 return orientation() == HorizontalScrollbar ? partRenderer->width() : partRe
nderer->height(); |
349 } | 349 } |
350 | 350 |
351 } | 351 } |
OLD | NEW |