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

Unified Diff: Source/core/inspector/LayoutEditor.h

Issue 1311783003: Devtools[LayoutEditor]: Rework layout-editor workflow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@resize
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/LayoutEditor.h
diff --git a/Source/core/inspector/LayoutEditor.h b/Source/core/inspector/LayoutEditor.h
index dcf5c7063171a34108b03af4955a6639d580fb3f..220517da83f9f2a270e297e2f141c5520cc31fea 100644
--- a/Source/core/inspector/LayoutEditor.h
+++ b/Source/core/inspector/LayoutEditor.h
@@ -8,7 +8,8 @@
#include "core/CSSPropertyNames.h"
#include "core/CoreExport.h"
#include "core/css/CSSPrimitiveValue.h"
-#include "core/dom/Node.h"
+#include "core/dom/Element.h"
+#include "core/inspector/InspectorHighlight.h"
#include "core/inspector/InspectorOverlayHost.h"
#include "platform/heap/Handle.h"
#include "wtf/PassOwnPtr.h"
@@ -19,24 +20,27 @@ namespace blink {
class CSSPrimitiveValue;
class InspectorCSSAgent;
+class InspectorDOMAgent;
class JSONArray;
class JSONObject;
class CORE_EXPORT LayoutEditor final: public NoBaseWillBeGarbageCollectedFinalized<LayoutEditor>, public InspectorOverlayHost::LayoutEditorListener {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LayoutEditor);
public:
- static PassOwnPtrWillBeRawPtr<LayoutEditor> create(InspectorCSSAgent* cssAgent)
+ static PassOwnPtrWillBeRawPtr<LayoutEditor> create(InspectorCSSAgent* cssAgent, InspectorDOMAgent* domAgent)
{
- return adoptPtrWillBeNoop(new LayoutEditor(cssAgent));
+ return adoptPtrWillBeNoop(new LayoutEditor(cssAgent, domAgent));
}
void setNode(Node*);
+ Node* node() { return m_element.get(); }
PassRefPtr<JSONObject> buildJSONInfo() const;
-
+ void setHighlightConfig(const InspectorHighlightConfig& highlightConfig) { m_highlightConfig = adoptPtr(new InspectorHighlightConfig(highlightConfig)); }
+ InspectorHighlightConfig& highlightConfig() { return *m_highlightConfig.get(); }
DECLARE_VIRTUAL_TRACE();
private:
- explicit LayoutEditor(InspectorCSSAgent*);
+ LayoutEditor(InspectorCSSAgent*, InspectorDOMAgent*);
RefPtrWillBeRawPtr<CSSPrimitiveValue> getPropertyCSSValue(CSSPropertyID) const;
PassRefPtr<JSONObject> createValueDescription(const String&) const;
void appendAnchorFor(JSONArray*, const String&, const String&, const FloatPoint&, const FloatPoint&) const;
@@ -45,13 +49,17 @@ private:
void overlayStartedPropertyChange(const String&) override;
void overlayPropertyChanged(float) override;
void overlayEndedPropertyChange() override;
+ void clearSelection(bool) override;
RefPtrWillBeMember<Element> m_element;
RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent;
+ RawPtrWillBeMember<InspectorDOMAgent> m_domAgent;
CSSPropertyID m_changingProperty;
float m_propertyInitialValue;
float m_factor;
CSSPrimitiveValue::UnitType m_valueUnitType;
+ bool m_isDirty;
+ OwnPtr<InspectorHighlightConfig> m_highlightConfig;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698