Delegates protest the Trans Pacific Partnership trade agreement during the first session at the Democratic National Convention in July. (Carlos Barria/Reuters)

It's pretty clear that dramatic subjects such as terrorism and illegal immigration are having an effect on the 2016 presidential campaign.

But perhaps a less heralded undercurrent in this year's race is free trade.

Both candidates have taken a stance against unbridled globalization, to varied degrees. Republican Donald Trump has upended his party's standard rhetoric by coming out strongly against international trade agreements, while Democrat Hillary Clinton has more subtly distanced herself from the 12-nation Trans-Pacific Partnership, a deal intended to be President Obama's free-trade legacy.

But exactly what voters think of globalization and free trade isn't quite so clear. Despite the negative rhetoric during the campaign, a new poll from the Chicago Council on Global Affairs appears to show an American public with some surprisingly positive attitudes toward globalization.

Remarkably, 65 percent of Americans said globalization is mostly good for the United States, while 34 percent said it is mostly bad.

More remarkable still, those positive feelings could be found across the political spectrum: 74 percent of Democrats said globalization is mostly good, with even the core supporters of Sen. Bernie Sanders (Vt.) — Clinton's rival in the Democratic primary contest — mostly positive about globalization (75 percent said it is positive for the United States, compared with 76 percent of core Clinton supporters). On the Republican side, 59 percent said globalization is mostly good, although that number dropped to 50 percent for core Trump supporters. Meanwhile, 61 percent of independents said globalization is positive.

In almost 20 years of Chicago Council polling on free trade, these numbers were the highest they had ever been for Democrats. In 1998, when the poll began, just 55 percent of Democrats had a positive view of globalization. For Republicans and independents, positive views of globalization have surged since six years ago, when they dropped to 51 percent and 52 percent, respectively.

Looking more generally over a history of attitudes to free trade and globalization, the Chicago Council's data seems to suggest that in the past 10 years, Democrats have become more positive about free trade while Republicans have become more negative. (Independents have largely stayed the same.)

But despite these shifts, attitudes seem to be more positive than the 2016 election-season rhetoric might lead you to believe. Even the controversial TPP is largely supported, with 60 percent of Americans saying they approve of it — a slight dip from last year, when 64 percent said they supported it. It also had a fair amount of cross-party support — 71 percent of Democrats said they support it, compared with 58 percent of Republicans and 52 percent of independents — although only 47 percent of Trump supporters said they favored the agreement.

When asked about specifics of international trade, American voters seemed to think it was good for them personally. Seventy percent said globalization made things better for them as consumers (75 percent for Democrats, 66 percent for Republicans and 69 percent for independents), while 64 percent said their standard of living improved because of globalization (72 percent of Democrats, and 60 percent of both Republicans and independents). More generally, 59 percent of Americans said international trade was good for the U.S. economy and 57 percent said it was good for U.S. companies.

The Chicago Council also noted that partisanship wasn't the only factor that influenced support for free trade. In general, if an American was younger, better educated, had a higher income and/or was nonwhite, they were more likely to have a positive view of free trade's effect on the United States and their own lives.

Americans were less positive about international trade's effect on jobs. Just 40 percent said international trade was good at creating jobs in the United States, while 35 percent said it was good for American workers' job security. In both instances, Republicans were notably less positive than Democrats and independents, although other demographic factors made little difference.

More than 2,000 adults were interviewed between June 10 and June 27 for the Chicago Council poll, with margins of error of 2.2 to 3.5 points, depending on the question, and higher margins of error for partisan subgroups. The Chicago Council has released a number of reports on the results of this survey recently, including in-depth looks at the views of supporters of both Clinton and Trump.

More on WorldViews

42 percent of Americans say they are less safe from terrorism than before 9/11

Trump supporters see the world very differently than other Republicans

How Clinton supporters view the world differently than Sanders supporters

Most Americans support U.S. military action in Syria — but only want a limited amount