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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 os = os->nextInPreOrder(); | 527 os = os->nextInPreOrder(); |
528 } | 528 } |
529 | 529 |
530 // Now create a single bounding box rect that encloses the whole selection. | 530 // Now create a single bounding box rect that encloses the whole selection. |
531 LayoutRect selRect; | 531 LayoutRect selRect; |
532 SelectionMap::iterator end = selectedObjects.end(); | 532 SelectionMap::iterator end = selectedObjects.end(); |
533 for (SelectionMap::iterator i = selectedObjects.begin(); i != end; ++i) { | 533 for (SelectionMap::iterator i = selectedObjects.begin(); i != end; ++i) { |
534 RenderSelectionInfo* info = i->value.get(); | 534 RenderSelectionInfo* info = i->value.get(); |
535 // RenderSelectionInfo::rect() is in the coordinates of the repaintConta
iner, so map to page coordinates. | 535 // RenderSelectionInfo::rect() is in the coordinates of the repaintConta
iner, so map to page coordinates. |
536 LayoutRect currRect = info->rect(); | 536 LayoutRect currRect = info->rect(); |
537 if (RenderLayerModelObject* repaintContainer = info->repaintContainer())
{ | 537 if (const RenderLayerModelObject* repaintContainer = info->repaintContai
ner()) { |
538 FloatQuad absQuad = repaintContainer->localToAbsoluteQuad(FloatRect(
currRect)); | 538 FloatQuad absQuad = repaintContainer->localToAbsoluteQuad(FloatRect(
currRect)); |
539 currRect = absQuad.enclosingBoundingBox(); | 539 currRect = absQuad.enclosingBoundingBox(); |
540 } | 540 } |
541 selRect.unite(currRect); | 541 selRect.unite(currRect); |
542 } | 542 } |
543 return pixelSnappedIntRect(selRect); | 543 return pixelSnappedIntRect(selRect); |
544 } | 544 } |
545 | 545 |
546 void RenderView::repaintSelection() const | 546 void RenderView::repaintSelection() const |
547 { | 547 { |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 return viewWidth(IncludeScrollbars) / scale; | 956 return viewWidth(IncludeScrollbars) / scale; |
957 } | 957 } |
958 | 958 |
959 double RenderView::layoutViewportHeight() const | 959 double RenderView::layoutViewportHeight() const |
960 { | 960 { |
961 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 961 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
962 return viewHeight(IncludeScrollbars) / scale; | 962 return viewHeight(IncludeScrollbars) / scale; |
963 } | 963 } |
964 | 964 |
965 } // namespace WebCore | 965 } // namespace WebCore |
OLD | NEW |