OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
484 bool LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc estor, LayoutRect& rect, VisibleRectFlags visibleRectFlags) const | 484 bool LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc estor, LayoutRect& rect, VisibleRectFlags visibleRectFlags) const |
485 { | 485 { |
486 return mapToVisibleRectInAncestorSpace(ancestor, rect, 0, visibleRectFlags); | 486 return mapToVisibleRectInAncestorSpace(ancestor, rect, 0, visibleRectFlags); |
487 } | 487 } |
488 | 488 |
489 bool LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc estor, LayoutRect& rect, MapCoordinatesFlags mode, VisibleRectFlags visibleRectF lags) const | 489 bool LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc estor, LayoutRect& rect, MapCoordinatesFlags mode, VisibleRectFlags visibleRectF lags) const |
490 { | 490 { |
491 if (document().printing()) | 491 if (document().printing()) |
492 return true; | 492 return true; |
493 | 493 |
494 if (style()->isFlippedBlocksWritingMode()) { | |
chrishtr
2016/03/28 20:38:59
This is handled by LayoutBox somehow?
Is this tes
Xianzhu
2016/03/28 21:12:08
Can a LayoutView have writing-mode?
chrishtr
2016/03/28 22:09:58
I think so. IIRC I added this code a month or so a
trchen
2016/03/28 22:22:42
Yes, LayoutView back-inherits the writing mode fro
| |
495 // We have to flip by hand since the view's logical height has not been determined. We | |
496 // can use the viewport width and height. | |
497 if (style()->isHorizontalWritingMode()) | |
498 rect.setY(viewHeight() - rect.maxY()); | |
499 else | |
500 rect.setX(viewWidth() - rect.maxX()); | |
501 } | |
502 | |
503 if (mode & IsFixed) | 494 if (mode & IsFixed) |
504 adjustOffsetForFixedPosition(rect); | 495 adjustOffsetForFixedPosition(rect); |
505 | 496 |
506 // Apply our transform if we have one (because of full page zooming). | 497 // Apply our transform if we have one (because of full page zooming). |
507 if (!ancestor && layer() && layer()->transform()) | 498 if (!ancestor && layer() && layer()->transform()) |
508 rect = layer()->transform()->mapRect(rect); | 499 rect = layer()->transform()->mapRect(rect); |
509 | 500 |
510 ASSERT(ancestor); | 501 ASSERT(ancestor); |
511 if (ancestor == this) | 502 if (ancestor == this) |
512 return true; | 503 return true; |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1038 | 1029 |
1039 ScrollResult LayoutView::scroll(ScrollGranularity granularity, const FloatSize& delta) | 1030 ScrollResult LayoutView::scroll(ScrollGranularity granularity, const FloatSize& delta) |
1040 { | 1031 { |
1041 if (!frameView()) | 1032 if (!frameView()) |
1042 return ScrollResult(); | 1033 return ScrollResult(); |
1043 | 1034 |
1044 return frame()->applyScrollDelta(granularity, delta, false); | 1035 return frame()->applyScrollDelta(granularity, delta, false); |
1045 } | 1036 } |
1046 | 1037 |
1047 } // namespace blink | 1038 } // namespace blink |
OLD | NEW |