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

Side by Side Diff: Source/core/frame/FrameView.h

Issue 198683002: Make it possible to override the tickmarks for a WebFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | 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) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // Override scrollbar notifications to update the AXObject cache. 306 // Override scrollbar notifications to update the AXObject cache.
307 virtual void didAddScrollbar(Scrollbar*, ScrollbarOrientation) OVERRIDE; 307 virtual void didAddScrollbar(Scrollbar*, ScrollbarOrientation) OVERRIDE;
308 virtual void willRemoveScrollbar(Scrollbar*, ScrollbarOrientation) OVERRIDE; 308 virtual void willRemoveScrollbar(Scrollbar*, ScrollbarOrientation) OVERRIDE;
309 309
310 virtual bool shouldAttemptToScrollUsingFastPath() const OVERRIDE; 310 virtual bool shouldAttemptToScrollUsingFastPath() const OVERRIDE;
311 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter 311 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter
312 // passed around the FrameView layout methods can be true while this returns 312 // passed around the FrameView layout methods can be true while this returns
313 // false. 313 // false.
314 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; } 314 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; }
315 315
316 // Sets the tickmarks for the FrameView, overriding the default behavior
317 // which is to display the tickmarks corresponding to find results.
318 // If |m_tickmarks| is empty, the default behavior is restored.
319 void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmark s; }
320
316 // ScrollableArea interface 321 // ScrollableArea interface
317 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE; 322 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE;
318 virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE; 323 virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE;
319 virtual void scrollTo(const IntSize&) OVERRIDE; 324 virtual void scrollTo(const IntSize&) OVERRIDE;
320 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; 325 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
321 virtual bool scrollAnimatorEnabled() const OVERRIDE; 326 virtual bool scrollAnimatorEnabled() const OVERRIDE;
322 virtual bool usesCompositedScrolling() const OVERRIDE; 327 virtual bool usesCompositedScrolling() const OVERRIDE;
323 virtual GraphicsLayer* layerForScrolling() const OVERRIDE; 328 virtual GraphicsLayer* layerForScrolling() const OVERRIDE;
324 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE; 329 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE;
325 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE; 330 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 bool m_hasSoftwareFilters; 505 bool m_hasSoftwareFilters;
501 506
502 float m_visibleContentScaleFactor; 507 float m_visibleContentScaleFactor;
503 IntSize m_inputEventsOffsetForEmulation; 508 IntSize m_inputEventsOffsetForEmulation;
504 float m_inputEventsScaleFactorForEmulation; 509 float m_inputEventsScaleFactorForEmulation;
505 510
506 IntSize m_layoutSize; 511 IntSize m_layoutSize;
507 bool m_layoutSizeFixedToFrameSize; 512 bool m_layoutSizeFixedToFrameSize;
508 513
509 Timer<FrameView> m_didScrollTimer; 514 Timer<FrameView> m_didScrollTimer;
515
516 Vector<IntRect> m_tickmarks;
510 }; 517 };
511 518
512 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 519 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
513 { 520 {
514 if (m_isVisuallyNonEmpty) 521 if (m_isVisuallyNonEmpty)
515 return; 522 return;
516 m_visuallyNonEmptyCharacterCount += count; 523 m_visuallyNonEmptyCharacterCount += count;
517 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 524 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
518 // The first few hundred characters rarely contain the interesting content o f the page. 525 // The first few hundred characters rarely contain the interesting content o f the page.
519 static const unsigned visualCharacterThreshold = 200; 526 static const unsigned visualCharacterThreshold = 200;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 m_view->setCanRepaintDuringPerformLayout(m_originalValue); 561 m_view->setCanRepaintDuringPerformLayout(m_originalValue);
555 } 562 }
556 private: 563 private:
557 FrameView* m_view; 564 FrameView* m_view;
558 bool m_originalValue; 565 bool m_originalValue;
559 }; 566 };
560 567
561 } // namespace WebCore 568 } // namespace WebCore
562 569
563 #endif // FrameView_h 570 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698