summaryrefslogtreecommitdiffstats
path: root/dom/base/nsDOMWindowUtils.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 05:10:25 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 05:10:25 -0400
commit7614fdb51b177e6975fce5bf9a7facef170e61aa (patch)
tree598e187ce71ae82b300a3a6b6b2f199aa2f3c43d /dom/base/nsDOMWindowUtils.cpp
parent5f297c5f57583b0f9d27d714beb285919f42d655 (diff)
downloadUXP-7614fdb51b177e6975fce5bf9a7facef170e61aa.tar
UXP-7614fdb51b177e6975fce5bf9a7facef170e61aa.tar.gz
UXP-7614fdb51b177e6975fce5bf9a7facef170e61aa.tar.lz
UXP-7614fdb51b177e6975fce5bf9a7facef170e61aa.tar.xz
UXP-7614fdb51b177e6975fce5bf9a7facef170e61aa.zip
Bug 1355351 - Make pseudo-elements return the correct style via getComputedStyle
* Add a node property to access the ::before and ::after pseudo-elements * Look for the frame for ::before and ::after pseudos * Clean up pseudo-element props * Simplify nsLayoutUtils callers, and make child iterators notice display: contents pseudos Tag #1375
Diffstat (limited to 'dom/base/nsDOMWindowUtils.cpp')
-rw-r--r--dom/base/nsDOMWindowUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
index 2ab5937ac..3f5b54c94 100644
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -3657,11 +3657,11 @@ nsDOMWindowUtils::GetOMTAStyle(nsIDOMElement* aElement,
RefPtr<nsROCSSPrimitiveValue> cssValue = nullptr;
nsIFrame* frame = element->GetPrimaryFrame();
- if (frame && !aPseudoElement.IsEmpty()) {
+ if (!aPseudoElement.IsEmpty()) {
if (aPseudoElement.EqualsLiteral("::before")) {
- frame = nsLayoutUtils::GetBeforeFrame(frame);
+ frame = nsLayoutUtils::GetBeforeFrame(element);
} else if (aPseudoElement.EqualsLiteral("::after")) {
- frame = nsLayoutUtils::GetAfterFrame(frame);
+ frame = nsLayoutUtils::GetAfterFrame(element);
} else {
return NS_ERROR_INVALID_ARG;
}