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

Side by Side Diff: sky/engine/core/rendering/RenderReplaced.cpp

Issue 684383002: Delete a ton more dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@writingmode1
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/RenderText.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const 480 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const
481 { 481 {
482 if (checkWhetherSelected && !isSelected()) 482 if (checkWhetherSelected && !isSelected())
483 return LayoutRect(); 483 return LayoutRect();
484 484
485 if (!inlineBoxWrapper()) 485 if (!inlineBoxWrapper())
486 // We're a block-level replaced element. Just return our own dimensions . 486 // We're a block-level replaced element. Just return our own dimensions .
487 return LayoutRect(LayoutPoint(), size()); 487 return LayoutRect(LayoutPoint(), size());
488 488
489 RootInlineBox& root = inlineBoxWrapper()->root(); 489 RootInlineBox& root = inlineBoxWrapper()->root();
490 LayoutUnit newLogicalTop = root.block().style()->isFlippedBlocksWritingMode( ) ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.selectio nTop() - inlineBoxWrapper()->logicalTop(); 490 LayoutUnit newLogicalTop = root.selectionTop() - inlineBoxWrapper()->logical Top();
491 if (root.block().style()->isHorizontalWritingMode()) 491 return LayoutRect(0, newLogicalTop, width(), root.selectionHeight());
492 return LayoutRect(0, newLogicalTop, width(), root.selectionHeight());
493 return LayoutRect(newLogicalTop, 0, root.selectionHeight(), height());
494 } 492 }
495 493
496 void RenderReplaced::setSelectionState(SelectionState state) 494 void RenderReplaced::setSelectionState(SelectionState state)
497 { 495 {
498 // The selection state for our containing block hierarchy is updated by the base class call. 496 // The selection state for our containing block hierarchy is updated by the base class call.
499 RenderBox::setSelectionState(state); 497 RenderBox::setSelectionState(state);
500 498
501 if (!inlineBoxWrapper()) 499 if (!inlineBoxWrapper())
502 return; 500 return;
503 501
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 LayoutRect RenderReplaced::clippedOverflowRectForPaintInvalidation(const RenderL ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint InvalidationState) const 534 LayoutRect RenderReplaced::clippedOverflowRectForPaintInvalidation(const RenderL ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint InvalidationState) const
537 { 535 {
538 // The selectionRect can project outside of the overflowRect, so take their union 536 // The selectionRect can project outside of the overflowRect, so take their union
539 // for paint invalidation to avoid selection painting glitches. 537 // for paint invalidation to avoid selection painting glitches.
540 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); 538 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect();
541 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali dationState); 539 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali dationState);
542 return r; 540 return r;
543 } 541 }
544 542
545 } 543 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698