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

Side by Side Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 1212373003: Devtools [LayouEditor]: Show label with size info (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 5 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/inspector/InspectorPageAgent.h ('k') | Source/core/inspector/LayoutEditor.h » ('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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 { 787 {
788 if (!inspectedFrame()->isMainFrame()) 788 if (!inspectedFrame()->isMainFrame())
789 return; 789 return;
790 #if !OS(ANDROID) 790 #if !OS(ANDROID)
791 if (m_enabled && m_state->getBoolean(PageAgentState::showSizeOnResize)) 791 if (m_enabled && m_state->getBoolean(PageAgentState::showSizeOnResize))
792 m_overlay->showAndHideViewSize(m_state->getBoolean(PageAgentState::showG ridOnResize)); 792 m_overlay->showAndHideViewSize(m_state->getBoolean(PageAgentState::showG ridOnResize));
793 #endif 793 #endif
794 frontend()->frameResized(); 794 frontend()->frameResized();
795 } 795 }
796 796
797 void InspectorPageAgent::didRecalculateStyle(int)
798 {
799 if (m_enabled)
800 m_overlay->update();
801 }
802
803 PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Loc alFrame* frame) 797 PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Loc alFrame* frame)
804 { 798 {
805 RefPtr<TypeBuilder::Page::Frame> frameObject = TypeBuilder::Page::Frame::cre ate() 799 RefPtr<TypeBuilder::Page::Frame> frameObject = TypeBuilder::Page::Frame::cre ate()
806 .setId(frameId(frame)) 800 .setId(frameId(frame))
807 .setLoaderId(InspectorIdentifiers<DocumentLoader>::identifier(frame->loa der().documentLoader())) 801 .setLoaderId(InspectorIdentifiers<DocumentLoader>::identifier(frame->loa der().documentLoader()))
808 .setUrl(urlWithoutFragment(frame->document()->url()).string()) 802 .setUrl(urlWithoutFragment(frame->document()->url()).string())
809 .setMimeType(frame->loader().documentLoader()->responseMIMEType()) 803 .setMimeType(frame->loader().documentLoader()->responseMIMEType())
810 .setSecurityOrigin(frame->document()->securityOrigin()->toRawString()); 804 .setSecurityOrigin(frame->document()->securityOrigin()->toRawString());
811 // FIXME: This doesn't work for OOPI. 805 // FIXME: This doesn't work for OOPI.
812 Frame* parentFrame = frame->tree().parent(); 806 Frame* parentFrame = frame->tree().parent();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 { 884 {
891 visitor->trace(m_inspectedFrame); 885 visitor->trace(m_inspectedFrame);
892 visitor->trace(m_debuggerAgent); 886 visitor->trace(m_debuggerAgent);
893 visitor->trace(m_cssAgent); 887 visitor->trace(m_cssAgent);
894 visitor->trace(m_overlay); 888 visitor->trace(m_overlay);
895 visitor->trace(m_inspectorResourceContentLoader); 889 visitor->trace(m_inspectorResourceContentLoader);
896 InspectorBaseAgent::trace(visitor); 890 InspectorBaseAgent::trace(visitor);
897 } 891 }
898 892
899 } // namespace blink 893 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/core/inspector/LayoutEditor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698