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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 2647533002: Force compositing inputs to be clean for getBoundingClientRect (Closed)
Patch Set: Finish new ElementTest test, address reviewer comments Created 3 years, 10 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
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 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 event->setDefaultHandled(); 1154 event->setDefaultHandled();
1155 } 1155 }
1156 } 1156 }
1157 1157
1158 const AtomicString& HTMLElement::eventParameterName() { 1158 const AtomicString& HTMLElement::eventParameterName() {
1159 DEFINE_STATIC_LOCAL(const AtomicString, eventString, ("event")); 1159 DEFINE_STATIC_LOCAL(const AtomicString, eventString, ("event"));
1160 return eventString; 1160 return eventString;
1161 } 1161 }
1162 1162
1163 int HTMLElement::offsetLeftForBinding() { 1163 int HTMLElement::offsetLeftForBinding() {
1164 ensureCompositingInputsClean();
1164 Element* offsetParent = unclosedOffsetParent(); 1165 Element* offsetParent = unclosedOffsetParent();
1165 if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) 1166 if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject())
1166 return adjustLayoutUnitForAbsoluteZoom( 1167 return adjustLayoutUnitForAbsoluteZoom(
1167 LayoutUnit(layoutObject->pixelSnappedOffsetLeft(offsetParent)), 1168 LayoutUnit(layoutObject->pixelSnappedOffsetLeft(offsetParent)),
1168 layoutObject->styleRef()) 1169 layoutObject->styleRef())
1169 .round(); 1170 .round();
1170 return 0; 1171 return 0;
1171 } 1172 }
1172 1173
1173 int HTMLElement::offsetTopForBinding() { 1174 int HTMLElement::offsetTopForBinding() {
1175 ensureCompositingInputsClean();
1174 Element* offsetParent = unclosedOffsetParent(); 1176 Element* offsetParent = unclosedOffsetParent();
1175 if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject()) 1177 if (LayoutBoxModelObject* layoutObject = layoutBoxModelObject())
1176 return adjustLayoutUnitForAbsoluteZoom( 1178 return adjustLayoutUnitForAbsoluteZoom(
1177 LayoutUnit(layoutObject->pixelSnappedOffsetTop(offsetParent)), 1179 LayoutUnit(layoutObject->pixelSnappedOffsetTop(offsetParent)),
1178 layoutObject->styleRef()) 1180 layoutObject->styleRef())
1179 .round(); 1181 .round();
1180 return 0; 1182 return 0;
1181 } 1183 }
1182 1184
1183 int HTMLElement::offsetWidthForBinding() { 1185 int HTMLElement::offsetWidthForBinding() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1217
1216 #ifndef NDEBUG 1218 #ifndef NDEBUG
1217 1219
1218 // For use in the debugger 1220 // For use in the debugger
1219 void dumpInnerHTML(blink::HTMLElement*); 1221 void dumpInnerHTML(blink::HTMLElement*);
1220 1222
1221 void dumpInnerHTML(blink::HTMLElement* element) { 1223 void dumpInnerHTML(blink::HTMLElement* element) {
1222 printf("%s\n", element->innerHTML().ascii().data()); 1224 printf("%s\n", element->innerHTML().ascii().data());
1223 } 1225 }
1224 #endif 1226 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698