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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 758073003: Always propagate direction and writing-mode from <body>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added XML and overconstraining tests. Created 6 years, 1 month 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 | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index cd4f778df1e55209db6b091cf0ee98cfd6374952..21824f0717ab73c4a1303194637837fb2495a7cf 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -519,12 +519,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForDocument(Document& document)
return documentStyle.release();
}
-static inline void resetDirectionAndWritingModeOnDocument(Document& document)
-{
- document.setDirectionSetOnDocumentElement(false);
- document.setWritingModeSetOnDocumentElement(false);
-}
-
static void addContentAttrValuesToFeatures(const Vector<AtomicString>& contentAttrValues, RuleFeatureSet& features)
{
for (size_t i = 0; i < contentAttrValues.size(); ++i)
@@ -569,8 +563,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
StyleResolverParentScope::ensureParentStackIsPushed();
- if (element == document().documentElement())
- resetDirectionAndWritingModeOnDocument(document());
StyleResolverState state(document(), element, defaultParent);
if (sharingBehavior == AllowStyleSharing && state.parentStyle()) {
@@ -673,8 +665,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element& element, const
ASSERT(document().settings());
ASSERT(!hasPendingAuthorStyleSheets());
- if (&element == document().documentElement())
- resetDirectionAndWritingModeOnDocument(document());
StyleResolverState state(document(), &element, parentStyle);
MatchResult result;
@@ -872,7 +862,6 @@ PassRefPtr<RenderStyle> StyleResolver::pseudoStyleForElement(Element* element, c
PassRefPtr<RenderStyle> StyleResolver::styleForPage(int pageIndex)
{
ASSERT(!hasPendingAuthorStyleSheets());
- resetDirectionAndWritingModeOnDocument(document());
StyleResolverState state(document(), document().documentElement()); // m_rootElementStyle will be set to the document style.
RefPtr<RenderStyle> style = RenderStyle::create();
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698