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

Side by Side Diff: sky/engine/core/editing/VisibleUnits.cpp

Issue 688213002: First pass at removing dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
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/editing/VisiblePosition.cpp ('k') | sky/engine/core/frame/FrameView.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) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 return p.isNotNull() && p == logicalEndOfLine(p); 878 return p.isNotNull() && p == logicalEndOfLine(p);
879 } 879 }
880 880
881 static inline IntPoint absoluteLineDirectionPointToLocalPointInBlock(RootInlineB ox* root, int lineDirectionPoint) 881 static inline IntPoint absoluteLineDirectionPointToLocalPointInBlock(RootInlineB ox* root, int lineDirectionPoint)
882 { 882 {
883 ASSERT(root); 883 ASSERT(root);
884 RenderBlockFlow& containingBlock = root->block(); 884 RenderBlockFlow& containingBlock = root->block();
885 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint() ); 885 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint() );
886 if (containingBlock.hasOverflowClip()) 886 if (containingBlock.hasOverflowClip())
887 absoluteBlockPoint -= containingBlock.scrolledContentOffset(); 887 absoluteBlockPoint -= containingBlock.scrolledContentOffset();
888 888 return IntPoint(lineDirectionPoint - absoluteBlockPoint.x(), root->blockDire ctionPointInLine());
889 if (root->block().isHorizontalWritingMode())
890 return IntPoint(lineDirectionPoint - absoluteBlockPoint.x(), root->block DirectionPointInLine());
891
892 return IntPoint(root->blockDirectionPointInLine(), lineDirectionPoint - abso luteBlockPoint.y());
893 } 889 }
894 890
895 VisiblePosition previousLinePosition(const VisiblePosition &visiblePosition, int lineDirectionPoint, EditableType editableType) 891 VisiblePosition previousLinePosition(const VisiblePosition &visiblePosition, int lineDirectionPoint, EditableType editableType)
896 { 892 {
897 Position p = visiblePosition.deepEquivalent(); 893 Position p = visiblePosition.deepEquivalent();
898 Node* node = p.deprecatedNode(); 894 Node* node = p.deprecatedNode();
899 895
900 if (!node) 896 if (!node)
901 return VisiblePosition(); 897 return VisiblePosition();
902 898
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 int caretOffset; 1372 int caretOffset;
1377 position.position().getInlineBoxAndOffset(position.affinity(), inlineBox, ca retOffset); 1373 position.position().getInlineBoxAndOffset(position.affinity(), inlineBox, ca retOffset);
1378 1374
1379 if (inlineBox) 1375 if (inlineBox)
1380 renderer = &inlineBox->renderer(); 1376 renderer = &inlineBox->renderer();
1381 1377
1382 return renderer->localCaretRect(inlineBox, caretOffset); 1378 return renderer->localCaretRect(inlineBox, caretOffset);
1383 } 1379 }
1384 1380
1385 } 1381 }
OLDNEW
« no previous file with comments | « sky/engine/core/editing/VisiblePosition.cpp ('k') | sky/engine/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698