The boundaries of what defines a derivative work is a bit fuzzy, and how much you need to take from a work in order to create new work that would be classified as derivative is open to debate/common law.
Suppose that HP holds a patent related to the keyboard layout in webOS, of which the source code of their implementation is released under the Apache licence. If Apple took that code and mashed it into iOS, it would (I believe) clearly be a derivative work and protected by the licence. But suppose they didn't look at the code (or any material released by HP under the Apache licence), they just saw a picture/read a description of it/used it on a device and implemented it based on those experiences; in this case I think it's difficult to say that Apple's implementation is a derivative (and therefore protected) because of the lack of connection to the Apache-licensed work (except that their code produces the same runtime effect that HP's does, which I don't believe is necessarily covered by the Apache licence as they are separable from the original work).
Suppose that HP holds a patent related to the keyboard layout in webOS, of which the source code of their implementation is released under the Apache licence. If Apple took that code and mashed it into iOS, it would (I believe) clearly be a derivative work and protected by the licence. But suppose they didn't look at the code (or any material released by HP under the Apache licence), they just saw a picture/read a description of it/used it on a device and implemented it based on those experiences; in this case I think it's difficult to say that Apple's implementation is a derivative (and therefore protected) because of the lack of connection to the Apache-licensed work (except that their code produces the same runtime effect that HP's does, which I don't believe is necessarily covered by the Apache licence as they are separable from the original work).