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

Side by Side Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 16402019: Remove clips where we can show that they are unnecessary. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: NeedsRebaseline for Mac Created 7 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google 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 3299 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 } 3310 }
3311 3311
3312 void RenderBlock::addOverflowFromInlineChildren() 3312 void RenderBlock::addOverflowFromInlineChildren()
3313 { 3313 {
3314 LayoutUnit endPadding = hasOverflowClip() ? paddingEnd() : LayoutUnit(); 3314 LayoutUnit endPadding = hasOverflowClip() ? paddingEnd() : LayoutUnit();
3315 // FIXME: Need to find another way to do this, since scrollbars could show w hen we don't want them to. 3315 // FIXME: Need to find another way to do this, since scrollbars could show w hen we don't want them to.
3316 if (hasOverflowClip() && !endPadding && node() && node()->isRootEditableElem ent() && style()->isLeftToRightDirection()) 3316 if (hasOverflowClip() && !endPadding && node() && node()->isRootEditableElem ent() && style()->isLeftToRightDirection())
3317 endPadding = 1; 3317 endPadding = 1;
3318 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) { 3318 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
3319 addLayoutOverflow(curr->paddedLayoutOverflowRect(endPadding)); 3319 addLayoutOverflow(curr->paddedLayoutOverflowRect(endPadding));
3320 if (!hasOverflowClip()) 3320 LayoutRect visualOverflow = curr->visualOverflowRect(curr->lineTop(), cu rr->lineBottom());
3321 addVisualOverflow(curr->visualOverflowRect(curr->lineTop(), curr->li neBottom())); 3321 addVisualOverflow(visualOverflow, VisualOverflowClippedByContentsClip);
3322 } 3322 }
3323 } 3323 }
3324 3324
3325 void RenderBlock::deleteEllipsisLineBoxes() 3325 void RenderBlock::deleteEllipsisLineBoxes()
3326 { 3326 {
3327 ETextAlign textAlign = style()->textAlign(); 3327 ETextAlign textAlign = style()->textAlign();
3328 bool ltr = style()->isLeftToRightDirection(); 3328 bool ltr = style()->isLeftToRightDirection();
3329 bool firstLine = true; 3329 bool firstLine = true;
3330 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) { 3330 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
3331 if (curr->hasEllipsisBox()) { 3331 if (curr->hasEllipsisBox()) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
3482 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache); 3482 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache);
3483 3483
3484 setLineGridBox(lineGridBox); 3484 setLineGridBox(lineGridBox);
3485 3485
3486 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying 3486 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying
3487 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping 3487 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
3488 // to this grid. 3488 // to this grid.
3489 } 3489 }
3490 3490
3491 } 3491 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698