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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 197313003: Fix TextAutosizer recalculate multipliers on rotate. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed some layout Created 6 years, 9 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/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 0cccefc3137c37b4e10083d5ae1a8fe0f3bf09f8..7c54f7f0164bfb9423c9a61b87e5cbc8024440f7 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -373,15 +373,10 @@ void FrameView::setFrameRect(const IntRect& newRect)
// Autosized font sizes depend on the width of the viewing area.
if (newRect.width() != oldRect.width()) {
- if (isMainFrame()) {
- Page* page = m_frame->page();
- bool textAutosizingEnabled = m_frame->settings()->textAutosizingEnabled();
- if (textAutosizingEnabled) {
- TextAutosizer* textAutosizer = m_frame->document()->textAutosizer();
- if (textAutosizer) {
- for (LocalFrame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext())
- textAutosizer->recalculateMultipliers();
- }
+ if (isMainFrame() && m_frame->settings()->textAutosizingEnabled()) {
+ for (LocalFrame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext()) {
+ if (TextAutosizer* textAutosizer = frame->document()->textAutosizer())
+ textAutosizer->recalculateMultipliers();
}
}
}
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698