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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 1330233003: Revert of Avoid style clobbering in setCompositionFromExistingText. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2566 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 } 2577 }
2578 2578
2579 bool WebViewImpl::isSelectionAnchorFirst() const 2579 bool WebViewImpl::isSelectionAnchorFirst() const
2580 { 2580 {
2581 const Frame* frame = focusedCoreFrame(); 2581 const Frame* frame = focusedCoreFrame();
2582 if (!frame || frame->isRemoteFrame()) 2582 if (!frame || frame->isRemoteFrame())
2583 return false; 2583 return false;
2584 return toLocalFrame(frame)->selection().selection().isBaseFirst(); 2584 return toLocalFrame(frame)->selection().selection().isBaseFirst();
2585 } 2585 }
2586 2586
2587 WebVector<WebCompositionUnderline> WebViewImpl::compositionUnderlines() const
2588 {
2589 const LocalFrame* focused = toLocalFrame(focusedCoreFrame());
2590 if (!focused)
2591 return WebVector<WebCompositionUnderline>();
2592 const Vector<CompositionUnderline>& underlines = focused->inputMethodControl ler().customCompositionUnderlines();
2593 WebVector<WebCompositionUnderline> results(underlines.size());
2594 for (size_t index = 0; index < underlines.size(); ++index) {
2595 CompositionUnderline underline = underlines[index];
2596 results[index] = WebCompositionUnderline(underline.startOffset, underlin e.endOffset, static_cast<WebColor>(underline.color.rgb()), underline.thick, stat ic_cast<WebColor>(underline.backgroundColor.rgb()));
2597 }
2598 return results;
2599 }
2600
2587 WebColor WebViewImpl::backgroundColor() const 2601 WebColor WebViewImpl::backgroundColor() const
2588 { 2602 {
2589 if (isTransparent()) 2603 if (isTransparent())
2590 return Color::transparent; 2604 return Color::transparent;
2591 if (!m_page) 2605 if (!m_page)
2592 return m_baseBackgroundColor; 2606 return m_baseBackgroundColor;
2593 if (!m_page->mainFrame()) 2607 if (!m_page->mainFrame())
2594 return m_baseBackgroundColor; 2608 return m_baseBackgroundColor;
2595 if (!m_page->mainFrame()->isLocalFrame()) 2609 if (!m_page->mainFrame()->isLocalFrame())
2596 return m_baseBackgroundColor; 2610 return m_baseBackgroundColor;
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
4402 if (m_pageColorOverlay) 4416 if (m_pageColorOverlay)
4403 m_pageColorOverlay->update(); 4417 m_pageColorOverlay->update();
4404 if (m_inspectorOverlay) { 4418 if (m_inspectorOverlay) {
4405 PageOverlay* inspectorPageOverlay = m_inspectorOverlay->pageOverlay(); 4419 PageOverlay* inspectorPageOverlay = m_inspectorOverlay->pageOverlay();
4406 if (inspectorPageOverlay) 4420 if (inspectorPageOverlay)
4407 inspectorPageOverlay->update(); 4421 inspectorPageOverlay->update();
4408 } 4422 }
4409 } 4423 }
4410 4424
4411 } // namespace blink 4425 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698