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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp

Issue 2336693002: Rendering text to a canvas in a frame-less document. (Closed)
Patch Set: Adding the failed tests to TestExpectations for Mac. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * Copyright (C) 2015 Collabora Ltd. All rights reserved. 5 * Copyright (C) 2015 Collabora Ltd. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 20 matching lines...) Expand all
31 #include "core/style/ComputedStyle.h" 31 #include "core/style/ComputedStyle.h"
32 #include "platform/FontFamilyNames.h" 32 #include "platform/FontFamilyNames.h"
33 #include "platform/fonts/FontDescription.h" 33 #include "platform/fonts/FontDescription.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 FontBuilder::FontBuilder(const Document& document) 37 FontBuilder::FontBuilder(const Document& document)
38 : m_document(&document) 38 : m_document(&document)
39 , m_flags(0) 39 , m_flags(0)
40 { 40 {
41 ASSERT(document.frame());
42 } 41 }
43 42
44 void FontBuilder::setInitial(float effectiveZoom) 43 void FontBuilder::setInitial(float effectiveZoom)
45 { 44 {
46 ASSERT(m_document->settings()); 45 ASSERT(m_document->settings());
47 if (!m_document->settings()) 46 if (!m_document->settings())
48 return; 47 return;
49 48
50 setFamilyDescription(m_fontDescription, FontBuilder::initialFamilyDescriptio n()); 49 setFamilyDescription(m_fontDescription, FontBuilder::initialFamilyDescriptio n());
51 setSize(m_fontDescription, FontBuilder::initialSize()); 50 setSize(m_fontDescription, FontBuilder::initialSize());
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 setSize(fontDescription, FontDescription::Size(FontSize::initialKeywordSize( ), 0.0f, false)); 404 setSize(fontDescription, FontDescription::Size(FontSize::initialKeywordSize( ), 0.0f, false));
406 updateSpecifiedSize(fontDescription, documentStyle); 405 updateSpecifiedSize(fontDescription, documentStyle);
407 updateComputedSize(fontDescription, documentStyle); 406 updateComputedSize(fontDescription, documentStyle);
408 407
409 updateOrientation(fontDescription, documentStyle); 408 updateOrientation(fontDescription, documentStyle);
410 documentStyle.setFontDescription(fontDescription); 409 documentStyle.setFontDescription(fontDescription);
411 documentStyle.font().update(fontSelector); 410 documentStyle.font().update(fontSelector);
412 } 411 }
413 412
414 } // namespace blink 413 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698