Bug #11669
closedDelayed invisible changes end up in prelearned stateless slot
0%
Description
Consider the following example:
void MyApplication::initialize()
{
// construct a large invisible widget to ensure two-phase rendering threshold is triggered.
Wt::WText *pText = m_pRoot->addNew<Wt::WText>("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum");
pText->setHidden(true);
// Modify the background color. This change will end up in an unrelated prelearned slot
pText->decorationStyle().setBackgroundColor(Wt::WColor("#ff0000"));
}
This results in the following prelearned slot for Wt::WDefaultLoadingIndicator::show
(see WebRenderer::updateLoadIndicator
):
showLoadingIndicator = function() {var o=null,e=null;
var j1=Wt4_9_1.$('o1fco89w');
j1.style.backgroundColor='#ff0000'; // bad: is not related to showing the load indicator
Wt4_9_1.show('o1fco89s', ''); // ok: showing the load indicator
};
This may even result in a js exception, when the widget is already removed from the dom when the loading indicator is being shown.
Not sure if this is related to WCssDecorationStyle::updateDomElement
specifically, or to prelearning in general. Currently, I only see WCssDecorationStyle
related code ending up in showLoadingIndicator
.
If it is a general issue, it may be a solution to collect the invisible changes before prelearning the stateless slots (inside WebRenderer::serveMainAjax
) as WebRenderer::collectChanges
will collect non-rendered changes when learning, but not when collecting the visible only changes.
Updated by Dries Mys over 1 year ago
Note that those delayed invisible changes may also end up in another (unrelated) learned slot.
Updated by Matthias Van Ceulebroeck over 1 year ago
- Target version set to 4.11.0
Updated by Matthias Van Ceulebroeck about 1 year ago
- Related to Bug #12022: Session crash due wrong rendering added
Updated by Matthias Van Ceulebroeck about 1 year ago
- Related to Bug #9076: Opening popup (calendar) of Wt::WDateEdit fails in Widgetset mode on first render. added
Updated by Matthias Van Ceulebroeck about 1 year ago
- Status changed from New to InProgress
- Assignee set to Matthias Van Ceulebroeck
- Target version changed from 4.11.0 to 4.10.2
Updated by Matthias Van Ceulebroeck about 1 year ago
- Status changed from InProgress to Review
- Assignee deleted (
Matthias Van Ceulebroeck)
Updated by Matthias Van Ceulebroeck about 1 year ago
- Target version changed from 4.10.2 to 4.10.3
Updated by Matthias Van Ceulebroeck about 1 year ago
- Assignee set to Korneel Dumon
Updated by Matthias Van Ceulebroeck 12 months ago
- Status changed from Review to Implemented @Emweb
- Assignee changed from Korneel Dumon to Matthias Van Ceulebroeck
Updated by Matthias Van Ceulebroeck 3 months ago
- Status changed from Implemented @Emweb to Closed