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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@storage
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index e86209842349280f79a9648027506024294764b0..70d9e554dac9f66e06a855261eed2e7a4bb8ab4b 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -609,7 +609,7 @@ LayoutBoxModelObject* Node::layoutBoxModelObject() const
LayoutRect Node::boundingBox() const
{
- if (layoutObject())
+ if (hasLayoutObject())
sashab 2016/07/04 07:57:13 I think you forgot to upload the code for this fun
nainar 2016/07/05 00:26:55 Took a look at this. The code for hasLayoutObject
return LayoutRect(layoutObject()->absoluteBoundingBoxRect());
return LayoutRect();
}
@@ -944,7 +944,7 @@ void Node::detach(const AttachContext& context)
DCHECK(document().lifecycle().stateAllowsDetach());
DocumentLifecycle::DetachScope willDetach(document().lifecycle());
- if (layoutObject())
+ if (hasLayoutObject())
layoutObject()->destroyAndCleanupAnonymousWrappers();
setLayoutObject(nullptr);
setStyleChange(NeedsReattachStyleChange);
@@ -986,7 +986,7 @@ bool Node::canStartSelection() const
if (hasEditableStyle())
return true;
- if (layoutObject()) {
+ if (hasLayoutObject()) {
const ComputedStyle& style = layoutObject()->styleRef();
// We allow selections to begin within an element that has -webkit-user-select: none set,
// but if the element is draggable then dragging should take priority over selection.

Powered by Google App Engine
This is Rietveld 408576698