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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 1628283002: posinset and setsize for input type, radio, exposed in AX tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed review comments Created 4 years, 10 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "core/layout/LayoutBlockFlow.h" 31 #include "core/layout/LayoutBlockFlow.h"
32 32
33 #include "core/InputTypeNames.h"
33 #include "core/dom/AXObjectCache.h" 34 #include "core/dom/AXObjectCache.h"
34 #include "core/frame/FrameView.h" 35 #include "core/frame/FrameView.h"
35 #include "core/frame/LocalFrame.h" 36 #include "core/frame/LocalFrame.h"
36 #include "core/frame/Settings.h" 37 #include "core/frame/Settings.h"
37 #include "core/html/HTMLDialogElement.h" 38 #include "core/html/HTMLDialogElement.h"
39 #include "core/html/HTMLInputElement.h"
38 #include "core/layout/HitTestLocation.h" 40 #include "core/layout/HitTestLocation.h"
39 #include "core/layout/LayoutAnalyzer.h" 41 #include "core/layout/LayoutAnalyzer.h"
40 #include "core/layout/LayoutFlowThread.h" 42 #include "core/layout/LayoutFlowThread.h"
41 #include "core/layout/LayoutMultiColumnFlowThread.h" 43 #include "core/layout/LayoutMultiColumnFlowThread.h"
42 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" 44 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h"
43 #include "core/layout/LayoutPagedFlowThread.h" 45 #include "core/layout/LayoutPagedFlowThread.h"
44 #include "core/layout/LayoutText.h" 46 #include "core/layout/LayoutText.h"
45 #include "core/layout/LayoutView.h" 47 #include "core/layout/LayoutView.h"
46 #include "core/layout/TextAutosizer.h" 48 #include "core/layout/TextAutosizer.h"
47 #include "core/layout/api/SelectionState.h" 49 #include "core/layout/api/SelectionState.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 layer->updateDescendantDependentFlags(); 314 layer->updateDescendantDependentFlags();
313 hasVisibleContent = layer->hasVisibleContent(); 315 hasVisibleContent = layer->hasVisibleContent();
314 } 316 }
315 if (hasVisibleContent) 317 if (hasVisibleContent)
316 setShouldInvalidateOverflowForPaint(); 318 setShouldInvalidateOverflowForPaint();
317 } 319 }
318 320
319 if (isHTMLDialogElement(node()) && isOutOfFlowPositioned()) 321 if (isHTMLDialogElement(node()) && isOutOfFlowPositioned())
320 positionDialog(); 322 positionDialog();
321 323
324 if (isHTMLInputElement(node()) && toHTMLInputElement(*node()).type() == Inpu tTypeNames::radio)
keishi 2016/02/16 02:22:47 We try to avoid the "if (input.type==foo) input.ba
je_julie(Not used) 2016/02/16 05:19:03 OK. I'll update it on next patch.
325 toHTMLInputElement(*node()).needUpdatePositionOfRadioGroup();
326
322 clearNeedsLayout(); 327 clearNeedsLayout();
323 } 328 }
324 329
325 inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit & pageLogicalHeight, SubtreeLayoutScope& layoutScope) 330 inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit & pageLogicalHeight, SubtreeLayoutScope& layoutScope)
326 { 331 {
327 LayoutUnit oldLeft = logicalLeft(); 332 LayoutUnit oldLeft = logicalLeft();
328 bool logicalWidthChanged = updateLogicalWidthAndColumnWidth(); 333 bool logicalWidthChanged = updateLogicalWidthAndColumnWidth();
329 relayoutChildren |= logicalWidthChanged; 334 relayoutChildren |= logicalWidthChanged;
330 335
331 rebuildFloatsFromIntruding(); 336 rebuildFloatsFromIntruding();
(...skipping 2526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2858 FrameView* frameView = document().view(); 2863 FrameView* frameView = document().view();
2859 LayoutUnit top = LayoutUnit((style()->position() == FixedPosition) ? 0 : fra meView->scrollOffset().height()); 2864 LayoutUnit top = LayoutUnit((style()->position() == FixedPosition) ? 0 : fra meView->scrollOffset().height());
2860 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 2865 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
2861 if (size().height() < visibleHeight) 2866 if (size().height() < visibleHeight)
2862 top += (visibleHeight - size().height()) / 2; 2867 top += (visibleHeight - size().height()) / 2;
2863 setY(top); 2868 setY(top);
2864 dialog->setCentered(top); 2869 dialog->setCentered(top);
2865 } 2870 }
2866 2871
2867 } // namespace blink 2872 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698