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

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 16081003: [CSS] -webkit-var must be case sensitive according to specs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use foreground color to render overtype caret Created 7 years, 6 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/core/rendering/RenderView.h ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #include "config.h" 21 #include "config.h"
22 #include "core/rendering/RenderView.h" 22 #include "core/rendering/RenderView.h"
23 23
24 #include "core/dom/Document.h" 24 #include "core/dom/Document.h"
25 #include "core/dom/Element.h" 25 #include "core/dom/Element.h"
26 #include "core/editing/FrameSelection.h"
26 #include "core/html/HTMLFrameOwnerElement.h" 27 #include "core/html/HTMLFrameOwnerElement.h"
27 #include "core/html/HTMLIFrameElement.h" 28 #include "core/html/HTMLIFrameElement.h"
28 #include "core/page/Frame.h" 29 #include "core/page/Frame.h"
29 #include "core/page/FrameView.h" 30 #include "core/page/FrameView.h"
30 #include "core/page/Page.h" 31 #include "core/page/Page.h"
31 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h" 32 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h"
32 #include "core/platform/graphics/FloatQuad.h" 33 #include "core/platform/graphics/FloatQuad.h"
33 #include "core/platform/graphics/GraphicsContext.h" 34 #include "core/platform/graphics/GraphicsContext.h"
34 #include "core/platform/graphics/transforms/TransformState.h" 35 #include "core/platform/graphics/transforms/TransformState.h"
35 #include "core/rendering/ColumnInfo.h" 36 #include "core/rendering/ColumnInfo.h"
(...skipping 17 matching lines...) Expand all
53 , m_selectionStartPos(-1) 54 , m_selectionStartPos(-1)
54 , m_selectionEndPos(-1) 55 , m_selectionEndPos(-1)
55 , m_maximalOutlineSize(0) 56 , m_maximalOutlineSize(0)
56 , m_pageLogicalHeight(0) 57 , m_pageLogicalHeight(0)
57 , m_pageLogicalHeightChanged(false) 58 , m_pageLogicalHeightChanged(false)
58 , m_layoutState(0) 59 , m_layoutState(0)
59 , m_layoutStateDisableCount(0) 60 , m_layoutStateDisableCount(0)
60 , m_firstLazyBlock(0) 61 , m_firstLazyBlock(0)
61 , m_renderQuoteHead(0) 62 , m_renderQuoteHead(0)
62 , m_renderCounterCount(0) 63 , m_renderCounterCount(0)
64 , m_selectionWasCaret(false)
63 { 65 {
64 // init RenderObject attributes 66 // init RenderObject attributes
65 setInline(false); 67 setInline(false);
66 68
67 m_minPreferredLogicalWidth = 0; 69 m_minPreferredLogicalWidth = 0;
68 m_maxPreferredLogicalWidth = 0; 70 m_maxPreferredLogicalWidth = 0;
69 71
70 setPreferredLogicalWidthsDirty(true, MarkOnlyThis); 72 setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
71 73
72 setPositionState(AbsolutePosition); // to 0,0 :) 74 setPositionState(AbsolutePosition); // to 0,0 :)
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 665 }
664 } 666 }
665 667
666 void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e nd, int endPos, SelectionRepaintMode blockRepaintMode) 668 void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e nd, int endPos, SelectionRepaintMode blockRepaintMode)
667 { 669 {
668 // Make sure both our start and end objects are defined. 670 // Make sure both our start and end objects are defined.
669 // Check www.msnbc.com and try clicking around to find the case where this h appened. 671 // Check www.msnbc.com and try clicking around to find the case where this h appened.
670 if ((start && !end) || (end && !start)) 672 if ((start && !end) || (end && !start))
671 return; 673 return;
672 674
675 bool caretChanged = m_selectionWasCaret != view()->frame()->selection()->isC aret();
676 m_selectionWasCaret = view()->frame()->selection()->isCaret();
673 // Just return if the selection hasn't changed. 677 // Just return if the selection hasn't changed.
674 if (m_selectionStart == start && m_selectionStartPos == startPos && 678 if (m_selectionStart == start && m_selectionStartPos == startPos &&
675 m_selectionEnd == end && m_selectionEndPos == endPos) 679 m_selectionEnd == end && m_selectionEndPos == endPos && !caretChanged)
676 return; 680 return;
677 681
678 if ((start && end) && (start->flowThreadContainingBlock() != end->flowThread ContainingBlock())) 682 if ((start && end) && (start->flowThreadContainingBlock() != end->flowThread ContainingBlock()))
679 return; 683 return;
680 684
681 // Record the old selected objects. These will be used later 685 // Record the old selected objects. These will be used later
682 // when we compare against the new selected objects. 686 // when we compare against the new selected objects.
683 int oldStartPos = m_selectionStartPos; 687 int oldStartPos = m_selectionStartPos;
684 int oldEndPos = m_selectionEndPos; 688 int oldEndPos = m_selectionEndPos;
685 689
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 #endif 1145 #endif
1142 1146
1143 if (layoutState) 1147 if (layoutState)
1144 layoutState->m_isPaginated = m_fragmenting; 1148 layoutState->m_isPaginated = m_fragmenting;
1145 1149
1146 if (m_flowThreadState != RenderObject::NotInsideFlowThread) 1150 if (m_flowThreadState != RenderObject::NotInsideFlowThread)
1147 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); 1151 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
1148 } 1152 }
1149 1153
1150 } // namespace WebCore 1154 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698