Changeset 107366 in webkit
- Timestamp:
- Feb 9, 2012, 11:07:21 PM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
-
ChangeLog (modified) (1 diff)
-
page/Frame.cpp (modified) (1 diff)
-
page/FrameView.cpp (modified) (1 diff)
-
page/GestureTapHighlighter.cpp (modified) (2 diffs)
-
page/Page.cpp (modified) (1 diff)
-
page/mac/FrameMac.mm (modified) (3 diffs)
-
page/win/FrameCGWin.cpp (modified) (1 diff)
-
rendering/LayoutTypes.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r107365 r107366 1 2012-02-09 Emil A Eklund <eae@chromium.org> 2 3 Convert Frame/FrameView to LayoutUnits in preparation for turning on subpixel layout 4 https://bugs.webkit.org/show_bug.cgi?id=78311 5 6 Reviewed by Eric Seidel. 7 8 No new tests, no new functionality. 9 10 * page/Frame.cpp: 11 (WebCore::Frame::nodeImage): 12 Pixel snap painting rect for image to ensure that it is painted aligned 13 to device pixels. This avoids avoid unwanted anti-aliasing. 14 15 * page/FrameView.cpp: 16 (WebCore::FrameView::windowClipRectForLayer): 17 Pixel snap clip rects as all window coordinates and sizes are exposed as 18 integers. 19 20 * page/GestureTapHighlighter.cpp: 21 * page/Page.cpp: 22 (WebCore::Page::addRelevantRepaintedObject): 23 As the painting is done aligned on pixel boundaries we need to pixel snap 24 the view rect when checking if it intersects the objects paint rect. 25 26 * page/mac/FrameMac.mm: 27 (WebCore::Frame::snapshotDragImage): 28 (WebCore::Frame::nodeImage): 29 Pixel snap painting rect for image to ensure that it is painted aligned 30 to device pixels. This avoids avoid unwanted anti-aliasing. 31 32 * page/win/FrameCGWin.cpp: 33 (WebCore::Frame::nodeImage): 34 Pixel snap painting rect for image to ensure that it is painted aligned 35 to device pixels. This avoids avoid unwanted anti-aliasing. 36 37 * rendering/LayoutTypes.h: 38 (WebCore::pixelSnappedIntRect): 39 (WebCore): 40 No-op implementation of pixelSnappedIntRect for now. 41 1 42 2012-02-09 Kenichi Ishibashi <bashi@chromium.org> 2 43 -
trunk/Source/WebCore/page/Frame.cpp
r106899 r107366 1073 1073 1074 1074 LayoutRect topLevelRect; 1075 IntRect paintingRect = renderer->paintingRootRect(topLevelRect);1075 IntRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLevelRect)); 1076 1076 1077 1077 OwnPtr<ImageBuffer> buffer(ImageBuffer::create(paintingRect.size())); -
trunk/Source/WebCore/page/FrameView.cpp
r107335 r107366 2484 2484 IntRect clipRect; 2485 2485 if (clipToLayerContents) 2486 clipRect = layer->childrenClipRect();2486 clipRect = pixelSnappedIntRect(layer->childrenClipRect()); 2487 2487 else 2488 clipRect = layer->selfClipRect();2488 clipRect = pixelSnappedIntRect(layer->selfClipRect()); 2489 2489 clipRect = contentsToWindow(clipRect); 2490 2490 return intersection(clipRect, windowClipRect()); -
trunk/Source/WebCore/page/GestureTapHighlighter.cpp
r106547 r107366 56 56 Frame* mainFrame = containingFrame->page()->mainFrame(); 57 57 58 LayoutPoint mainFramePoint = mainFrame->view()->rootViewToContents(containingFrame->view()->contentsToRootView( LayoutPoint()));58 LayoutPoint mainFramePoint = mainFrame->view()->rootViewToContents(containingFrame->view()->contentsToRootView(IntPoint())); 59 59 return mainFramePoint; 60 60 } … … 96 96 inline void shiftXEdgesToContainIfStrikes(LayoutRect& rect, const LayoutRect& other) 97 97 { 98 int leftSide = rect.x();99 int rightSide = rect.maxX();98 LayoutUnit leftSide = rect.x(); 99 LayoutUnit rightSide = rect.maxX(); 100 100 101 101 if (!other.isEmpty() && strikes(rect, other)) { -
trunk/Source/WebCore/page/Page.cpp
r106977 r107366 1077 1077 // The objects are only relevant if they are being painted within the viewRect(). 1078 1078 if (RenderView* view = object->view()) { 1079 if (!objectPaintRect.intersects( view->viewRect()))1079 if (!objectPaintRect.intersects(pixelSnappedIntRect(view->viewRect()))) 1080 1080 return; 1081 1081 } -
trunk/Source/WebCore/page/mac/FrameMac.mm
r104530 r107366 159 159 // imply new styles, plus JS could have changed other things 160 160 LayoutRect topLevelRect; 161 NSRect paintingRect = renderer->paintingRootRect(topLevelRect);161 NSRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLevelRect)); 162 162 163 163 m_view->setNodeToDraw(node); // invoke special sub-tree drawing mode … … 168 168 169 169 if (elementRect) 170 *elementRect = topLevelRect;170 *elementRect = pixelSnappedIntRect(topLevelRect); 171 171 if (imageRect) 172 172 *imageRect = paintingRect; … … 183 183 184 184 LayoutRect topLevelRect; 185 NSRect paintingRect = renderer->paintingRootRect(topLevelRect);185 NSRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLevelRect)); 186 186 187 187 m_view->setNodeToDraw(node); // invoke special sub-tree drawing mode -
trunk/Source/WebCore/page/win/FrameCGWin.cpp
r106884 r107366 99 99 100 100 LayoutRect topLevelRect; 101 IntRect paintingRect = renderer->paintingRootRect(topLevelRect);101 IntRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLevelRect)); 102 102 103 103 document()->updateLayout(); -
trunk/Source/WebCore/rendering/LayoutTypes.h
r107296 r107366 50 50 { 51 51 return enclosingIntRect(rect); 52 } 53 54 inline IntRect pixelSnappedIntRect(const LayoutRect& rect) 55 { 56 return rect; 52 57 } 53 58
Note:
See TracChangeset
for help on using the changeset viewer.