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

Unified Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 2172133002: Fix a crash caused by changing dir attribute of a slot element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/shadow-dom/crashes/slot-dir-attribute-crash.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
index c65115f04480fb2aae2393bbd052934002cd2aa6..4c111901082e2e9a51685be609f01ed2c50b584f 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -777,6 +777,8 @@ void HTMLElement::dirAttributeChanged(const AtomicString& value)
{
// If an ancestor has dir=auto, and this node has the first character,
// changes to dir attribute may affect the ancestor.
+ if (!canParticipateInFlatTree())
+ return;
kochi 2016/07/22 07:41:33 nit: The comment above and these 2 lines are not r
hayato 2016/07/22 09:59:36 Ah. Thanks, but I did not think so. I thought that
updateDistribution();
Element* parent = FlatTreeTraversal::parentElement(*this);
if (parent && parent->isHTMLElement() && toHTMLElement(parent)->selfOrAncestorHasDirAutoAttribute())
« no previous file with comments | « third_party/WebKit/LayoutTests/shadow-dom/crashes/slot-dir-attribute-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698