Adds functions for skipping child component layout measuring.
Removes unnecessary code from VScrollTable.
1. case: no components
- render time without the fix: ~105ms
- render time with fix: ~105ms
2. case: 2 button and 2 textfield cols
- render time without the fix: ~279ms
- render time with fix: ~240ms (~17% faster)
3. case: 3 button and 3 textfield cols
- render time without the fix: ~350ms
- render time with fix: ~281ms (~20% faster)
Change-Id: I6025f8ee2fd438d228ff3b65f43535961cf12c0b
This change removes the method LayoutDependenyTree.setNeedsMeasure which
takes a connectorId as first param.
In all places where it is used, the ComponentConnector is actually known,
so this change avoids looking it up over and over again.
Also The lookup would need to lookup the ConnectorMap every time.
Change-Id: I2593b0bede05cd69889ba68aac854cfba43f70b1
LayoutManager uses shortcut when delaying overflow fixes (#16963).
This change introduces an extracted method which will quick return if
a component needs a delayedOverflowFix.
Change-Id: I0d6ab100964a59e2f445a81271863a8212538d4d
LayoutManager reuses shortcut Element instance for measure (#16964).
This change prevents the duplicate getter chain lookup
connector.getWidget().getElement() on the very hot measureConnector
method.
Change-Id: Ia59c9ef2e6bbcf9402424bc565bc9ee3977e3c6e
Fix for 'Aborting layout after 100 passess' (#13359)
'Aborting layout after 100 passes.' is caused by LayoutManager falling
into a loop on rounding fractional layout slot sizes up and down while
trying to fit layout's content in the space available. LayoutManager
round always up, that causes this issue with IE9+ and Chrome. This
change helps LayoutManager to round fractional sizes down for browsers
that causes problems if rounded up.
Browsers may fall into the loop especially with a zoom level other than
100%. Not with any zoom level though. Problematic zoom level varies by
browser. OrderedLayoutExpandTest uses zoom levels other than 100%. Test
for Chrome is the only one that really is able to reproduce error
without the fix. IE9/10 would too, but the zoom level could not be set
exactly to the required 95% for IE. Test works best as a regression test
for other browsers.
Change-Id: Ie840b074df5fed5ea3b15fba9a6fd372a5c0b76a
Revert "Assert that connector needing layout is attached (#11698)"
This reverts commit cb7b02d4e5
The assert is not a good idea because it is triggered when a connector registers a dependency in its init method.
Merge: no
Change-Id: I1f5a99af8f0af7b3329a1a596073ba09e55e18dc
Revert "Assert that connector needing layout is attached (#11698)"
This reverts commit cb7b02d4e5
The assert is not a good idea because it is triggered when a connector registers a dependency in its init method.
Change-Id: I3709c4749927e0333b7557cf553080b770639e50
* Unless there's a ElementResizeListener or a registered dependency,
only ManagedLayouts and children of ManagedLayouts are measured
* Add assertions to help detect situations where measurements are
requested for elements that are not measured
Change-Id: Idde40476040880afd069147074083b60550d9404