diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 18:53:17 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 18:53:17 +0000 |
commit | 5dd9d7d2d2693f76c56f544938c0fef0b9f765ee (patch) | |
tree | 55ae440e3d7c1ca458e69e089c3332d32375a643 | |
parent | 2f9900fdf95ab865858bc63e7006803be942f634 (diff) | |
download | chromium_src-5dd9d7d2d2693f76c56f544938c0fef0b9f765ee.zip chromium_src-5dd9d7d2d2693f76c56f544938c0fef0b9f765ee.tar.gz chromium_src-5dd9d7d2d2693f76c56f544938c0fef0b9f765ee.tar.bz2 |
Now that we've synced to my WebKit changes I can remove the use
of highlevel WebCore types in the scrollbar code. I also found
some code that had been ifdef-ed that I missed deleting during
my last pass.
Review URL: http://codereview.chromium.org/13713
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6723 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/webwidget_impl.h | 3 | ||||
-rw-r--r-- | webkit/port/platform/chromium/ScrollbarThemeChromium.cpp | 19 |
2 files changed, 6 insertions, 16 deletions
diff --git a/webkit/glue/webwidget_impl.h b/webkit/glue/webwidget_impl.h index c19e6a2e..97b08a2 100644 --- a/webkit/glue/webwidget_impl.h +++ b/webkit/glue/webwidget_impl.h @@ -93,9 +93,6 @@ class WebWidgetImpl : public WebWidget, // WebCore::WidgetClientWin virtual const SkBitmap* getPreloadedResourceBitmap(int resource_id); virtual void onScrollPositionChanged(WebCore::Widget* widget); - virtual const WTF::Vector<RefPtr<WebCore::Range> >* getTickmarks( - WebCore::Frame* frame); - virtual size_t getActiveTickmarkIndex(WebCore::Frame* frame); virtual bool isHidden(); #endif diff --git a/webkit/port/platform/chromium/ScrollbarThemeChromium.cpp b/webkit/port/platform/chromium/ScrollbarThemeChromium.cpp index f9d961c..ea04d22 100644 --- a/webkit/port/platform/chromium/ScrollbarThemeChromium.cpp +++ b/webkit/port/platform/chromium/ScrollbarThemeChromium.cpp @@ -28,9 +28,8 @@ #include "ChromiumBridge.h" #include "PlatformMouseEvent.h" -#include "Frame.h" -#include "FrameView.h" #include "Scrollbar.h" +#include "ScrollbarClient.h" #include "ScrollbarThemeComposite.h" // ----------------------------------------------------------------------------- @@ -122,16 +121,10 @@ void ScrollbarThemeChromium::paintTickmarks(GraphicsContext* context, Scrollbar* if (rect.height() <= 0 || rect.width() <= 0) return; // nothing to draw on. - // Get the frameview. - // FIXME: Stop relying on high-level WebCore types such as Frame and FrameView. - if (!scrollbar->parent()->isFrameView()) - return; - FrameView* frameView = static_cast<FrameView*>(scrollbar->parent()); - Document* doc = frameView->frame()->document(); - - // Get the text markers for the frameview. - Vector<IntRect> markers = doc->renderedRectsForMarkers(DocumentMarker::TextMatch); - if (!markers.size()) + // Get the tickmarks for the frameview. + Vector<IntRect> tickmarks; + scrollbar->client()->getTickmarks(tickmarks); + if (!tickmarks.size()) return; // Get the image for the tickmarks. @@ -143,7 +136,7 @@ void ScrollbarThemeChromium::paintTickmarks(GraphicsContext* context, Scrollbar* context->save(); - for (Vector<IntRect>::const_iterator i = markers.begin(); i != markers.end(); ++i) { + for (Vector<IntRect>::const_iterator i = tickmarks.begin(); i != tickmarks.end(); ++i) { // Calculate how far down (in %) the tick-mark should appear. const float percent = static_cast<float>(i->y()) / scrollbar->totalSize(); |