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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 | 2195 |
2196 // FIXME: childrenClipRect relies on compositingState, which is not necessar
ily up to date. | 2196 // FIXME: childrenClipRect relies on compositingState, which is not necessar
ily up to date. |
2197 // https://code.google.com/p/chromium/issues/detail?id=343769 | 2197 // https://code.google.com/p/chromium/issues/detail?id=343769 |
2198 DisableCompositingQueryAsserts disabler; | 2198 DisableCompositingQueryAsserts disabler; |
2199 | 2199 |
2200 // Apply the clip from the layer. | 2200 // Apply the clip from the layer. |
2201 IntRect clipRect = contentsToRootFrame(pixelSnappedIntRect(enclosingLayer->c
lipper().childrenClipRect())); | 2201 IntRect clipRect = contentsToRootFrame(pixelSnappedIntRect(enclosingLayer->c
lipper().childrenClipRect())); |
2202 return intersection(clipRect, windowClipRect()); | 2202 return intersection(clipRect, windowClipRect()); |
2203 } | 2203 } |
2204 | 2204 |
| 2205 IntRect FrameView::unobscuredRectForFrameOwner(const HTMLFrameOwnerElement* owne
rElement) const |
| 2206 { |
| 2207 if (!ownerElement->layoutObject()) |
| 2208 return IntRect(); |
| 2209 |
| 2210 const DeprecatedPaintLayer* enclosingLayer = ownerElement->layoutObject()->e
nclosingLayer(); |
| 2211 if (!enclosingLayer) |
| 2212 return IntRect(); |
| 2213 |
| 2214 // FIXME: childrenClipRect relies on compositingState, which is not necessar
ily up to date. |
| 2215 // https://code.google.com/p/chromium/issues/detail?id=343769 |
| 2216 DisableCompositingQueryAsserts disabler; |
| 2217 |
| 2218 // Apply the clip from the layer. |
| 2219 IntRect clipRect = contentsToRootFrame(pixelSnappedIntRect(enclosingLayer->c
lipper().childrenClipRect())); |
| 2220 |
| 2221 // If element is not in root frame, clip to the local frame. |
| 2222 // FIXME: Do we need to do this for remote frames? |
| 2223 if (m_frame->deprecatedLocalOwner()) |
| 2224 clipRect.intersect(contentsToRootFrame(visibleContentRect())); |
| 2225 |
| 2226 return clipRect; |
| 2227 } |
| 2228 |
2205 bool FrameView::shouldUseIntegerScrollOffset() const | 2229 bool FrameView::shouldUseIntegerScrollOffset() const |
2206 { | 2230 { |
2207 if (m_frame->settings() && !m_frame->settings()->preferCompositingToLCDTextE
nabled()) | 2231 if (m_frame->settings() && !m_frame->settings()->preferCompositingToLCDTextE
nabled()) |
2208 return true; | 2232 return true; |
2209 return false; | 2233 return false; |
2210 } | 2234 } |
2211 | 2235 |
2212 bool FrameView::isActive() const | 2236 bool FrameView::isActive() const |
2213 { | 2237 { |
2214 Page* page = frame().page(); | 2238 Page* page = frame().page(); |
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4067 { | 4091 { |
4068 Settings* settings = frame().settings(); | 4092 Settings* settings = frame().settings(); |
4069 if (!settings || !settings->rootLayerScrolls()) | 4093 if (!settings || !settings->rootLayerScrolls()) |
4070 return this; | 4094 return this; |
4071 | 4095 |
4072 LayoutView* layoutView = this->layoutView(); | 4096 LayoutView* layoutView = this->layoutView(); |
4073 return layoutView ? layoutView->scrollableArea() : nullptr; | 4097 return layoutView ? layoutView->scrollableArea() : nullptr; |
4074 } | 4098 } |
4075 | 4099 |
4076 } // namespace blink | 4100 } // namespace blink |
OLD | NEW |