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

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 492053002: Use LayoutRect during addFocusRingRects to avoid loss of precision (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline (pixel tests about focus rings. 1-pixel width diff at the edge because of different rounding) Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderInline.cpp ('k') | Source/core/rendering/RenderObject.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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 993
994 // Pushes state onto RenderGeometryMap about how to map coordinates from thi s renderer to its container, or ancestorToStopAt (whichever is encountered first ). 994 // Pushes state onto RenderGeometryMap about how to map coordinates from thi s renderer to its container, or ancestorToStopAt (whichever is encountered first ).
995 // Returns the renderer which was mapped to (container or ancestorToStopAt). 995 // Returns the renderer which was mapped to (container or ancestorToStopAt).
996 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const; 996 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const;
997 997
998 bool shouldUseTransformFromContainer(const RenderObject* container) const; 998 bool shouldUseTransformFromContainer(const RenderObject* container) const;
999 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const; 999 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const;
1000 1000
1001 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter () || hasBlendMode(); } 1001 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter () || hasBlendMode(); }
1002 1002
1003 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) const { }; 1003 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const { }
1004 1004
1005 // Compute a list of hit-test rectangles per layer rooted at this renderer. 1005 // Compute a list of hit-test rectangles per layer rooted at this renderer.
1006 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; 1006 virtual void computeLayerHitTestRects(LayerHitTestRects&) const;
1007 1007
1008 // Return the renderer whose background style is used to paint the root back ground. Should only be called on the renderer for which isDocumentElement() is t rue. 1008 // Return the renderer whose background style is used to paint the root back ground. Should only be called on the renderer for which isDocumentElement() is t rue.
1009 RenderObject* rendererForRootBackground(); 1009 RenderObject* rendererForRootBackground();
1010 1010
1011 RespectImageOrientationEnum shouldRespectImageOrientation() const; 1011 RespectImageOrientationEnum shouldRespectImageOrientation() const;
1012 1012
1013 bool isRelayoutBoundaryForInspector() const; 1013 bool isRelayoutBoundaryForInspector() const;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 BoxSide, Color, int thickness, EBorderStyle, bool antialias); 1097 BoxSide, Color, int thickness, EBorderStyle, bool antialias);
1098 void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 1098 void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
1099 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias); 1099 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias);
1100 void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 1100 void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
1101 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias); 1101 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias);
1102 void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 1102 void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
1103 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); 1103 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias);
1104 1104
1105 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*); 1105 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*);
1106 void paintOutline(PaintInfo&, const LayoutRect&); 1106 void paintOutline(PaintInfo&, const LayoutRect&);
1107 void addChildFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalO ffset, const RenderLayerModelObject* paintContainer) const; 1107 void addChildFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer) const;
1108 1108
1109 virtual LayoutRect viewRect() const; 1109 virtual LayoutRect viewRect() const;
1110 1110
1111 void clearLayoutRootIfNeeded() const; 1111 void clearLayoutRootIfNeeded() const;
1112 virtual void willBeDestroyed(); 1112 virtual void willBeDestroyed();
1113 void postDestroy(); 1113 void postDestroy();
1114 1114
1115 virtual void insertedIntoTree(); 1115 virtual void insertedIntoTree();
1116 virtual void willBeRemovedFromTree(); 1116 virtual void willBeRemovedFromTree();
1117 1117
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 void showTree(const blink::RenderObject*); 1559 void showTree(const blink::RenderObject*);
1560 void showLineTree(const blink::RenderObject*); 1560 void showLineTree(const blink::RenderObject*);
1561 void showRenderTree(const blink::RenderObject* object1); 1561 void showRenderTree(const blink::RenderObject* object1);
1562 // We don't make object2 an optional parameter so that showRenderTree 1562 // We don't make object2 an optional parameter so that showRenderTree
1563 // can be called from gdb easily. 1563 // can be called from gdb easily.
1564 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1564 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1565 1565
1566 #endif 1566 #endif
1567 1567
1568 #endif // RenderObject_h 1568 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderInline.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698