Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1053123007: Invalidate paint of tickmarks on document change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 ensureTextFinder().findMatchRects(outputRects); 1498 ensureTextFinder().findMatchRects(outputRects);
1499 } 1499 }
1500 1500
1501 void WebLocalFrameImpl::setTickmarks(const WebVector<WebRect>& tickmarks) 1501 void WebLocalFrameImpl::setTickmarks(const WebVector<WebRect>& tickmarks)
1502 { 1502 {
1503 if (frameView()) { 1503 if (frameView()) {
1504 Vector<IntRect> tickmarksConverted(tickmarks.size()); 1504 Vector<IntRect> tickmarksConverted(tickmarks.size());
1505 for (size_t i = 0; i < tickmarks.size(); ++i) 1505 for (size_t i = 0; i < tickmarks.size(); ++i)
1506 tickmarksConverted[i] = tickmarks[i]; 1506 tickmarksConverted[i] = tickmarks[i];
1507 frameView()->setTickmarks(tickmarksConverted); 1507 frameView()->setTickmarks(tickmarksConverted);
1508 invalidateScrollbar();
1509 } 1508 }
1510 } 1509 }
1511 1510
1512 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const 1511 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const
1513 { 1512 {
1514 if (!frame()) 1513 if (!frame())
1515 return WebString(); 1514 return WebString();
1516 StringBuilder text; 1515 StringBuilder text;
1517 frameContentAsPlainText(maxChars, frame(), text); 1516 frameContentAsPlainText(maxChars, frame(), text);
1518 return text.toString(); 1517 return text.toString();
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
2088 } 2087 }
2089 2088
2090 TextFinder& WebLocalFrameImpl::ensureTextFinder() 2089 TextFinder& WebLocalFrameImpl::ensureTextFinder()
2091 { 2090 {
2092 if (!m_textFinder) 2091 if (!m_textFinder)
2093 m_textFinder = TextFinder::create(*this); 2092 m_textFinder = TextFinder::create(*this);
2094 2093
2095 return *m_textFinder; 2094 return *m_textFinder;
2096 } 2095 }
2097 2096
2098 void WebLocalFrameImpl::invalidateScrollbar() const
2099 {
2100 ASSERT(frame() && frame()->view());
2101 FrameView* view = frame()->view();
2102 // Invalidate the vertical scroll bar region for the view.
2103 Scrollbar* scrollbar = view->verticalScrollbar();
2104 if (scrollbar)
2105 scrollbar->invalidate();
2106 }
2107
2108 void WebLocalFrameImpl::invalidateAll() const
2109 {
2110 ASSERT(frame() && frame()->view());
2111 FrameView* view = frame()->view();
2112 view->invalidateRect(view->frameRect());
2113 invalidateScrollbar();
2114 }
2115
2116 void WebLocalFrameImpl::setFrameWidget(WebFrameWidgetImpl* frameWidget) 2097 void WebLocalFrameImpl::setFrameWidget(WebFrameWidgetImpl* frameWidget)
2117 { 2098 {
2118 m_frameWidget = frameWidget; 2099 m_frameWidget = frameWidget;
2119 } 2100 }
2120 2101
2121 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const 2102 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const
2122 { 2103 {
2123 return m_frameWidget; 2104 return m_frameWidget;
2124 } 2105 }
2125 2106
2126 } // namespace blink 2107 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698