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

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

Issue 15159008: Node::lazyAttach shouldn't lie about being attached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missing commit Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 FloatPoint absolutePoint(0, scrollTop); 95 FloatPoint absolutePoint(0, scrollTop);
96 int visibleHeight = frameView->visibleContentRect(ScrollableArea::IncludeScr ollbars).height(); 96 int visibleHeight = frameView->visibleContentRect(ScrollableArea::IncludeScr ollbars).height();
97 if (box->height() < visibleHeight) 97 if (box->height() < visibleHeight)
98 absolutePoint.move(0, (visibleHeight - box->height()) / 2); 98 absolutePoint.move(0, (visibleHeight - box->height()) / 2);
99 FloatPoint localPoint = box->containingBlock()->absoluteToLocal(absolutePoin t); 99 FloatPoint localPoint = box->containingBlock()->absoluteToLocal(absolutePoin t);
100 100
101 m_top = localPoint.y(); 101 m_top = localPoint.y();
102 m_topIsValid = true; 102 m_topIsValid = true;
103 103
104 // FIXME: It's inefficient to reattach here. We could do better by mutating style directly and forcing another layout. 104 // FIXME: It's inefficient to reattach here. We could do better by mutating style directly and forcing another layout.
105 reattach(); 105 lazyReattach();
106 } 106 }
107 107
108 void HTMLDialogElement::show() 108 void HTMLDialogElement::show()
109 { 109 {
110 if (fastHasAttribute(openAttr)) 110 if (fastHasAttribute(openAttr))
111 return; 111 return;
112 setBooleanAttribute(openAttr, true); 112 setBooleanAttribute(openAttr, true);
113 positionAndReattach(); 113 positionAndReattach();
114 } 114 }
115 115
(...skipping 12 matching lines...) Expand all
128 { 128 {
129 // FIXME: Workaround for <https://bugs.webkit.org/show_bug.cgi?id=91058>: mo difying an attribute for which there is an attribute selector 129 // FIXME: Workaround for <https://bugs.webkit.org/show_bug.cgi?id=91058>: mo difying an attribute for which there is an attribute selector
130 // in html.css sometimes does not trigger a style recalc. 130 // in html.css sometimes does not trigger a style recalc.
131 if (name == openAttr) 131 if (name == openAttr)
132 return true; 132 return true;
133 133
134 return HTMLElement::isPresentationAttribute(name); 134 return HTMLElement::isPresentationAttribute(name);
135 } 135 }
136 136
137 } // namespace WebCore 137 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698