Changeset 112170 in webkit
- Timestamp:
- Mar 26, 2012 4:35:04 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112167 r112170 1 2012-03-26 Levi Weintraub <leviw@chromium.org> 2 3 Update LayoutUnit usage in ContainerNode, Element, and ElementRareData 4 https://bugs.webkit.org/show_bug.cgi?id=82219 5 6 Reviewed by Eric Seidel. 7 8 No new tests. No change in behavior. 9 10 * dom/ContainerNode.cpp: 11 (WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect 12 of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped. 13 * dom/Element.cpp: 14 (WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute 15 coordinates, which are always expressed in integers. 16 * dom/Element.h: 17 (Element): 18 * dom/ElementRareData.h: 19 (WebCore::defaultMinimumSizeForResizing): Using numeric_limits<LayoutUnit>::max instead of 20 INT_MAX to avoid overflowing when LayoutUnits are sub-pixel. 21 1 22 2012-03-26 Adam Klein <adamk@chromium.org> 2 23 -
trunk/Source/WebCore/dom/ContainerNode.cpp
r112051 r112170 933 933 if (o->isText()) { 934 934 RenderText* text = toRenderText(o); 935 LayoutRect linesBox = text->linesBoundingBox();935 IntRect linesBox = text->linesBoundingBox(); 936 936 if (!linesBox.maxX() && !linesBox.maxY()) 937 937 continue; -
trunk/Source/WebCore/dom/Element.cpp
r112155 r112170 476 476 } 477 477 478 LayoutRect Element::boundsInRootViewSpace()478 IntRect Element::boundsInRootViewSpace() 479 479 { 480 480 document()->updateLayoutIgnorePendingStylesheets(); … … 482 482 FrameView* view = document()->view(); 483 483 if (!view) 484 return LayoutRect();484 return IntRect(); 485 485 486 486 Vector<FloatQuad> quads; … … 501 501 502 502 if (quads.isEmpty()) 503 return LayoutRect();504 505 LayoutRect result = quads[0].enclosingBoundingBox();503 return IntRect(); 504 505 IntRect result = quads[0].enclosingBoundingBox(); 506 506 for (size_t i = 1; i < quads.size(); ++i) 507 507 result.unite(quads[i].enclosingBoundingBox()); -
trunk/Source/WebCore/dom/Element.h
r111930 r112170 187 187 virtual int scrollHeight(); 188 188 189 LayoutRect boundsInRootViewSpace();189 IntRect boundsInRootViewSpace(); 190 190 191 191 PassRefPtr<ClientRectList> getClientRects(); -
trunk/Source/WebCore/dom/ElementRareData.h
r110172 r112170 82 82 inline IntSize defaultMinimumSizeForResizing() 83 83 { 84 return IntSize( INT_MAX, INT_MAX);84 return IntSize(std::numeric_limits<LayoutUnit>::max(), std::numeric_limits<LayoutUnit>::max()); 85 85 } 86 86
Note: See TracChangeset
for help on using the changeset viewer.