Summary: | Split findNextLineBreak into a LineBreaker class | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Levi Weintraub <leviw> | ||||||
Component: | Layout and Rendering | Assignee: | Levi Weintraub <leviw> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cmarcelo, commit-queue, eric, hyatt, mitz, rniwa | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 57779 | ||||||||
Attachments: |
|
Description
Levi Weintraub
2011-05-04 14:12:33 PDT
Yay! Created attachment 92317 [details]
Patch
Comment on attachment 92317 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92317&action=review Hm... LineBreaker seems like a class of logic, and the actual state will likely end up separate. Sorta like how BidiStatus is separate from the actual BidiResolver, and the Token is separate from the Tokenizer, etc. But I think this is moving us in a good direction! it's not clear what m_hyphenated and m_clear apply to. I assume the current line, but it would be nice to make that more clear some how. Again, tha tmay be part of some later state from state-machine split. :) > Source/WebCore/rendering/RenderBlockLineLayout.cpp:901 > + LineBreaker lb(this); I would have called this lineBreaker. :) > Source/WebCore/rendering/RenderBlockLineLayout.cpp:2333 > +// FIXME: The entire concept of the skipTrailingWhitespace function is flawed, since we really need to be building > +// line boxes even for containers that may ultimately collapse away. Otherwise we'll never get positioned > +// elements quite right. In other words, we need to build this function's work into the normal line > +// object iteration process. > +// NB. this function will insert any floating elements that would otherwise > +// be skipped but it will not position them. > +void RenderBlock::LineBreaker::skipTrailingWhitespace(InlineIterator& iterator, const LineInfo& lineInfo) > +{ > + while (!iterator.atEnd() && !requiresLineBox(iterator, lineInfo)) { I wouldn't have bothered moving these from their previous location. Comment on attachment 92317 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92317&action=review Thanks for the review! I'm going to take both of your suggestions before landing. >> Source/WebCore/rendering/RenderBlockLineLayout.cpp:901 >> + LineBreaker lb(this); > > I would have called this lineBreaker. :) Renaming it :) >> Source/WebCore/rendering/RenderBlockLineLayout.cpp:2333 >> + while (!iterator.atEnd() && !requiresLineBox(iterator, lineInfo)) { > > I wouldn't have bothered moving these from their previous location. Fair point. It needlessly clutters blame and all... Created attachment 92324 [details]
Patch for landing
Comment on attachment 92324 [details] Patch for landing Clearing flags on attachment: 92324 Committed r85810: <http://trac.webkit.org/changeset/85810> All reviewed patches have been landed. Closing bug. |