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

Issue 13771002: Recalc styles on resize if we have viewport units. (Closed)

Created:
7 years, 8 months ago by Timothy Loh
Modified:
7 years, 1 month ago
Reviewers:
esprehn, eseidel1, eseidel
CC:
blink-reviews, Alexis Menard, Julien - ping for review, ojan, tony
Base URL:
https://chromium.googlesource.com/chromium/blink@master
Visibility:
Public.

Description

Recalc styles on resize if we have viewport units. This patch forces style recalcs after resize operations if we have any viewport units. This fixes the issue of having font-size and line-height properties not being updated when we resize, but more importantly sets us up to resolve all viewport units at style calc time and thus remove the various viewport unit types from Length objects, which will fix various interactions with viewport units. BUG=124331

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -6 lines) Patch
A LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-resize-font-size.html View 1 chunk +44 lines, -0 lines 0 comments Download
A LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-resize-font-size-expected.html View 1 chunk +27 lines, -0 lines 0 comments Download
M Source/WebCore/css/CSSGrammar.y.in View 1 chunk +20 lines, -4 lines 0 comments Download
M Source/WebCore/css/StyleSheetContents.h View 3 chunks +3 lines, -0 lines 0 comments Download
M Source/WebCore/css/StyleSheetContents.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/WebCore/dom/Document.cpp View 3 chunks +9 lines, -0 lines 0 comments Download
M Source/WebCore/dom/DocumentStyleSheetCollection.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/WebCore/dom/DocumentStyleSheetCollection.cpp View 3 chunks +11 lines, -0 lines 0 comments Download
M Source/WebCore/page/FrameView.cpp View 1 chunk +8 lines, -2 lines 2 comments Download

Messages

Total messages: 6 (0 generated)
Timothy Loh
Hi Eric, Could you review this patch for me? You've looked at it previously at ...
7 years, 8 months ago (2013-04-08 05:26:05 UTC) #1
eseidel
This seems reasonable to me. CCing other rendering reviewers as well. lgtm.
7 years, 8 months ago (2013-04-09 08:12:06 UTC) #2
esprehn
This doesn't resolve all viewport units at recalc time yet right? I'm concerned this is ...
7 years, 8 months ago (2013-04-09 08:20:27 UTC) #3
esprehn
eseidel and I discussed this and I think we want to not do this change ...
7 years, 8 months ago (2013-04-09 08:34:22 UTC) #4
Timothy Loh
Yes, resolving viewport units at recalc time would be a separate (much larger but mostly ...
7 years, 8 months ago (2013-04-10 01:10:08 UTC) #5
esprehn
7 years, 8 months ago (2013-04-12 03:14:25 UTC) #6
On 2013/04/10 01:10:08, Timothy Loh wrote:
> .. 
> I tend to think that it's better to have things correct and slow rather than
> incorrect and fast, but if this isn't the approach that you guys think is
right
> then perhaps you could make some suggestions on how to make it better? :)

The issue is one of having big foot guns. Right now we're wrong sometimes, but
every page that uses vh and vw isn't super slow.

I'd want to see a long term solution so this "make my page slow" button wasn't
in the tree forever before allowing this kind of change.

Powered by Google App Engine
This is Rietveld 408576698