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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutInline.cpp

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 } 1043 }
1044 return LayoutRect(); 1044 return LayoutRect();
1045 } 1045 }
1046 1046
1047 LayoutRect LayoutInline::localOverflowRectForPaintInvalidation() const 1047 LayoutRect LayoutInline::localOverflowRectForPaintInvalidation() const
1048 { 1048 {
1049 // If we don't create line boxes, we don't have any invalidations to do. 1049 // If we don't create line boxes, we don't have any invalidations to do.
1050 if (!alwaysCreateLineBoxes()) 1050 if (!alwaysCreateLineBoxes())
1051 return LayoutRect(); 1051 return LayoutRect();
1052 1052
1053 if (style()->visibility() != VISIBLE) 1053 if (style()->visibility() != EVisibility::Visible)
1054 return LayoutRect(); 1054 return LayoutRect();
1055 1055
1056 return visualOverflowRect(); 1056 return visualOverflowRect();
1057 } 1057 }
1058 1058
1059 LayoutRect LayoutInline::visualOverflowRect() const 1059 LayoutRect LayoutInline::visualOverflowRect() const
1060 { 1060 {
1061 LayoutRect overflowRect = linesVisualOverflowBoundingBox(); 1061 LayoutRect overflowRect = linesVisualOverflowBoundingBox();
1062 LayoutUnit outlineOutset(style()->outlineOutsetExtent()); 1062 LayoutUnit outlineOutset(style()->outlineOutsetExtent());
1063 if (outlineOutset) { 1063 if (outlineOutset) {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 1328
1329 void LayoutInline::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layo utPoint& layerOffset) const 1329 void LayoutInline::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layo utPoint& layerOffset) const
1330 { 1330 {
1331 AbsoluteLayoutRectsGeneratorContext context(rects, layerOffset); 1331 AbsoluteLayoutRectsGeneratorContext context(rects, layerOffset);
1332 generateLineBoxRects(context); 1332 generateLineBoxRects(context);
1333 } 1333 }
1334 1334
1335 void LayoutInline::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions) 1335 void LayoutInline::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions)
1336 { 1336 {
1337 // Convert the style regions to absolute coordinates. 1337 // Convert the style regions to absolute coordinates.
1338 if (style()->visibility() != VISIBLE) 1338 if (style()->visibility() != EVisibility::Visible)
1339 return; 1339 return;
1340 1340
1341 if (style()->getDraggableRegionMode() == DraggableRegionNone) 1341 if (style()->getDraggableRegionMode() == DraggableRegionNone)
1342 return; 1342 return;
1343 1343
1344 AnnotatedRegionValue region; 1344 AnnotatedRegionValue region;
1345 region.draggable = style()->getDraggableRegionMode() == DraggableRegionDrag; 1345 region.draggable = style()->getDraggableRegionMode() == DraggableRegionDrag;
1346 region.bounds = LayoutRect(linesBoundingBox()); 1346 region.bounds = LayoutRect(linesBoundingBox());
1347 1347
1348 LayoutObject* container = containingBlock(); 1348 LayoutObject* container = containingBlock();
1349 if (!container) 1349 if (!container)
1350 container = this; 1350 container = this;
1351 1351
1352 FloatPoint absPos = container->localToAbsolute(); 1352 FloatPoint absPos = container->localToAbsolute();
1353 region.bounds.setX(LayoutUnit(absPos.x() + region.bounds.x())); 1353 region.bounds.setX(LayoutUnit(absPos.x() + region.bounds.x()));
1354 region.bounds.setY(LayoutUnit(absPos.y() + region.bounds.y())); 1354 region.bounds.setY(LayoutUnit(absPos.y() + region.bounds.y()));
1355 1355
1356 regions.append(region); 1356 regions.append(region);
1357 } 1357 }
1358 1358
1359 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const 1359 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const
1360 { 1360 {
1361 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason); 1361 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason);
1362 1362
1363 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1363 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1364 invalidateDisplayItemClient(*box, invalidationReason); 1364 invalidateDisplayItemClient(*box, invalidationReason);
1365 } 1365 }
1366 1366
1367 } // namespace blink 1367 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698