DescriptionMerge 133124 - [Refactoring] Move initial style setting for ProgressValueElement from attach method to createShadowSubtree method in HTMLProgressElement.
https://bugs.webkit.org/show_bug.cgi?id=83664
Reviewed by Hajime Morita.
Source/WebCore:
The original code updates inline style during attach(). However,
the attach would be invoked from Element::recalcStyle()'s reattach().
If updating inline styles during the reattach(), style related flags,
i.e. childNeedsStyleRecalc, and needsStyleRecalc are cleared after the
reattach(). So the inline styles are not updated in next
setNeedsStyleRecalc, because ProgressValueElement has already had
InlineStyleChange (existingChanegType == InlineStyleChange) and
markAncestorsWithChildNeedsStyleRecalc is not invoked.
Test: fast/dom/HTMLProgressElement/progress-bar-set-value.html
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::attach):
Copied updateFromElement from didElementStateChange. If removing the
update, indeterminate-progress-001.html and progress-element.html
under fast/dom/HTMLProgressElement will fail. We still need attach()
and updateFromElement. To remove the attach(), need more refactoring,
i.e. investigating where attach() is invoked from and modifying all
related codes.
(WebCore::HTMLProgressElement::createShadowSubtree):
Initialize m_value by indeterminate-position. The value is default
value of progress element.
LayoutTests:
* fast/dom/HTMLProgressElement/progress-bar-set-value-expected.html: Added.
* fast/dom/HTMLProgressElement/progress-bar-set-value.html: Added.
TBR=tasak@google.com
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=133838
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|