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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index 6f8080da82b2addb719b100abbea711adad4b861..65036275b3add7a3a144282b86ff239137fa0feb 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -2038,7 +2038,7 @@ void InspectorCSSAgent::getBackgroundColors(ErrorString* errorString, int nodeId
return;
}
Document& document = element->document();
- bool isMainFrame = !document.ownerElement();
+ bool isMainFrame = document.isInMainFrame();
bool foundOpaqueColor = false;
if (isMainFrame && !view->isTransparent()) {
// Start with the "default" page color (typically white).
@@ -2050,9 +2050,9 @@ void InspectorCSSAgent::getBackgroundColors(ErrorString* errorString, int nodeId
foundOpaqueColor = getColorsFromRect(textBounds, element->document(), element, colors);
if (!foundOpaqueColor && !isMainFrame) {
- for (HTMLFrameOwnerElement* ownerElement = document.ownerElement();
+ for (HTMLFrameOwnerElement* ownerElement = document.localOwner();
!foundOpaqueColor && ownerElement;
- ownerElement = ownerElement->document().ownerElement()) {
+ ownerElement = ownerElement->document().localOwner()) {
foundOpaqueColor = getColorsFromRect(textBounds, ownerElement->document(), nullptr, colors);
}
}

Powered by Google App Engine
This is Rietveld 408576698