OLD | NEW |
---|---|
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
465 | 465 |
466 // Scroll the actual contents of the view (either blitting or invalidating a s needed). | 466 // Scroll the actual contents of the view (either blitting or invalidating a s needed). |
467 void scrollContents(const IntSize& scrollDelta); | 467 void scrollContents(const IntSize& scrollDelta); |
468 | 468 |
469 // This gives us a means of blocking painting on our scrollbars until the fi rst layout has occurred. | 469 // This gives us a means of blocking painting on our scrollbars until the fi rst layout has occurred. |
470 void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = fal se); | 470 void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = fal se); |
471 bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; } | 471 bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; } |
472 | 472 |
473 bool drawPanScrollIcon() { return m_shouldDrawPanScrollIcon; } | 473 bool drawPanScrollIcon() { return m_shouldDrawPanScrollIcon; } |
474 | 474 |
475 IntPoint rootFrameToContents(const IntPoint&) const; | 475 IntPoint rootFrameToContents(const IntPoint&) const; |
Rick Byers
2015/03/05 17:56:20
Can you add a brief description of each of the co-
bokan
2015/03/06 21:54:37
Done.
| |
476 FloatPoint rootFrameToContents(const FloatPoint&) const; | |
476 IntRect rootFrameToContents(const IntRect&) const; | 477 IntRect rootFrameToContents(const IntRect&) const; |
477 IntPoint contentsToRootFrame(const IntPoint&) const; | 478 IntPoint contentsToRootFrame(const IntPoint&) const; |
478 IntRect contentsToRootFrame(const IntRect&) const; | 479 IntRect contentsToRootFrame(const IntRect&) const; |
479 | 480 |
480 // Event coordinates are assumed to be in the coordinate space of a window t hat contains | 481 IntRect viewportToContents(const IntRect&) const; |
481 // the entire widget hierarchy. It is up to the platform to decide what the precise definition | 482 IntRect contentsToViewport(const IntRect&) const; |
482 // of containing window is. (For example on Mac it is the containing NSWindo w.) | 483 IntPoint contentsToViewport(const IntPoint&) const; |
Rick Byers
2015/03/05 17:56:20
Does any of this comment still apply? Eg. your CL
bokan
2015/03/06 21:54:37
I don't think so, I think this comment is out of d
Rick Byers
2015/03/07 15:44:08
Nice, that would be an improvement if it's true (a
| |
483 IntPoint windowToContents(const IntPoint&) const; | 484 IntPoint viewportToContents(const IntPoint&) const; |
484 FloatPoint windowToContents(const FloatPoint&) const; | 485 |
485 IntPoint contentsToWindow(const IntPoint&) const; | 486 // FIXME: Some external callers expect to get back a rect that's positioned |
486 IntRect windowToContents(const IntRect&) const; | 487 // in viewport space, but sized in CSS pixels. This is an artefact of the |
Rick Byers
2015/03/05 17:56:20
nit: artifact
bokan
2015/03/06 21:54:37
Done. (Though either works: http://english.stackex
Rick Byers
2015/03/07 15:44:08
Oh sorry! I thought this was just a typo - I'm no
| |
487 IntRect contentsToWindow(const IntRect&) const; | 488 // old pinch-zoom path. These callers should be converted to expect a rect |
489 // fully in viewport space. crbug.com/459591. | |
490 IntRect soonToBeRemovedContentsToUnscaledViewport(const IntRect&) const; | |
488 | 491 |
489 // Methods for converting between Frame and Content (i.e. Document) coordina tes. | 492 // Methods for converting between Frame and Content (i.e. Document) coordina tes. |
490 // Frame coordinates are relative to the top left corner of the frame and so | 493 // Frame coordinates are relative to the top left corner of the frame and so |
491 // they are affected by scroll offset. Content coordinates are relative to t he | 494 // they are affected by scroll offset. Content coordinates are relative to t he |
492 // document's top left corner and thus are not affected by scroll offset. | 495 // document's top left corner and thus are not affected by scroll offset. |
493 IntPoint contentsToFrame(const IntPoint&) const; | 496 IntPoint contentsToFrame(const IntPoint&) const; |
494 IntRect contentsToFrame(const IntRect&) const; | 497 IntRect contentsToFrame(const IntRect&) const; |
495 IntPoint frameToContents(const IntPoint&) const; | 498 IntPoint frameToContents(const IntPoint&) const; |
496 FloatPoint frameToContents(const FloatPoint&) const; | 499 FloatPoint frameToContents(const FloatPoint&) const; |
497 IntRect frameToContents(const IntRect&) const; | 500 IntRect frameToContents(const IntRect&) const; |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
866 static const unsigned visualPixelThreshold = 32 * 32; | 869 static const unsigned visualPixelThreshold = 32 * 32; |
867 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 870 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
868 setIsVisuallyNonEmpty(); | 871 setIsVisuallyNonEmpty(); |
869 } | 872 } |
870 | 873 |
871 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); | 874 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); |
872 | 875 |
873 } // namespace blink | 876 } // namespace blink |
874 | 877 |
875 #endif // FrameView_h | 878 #endif // FrameView_h |
OLD | NEW |