WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
88049
Layout not updated after setting -webkit-line-clamp to none
https://bugs.webkit.org/show_bug.cgi?id=88049
Summary
Layout not updated after setting -webkit-line-clamp to none
mitz
Reported
2012-06-01 00:01:35 PDT
<
rdar://problem/11407365
> Changing -webkit-line-clamp dynamically from a number or percentage value to none doesn’t remove clamping. Patch forthcoming.
Attachments
Mark blocks for layout and clear truncation when line-clamp changes to none
(5.45 KB, patch)
2012-06-01 00:16 PDT
,
mitz
inferno
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2012-06-01 00:16:26 PDT
Created
attachment 145222
[details]
Mark blocks for layout and clear truncation when line-clamp changes to none
Abhishek Arya
Comment 2
2012-06-01 00:58:06 PDT
Comment on
attachment 145222
[details]
Mark blocks for layout and clear truncation when line-clamp changes to none View in context:
https://bugs.webkit.org/attachment.cgi?id=145222&action=review
> Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:153 > +void RenderDeprecatedFlexibleBox::styleWillChange(StyleDifference diff, const RenderStyle *newStyle)
* on the wrong side.
> Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:987 > +void RenderDeprecatedFlexibleBox::clearLineClamp()
nit: Can this code be shared with
http://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp&exact_package=chromium&q=markPositionedObjectsForLayout&type=cs&l=883
to avoid duplication.
> Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:995 > + || (child->style()->height().isAuto() && child->isBlockFlow())) {
Do we want to use logicalHeight here ?
> Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:996 > + child->setChildNeedsLayout(true);
I think we just need to MarkOnlyThis in the second argument.
Abhishek Arya
Comment 3
2012-06-01 01:03:43 PDT
Comment on
attachment 145222
[details]
Mark blocks for layout and clear truncation when line-clamp changes to none View in context:
https://bugs.webkit.org/attachment.cgi?id=145222&action=review
> Source/WebCore/ChangeLog:14 > + children for layout and clears trunaction from blocks.
typo 'trunacation'
mitz
Comment 4
2012-06-01 01:18:28 PDT
Comment on
attachment 145222
[details]
Mark blocks for layout and clear truncation when line-clamp changes to none View in context:
https://bugs.webkit.org/attachment.cgi?id=145222&action=review
Thanks for the review!
>> Source/WebCore/ChangeLog:14 >> + children for layout and clears trunaction from blocks. > > typo 'trunacation'
I am going to fix this.
>> Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:153 >> +void RenderDeprecatedFlexibleBox::styleWillChange(StyleDifference diff, const RenderStyle *newStyle) > > * on the wrong side.
Oops! I will fix this.
>> Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:995 >> + || (child->style()->height().isAuto() && child->isBlockFlow())) { > > Do we want to use logicalHeight here ?
I don’t think RenderDeprecatedFlexibleBox was ever made writing-mode aware. More importantly, this code follows the logic in applyLineClamp().
>> Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:996 >> + child->setChildNeedsLayout(true); > > I think we just need to MarkOnlyThis in the second argument.
MarkOnlyThis is only useful during layout, when you don’t want to re-dirty the ancestors. clearLineClamp() is not called during layout, so MarkOnlyThis is not necessary and using it would introduce risk of creating a subtree that needs layout and never gets it.
Abhishek Arya
Comment 5
2012-06-01 01:21:46 PDT
Sounds good. Thanks for the patch.
mitz
Comment 6
2012-06-01 07:14:32 PDT
Fixed in <
http://trac.webkit.org/r119227
>.
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