| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 2728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2739 void FrameView::paintScrollCorner(GraphicsContext* context, const IntRect& corne
rRect) | 2739 void FrameView::paintScrollCorner(GraphicsContext* context, const IntRect& corne
rRect) |
| 2740 { | 2740 { |
| 2741 if (context->updatingControlTints()) { | 2741 if (context->updatingControlTints()) { |
| 2742 updateScrollCorner(); | 2742 updateScrollCorner(); |
| 2743 return; | 2743 return; |
| 2744 } | 2744 } |
| 2745 | 2745 |
| 2746 if (m_scrollCorner) { | 2746 if (m_scrollCorner) { |
| 2747 bool needsBackgorund = m_frame->page() && m_frame->page()->mainFrame() =
= m_frame; | 2747 bool needsBackgorund = m_frame->page() && m_frame->page()->mainFrame() =
= m_frame; |
| 2748 if (needsBackgorund) | 2748 if (needsBackgorund) |
| 2749 context->fillRect(cornerRect, baseBackgroundColor(), ColorSpaceDevic
eRGB); | 2749 context->fillRect(cornerRect, baseBackgroundColor()); |
| 2750 m_scrollCorner->paintIntoRect(context, cornerRect.location(), cornerRect
); | 2750 m_scrollCorner->paintIntoRect(context, cornerRect.location(), cornerRect
); |
| 2751 return; | 2751 return; |
| 2752 } | 2752 } |
| 2753 | 2753 |
| 2754 ScrollView::paintScrollCorner(context, cornerRect); | 2754 ScrollView::paintScrollCorner(context, cornerRect); |
| 2755 } | 2755 } |
| 2756 | 2756 |
| 2757 void FrameView::paintScrollbar(GraphicsContext* context, Scrollbar* bar, const I
ntRect& rect) | 2757 void FrameView::paintScrollbar(GraphicsContext* context, Scrollbar* bar, const I
ntRect& rect) |
| 2758 { | 2758 { |
| 2759 bool needsBackgorund = bar->isCustomScrollbar() && (m_frame->page() && m_fra
me->page()->mainFrame() == m_frame); | 2759 bool needsBackgorund = bar->isCustomScrollbar() && (m_frame->page() && m_fra
me->page()->mainFrame() == m_frame); |
| 2760 if (needsBackgorund) { | 2760 if (needsBackgorund) { |
| 2761 IntRect toFill = bar->frameRect(); | 2761 IntRect toFill = bar->frameRect(); |
| 2762 toFill.intersect(rect); | 2762 toFill.intersect(rect); |
| 2763 context->fillRect(toFill, baseBackgroundColor(), ColorSpaceDeviceRGB); | 2763 context->fillRect(toFill, baseBackgroundColor()); |
| 2764 } | 2764 } |
| 2765 | 2765 |
| 2766 ScrollView::paintScrollbar(context, bar, rect); | 2766 ScrollView::paintScrollbar(context, bar, rect); |
| 2767 } | 2767 } |
| 2768 | 2768 |
| 2769 Color FrameView::documentBackgroundColor() const | 2769 Color FrameView::documentBackgroundColor() const |
| 2770 { | 2770 { |
| 2771 // <https://bugs.webkit.org/show_bug.cgi?id=59540> We blend the background c
olor of | 2771 // <https://bugs.webkit.org/show_bug.cgi?id=59540> We blend the background c
olor of |
| 2772 // the document and the body against the base background color of the frame
view. | 2772 // the document and the body against the base background color of the frame
view. |
| 2773 // Background images are unfortunately impractical to include. | 2773 // Background images are unfortunately impractical to include. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2889 else if (m_frame->ownerElement()) | 2889 else if (m_frame->ownerElement()) |
| 2890 fillWithRed = false; // Subframe, don't fill with red. | 2890 fillWithRed = false; // Subframe, don't fill with red. |
| 2891 else if (isTransparent()) | 2891 else if (isTransparent()) |
| 2892 fillWithRed = false; // Transparent, don't fill with red. | 2892 fillWithRed = false; // Transparent, don't fill with red. |
| 2893 else if (m_paintBehavior & PaintBehaviorSelectionOnly) | 2893 else if (m_paintBehavior & PaintBehaviorSelectionOnly) |
| 2894 fillWithRed = false; // Selections are transparent, don't fill with red. | 2894 fillWithRed = false; // Selections are transparent, don't fill with red. |
| 2895 else if (m_nodeToDraw) | 2895 else if (m_nodeToDraw) |
| 2896 fillWithRed = false; // Element images are transparent, don't fill with
red. | 2896 fillWithRed = false; // Element images are transparent, don't fill with
red. |
| 2897 else | 2897 else |
| 2898 fillWithRed = true; | 2898 fillWithRed = true; |
| 2899 | 2899 |
| 2900 if (fillWithRed) | 2900 if (fillWithRed) |
| 2901 p->fillRect(rect, Color(0xFF, 0, 0), ColorSpaceDeviceRGB); | 2901 p->fillRect(rect, Color(0xFF, 0, 0)); |
| 2902 #endif | 2902 #endif |
| 2903 | 2903 |
| 2904 RenderView* renderView = this->renderView(); | 2904 RenderView* renderView = this->renderView(); |
| 2905 if (!renderView) { | 2905 if (!renderView) { |
| 2906 LOG_ERROR("called FrameView::paint with nil renderer"); | 2906 LOG_ERROR("called FrameView::paint with nil renderer"); |
| 2907 return; | 2907 return; |
| 2908 } | 2908 } |
| 2909 | 2909 |
| 2910 ASSERT(!needsLayout()); | 2910 ASSERT(!needsLayout()); |
| 2911 if (needsLayout()) | 2911 if (needsLayout()) |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3405 } | 3405 } |
| 3406 | 3406 |
| 3407 AXObjectCache* FrameView::axObjectCache() const | 3407 AXObjectCache* FrameView::axObjectCache() const |
| 3408 { | 3408 { |
| 3409 if (frame() && frame()->document()) | 3409 if (frame() && frame()->document()) |
| 3410 return frame()->document()->existingAXObjectCache(); | 3410 return frame()->document()->existingAXObjectCache(); |
| 3411 return 0; | 3411 return 0; |
| 3412 } | 3412 } |
| 3413 | 3413 |
| 3414 } // namespace WebCore | 3414 } // namespace WebCore |
| OLD | NEW |