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 2552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 } | 2563 } |
2564 | 2564 |
2565 bool WebViewImpl::isSelectionAnchorFirst() const | 2565 bool WebViewImpl::isSelectionAnchorFirst() const |
2566 { | 2566 { |
2567 const Frame* frame = focusedCoreFrame(); | 2567 const Frame* frame = focusedCoreFrame(); |
2568 if (!frame || frame->isRemoteFrame()) | 2568 if (!frame || frame->isRemoteFrame()) |
2569 return false; | 2569 return false; |
2570 return toLocalFrame(frame)->selection().selection().isBaseFirst(); | 2570 return toLocalFrame(frame)->selection().selection().isBaseFirst(); |
2571 } | 2571 } |
2572 | 2572 |
2573 WebVector<WebCompositionUnderline> WebViewImpl::compositionUnderlines() const | |
2574 { | |
2575 const LocalFrame* focused = toLocalFrame(focusedCoreFrame()); | |
2576 if (!focused) | |
2577 return WebVector<WebCompositionUnderline>(); | |
2578 const Vector<CompositionUnderline>& underlines = focused->inputMethodControl
ler().customCompositionUnderlines(); | |
2579 WebVector<WebCompositionUnderline> results(underlines.size()); | |
2580 for (size_t index = 0; index < underlines.size(); ++index) { | |
2581 CompositionUnderline underline = underlines[index]; | |
2582 results[index] = WebCompositionUnderline(underline.startOffset, underlin
e.endOffset, static_cast<WebColor>(underline.color.rgb()), underline.thick, stat
ic_cast<WebColor>(underline.backgroundColor.rgb())); | |
2583 } | |
2584 return results; | |
2585 } | |
2586 | |
2587 WebColor WebViewImpl::backgroundColor() const | 2573 WebColor WebViewImpl::backgroundColor() const |
2588 { | 2574 { |
2589 if (isTransparent()) | 2575 if (isTransparent()) |
2590 return Color::transparent; | 2576 return Color::transparent; |
2591 if (!m_page) | 2577 if (!m_page) |
2592 return m_baseBackgroundColor; | 2578 return m_baseBackgroundColor; |
2593 if (!m_page->mainFrame()) | 2579 if (!m_page->mainFrame()) |
2594 return m_baseBackgroundColor; | 2580 return m_baseBackgroundColor; |
2595 if (!m_page->mainFrame()->isLocalFrame()) | 2581 if (!m_page->mainFrame()->isLocalFrame()) |
2596 return m_baseBackgroundColor; | 2582 return m_baseBackgroundColor; |
(...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4411 if (m_pageColorOverlay) | 4397 if (m_pageColorOverlay) |
4412 m_pageColorOverlay->update(); | 4398 m_pageColorOverlay->update(); |
4413 if (InspectorOverlayImpl* overlay = inspectorOverlay()) { | 4399 if (InspectorOverlayImpl* overlay = inspectorOverlay()) { |
4414 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4400 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
4415 if (inspectorPageOverlay) | 4401 if (inspectorPageOverlay) |
4416 inspectorPageOverlay->update(); | 4402 inspectorPageOverlay->update(); |
4417 } | 4403 } |
4418 } | 4404 } |
4419 | 4405 |
4420 } // namespace blink | 4406 } // namespace blink |
OLD | NEW |