WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
11441
More rendering code cleaning
https://bugs.webkit.org/show_bug.cgi?id=11441
Summary
More rendering code cleaning
Sam Weinig
Reported
2006-10-27 16:02:00 PDT
More fall cleaning of the rendering code. Patch to come.
Attachments
patch
(125.42 KB, patch)
2006-10-27 16:06 PDT
,
Sam Weinig
timothy
: review+
Details
Formatted Diff
Diff
no-whitespace-changes version of the patch
(89.48 KB, patch)
2006-10-27 16:12 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
updated patch
(126.85 KB, patch)
2006-10-29 18:50 PST
,
Sam Weinig
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2006-10-27 16:06:27 PDT
Created
attachment 11262
[details]
patch
Sam Weinig
Comment 2
2006-10-27 16:12:54 PDT
Created
attachment 11263
[details]
no-whitespace-changes version of the patch Diff made with svn diff -x -w
mitz
Comment 3
2006-10-28 11:35:54 PDT
I actually had a bunch of comments on the first 2/3 of the patch before Tim reviewed it :-) In case you want to consider them: I interpret the "one line" guideline as "one line", not "one statement", so revert this: - - if (!result) { + + if (!result) // Allocate a new chunk from the arena ARENA_ALLOCATE(result, &m_pool, size); - } Please change 'b' to 'firstLine' in these: + virtual short lineHeight(bool b, bool isRootLineBox = false) const; + virtual short baselinePosition(bool b, bool isRootLineBox = false) const; For this: - virtual int maxTopMargin(bool positive) const { + virtual int maxTopMargin(bool positive) const + { if (positive) return m_maxTopPosMargin; - else - return m_maxTopNegMargin; + return m_maxTopNegMargin; } I think "return positive ? m_maxTopPosMargin : m_maxTopNegMargin;" is neater. Ditto for maxBottomMargin(). Leftover space after the &: + int skipWhitespace(BidiIterator& , BidiState&); 'stream' is redundant: + virtual void dump(TextStream* stream, DeprecatedString ind = "") const; I don't think you need parameter names at all in these: + RootInlineBox* lineAtIndex(int index); + int heightForLineCount(int lineCount); Same goes for 'renderer' here: + Position positionForRenderer(RenderObject* renderer, bool start = true) const; Is this comment still needed?! - // XXX Generalize to work with top and left as well. + // FIXME: Generalize to work with top and left as well. And what about this one? Duh. +#include "AXObjectCache.h" // For accessibility Index: WebCore/rendering/RenderFieldset.cpp Needs spaces around the minus sign: + int yOff = (legend->yPos() > 0) ? 0 : (legend->height()-borderTop()) / 2; Index: WebCore/rendering/RenderForeignObject.cpp I wanted to suggest a better name for the bool in: + virtual void computeAbsoluteRepaintRect(IntRect&, bool f); Apparently it means that the caller is fixed, but I can't see that it's being used anywhere. Weird. The change makes the comment redundant: - ASSERT(false); // Should never be reached. + ASSERT_NOT_REACHED(); // Should never be reached. I don't like the name 'needsLayout' here: - bool needlayout = false; + bool needsLayout = false; How about 'ensureLayout'? Double parentheses: + if ((newImage->imageSize().width() != intrinsicWidth() || newImage->imageSize().height() != intrinsicHeight() || imageSizeChanged)) { Missing space after if: + if(imageSizeChanged || m_width != oldwidth || m_height != oldheight)
mitz
Comment 4
2006-10-28 11:41:50 PDT
Finally, I don't think the patch will merge following
r17399
:(
Sam Weinig
Comment 5
2006-10-29 18:50:21 PST
Created
attachment 11279
[details]
updated patch
mitz
Comment 6
2006-10-30 09:57:55 PST
Comment on
attachment 11279
[details]
updated patch Great work! I have 3 comments which you should fix when landing. "its", not "it's": +// FIXME: move this to it's own file "IntRect &exposeRect" -> "IntRect& exposeRect": + IntRect getRectToExpose(const IntRect& visibleRect, const IntRect &exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY); 'b' is a bad name, but 'firstLine' is better than no name: - virtual short lineHeight(bool b, bool isRootLineBox=false) const; - virtual short baselinePosition(bool b, bool isRootLineBox=false) const; + virtual short lineHeight(bool, bool isRootLineBox = false) const; + virtual short baselinePosition(bool, bool isRootLineBox = false) const;
Sam Weinig
Comment 7
2006-10-30 18:27:37 PST
Landed in
r17448
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug