I'm afraid the examples you have provided are incorrect, but here is what it means in Shrek: for someone to be "in someone else's face" means for that person to be undesirably close to someone else for any reason ranging from the annoying to the antagonistic. You often see this in a situation where someone is verbally harassing or/and interrogating another person. They get really close to them because they really want an answer, to be noticed, or for the other person to know they are wrong.
There are also situations where you know two people are about to get into a fight because they get incredibly close to one another because they are trying to intimidate the other person and show that they are not going to back down from the fight. In the Southern U.S., we call this "bowing up" (that's probably a slang expression), but you may often hear one of the participants say something like, "get out of my face!" So, I think that antagonistic meaning of the expression is also valid.
So, those are some of the meanings of your expression. I know some of those do not apply to the scene in Shrek, but I wanted to be thorough because it is such a slang expression.