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

Side by Side Diff: Source/core/editing/VisibleUnits.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 while (n && n->hasEditableStyle() != startNodeIsEditable) 1108 while (n && n->hasEditableStyle() != startNodeIsEditable)
1109 n = NodeTraversal::previousPostOrder(*n, startBlock); 1109 n = NodeTraversal::previousPostOrder(*n, startBlock);
1110 if (!n || !n->isDescendantOf(highestRoot)) 1110 if (!n || !n->isDescendantOf(highestRoot))
1111 break; 1111 break;
1112 } 1112 }
1113 LayoutObject* r = n->layoutObject(); 1113 LayoutObject* r = n->layoutObject();
1114 if (!r) { 1114 if (!r) {
1115 n = NodeTraversal::previousPostOrder(*n, startBlock); 1115 n = NodeTraversal::previousPostOrder(*n, startBlock);
1116 continue; 1116 continue;
1117 } 1117 }
1118 const LayoutStyle& style = r->styleRef(); 1118 const ComputedStyle& style = r->styleRef();
1119 if (style.visibility() != VISIBLE) { 1119 if (style.visibility() != VISIBLE) {
1120 n = NodeTraversal::previousPostOrder(*n, startBlock); 1120 n = NodeTraversal::previousPostOrder(*n, startBlock);
1121 continue; 1121 continue;
1122 } 1122 }
1123 1123
1124 if (r->isBR() || isBlock(n)) 1124 if (r->isBR() || isBlock(n))
1125 break; 1125 break;
1126 1126
1127 if (r->isText() && toLayoutText(r)->renderedTextLength()) { 1127 if (r->isText() && toLayoutText(r)->renderedTextLength()) {
1128 ASSERT_WITH_SECURITY_IMPLICATION(n->isTextNode()); 1128 ASSERT_WITH_SECURITY_IMPLICATION(n->isTextNode());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 n = NodeTraversal::next(*n, stayInsideBlock); 1187 n = NodeTraversal::next(*n, stayInsideBlock);
1188 if (!n || !n->isDescendantOf(highestRoot)) 1188 if (!n || !n->isDescendantOf(highestRoot))
1189 break; 1189 break;
1190 } 1190 }
1191 1191
1192 LayoutObject* r = n->layoutObject(); 1192 LayoutObject* r = n->layoutObject();
1193 if (!r) { 1193 if (!r) {
1194 n = NodeTraversal::next(*n, stayInsideBlock); 1194 n = NodeTraversal::next(*n, stayInsideBlock);
1195 continue; 1195 continue;
1196 } 1196 }
1197 const LayoutStyle& style = r->styleRef(); 1197 const ComputedStyle& style = r->styleRef();
1198 if (style.visibility() != VISIBLE) { 1198 if (style.visibility() != VISIBLE) {
1199 n = NodeTraversal::next(*n, stayInsideBlock); 1199 n = NodeTraversal::next(*n, stayInsideBlock);
1200 continue; 1200 continue;
1201 } 1201 }
1202 1202
1203 if (r->isBR() || isBlock(n)) 1203 if (r->isBR() || isBlock(n))
1204 break; 1204 break;
1205 1205
1206 // FIXME: We avoid returning a position where the renderer can't accept the caret. 1206 // FIXME: We avoid returning a position where the renderer can't accept the caret.
1207 if (r->isText() && toLayoutText(r)->renderedTextLength()) { 1207 if (r->isText() && toLayoutText(r)->renderedTextLength()) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 int caretOffset; 1406 int caretOffset;
1407 position.position().getInlineBoxAndOffset(position.affinity(), inlineBox, ca retOffset); 1407 position.position().getInlineBoxAndOffset(position.affinity(), inlineBox, ca retOffset);
1408 1408
1409 if (inlineBox) 1409 if (inlineBox)
1410 renderer = &inlineBox->layoutObject(); 1410 renderer = &inlineBox->layoutObject();
1411 1411
1412 return renderer->localCaretRect(inlineBox, caretOffset); 1412 return renderer->localCaretRect(inlineBox, caretOffset);
1413 } 1413 }
1414 1414
1415 } 1415 }
OLDNEW
« no previous file with comments | « Source/core/editing/SimplifyMarkupCommand.cpp ('k') | Source/core/editing/iterators/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698