Changeset 176294 in webkit
- Timestamp:
- Nov 18, 2014, 4:20:07 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/autofocus-in-sandbox-with-allow-scripts.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r176287 r176294 1 2014-11-18 Andreas Kling <akling@apple.com> 2 3 Avoid synchronous style recalc in Document.activeElement 4 <https://webkit.org/b/138850> 5 6 Reviewed by Ryosuke Niwa. 7 8 Tweak a test to run once the DOM is loaded instead of during parsing. 9 10 * fast/forms/autofocus-in-sandbox-with-allow-scripts.html: 11 1 12 2014-11-18 David Hyatt <hyatt@apple.com> 2 13 -
trunk/LayoutTests/fast/forms/autofocus-in-sandbox-with-allow-scripts.html
r127481 r176294 6 6 (which it would be if the sandbox didn't allow autofocus although allow-scripts flag is set). 7 7 <iframe sandbox="allow-scripts" 8 src="data:text/html,<input autofocus onfocus><script> alert(document.activeElement.tagName)</script>"></iframe>8 src="data:text/html,<input autofocus onfocus><script>window.onload = function() { alert(document.activeElement.tagName) }</script>"></iframe> -
trunk/Source/WebCore/ChangeLog
r176293 r176294 1 2014-11-18 Andreas Kling <akling@apple.com> 2 3 Avoid synchronous style recalc in Document.activeElement 4 <https://webkit.org/b/138850> 5 6 Reviewed by Ryosuke Niwa. 7 8 This subtly changes the behavior of <input autofocus>, which was caught by 9 a layout test. Auto-focus doesn't happen until the render tree is attached, 10 although it was possible to force it by accessing document.activeElement. 11 12 Now auto-focus is always lazy. This is consistent with other browser engines. 13 14 ~1% progression on Speedometer locally. 15 16 * dom/Document.cpp: 17 (WebCore::Document::activeElement): 18 1 19 2014-11-18 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebCore/dom/Document.cpp
r176174 r176294 6316 6316 Element* Document::activeElement() 6317 6317 { 6318 updateStyleIfNeeded();6319 6318 if (Element* element = treeScope().focusedElement()) 6320 6319 return element;
Note:
See TracChangeset
for help on using the changeset viewer.