WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
123033
[CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementation with Blink's
https://bugs.webkit.org/show_bug.cgi?id=123033
Summary
[CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementat...
Zoltan Horvath
Reported
2013-10-18 11:47:37 PDT
In blink I made this function in a bit different way. This change modifies it to be identical, which helps a lot in the future cross-merging patches.
Attachments
Patch
(2.42 KB, patch)
2013-10-18 11:50 PDT
,
Zoltan Horvath
no flags
Details
Formatted Diff
Diff
Patch
(2.31 KB, patch)
2013-10-18 13:21 PDT
,
Zoltan Horvath
hyatt
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Zoltan Horvath
Comment 1
2013-10-18 11:50:24 PDT
Created
attachment 214591
[details]
Patch
Darin Adler
Comment 2
2013-10-18 12:03:32 PDT
Comment on
attachment 214591
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=214591&action=review
> Source/WebCore/rendering/RenderBlockLineLayout.cpp:1472 > - if (shapeInsideInfo && !wordMeasurements.size() && containsFloats()) { > - lastFloatFromPreviousLine = m_floatingObjects->set().last().get(); > - LayoutUnit floatLogicalTopOffset = shapeInsideInfo->computeFirstFitPositionForFloat(logicalSizeForFloat(lastFloatFromPreviousLine)); > - if (logicalHeight() < floatLogicalTopOffset) > - adjustedLogicalLineTop = floatLogicalTopOffset; > + if (shapeInsideInfo) { > + lastFloatFromPreviousLine = (containsFloats()) ? m_floatingObjects->set().last().get() : 0; > + if (!wordMeasurements.size() && lastFloatFromPreviousLine) { > + LayoutUnit floatLogicalTopOffset = shapeInsideInfo->computeFirstFitPositionForFloat(logicalSizeForFloat(lastFloatFromPreviousLine)); > + if (logicalHeight() < floatLogicalTopOffset) > + adjustedLogicalLineTop = floatLogicalTopOffset; > + } > }
I like the old version better than the new version. The use of ? : and 0 is not as nice as regular if statement. Could you merge in the other direction instead?
Zoltan Horvath
Comment 3
2013-10-18 13:21:35 PDT
Created
attachment 214597
[details]
Patch
Zoltan Horvath
Comment 4
2013-10-18 13:24:26 PDT
(In reply to
comment #2
)
> (From update of
attachment 214591
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=214591&action=review
> > > Source/WebCore/rendering/RenderBlockLineLayout.cpp:1472 > > - if (shapeInsideInfo && !wordMeasurements.size() && containsFloats()) { > > - lastFloatFromPreviousLine = m_floatingObjects->set().last().get(); > > - LayoutUnit floatLogicalTopOffset = shapeInsideInfo->computeFirstFitPositionForFloat(logicalSizeForFloat(lastFloatFromPreviousLine)); > > - if (logicalHeight() < floatLogicalTopOffset) > > - adjustedLogicalLineTop = floatLogicalTopOffset; > > + if (shapeInsideInfo) { > > + lastFloatFromPreviousLine = (containsFloats()) ? m_floatingObjects->set().last().get() : 0; > > + if (!wordMeasurements.size() && lastFloatFromPreviousLine) { > > + LayoutUnit floatLogicalTopOffset = shapeInsideInfo->computeFirstFitPositionForFloat(logicalSizeForFloat(lastFloatFromPreviousLine)); > > + if (logicalHeight() < floatLogicalTopOffset) > > + adjustedLogicalLineTop = floatLogicalTopOffset; > > + } > > } > > I like the old version better than the new version. The use of ? : and 0 is not as nice as regular if statement. Could you merge in the other direction instead?
I updated the patch. What do you think about the new version? I'm working on the refactoring of the RenderBlockLineLayout's nextSegmentBreak method, and because of that change I need to update the lastFloatFromPreviousLine variable in the shapeInsideInfo case. That's the reason because I want to do the merge this direction. This one looks better now, I think.
Zoltan Horvath
Comment 5
2013-10-18 14:24:41 PDT
(In reply to
comment #4
)
> I'm working on the refactoring of the RenderBlockLineLayout's nextSegmentBreak method, and because of that change I need to update the lastFloatFromPreviousLine variable in the shapeInsideInfo case. That's the reason because I want to do the merge this direction. This one looks better now, I think.
patch preview on
bug #123038
Dave Hyatt
Comment 6
2013-10-22 14:21:06 PDT
Comment on
attachment 214597
[details]
Patch r=me
Zoltan Horvath
Comment 7
2013-10-22 15:05:52 PDT
Committed
r157820
: <
http://trac.webkit.org/changeset/157820
>
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