OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 | 2309 |
2310 WebVector<WebCompositionUnderline> WebViewImpl::compositionUnderlines() const | 2310 WebVector<WebCompositionUnderline> WebViewImpl::compositionUnderlines() const |
2311 { | 2311 { |
2312 const LocalFrame* focused = toLocalFrame(focusedWebCoreFrame()); | 2312 const LocalFrame* focused = toLocalFrame(focusedWebCoreFrame()); |
2313 if (!focused) | 2313 if (!focused) |
2314 return WebVector<WebCompositionUnderline>(); | 2314 return WebVector<WebCompositionUnderline>(); |
2315 const Vector<CompositionUnderline>& underlines = focused->inputMethodControl
ler().customCompositionUnderlines(); | 2315 const Vector<CompositionUnderline>& underlines = focused->inputMethodControl
ler().customCompositionUnderlines(); |
2316 WebVector<WebCompositionUnderline> results(underlines.size()); | 2316 WebVector<WebCompositionUnderline> results(underlines.size()); |
2317 for (size_t index = 0; index < underlines.size(); ++index) { | 2317 for (size_t index = 0; index < underlines.size(); ++index) { |
2318 CompositionUnderline underline = underlines[index]; | 2318 CompositionUnderline underline = underlines[index]; |
2319 results[index] = WebCompositionUnderline(underline.startOffset, underlin
e.endOffset, static_cast<WebColor>(underline.color.rgb()), underline.thick); | 2319 results[index] = WebCompositionUnderline(underline.startOffset, underlin
e.endOffset, static_cast<WebColor>(underline.color.rgb()), underline.thick, stat
ic_cast<WebColor>(underline.backgroundColor.rgb())); |
2320 } | 2320 } |
2321 return results; | 2321 return results; |
2322 } | 2322 } |
2323 | 2323 |
2324 WebColor WebViewImpl::backgroundColor() const | 2324 WebColor WebViewImpl::backgroundColor() const |
2325 { | 2325 { |
2326 if (isTransparent()) | 2326 if (isTransparent()) |
2327 return Color::transparent; | 2327 return Color::transparent; |
2328 if (!m_page) | 2328 if (!m_page) |
2329 return m_baseBackgroundColor; | 2329 return m_baseBackgroundColor; |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4074 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4074 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4075 | 4075 |
4076 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4076 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4077 return false; | 4077 return false; |
4078 | 4078 |
4079 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4079 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4080 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4080 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4081 } | 4081 } |
4082 | 4082 |
4083 } // namespace blink | 4083 } // namespace blink |
OLD | NEW |