Under investigation in this paper is a higher-order nonlinear Schrodinger equation which can describe the propagation of ultrashort pulse in the inhomogeneous optical fiber. Lax pair and conservation laws are constructed from which the integrability of the equation can be verified. Nonautonomous breathers and rogue waves for the equation are derived based on the Darboux transformation (DT) and generalized DT, respectively. Influence of the group-velocity dispersion, third- and forth-order dispersion and gain or loss coefficient on the propagation and interaction of the nonautonomous breathers and rogue waves, is also discussed specifically. There exist two types of nonautonomous breathers. Expressions of the quasi-periods for the two types of nonautonomous breathers are given and the effects of coefficients on the quasi-periods are also discussed. Gain or loss coefficient affects the background for the nonautonomous breather, while third-order dispersion has an influence on the trajectory of the nonautonomous breather. Group-velocity dispersion affects the range of the nonautonomous rogue wave. In addition, group-velocity dispersion also produces a skew angle and the skew angle rotates in the clockwise direction with the increase of group-velocity dispersion. When forth-order dispersion coefficient is taken as a linear function of distance, the structure of rogue wave pair can be formed. The separation and relative locations for the two constituents of rogue wave pair are affected by the coefficients of the linear function. (C) 2016 Elsevier Ltd. All rights reserved.