Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: Source/core/html/HTMLInputElement.cpp

Issue 15871005: Avoid N^2 walk placing renderers when building the render tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding a mitigation for the perf regression to Element::recalcStyle. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 removeFromRadioButtonGroup(); 1455 removeFromRadioButtonGroup();
1456 HTMLTextFormControlElement::willChangeForm(); 1456 HTMLTextFormControlElement::willChangeForm();
1457 } 1457 }
1458 1458
1459 void HTMLInputElement::didChangeForm() 1459 void HTMLInputElement::didChangeForm()
1460 { 1460 {
1461 HTMLTextFormControlElement::didChangeForm(); 1461 HTMLTextFormControlElement::didChangeForm();
1462 addToRadioButtonGroup(); 1462 addToRadioButtonGroup();
1463 } 1463 }
1464 1464
1465 void HTMLInputElement::addToRadioButtonGroupCallback(Element* element)
1466 {
1467 toHTMLInputElement(element)->addToRadioButtonGroup();
1468 }
1469
1465 Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint) 1470 Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint)
1466 { 1471 {
1467 HTMLTextFormControlElement::insertedInto(insertionPoint); 1472 HTMLTextFormControlElement::insertedInto(insertionPoint);
1468 if (insertionPoint->inDocument() && !form()) 1473 if (insertionPoint->inDocument() && !form() && checkedRadioButtons())
1469 addToRadioButtonGroup(); 1474 queueInsertionCallback(addToRadioButtonGroupCallback, this);
1470 resetListAttributeTargetObserver(); 1475 resetListAttributeTargetObserver();
1471 return InsertionDone; 1476 return InsertionDone;
1472 } 1477 }
1473 1478
1474 void HTMLInputElement::removedFrom(ContainerNode* insertionPoint) 1479 void HTMLInputElement::removedFrom(ContainerNode* insertionPoint)
1475 { 1480 {
1476 if (insertionPoint->inDocument() && !form()) 1481 if (insertionPoint->inDocument() && !form())
1477 removeFromRadioButtonGroup(); 1482 removeFromRadioButtonGroup();
1478 HTMLTextFormControlElement::removedFrom(insertionPoint); 1483 HTMLTextFormControlElement::removedFrom(insertionPoint);
1479 ASSERT(!inDocument()); 1484 ASSERT(!inDocument());
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 } 1915 }
1911 1916
1912 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1917 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1913 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1918 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1914 { 1919 {
1915 return m_inputType->customStyleForRenderer(originalStyleForRenderer()); 1920 return m_inputType->customStyleForRenderer(originalStyleForRenderer());
1916 } 1921 }
1917 #endif 1922 #endif
1918 1923
1919 } // namespace 1924 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698