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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineIterator.h

Issue 1444973002: Collapse whitespace after list markers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/line/InlineIterator.h
diff --git a/third_party/WebKit/Source/core/layout/line/InlineIterator.h b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
index 73c2554e556e26011772fca3d74372b1d84adfa8..07108abaf65100eddf81d77fcd2ecdd46d54b50a 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineIterator.h
+++ b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
@@ -269,6 +269,12 @@ static inline LineLayoutItem bidiNextShared(LineLayoutItem root, LineLayoutItem
template <class Observer>
static inline LineLayoutItem bidiNextSkippingEmptyInlines(LineLayoutItem root, LineLayoutItem current, Observer* observer)
{
+ // TODO(rhogan): Rename this caller. It's used for a detailed walk of every object in an inline flow, for example during line layout.
+ // We always return empty inlines in bidiNextShared, which gives lie to the bidiNext[Skipping|Including]EmptyInlines
+ // naming scheme we use to call it. bidiNextSkippingEmptyInlines is the less fussy of the two callers,
+ // it will always try to advance and will return what it finds if it's a line layout object in isIteratorTarget or if
+ // it's an empty LayoutInline. If the LayoutInline has content, it will advance past the start of the LayoutLine and try to return
+ // one of its children.
// The SkipEmptyInlines callers never care about endOfInlinePtr.
return bidiNextShared(root, current, observer, SkipEmptyInlines);
}
@@ -282,6 +288,12 @@ static inline LineLayoutItem bidiNextSkippingEmptyInlines(LineLayoutItem root, L
static inline LineLayoutItem bidiNextIncludingEmptyInlines(LineLayoutItem root, LineLayoutItem current, bool* endOfInlinePtr = nullptr)
{
+ // TODO(rhogan): Rename this caller. It's used for quick and dirty walks of inline children by InlineWalker, which isn't
+ // interested in the contents of inlines. Use cases include dirtying objects or simplified layout that leaves lineboxes intact.
+ // bidiNextIncludingEmptyInlines will return if the iterator is at the start of a LayoutInline (even if it hasn't
+ // advanced yet) unless it previously stopped at the start of the same LayoutInline the last time it tried to iterate.
+ // If it finds itself inside a LayoutInline that doesn't have anything in isIteratorTarget it will return the enclosing
+ // LayoutInline.
InlineBidiResolver* observer = nullptr; // Callers who include empty inlines, never use an observer.
return bidiNextShared(root, current, observer, IncludeEmptyInlines, endOfInlinePtr);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698