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

Unified Diff: Source/core/dom/Document.cpp

Issue 183883009: Revert of Don't setStyle the RenderView every style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « no previous file | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index b698359de2bfac80ad6a87880b71b9e082b83002..9cd3a9f7679d3c1801f958ac83661fa97b265316 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1660,32 +1660,28 @@
documentElement()->setNeedsStyleRecalc(SubtreeStyleChange);
}
- EOverflow overflowX = OAUTO;
- EOverflow overflowY = OAUTO;
- float columnGap = 0;
- if (overflowStyle) {
- overflowX = overflowStyle->overflowX();
- overflowY = overflowStyle->overflowY();
- // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto':
- if (overflowX == OVISIBLE)
- overflowX = OAUTO;
- if (overflowY == OVISIBLE)
- overflowY = OAUTO;
- // Column-gap is (ab)used by the current paged overflow implementation (in lack of other
- // ways to specify gaps between pages), so we have to propagate it too.
- columnGap = overflowStyle->columnGap();
- }
-
RefPtr<RenderStyle> documentStyle = renderView()->style();
if (documentStyle->writingMode() != rootWritingMode
|| documentStyle->direction() != rootDirection
- || documentStyle->overflowX() != overflowX
- || documentStyle->overflowY() != overflowY
- || documentStyle->columnGap() != columnGap) {
+ || (overflowStyle && (documentStyle->overflowX() != overflowStyle->overflowX() || documentStyle->overflowY() != overflowStyle->overflowY()))) {
RefPtr<RenderStyle> newStyle = RenderStyle::clone(documentStyle.get());
newStyle->setWritingMode(rootWritingMode);
newStyle->setDirection(rootDirection);
- newStyle->setColumnGap(columnGap);
+ EOverflow overflowX = OAUTO;
+ EOverflow overflowY = OAUTO;
+ if (overflowStyle) {
+ overflowX = overflowStyle->overflowX();
+ overflowY = overflowStyle->overflowY();
+ // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto':
+ if (overflowX == OVISIBLE)
+ overflowX = OAUTO;
+ if (overflowY == OVISIBLE)
+ overflowY = OAUTO;
+
+ // Column-gap is (ab)used by the current paged overflow implementation (in lack of other
+ // ways to specify gaps between pages), so we have to propagate it too.
+ newStyle->setColumnGap(overflowStyle->columnGap());
+ }
newStyle->setOverflowX(overflowX);
newStyle->setOverflowY(overflowY);
renderView()->setStyle(newStyle);
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698