OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 ensureTextFinder().findMatchRects(outputRects); | 1501 ensureTextFinder().findMatchRects(outputRects); |
1502 } | 1502 } |
1503 | 1503 |
1504 void WebLocalFrameImpl::setTickmarks(const WebVector<WebRect>& tickmarks) | 1504 void WebLocalFrameImpl::setTickmarks(const WebVector<WebRect>& tickmarks) |
1505 { | 1505 { |
1506 if (frameView()) { | 1506 if (frameView()) { |
1507 Vector<IntRect> tickmarksConverted(tickmarks.size()); | 1507 Vector<IntRect> tickmarksConverted(tickmarks.size()); |
1508 for (size_t i = 0; i < tickmarks.size(); ++i) | 1508 for (size_t i = 0; i < tickmarks.size(); ++i) |
1509 tickmarksConverted[i] = tickmarks[i]; | 1509 tickmarksConverted[i] = tickmarks[i]; |
1510 frameView()->setTickmarks(tickmarksConverted); | 1510 frameView()->setTickmarks(tickmarksConverted); |
1511 invalidateScrollbar(); | |
1512 } | 1511 } |
1513 } | 1512 } |
1514 | 1513 |
1515 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const | 1514 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const |
1516 { | 1515 { |
1517 if (!frame()) | 1516 if (!frame()) |
1518 return WebString(); | 1517 return WebString(); |
1519 StringBuilder text; | 1518 StringBuilder text; |
1520 frameContentAsPlainText(maxChars, frame(), text); | 1519 frameContentAsPlainText(maxChars, frame(), text); |
1521 return text.toString(); | 1520 return text.toString(); |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2082 } | 2081 } |
2083 | 2082 |
2084 TextFinder& WebLocalFrameImpl::ensureTextFinder() | 2083 TextFinder& WebLocalFrameImpl::ensureTextFinder() |
2085 { | 2084 { |
2086 if (!m_textFinder) | 2085 if (!m_textFinder) |
2087 m_textFinder = TextFinder::create(*this); | 2086 m_textFinder = TextFinder::create(*this); |
2088 | 2087 |
2089 return *m_textFinder; | 2088 return *m_textFinder; |
2090 } | 2089 } |
2091 | 2090 |
2092 void WebLocalFrameImpl::invalidateScrollbar() const | |
2093 { | |
2094 ASSERT(frame() && frame()->view()); | |
2095 FrameView* view = frame()->view(); | |
2096 // Invalidate the vertical scroll bar region for the view. | |
2097 Scrollbar* scrollbar = view->verticalScrollbar(); | |
2098 if (scrollbar) | |
2099 scrollbar->invalidate(); | |
2100 } | |
2101 | |
2102 void WebLocalFrameImpl::invalidateAll() const | |
2103 { | |
2104 ASSERT(frame() && frame()->view()); | |
2105 FrameView* view = frame()->view(); | |
2106 view->invalidateRect(view->frameRect()); | |
2107 invalidateScrollbar(); | |
2108 } | |
2109 | |
2110 void WebLocalFrameImpl::setFrameWidget(WebFrameWidgetImpl* frameWidget) | 2091 void WebLocalFrameImpl::setFrameWidget(WebFrameWidgetImpl* frameWidget) |
2111 { | 2092 { |
2112 m_frameWidget = frameWidget; | 2093 m_frameWidget = frameWidget; |
2113 } | 2094 } |
2114 | 2095 |
2115 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2096 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
2116 { | 2097 { |
2117 return m_frameWidget; | 2098 return m_frameWidget; |
2118 } | 2099 } |
2119 | 2100 |
2120 } // namespace blink | 2101 } // namespace blink |
OLD | NEW |